summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-04-07 18:00:13 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-04-07 18:00:13 +0000
commit1a348ede4934a1ba78f337ee1dffe11a699f4bef (patch)
tree883d4c1ae282fb67e1720f81c20f564499298ff4
parent7cb0d361f1b4260b47ab1da99224332947320553 (diff)
parenta6cd6538e4271ea08dc86803e8b7e8c8f235960b (diff)
downloadhercules-1a348ede4934a1ba78f337ee1dffe11a699f4bef.tar.gz
hercules-1a348ede4934a1ba78f337ee1dffe11a699f4bef.tar.bz2
hercules-1a348ede4934a1ba78f337ee1dffe11a699f4bef.tar.xz
hercules-1a348ede4934a1ba78f337ee1dffe11a699f4bef.zip
branch for major stability breakage
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@1440 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-SVN.txt453
-rw-r--r--Changelog.txt1555
-rw-r--r--Dev/GDB_reports.txt42
-rw-r--r--Dev/Ideas_Suggestions.txt92
-rw-r--r--Dev/TODO.txt204
-rw-r--r--Dev/TODO_MOB_AI.txt4
-rw-r--r--Dev/bugs.txt409
-rw-r--r--Dev/quotes.txt23
-rw-r--r--Dev/scripting.txt40
-rw-r--r--Makefile66
-rw-r--r--README.win3232
-rw-r--r--Readme-jap3769
-rw-r--r--SVN-SUPPORT15
-rw-r--r--conf-tmpl/atcommand_athena.conf100
-rw-r--r--conf-tmpl/atcommand_athena.conf.orig569
-rw-r--r--conf-tmpl/battle_athena.conf216
-rw-r--r--conf-tmpl/char_athena.conf24
-rw-r--r--conf-tmpl/charcommand_athena.conf17
-rw-r--r--conf-tmpl/help.txt4
-rwxr-xr-x[-rw-r--r--]conf-tmpl/import/charcommand_conf.txt (renamed from log/atcommandlog.log)0
-rwxr-xr-x[-rw-r--r--]conf-tmpl/import/log_conf.txt (renamed from log/branchlog.log)0
-rw-r--r--conf-tmpl/inter_athena.conf17
-rw-r--r--conf-tmpl/ladmin_athena.conf3
-rw-r--r--conf-tmpl/log_athena.conf76
-rw-r--r--conf-tmpl/login_athena.conf41
-rw-r--r--conf-tmpl/map_athena.conf1129
-rw-r--r--conf-tmpl/mapflag/gvg.txt6
-rw-r--r--conf-tmpl/mapflag/indoors.txt8
-rw-r--r--conf-tmpl/mapflag/jail.txt4
-rw-r--r--conf-tmpl/mapflag/nobranch.txt12
-rw-r--r--conf-tmpl/mapflag/noicewall.txt10
-rw-r--r--conf-tmpl/mapflag/nomemo.txt47
-rw-r--r--conf-tmpl/mapflag/nopenalty.txt4
-rw-r--r--conf-tmpl/mapflag/nopvp.txt3
-rw-r--r--conf-tmpl/mapflag/noreturn.txt198
-rw-r--r--conf-tmpl/mapflag/nosave.txt6
-rw-r--r--conf-tmpl/mapflag/noteleport.txt22
-rw-r--r--conf-tmpl/mapflag/water.txt54
-rw-r--r--conf-tmpl/mapflag/water_height.txt5
-rw-r--r--conf-tmpl/maps_athena.conf628
-rw-r--r--conf-tmpl/msg_athena.conf50
-rw-r--r--conf-tmpl/packet_athena.conf55
-rw-r--r--conf-tmpl/readme.txt33
-rw-r--r--conf-tmpl/script_athena.conf52
-rw-r--r--conf-tmpl/water.txt54
-rw-r--r--conf-tmpl/water_height.txt68
-rw-r--r--db/Changelog.txt254
-rw-r--r--db/const.txt91
-rw-r--r--db/create_arrow_db.txt35
-rw-r--r--db/exp.txt60
-rw-r--r--db/item_avail.txt7
-rw-r--r--db/item_bluebox.txt2
-rw-r--r--db/item_cardalbum.txt205
-rw-r--r--db/item_db.txt1551
-rw-r--r--db/item_db2.txt6
-rw-r--r--db/item_findingore.txt24
-rw-r--r--db/item_noequip.txt7
-rw-r--r--db/item_violetbox.txt2
-rw-r--r--db/mob_avail.txt4
-rw-r--r--db/mob_branch.txt73
-rw-r--r--db/mob_db.txt1087
-rw-r--r--db/mob_db2.txt186
-rw-r--r--db/mob_race2_db.txt6
-rw-r--r--db/mob_skill_db.txt2
-rw-r--r--db/packet_db.txt315
-rw-r--r--db/produce_db.txt2
-rw-r--r--db/skill_cast_db.txt108
-rw-r--r--db/skill_castnodex_db.txt29
-rw-r--r--db/skill_db.txt105
-rw-r--r--db/skill_nocast_db.txt15
-rw-r--r--db/skill_require_db.txt49
-rw-r--r--db/skill_tree.txt122
-rw-r--r--db/skill_unit_db.txt80
-rw-r--r--doc/item_bonus.txt283
-rw-r--r--eAthena.sln58
-rw-r--r--log/char.log544
-rw-r--r--log/char.txt0
-rw-r--r--log/droplog.log0
-rw-r--r--log/gm.txt0
-rw-r--r--log/inter.txt0
-rw-r--r--log/login.log2908
-rw-r--r--log/mvplog.log0
-rw-r--r--log/presentlog.log0
-rw-r--r--log/producelog.log0
-rw-r--r--log/refinelog.log0
-rw-r--r--log/tradelog.log0
-rw-r--r--log/vendlog.log0
-rw-r--r--npc/Changelog.txt209
-rw-r--r--npc/cities/alberta.txt21
-rw-r--r--npc/cities/aldebaran.txt9
-rw-r--r--npc/cities/comodo.txt27
-rw-r--r--npc/cities/geffen.txt21
-rw-r--r--npc/cities/morocc.txt3
-rw-r--r--npc/cities/payon.txt485
-rw-r--r--npc/cities/prontera.txt9
-rw-r--r--npc/cities/umbala.txt23
-rw-r--r--npc/cities/valkyrie.txt385
-rw-r--r--npc/cities/yuno.txt30
-rw-r--r--npc/events/custom/draculax.txt2
-rw-r--r--npc/events/custom/uneasy_cemetery.txt8
-rw-r--r--npc/events/easter.txt3
-rw-r--r--npc/events/twintowers.txt2
-rw-r--r--npc/events/valentinesday.txt2
-rw-r--r--npc/events/xmas.txt24
-rw-r--r--npc/guides/guides_yun.txt21
-rw-r--r--npc/guild/aldeg/aldeg_ev_agit.txt10
-rw-r--r--npc/guild/ev_agit_event.txt60
-rw-r--r--npc/guild/gefg/gefg_ev_agit.txt10
-rw-r--r--npc/guild/gefg/gefg_flags.txt15
-rw-r--r--npc/guild/gefg/gefg_kafras.txt15
-rw-r--r--npc/guild/gldfunc_dunsw.txt11
-rw-r--r--npc/guild/gldfunc_manager.txt13
-rw-r--r--npc/guild/gldfunc_treasure.txt32
-rw-r--r--npc/guild/nguild/nguild_ev_agit.txt8
-rw-r--r--npc/guild/payg/payg_ev_agit.txt10
-rw-r--r--npc/guild/payg/payg_flags.txt15
-rw-r--r--npc/guild/payg/payg_guardians.txt2
-rw-r--r--npc/guild/payg/payg_managers.txt2
-rw-r--r--npc/guild/prtg/prtg_ev_agit.txt10
-rw-r--r--npc/guild/prtg/prtg_flags.txt15
-rw-r--r--npc/guild/prtg/prtg_kafras.txt2
-rw-r--r--npc/jobs/1-1/acolyte.txt9
-rw-r--r--npc/jobs/1-1/archer.txt9
-rw-r--r--npc/jobs/1-1/mage.txt15
-rw-r--r--npc/jobs/1-1/merchant.txt21
-rw-r--r--npc/jobs/1-1/swordsman.txt12
-rw-r--r--npc/jobs/1-1/thief.txt15
-rw-r--r--npc/jobs/2-1-1/AssassinCross.txt131
-rw-r--r--npc/jobs/2-1-1/HighPriest.txt101
-rw-r--r--npc/jobs/2-1-1/HighWizard.txt101
-rw-r--r--npc/jobs/2-1-1/LordKnight.txt120
-rw-r--r--npc/jobs/2-1-1/Sniper.txt117
-rw-r--r--npc/jobs/2-1-1/WhiteSmith.txt121
-rw-r--r--npc/jobs/2-1/assassin.txt55
-rw-r--r--npc/jobs/2-1/blacksmith.txt9
-rw-r--r--npc/jobs/2-1/hunter.txt19
-rw-r--r--npc/jobs/2-1/knight.txt42
-rw-r--r--npc/jobs/2-1/priest.txt68
-rw-r--r--npc/jobs/2-1/wizard.txt35
-rw-r--r--npc/jobs/2-2-1/Champion.txt102
-rw-r--r--npc/jobs/2-2-1/Clown.txt123
-rw-r--r--npc/jobs/2-2-1/Creator.txt119
-rw-r--r--npc/jobs/2-2-1/Gypsy.txt123
-rw-r--r--npc/jobs/2-2-1/Paladin.txt120
-rw-r--r--npc/jobs/2-2-1/Professor.txt101
-rw-r--r--npc/jobs/2-2-1/Stalker.txt131
-rw-r--r--npc/jobs/2-2/alchemist.txt46
-rw-r--r--npc/jobs/2-2/crusader.txt13
-rw-r--r--npc/jobs/2-2/monk.txt1920
-rw-r--r--npc/jobs/2-2/rogue.txt57
-rw-r--r--npc/jobs/custom/jobchange.txt118
-rw-r--r--npc/jobs/novice/novice.txt14
-rw-r--r--npc/kafras/functions_kafras.txt10
-rw-r--r--npc/kafras/kafras_alde.txt4
-rw-r--r--npc/merchants/alchemist.txt3
-rw-r--r--npc/merchants/clothes_dyer.txt18
-rw-r--r--npc/merchants/dye_maker.txt3
-rw-r--r--npc/merchants/grandpa_pharmacist.txt3
-rw-r--r--npc/merchants/refine.txt23
-rw-r--r--npc/merchants/scrolls_arrows.txt34
-rw-r--r--npc/merchants/shops.txt44
-rw-r--r--npc/mobs/dungeons/anthell.txt180
-rw-r--r--npc/mobs/dungeons/geftower.txt10
-rw-r--r--npc/mobs/dungeons/glastheim.txt169
-rw-r--r--npc/mobs/dungeons/guilddun.txt4
-rw-r--r--npc/mobs/dungeons/moc_pyramid.txt4
-rw-r--r--npc/mobs/dungeons/moc_sphinx.txt2
-rw-r--r--npc/mobs/dungeons/orcdun.txt22
-rw-r--r--npc/mobs/dungeons/payoncave.txt6
-rw-r--r--npc/mobs/dungeons/pront_maze.txt92
-rw-r--r--npc/mobs/dungeons/pront_sewers.txt2
-rw-r--r--npc/mobs/dungeons/sunkenship.txt8
-rw-r--r--npc/mobs/dungeons/turtleisland.txt6
-rw-r--r--npc/mobs/dungeons/umbaladun.txt14
-rw-r--r--npc/mobs/fields/ayothaya.txt2
-rw-r--r--npc/mobs/fields/comodo.txt6
-rw-r--r--npc/mobs/fields/geffen.txt78
-rw-r--r--npc/mobs/fields/mjolnir.txt6
-rw-r--r--npc/mobs/fields/morocc.txt138
-rw-r--r--npc/mobs/fields/niflheim.txt58
-rw-r--r--npc/mobs/fields/payon.txt3
-rw-r--r--npc/mobs/fields/umbala.txt26
-rw-r--r--npc/mobs/fields/yuno.txt170
-rw-r--r--npc/mobs/pvp.txt10
-rw-r--r--npc/npcs_athena.conf539
-rw-r--r--npc/other/Global_Functions.txt8
-rw-r--r--npc/other/bank.txt2
-rw-r--r--npc/other/devnpc.txt7
-rw-r--r--npc/other/eliza.txt702
-rw-r--r--npc/other/heal_payment.txt4
-rw-r--r--npc/other/kafra_bank.txt58
-rw-r--r--npc/other/mc_cameri/heal.txt30
-rw-r--r--npc/other/mc_cameri/jobchanger.txt18
-rw-r--r--npc/other/mc_cameri/warper.txt418
-rw-r--r--npc/other/msg_boards.txt45
-rw-r--r--npc/other/platinum_skills.txt26
-rw-r--r--npc/other/pvp.txt18
-rw-r--r--npc/other/wedding.txt58
-rw-r--r--npc/quests/all_quest.txt2
-rw-r--r--npc/quests/bunnyband.txt3
-rw-r--r--npc/quests/custom/event_32_new_hats.txt2
-rw-r--r--npc/quests/custom/event_6_new_hats.txt732
-rw-r--r--npc/quests/custom/kahohorn.txt1
-rw-r--r--npc/quests/custom/new_hats.txt23
-rw-r--r--npc/quests/juice_maker.txt9
-rw-r--r--npc/quests/monstertamers.txt9
-rw-r--r--npc/quests/mrsmile.txt3
-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.txt68
-rw-r--r--npc/quests/newgears/burning_blood_bandana.txt65
-rw-r--r--npc/quests/newgears/cat_hairband.txt74
-rw-r--r--npc/quests/newgears/fox_mask.txt57
-rw-r--r--npc/quests/newgears/hat_seller.txt143
-rw-r--r--npc/quests/newgears/indian_headband.txt57
-rw-r--r--npc/quests/newgears/mask_of_alarm.txt53
-rw-r--r--npc/quests/newgears/mushroom_hairband.txt59
-rw-r--r--npc/quests/newgears/neris.txt128
-rw-r--r--npc/quests/newgears/old_blacksmith.txt99
-rw-r--r--npc/quests/newgears/posture_fix_hat.txt69
-rw-r--r--npc/quests/newgears/sea_otter_hat.txt54
-rw-r--r--npc/quests/newgears/traveler.txt132
-rw-r--r--npc/quests/newgears/tulip_hairpin.txt65
-rw-r--r--npc/quests/quests_alberta.txt10
-rw-r--r--npc/quests/quests_comodo.txt6
-rw-r--r--npc/quests/quests_payon.txt3
-rw-r--r--npc/quests/quests_prontera.txt3
-rw-r--r--npc/quests/quests_yuno.txt3
-rw-r--r--npc/quests/skills/acolyte_skills.txt3
-rw-r--r--npc/quests/skills/archer_skills.txt6
-rw-r--r--npc/quests/skills/mage_skills.txt3
-rw-r--r--npc/quests/skills/merchant_skills.txt12
-rw-r--r--npc/quests/skills/novice_skills.txt9
-rw-r--r--npc/quests/skills/swordsman_skills.txt18
-rw-r--r--npc/quests/skills/thief_skills.txt6
-rw-r--r--npc/sample/PCLoginEvent.txt22
-rw-r--r--npc/sample/bank_test.txt45
-rw-r--r--npc/sample/npc_extend_shop.txt126
-rw-r--r--npc/sample/npc_test_npctimer2.txt16
-rw-r--r--npc/sample/npc_test_str.txt24
-rw-r--r--npc/warps/cities/aldebaran.txt2
-rw-r--r--npc/warps/cities/amatsu.txt9
-rw-r--r--npc/warps/cities/louyang.txt9
-rw-r--r--npc/warps/cities/payon.txt4
-rw-r--r--npc/warps/cities/yuno.txt2
-rw-r--r--npc/warps/dungeons/ant_hell.txt2
-rw-r--r--npc/warps/einbroch.txt111
-rw-r--r--npc/warps/fields/amatsu_fild.txt11
-rw-r--r--npc/warps/fields/yuno_fild.txt48
-rw-r--r--object_del.bat24
-rw-r--r--readme/npcfeatures.html5
-rw-r--r--save-tmpl/bank.txt0
-rw-r--r--sql-files/database.sql2180
-rw-r--r--sql-files/db_tables.sql8
-rw-r--r--sql-files/item_db.sql1835
-rw-r--r--sql-files/logs.sql15
-rw-r--r--sql-files/mail.sql2
-rw-r--r--sql-files/main-new.sql560
-rw-r--r--sql-files/main.sql501
-rw-r--r--sql-files/mob_db.sql687
-rw-r--r--sql-files/upgrade_1.0.0.sql1
-rw-r--r--sql-files/upgrade_svn1125.sql12
-rw-r--r--sql-files/upgrade_svn1315.sql3
-rw-r--r--src/char/GNUmakefile17
-rw-r--r--src/char/Makefile6
-rw-r--r--src/char/char.c529
-rw-r--r--src/char/char.h3
-rw-r--r--src/char/int_guild.c118
-rw-r--r--src/char/int_guild.h1
-rw-r--r--src/char/int_party.c148
-rw-r--r--src/char/int_party.h1
-rw-r--r--src/char/int_pet.c47
-rw-r--r--src/char/int_pet.h1
-rw-r--r--src/char/int_storage.c168
-rw-r--r--src/char/int_storage.h1
-rw-r--r--src/char/inter.c65
-rw-r--r--src/char/inter.h1
-rw-r--r--src/char_sql/GNUmakefile20
-rw-r--r--src/char_sql/Makefile12
-rw-r--r--src/char_sql/char.c4177
-rw-r--r--src/char_sql/char.h11
-rw-r--r--src/char_sql/int_guild.c665
-rw-r--r--src/char_sql/int_guild.h1
-rw-r--r--src/char_sql/int_party.c245
-rw-r--r--src/char_sql/int_party.h1
-rw-r--r--src/char_sql/int_pet.c72
-rw-r--r--src/char_sql/int_pet.h1
-rw-r--r--src/char_sql/int_storage.c195
-rw-r--r--src/char_sql/int_storage.h1
-rw-r--r--src/char_sql/inter.c139
-rw-r--r--src/char_sql/inter.h8
-rw-r--r--src/char_sql/itemdb.c18
-rw-r--r--src/char_sql/itemdb.h2
-rw-r--r--src/char_sql/make.sh3
-rw-r--r--src/common/GNUmakefile14
-rw-r--r--src/common/Makefile33
-rw-r--r--src/common/buffer.h18
-rw-r--r--src/common/core.c250
-rw-r--r--src/common/core.h11
-rw-r--r--src/common/db.c203
-rw-r--r--src/common/db.h25
-rw-r--r--src/common/dll.h25
-rw-r--r--src/common/grfio.c251
-rw-r--r--src/common/grfio.h3
-rw-r--r--src/common/lock.c44
-rw-r--r--src/common/malloc.c510
-rw-r--r--src/common/malloc.h66
-rw-r--r--src/common/mmo.h78
-rw-r--r--src/common/nullpo.h11
-rw-r--r--src/common/showmsg.c125
-rw-r--r--src/common/showmsg.h93
-rw-r--r--src/common/socket.c672
-rw-r--r--src/common/socket.h32
-rw-r--r--src/common/strlib.c (renamed from src/char_sql/strlib.c)45
-rw-r--r--src/common/strlib.h (renamed from src/char_sql/strlib.h)9
-rw-r--r--src/common/timer.c290
-rw-r--r--src/common/timer.h12
-rw-r--r--src/common/utils.c16
-rw-r--r--src/common/utils.h18
-rw-r--r--src/ladmin/GNUmakefile14
-rw-r--r--src/ladmin/Makefile6
-rw-r--r--src/ladmin/ladmin.c70
-rw-r--r--src/ladmin/md5calc.c6
-rw-r--r--src/lib/zconf_win32.h279
-rw-r--r--src/lib/zlib_win32.h893
-rw-r--r--src/login/GNUmakefile13
-rw-r--r--src/login/Makefile7
-rw-r--r--src/login/login.c549
-rw-r--r--src/login/login.h9
-rw-r--r--src/login/md5calc.c6
-rw-r--r--src/login_sql/GNUmakefile18
-rw-r--r--src/login_sql/Makefile14
-rw-r--r--src/login_sql/char_int.c512
-rw-r--r--src/login_sql/char_int.h2
-rw-r--r--src/login_sql/login.c1720
-rw-r--r--src/login_sql/login.h124
-rw-r--r--src/login_sql/login_int.c376
-rw-r--r--src/login_sql/login_int.h1
-rw-r--r--src/login_sql/md5calc.c6
-rw-r--r--src/login_sql/strlib.c58
-rw-r--r--src/login_sql/strlib.h9
-rw-r--r--src/map/GNUmakefile75
-rw-r--r--src/map/Makefile103
-rw-r--r--src/map/Makefile.win3215
-rw-r--r--src/map/atcommand.c4043
-rw-r--r--src/map/atcommand.h72
-rw-r--r--src/map/battle.c2751
-rw-r--r--src/map/battle.h97
-rw-r--r--src/map/charcommand.c626
-rw-r--r--src/map/charcommand.h9
-rw-r--r--src/map/chat.c16
-rw-r--r--src/map/chrif.c259
-rw-r--r--src/map/chrif.h8
-rw-r--r--src/map/clif.c3552
-rw-r--r--src/map/clif.h33
-rw-r--r--src/map/guild.c313
-rw-r--r--src/map/guild.h4
-rw-r--r--src/map/intif.c169
-rw-r--r--src/map/intif.h6
-rw-r--r--src/map/itemdb.c339
-rw-r--r--src/map/itemdb.h3
-rw-r--r--src/map/log.c397
-rw-r--r--src/map/log.h13
-rw-r--r--src/map/mail.c259
-rw-r--r--src/map/map.c2012
-rw-r--r--src/map/map.h196
-rw-r--r--src/map/mob.c1798
-rw-r--r--src/map/mob.h32
-rw-r--r--src/map/npc.c1028
-rw-r--r--src/map/npc.h16
-rw-r--r--src/map/npc_chat.c502
-rw-r--r--src/map/party.c56
-rw-r--r--src/map/party.h2
-rw-r--r--src/map/path.c86
-rw-r--r--src/map/pc.c3294
-rw-r--r--src/map/pc.h51
-rw-r--r--src/map/pet.c305
-rw-r--r--src/map/pet.h8
-rw-r--r--src/map/script.c1506
-rw-r--r--src/map/script.h24
-rw-r--r--src/map/skill.c8690
-rw-r--r--src/map/skill.h270
-rw-r--r--src/map/status.c5159
-rw-r--r--src/map/status.h271
-rw-r--r--src/map/storage.c207
-rw-r--r--src/map/storage.h2
-rw-r--r--src/map/trade.c395
-rw-r--r--src/map/vending.c21
-rw-r--r--src/tool/Makefile (renamed from tool/Makefile)0
-rw-r--r--src/tool/adduser.c (renamed from tool/adduser.c)0
-rw-r--r--src/tool/backup (renamed from tool/backup)0
-rw-r--r--src/tool/cgi/addaccount.cgi (renamed from tool/cgi/addaccount.cgi)0
-rw-r--r--src/tool/checkversion (renamed from tool/checkversion)0
-rw-r--r--src/tool/convert.c (renamed from tool/convert.c)0
-rw-r--r--src/tool/getlogincount (renamed from tool/getlogincount)0
-rw-r--r--src/tool/ladmin (renamed from tool/ladmin)0
-rw-r--r--src/tool/mapcheck.sh (renamed from tool/mapcheck.sh)0
-rw-r--r--src/tool/mapchecker.sh (renamed from tool/mapchecker.sh)0
-rw-r--r--src/txt-converter/char/GNUmakefile13
-rw-r--r--src/txt-converter/char/Makefile8
-rw-r--r--src/txt-converter/char/char-converter.c177
-rw-r--r--src/txt-converter/char/char.h6
-rw-r--r--src/txt-converter/char/strlib.c66
-rw-r--r--src/txt-converter/char/strlib.h9
-rw-r--r--src/txt-converter/common/mmo.h20
-rw-r--r--src/txt-converter/login/GNUmakefile11
-rw-r--r--src/txt-converter/login/Makefile9
-rw-r--r--src/txt-converter/login/login-converter.c12
-rw-r--r--src/webserver/Changelog.txt3
-rw-r--r--src/webserver/Makefile48
-rw-r--r--src/webserver/Makefile.win35
-rw-r--r--src/webserver/WEBSER~1.layout24
-rw-r--r--src/webserver/Webserver.dev97
-rw-r--r--src/webserver/Webserver.layout38
-rw-r--r--src/webserver/conf/webserver-athena.conf36
-rw-r--r--src/webserver/doc/API.txt (renamed from webserver/doc/API.txt)0
-rw-r--r--src/webserver/doc/README (renamed from webserver/doc/README)0
-rw-r--r--src/webserver/generate.c (renamed from webserver/generate.c)0
-rw-r--r--src/webserver/htmlstyle.c (renamed from webserver/htmlstyle.c)0
-rw-r--r--src/webserver/logs.c (renamed from webserver/logs.c)0
-rw-r--r--src/webserver/main.c208
-rw-r--r--src/webserver/pages/about.c (renamed from webserver/pages/about.c)0
-rw-r--r--src/webserver/pages/notdone.c (renamed from webserver/pages/notdone.c)0
-rw-r--r--src/webserver/pages/sample.c (renamed from webserver/pages/sample.c)0
-rw-r--r--src/webserver/parse.c (renamed from webserver/parse.c)0
-rw-r--r--src/webserver/webserver.c136
-rw-r--r--src/webserver/webserver.h21
-rw-r--r--src/zlib/FAQ337
-rw-r--r--src/zlib/README126
-rw-r--r--src/zlib/adler32.c74
-rw-r--r--src/zlib/compress.c79
-rw-r--r--src/zlib/crc32.c333
-rw-r--r--src/zlib/crc32.h441
-rw-r--r--src/zlib/deflate.c1502
-rw-r--r--src/zlib/deflate.h325
-rw-r--r--src/zlib/inffast.c305
-rw-r--r--src/zlib/inffast.h11
-rw-r--r--src/zlib/inffixed.h94
-rw-r--r--src/zlib/inflate.c1274
-rw-r--r--src/zlib/inflate.h117
-rw-r--r--src/zlib/inftrees.c328
-rw-r--r--src/zlib/inftrees.h55
-rw-r--r--src/zlib/trees.c1215
-rw-r--r--src/zlib/trees.h128
-rw-r--r--src/zlib/zconf.h326
-rw-r--r--src/zlib/zlib.h1200
-rw-r--r--src/zlib/zutil.c319
-rw-r--r--src/zlib/zutil.h263
-rw-r--r--vcproj/char-server_sql.vcproj183
-rw-r--r--vcproj/char-server_txt.vcproj182
-rw-r--r--vcproj/login-server_sql.vcproj170
-rw-r--r--vcproj/login-server_txt.vcproj169
-rw-r--r--vcproj/map-server_sql.vcproj382
-rw-r--r--vcproj/map-server_txt.vcproj381
-rw-r--r--webserver/Makefile26
-rw-r--r--webserver/main.c142
456 files changed, 65455 insertions, 34820 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
new file mode 100644
index 000000000..3c1ce0665
--- /dev/null
+++ b/Changelog-SVN.txt
@@ -0,0 +1,453 @@
+
+Date Added
+
+04/07
+ * 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).
diff --git a/Changelog.txt b/Changelog.txt
index b141aa5d0..cec3bcfd8 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,51 +1,1543 @@
Date Added
-12/18
- * Lord Knight's Concentration can now be used with any weapon [Aria]
- * Fixed import command in inter_athena.conf file [Ajarn]
- * Changed few God-items to fit kRO 12/7/04 Patch [Aria]
- * Readded my own npc [Aria]
- * Fixed SQL char creation, it now follows MySQL standards and uses mysql_last_insert_id [Ajarn]
+-------- Read Changelog-SVN.txt for the newer SVN entries--------
+
+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;"
-12/10
- * Fixed parse's for login-server, it actually fails if packet len isn't long enough [Wizputer]
- * Edit of parses in char-server, -UNTESTED- [Wizputer]
+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/09
- * char-server changes -UNTESTED- [Wizputer]
- * new method for getting GMs [Wizputer]
- * Added unique key for Char names [Wizputer]
+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/08
- * Started optimizing char-server [Wizputer]
+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/07
- * Optimized login-server some more [Wizputer]
- * Added new tables, data-types not finished [Wizputer]
+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/05
- * Added src/webserver, eAthena Web Server (Second Edition), not finished [MC Cameri]
- * some cleanup of char_sql [MouseJstr]
- * added verbose mysql debugging to char_sql [MouseJstr]
+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/02
- * Fixed int state in SQL login.c [Wizputer]
- * Moved init of send_users_tologin timer to when char connects to login [Wizputer]
+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
- * "Beautified" sql login-server [Wizputer]
+ * 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
- * Updated packet_ver_flag's default value, thanks to iscandium
- * Updated Finger Offensive, thanks to orn
- * Added warning if motd.txt was not found
+ * 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.
- * Updated Slow Poison, modified checks for skill_unit_onplace abit. [celest]
11/26
* Fixed Abrakadabra (2 minor bugs of consumed items - they were ignored if placed in 0 pos) [Lupus]
@@ -591,9 +2083,6 @@ Date Added
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.
-
- src/txt-converter/login/login-converter.c src/txt-converter/char/char-converter.c src/login_sql/login.c src/common/socket.c src/common/socket.h src/char_sql/char.c src/char_sql/int_guild.c src/char_sql/inter.c src/map/atcommand.c src/map/map.c src/map/mail.c src/char/char.c conf-tmpl/map_athena.conf conf-tmpl/char_athena.conf Changelog.txt
-
10/15
* added @setbattleflag to let me reset a battle_config at runtime [MouseJstr]
* --- RC5 release
diff --git a/Dev/GDB_reports.txt b/Dev/GDB_reports.txt
new file mode 100644
index 000000000..c40a5b60d
--- /dev/null
+++ b/Dev/GDB_reports.txt
@@ -0,0 +1,42 @@
+Mainly because I'm (Ajarn) tired... and not too sure about these, or future ones even...
+I'll report GDB's here. MouseJstr, this is mainly for you.
+
+svn 770: Fixed
+-----------------
+#0 buildin_sc_start (st=0xbfbfea30) at script.c:4225
+4225 if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag)
+(gdb) print bl
+$3 = (struct block_list *) 0x0
+(gdb) where
+#0 buildin_sc_start (st=0xbfbfea30) at script.c:4225
+#1 0x08093f5d in run_func (st=0xbfbfea30) at script.c:6680
+#2 0x08094171 in run_script_main (script=0xf54a000 "\b\002", pos=502, rid=2000181, oid=110001888,
+ st=0xbfbfea30, rootscript=0x0) at script.c:6754
+#3 0x08094301 in run_script (script=0xf54a000 "\b\002", pos=502, rid=2000181, oid=110001888) at script.c:6880
+#4 0x08079115 in npc_scriptcont (sd=0x1c9d7000, id=110001888) at npc.c:923
+#5 0x08064485 in clif_parse (fd=54) at clif.c:10352
+#6 0x080e1629 in do_parsepacket () at socket.c:452
+#7 0x080e0b11 in main (argc=1, argv=0xbfbfec88) at core.c:176
+#8 0x080497e2 in _start ()
+
+----
+
+#0 0x080d8d80 in guild_member_leaved (guild_id=10030, account_id=2000740, char_id=151069, flag=0,
+ name=0x1c567037 "kloyd", mes=0x1c56700f "?") at guild.c:685
+685 sd2=guild_getavailablesd(g);
+(gdb) print g
+$5 = (struct guild *) 0x0
+(gdb) where
+#0 0x080d8d80 in guild_member_leaved (guild_id=10030, account_id=2000740, char_id=151069, flag=0,
+ name=0x1c567037 "kloyd", mes=0x1c56700f "?") at guild.c:685
+#1 0x080d53ab in intif_parse_GuildMemberLeaved (fd=0) at intif.c:918
+#2 0x080d5acc in intif_parse (fd=9) at intif.c:1123
+#3 0x080503a2 in chrif_parse (fd=9) at chrif.c:1004
+#4 0x080e1629 in do_parsepacket () at socket.c:452
+#5 0x080e0b11 in main (argc=1, argv=0xbfbfedf4) at core.c:176
+#6 0x080497e2 in _start ()
+
+-----------------
+
+That's all I got for now. I'll keep adding them as they show up (if they are simple),
+if you are away Mouse (or whoever wants to fix them). Reply to them as they are fixed.
diff --git a/Dev/Ideas_Suggestions.txt b/Dev/Ideas_Suggestions.txt
new file mode 100644
index 000000000..99471936e
--- /dev/null
+++ b/Dev/Ideas_Suggestions.txt
@@ -0,0 +1,92 @@
+//Any ideas or suggestions you guys have, put them here.
+//These don't have to be put into the source, but maybe if
+//you would like something down... someone might do it? lol
+
+----
+I (Ajarn) have loads of ideas. I might as well put them here. If no one does them it's fine, because I plan on doing them eventually if no one else does.
+
+1) Better jail system. You know how the ban system has a time column,
+ so you can set a certain amount of ban time? I think jailing should
+ have this to. This way you can unjail the character when they are
+ online or not, and jail them if they are on or not, etc. This will
+ also lock their char to the jail until the state of that column is
+ changed. One the time hits that they can come out (every min run a
+ timer maybe?) they are unjailed if online, and if they are offline,
+ the next time they log on it will check that column and unjail them
+ then.
+
+
+2) Addition to ban system. Ban works on a state system and I think ti
+ should have another state. Instead of fully banning someone you
+ should have the option of banning them from creating new chars
+ before a full ban. This way you can jail their chars, and ban
+ creation of new chars. Then they have to sit in the jail and talk
+ it out with a GM. Gets problems solved easier.
+
+
+3) Better gm level system. Basicly a gm command has group numbers
+ after it (monster:1,5,99) and those gm levels can use it. This way
+ you can have a much more flexible system. But when I think about
+ it... it takes a lot of checking to do it that way, and in the long
+ run, it would be a lot more flexible and easier to have account
+ names after each gm command. I'm not sure which one I like, or
+ which one should be used, but the "level" system is kind of hard to
+ do when you want to have sistem levels. Like, some have group A
+ commands, and some have group B commands, having nothing to do with
+ group A. There is no way to do that with the current system.
+
+ nsstrunks: The group numbers is kinda pointless, since
+ currently if you set it to a higher number, everyone above
+ that will have access.
+
+4) Private Message SPY! (@pmspy <char name>) What it does is you see
+ everything that that person private messages to another, and
+ anything another pms to them. I'm not sure if it can be already
+ done, but this would stack with @guildspy and @partyspy. So, you
+ you know thier party, and guild and you do all three spies, and you
+ follow them around you can hear everything they are saying.
+
+5) Probably a stupid idea, but @localspy. It basicly spies on all the
+ text that they can hear localy and sends it to you like "ajarn can
+ hear: ....." and "ajarn says: ..." This way you can do #4 to a
+ person, and then this, without following them, and get the same
+ effect.
+
+6) We need another file for item_db.txt to keep there your custom items
+ We already have the same thing is for mobs (mob_db2.txt)
+ Why don't we use it?
+
+7) New way to store/calculate EXP. Log of the idea:
+
+Ancyker: exp
+Ancyker: the way its stored
+Ancyker: needs changed
+Ancyker: currently it stores base level and exp
+Ancyker: this is crap
+Ancyker: it should store base level, and exp towards next level
+Ancyker: so say u just level to level 5
+Ancyker: ur level would be 5, and exp 0
+Ancyker: u kill a poring
+Ancyker: they give i beleive 10 exp
+Ancyker: so now it would be 5 level, 10 exp
+Ancyker: when u hit the marker, u gain a level
+Ancyker: thats how the exp is stored in the fsking database
+Ancyker: exp towards next level
+Ancyker: not total exp
+Ancyker: the problem with athena
+Ancyker: it doesnt follow its own damn rules
+Ancyker: it does a database one way
+Ancyker: then totally changes it when it loads it
+Ancyker: pick a damn method already
+
+I (Ajarn) agree with him. It would make things so much easier server side too.
+
+
+How to implement those ideas:
+
+[Lupus]
+1) You can make a script. Put OnTouch Area in the jail... when a banned person gets into jails, you set a global VAR.
+ Then use PCLoginEvent.txt to check TIME/DATE and free that poor person when it's OK.
+ So it's pretty easy to make with scripting. And even more... some private servers already have such scripts
+ and even make the prisoners gather some mushrums and stuff, to get them off the jail faster
+ PLUS: you should count time only when the player is in PRISON. Don't count when he's off-line 8)
diff --git a/Dev/TODO.txt b/Dev/TODO.txt
index 3d490498a..ac46bc634 100644
--- a/Dev/TODO.txt
+++ b/Dev/TODO.txt
@@ -33,28 +33,6 @@ Notes: Will work with just mob_id/name specified (ie @monster poring)
**********
-3.
-Description: Fix Ghostring Card
-
-Status: Done
-
-Assignee: MouseJstr
-
-Notes: battle_config flag to disable ghosty armor
- protecting you from mobs
-
-**********
-4.
-Description: Add nomagic mapflag/@skilloff/@skillon
-
-Status: Done
-
-Assignee: MouseJstr
-
-Notes: NONE
-
-
-**********
5.
Description: Checking help.txt (main directory, conf directory, doc directory) with atcommand.c
@@ -451,46 +429,6 @@ Assignee: Yor
Notes: NONE
**********
-37.
-Description: @killer - enables a @gm to hit a player outside of pvp
-
-Status: Done
-
-Assignee: MouseJstr
-
-Notes:
-
-**********
-38.
-Description: atcommand scripts - script @atcommands`
-
-Status: Pending
-
-Assignee: MouseJstr
-
-Notes:
-
-**********
-40.
-Description: @addwarp - create a static warp to a target location
-
-Status: Done
-
-Assignee: MouseJstr
-
-Notes:
-**********
-41.
-Description: @movenpc
- - manipulate npc's at runtime
-
-Status: Done
-
-Assignee: MouseJstr
-
-Notes: handling npc's with the same name on multiple maps
- requires thoughts
-**********
42.
Description: @uptime - how long as the server been up?
@@ -513,27 +451,6 @@ Assignee: MouseJstr
Notes
**********
-44.
-Description: Fix GTB card
-
-Status: Done
-
-Assignee: MouseJstr
-
-Notes: battle_config command that controls just how magic resistant
- you raelly are
-**********
-45.
-Description: gm @follow command
-
-Status: Done
-
-Assignee: MouseJstr
-
-Notes: follows players, including warping to them... lets you do
- a gm hide and grab a cup of coffee while watching a player
- do bad things..
-**********
47.
Description: different max aspd for players and GM's
@@ -542,15 +459,6 @@ Status: Pending
Assignee: MouseJstr
Notes:
-**********
-48.
-Description: Configurable max num castles for a guild
-
-Status: Done
-
-Assignee: MouseJstr
-
-Notes: We limit each guild to 3 castles on my server
*********
49
Description: Add @chareffect - Done [MouseJstr]
@@ -695,16 +603,120 @@ Notes: http://forums.emperium.org/viewtopic.php?t=44856
********
59.
-Description Add a function where usable item bonuses cannot stack. Eg, an item that gives you +1 str when used again does not total to +2 str.
+Description Add a function where usable item bonuses
+ cannot stack. Eg, an item that gives you +1 str when used
+ again does not total to +2 str.
Status Pending
Assignee None
Notes None
-**********
+ **********
60.
-Description Make it possible to set the selling price of an item in a shop npc. If a selling price is not present it uses the item_db and this can be selectable by battleconf
+Description Make it possible to set the selling
+ price of an item in a shop npc. If a selling price is not
+ present it uses the item_db and this can be selectable
+ by battleconf
Status Pending
Assignee None
Notes None
-********** \ No newline at end of file
+**********
+61.
+Description Make a battle_config option to cause, if
+ a user is logged in and somebody tries to log in again,
+ it logs them both out...
+Status: Pending
+Assignee None
+Notes None
+***
+62.
+Description Make a battle_config option to disable auto-muting
+Status: Pending
+***
+63.
+Description Can't unmute auto-muted people
+Status: Pending
+Assignee None
+Notes None
+***
+64.
+Description Wedding skill recall.. should only have one active at a time
+Status: Pending
+Assignee None
+Notes None
+***
+65.
+Description Wedding skill recall should work in noskill zone
+Status: Pending
+Assignee None
+Notes None
+***
+66.
+Description re-add a better packet_db implementation
+Status: Pending
+Assignee nsstrunks
+Notes None
+***
+67.
+Description the char server is a fricken dog...
+Status: Pending
+Assignee MouseJstr
+Notes None
+***
+68.
+Description add no_mob_drops as a map flag
+Status: Pending
+Assignee None
+Notes so that mobs don't drop shit in pvp arena's
+***
+69.
+Description add MvM map flag
+Status: Pending
+Assignee None
+Notes for allowing a monster on monster arena
+***
+70.
+Description Redo the gm help files
+Status Pending
+Assignee MC_Cameri
+Notes Do this after all @char commands are converted to # to
+avoid any problems.
+**
+71.
+Description Make a way for NPC's to retrieve and set battle_flags
+Status Pending
+Assignee MouseJstr
+**
+72.
+Description Add a @rates command to summerize the current rates
+Status Pending
+Assignee MouseJstr
+**
+73.
+Description Added file based logging for all item movements
+Status Pending
+Assignee
+
+All trades, storage movements, drops, purchases, creates, etc.. log it
+all to a text file.
+**
+74.
+Description Add a spy-file
+Status Pending
+Assignee
+
+All conversations.. broken out by who says them and who can hear
+them.. to a text file
+**
+75.
+Description Make NPC's able to actually CAST a spell
+Status Pending
+Assignee
+**
+76.
+Description Add IP based masks for restricting GM powers
+Status Pending
+Assignee
+
+Stealing my name/pass does not give you my powers
+**
diff --git a/Dev/TODO_MOB_AI.txt b/Dev/TODO_MOB_AI.txt
index 9f73656f9..82d6560f5 100644
--- a/Dev/TODO_MOB_AI.txt
+++ b/Dev/TODO_MOB_AI.txt
@@ -131,4 +131,6 @@ towards them.
let mob stats vary a little bit - every mob shouldn't be the exact same. if it's stronger it gives more exp, and vice
versa.
-have a monster be able to use its drops, and not drop it. like a poring using an apple. \ No newline at end of file
+have a monster be able to use its drops, and not drop it. like a poring using an apple.
+
+davidsiaw: About that last line, now the player finds a 4 slot pike and a poring takes it and uses it against him... hmm won't that be a lil... frustrating? \ No newline at end of file
diff --git a/Dev/bugs.txt b/Dev/bugs.txt
index 3fee32b7c..b47a36452 100644
--- a/Dev/bugs.txt
+++ b/Dev/bugs.txt
@@ -1,7 +1,3 @@
-Problem: Adding the new guild skills causes it to crash?
-Assigned: N/A
-Progess: 0%
-
Problem: 2-2-1 classes are regarded as Novicies by the game server. NPCs aren't taking them as thier jobs but if you the the NPC to do something for a novice class it works with the 2-2-1 like renters. Also if some one becomes high novice, if they use jobra they can become first jobs like a swordsman.
Assigned: N/A
Progess: 0%
@@ -11,84 +7,401 @@ Problem: Stats nor skills don't downgrade when your level gets reverted due to e
Assigned: N/A
Progess: 0%
-Problem: You can hit yourself with your own spider web.
-Assigned: N/A
-Progess: 90% - should be fixed, but please test!
-
Problem: Pre skill requirements for new skills are wrong it makes you use 49 skills points before you can get the newer skills.
Assigned: Celest
Progess: ~90% (Notes: not sure if it causes problems, need more testing =p)
-Problem: Monster hp view only shows but does not go down with a hit.
+Problem: When u spawn ~300 mobs (and more or less) then do @killmonster then some mobs freeze on the screen (have no names, don't move, etc)
Assigned: N/A
Progess: 0%
+Note by Cameri: This is not a bug, it's something that has to do with the client...
-Problem: Monsters always freeze, when hit they don't move but 2 mins later they move.
+Problem: Joker card 4139 lets anyone to steal money / zeny. Just like he's a thief. It shoul;d be revised - success rates lowered and "steal item" disabled
Assigned: N/A
Progess: 0%
-Problem: Mobs don't attack
+Problem: Wierd login-server bug on sql, it displays that the server is full when map-server crashes, has something to do with anti double login feature?
Assigned: N/A
-Progess: 0%
+Progress: 0%
-Problem: When u spawn ~300 mobs (and more or less) then do @killmonster then some mobs freeze on the screen (have no names, don't move, etc)
+Problem: MVP cast spells w/o showing "prepare cast line"
Assigned: N/A
-Progess: 0%
+Progress: jA's mob skill DB itself already has skills that have no cast time,
+ does the same problem happen in jA? Perhaps it should read right from
+ skill_cast_db instead? [celest]
+
+Problem: ~40+ players connected.. and soon can't re-connect, they can enter password, but never see "select character" screen.
+Assigned: MouseJstr
+Progress: 75%
+
+ In many cases, this is due to horrible performance
+ under MySQL
+
+Problem: Chars with ' in their name.. is legal.. and messes up sql
+Assigned: N/A
+Progress: 0%
+Information: http://dev.mysql.com/doc/mysql/en/mysql_real_escape_string.html
+
+ DB server Error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'n' Sniff')' at line 1 Scratch 'n' Sniff
-Problem: With 1025 client, some NPC sprites look different (i.e. Black Jack's NPC sprite)
+Problem: PETS can attack Guardians, so players go to enemy castles before WOE and KILL all their Guards with PETS... LoL!
+Assigned: Codemaster
+Progress: 100% - Make sure you test this for me :)
+
+Problem: mob_aval clone bug crashes client
+Assigned: N/A
+Progress: 0%
+
+ spawn mob 1600..
+
+ also
+
+ add a flag to the monsters defs
+ for example
+ 1002,1039 // makes a poring a bapho
+ if it's like that nothing happens
+ but if you do this
+ 1002,1039,1 // makes a poring a big bapho
+ 1002,1039,2 // makes a poring a small bapho
+ effect id or something
+
+Problem: Due to the Guilds CACHE we see some went-offline members as online ones. It is very confusing. You don't know who's really on.
+Assigned: MouseJstr
+Progress: 100%
+
+Problem: Guilds BUG (it isn't related to the scripts, because noone change them recently)
+ When some guild SEIZE any castle, then Castle N 1 becomes their own, too (not M 0, but M 1)
+Assigned: MouseJstr
+Progress: 100%
+
+Problem: Storage BUGS! Items doubles/clones again any kinds of items! (due to "latest storage fix")
Assigned: N/A
-Progess: 0%
+Progress: 0%
-Problem: Thiefs can steal ZENY / items from TREASURE chests!!baaaah!! and Guardians!
+ Only happens during crashes..
+
+Problem: status.weapon can be 16... which causes the accesses outside
+ the bounds of the array
Assigned: N/A
-Progess: 0%
+Progress: 0%
-Problem: Joker card 4139 lets anyone to steal money / zeny. Just like he's a thief. It shoul;d be revised - success rates lowered and "steal item" disabled
+ battle.c:549:Bounds error: array reference (16) outside bounds of the array.
+ battle.c:549: Pointer value: 0x1ceda808
+ battle.c:549: Object `calloc':
+ battle.c:549: Address in memory: 0x1ceda7c8 .. 0x1ceda807
+ battle.c:549: Size: 64 bytes
+ battle.c:549: Element size: 4 bytes
+ battle.c:549: Number of elements: 16
+ battle.c:549: Created at: malloc.c, line 23
+ battle.c:549: Storage class: heap
+ battle.c:3078:Bounds error: array reference (16) outside bounds of the array.
+ battle.c:3078: Pointer value: 0x1ceda848
+ battle.c:3078: Object `calloc':
+ battle.c:3078: Address in memory: 0x1ceda808 .. 0x1ceda847
+ battle.c:3078: Size: 64 bytes
+ battle.c:3078: Element size: 4 bytes
+ battle.c:3078: Number of elements: 16
+ battle.c:3078: Created at: malloc.c, line 23
+ battle.c:3078: Storage class: heap
+
+
+Problem: This bug's appeared again: Permanent #Variables/Variables disappear.
+ Quests, Banks, etc wipe when you create a new character
+
+ We had no such a bug before, but Freya has it. Probably it soaked into eA with
+ Freya optimizations code...
Assigned: N/A
-Progess: 0%
+Progress: 0%
-Problem: When servers restart sometime the gm lvls in sql get reset back to 0
-Assigned: Wizputer
-Progess: 0%
+Problem: Sometimes a new empty guild appears with ID 10000, blank name, blank master..
+ but some chars contain its ID and Guild Memebers Table isn't empty.
+ (probably can't get real Last used ID)
+Assigned: N/A
+Progress: 0%
-Problem: [mob attacks againsts players wearing ghostring armor do full damage mob_ghostring_fix: yes] Does not work, does nothing.
+Problem: SVN 8XX. After 1 day up it started to repeat every players commands twice:
+ i.g. Item usage, movement, etc. It looks like LAGS
Assigned: N/A
-Progess: 0%
+Progress: 0%
-Problem: If two clients using the same account the server will crash and it allows people to dupe using the trade bug, one person trades over and item relogs it saves and the other person doesn't, they crash server both of them end up with the item.
+Problem: SVN 8XX. Firewall Spell doesn't hold mobs. They get all the damage and
+ walk trough the wall. (even at the level of 10th)
Assigned: N/A
-Progess: 0%
+Progress: 0%
-Problem: When athena is run in linux it creates core files which takes 300 megs.
+Problem: Chase walk skill slightly messed up. You see yourself as invisible, but other players
+ can still see you
Assigned: N/A
-Progess: 0%
+Progress: 0%
-Problem: The skill tree's max skill lvl is not read/used.
+Problem: Potion Pitcher skill should be able to target yourself.
+Assigned: N/A
+Progress: -
+Notes: Gravity disabled that some time ago ;P
+
+Problem: There are many empty entries of newly created characters in Char DB Table (missing names)
+Assigned: N/A
+Progress: 0%
+
+IMPORTANT: = NEVERENDING SOURCE OF SP/HP
+Problem: Wedding skills fully donate SP/HP even when the donor has 1 SP / HP (when player has low amount of Max SP/HP)
+Assigned: Codemaster
+Progress: 100% - should be fixed. Checks for 15% of HP for males, 15% of SP for females.
+
+Problem: Exp Party Sharing Bug.
+ i.g. Hunter + Merchant are in the same party. M. is sitting. Hunter is killing some Seals. M. doesn't get EXP.
+ Then H. teleports to another map and hunts there. Now, M. kills a poring and get a huuuuuuuuuuuuuuuuge amount
+ of EXP (like it was collecting... all the time he was sitting next to H.)
+Assigned: N/A
+Progress: 0%
+
+Problem: Guilds alliances
+ You can have any number of alliances entried in SQL db. Sometimes it glitches and you get > 4 alliances
+Assigned: N/A
+Progress: 0%
+
+Problem: Disguise Stats Bonus bug.
+ try @disguise 1002 or 'bonus bDisguise,1002;' as a script in a wearable item. And then go in hide.
+ You'll get +255 os ro bonuses for all stats and would kill LOD in one kick.
+ It's a global bug.. comes from those times when WEDDING Class had such ++++bonuses
+ So Wedding Class has been fixed, but not the source of the bug.
+Assigned: N/A
+Progress: 0%
+
+Problem: Guilds DB
+ There always appears an empty guild with ID 100000.
+Assigned: N/A
+Progress: 0%
+
+Problem: You can put in Cart goods more than Cart Max Weight limit allows
+ (it's an old good bug about Named / Unnamed Stackable items)
+Assigned: N/A
+Progress: 0%
+
+Problem: Berserk Skill supposedly disappears randomly.
+Assigned: N/A
+Progress: 0%
+
+Problem: Lord Kaho Horns supposedly disappear when equipped.
+Assigned: N/A
+Progress: 0%
+
+Problem: Older Clients are unable to log into the server, period.
+ Even if the packet_db is set to use the older clients, they still are unable to connect.
Assigned: Celest
-Progess: ~100% (Notes: Maybe there's a less messy way? xP)
+Progress: ~100%
+Notes: Fixed. A typo caused the code to block packet version 5 clients
-Problem: Char server and Map server crash when you recall some one.
+Problem: Fire Pillar doesn't consume GEMS!
Assigned: N/A
-Progess: 0%
+Progress: N/A
+Notes: It isn't supposed to for level 1-5 ^^ [Celest]
+
+Problem: Friends List doesn't save / load again. It used to work 2 months ago.
+ Let's use Freya's Friends solution (faster, better)
+Assigned: N/A
+Progress: 0%
-Problem: Monk's Skill ROOT instantly reboots server
+Problem: Problems with View ID od wearable Items / Weapons
+ e.g.
+ You put off Goggles, but see them on the character even after relogin
+ You can see both Knife + Shield in a hand
+Assigned: N/A
+Progress: 0%
+
+Problem: [item exploit] Hunters can set traps not consuming the TRAPS ITEMS, when Bards
+ use their special support skill.
+ Then Hunters can collect these traps for free... And then sell, etc.
+Assigned: N/A
+Progress: 0%
+
+Problem: Speed hack and other proxy-like hacks
+ they change/double selected packets for different exploits:
+ dupe, multiattack (destroy Emp in 1 minute.) etc...
+ We should check packets, should keep eye on frequency of users packets
+ and ban / kick / log funkers
+Assigned: N/A
+Progress: 0%
+
+Problem: ATCommand @addwarp crashes the server
+Assigned: N/A
+Progress: 0%
+
+Problem: If a char has been saved with non-existing map name
+ then the server crashes on entering the game.
+ the wrong names e.g. prontera.gat.gat
+ could be generated on times when map server is disconnected with char server.
+Assigned: N/A
+Progress: 0%
+
+Problem: [item exploit] Trade Window + Blacksmith's/Alchemyst's MAKE skills -> item exploit
+Assigned: N/A
+Progress: 0%
+
+Problem: New Guilds Active Skills Abuse. You call 1st skill, then call 2nd and NOW, without dalay of 30 min (or whatever)
+ you can AGAIN call the 1st skill... So there's no time limit... etc.
Assigned: Celest
-Progess: 100%? (Notes: Typo... my bad, sorry ^^; )
+Progress: 100% - Fixed
-Problem: Sage's Area Skills (Delu.,Vulcano, etc) if casted on the same area (or overlap each other) instantly reboots server. use @gvgon when test. Don't test it towns
+Problem: Wedding TELEPORT skills now work on maps where TELEPORT was disabled
Assigned: N/A
-Progess: 0%
+Progress: 0%
-Problem: @job/#job turns you into 2-2-1 and not into any other jobs
-Assigned: N/a
-Progess: 0% (Notes by Celest: Actually, check here ^_-
-http://eathena.deltaanime.net/forum/viewtopic.php?p=79951#79951)
+Problem: Guilds Skill - Emergency Call doesn't work in castles (it somehow useless)
+Assigned: N/A
+Progress: 0%
-Problem: @disguise has no death sprite so the client crashes when you die, a solution would be that upon death before the sprites change you're undisguised.
-Assigned: N/a
-Progess: 0%
+Problem: Guilds Skill - GD_EVELOPMENT (Extend_Guild)
+ has different description in korean desc table (some numbersm etc)
+ so it's different from the current implementation (Celest, plz check)
+Assigned: N/A
+Progress: 0%
-Problem: Changing email and Broadcast both use the same packets / Packet 0x3000 assigned to changing email instead of broadcasting?
-Notes: Refer to char.c line 2272 and line 2416, intif.c line 107, chrif.c line 377
-Assigned: N/A
-Progress: 0% \ No newline at end of file
+Problem: 'Adrenaline Rush' has to work with any weapon again (for whole party)
+ according to the kRO Sak patch on 21/12
+Assigned: N/A
+Progress: N/A
+Notes: "Fixed Adrenaline Rush skill working for all weapon types again."
+ I think it was supposed to not work with all weapons ^^;
+
+Problem: [Urgent!] Server doesn't save Variables (#global and global)
+ If you exit the client with Alt-F4 or lose connection to the server.
+Assigned: N/A
+Progress: 0%
+
+Problem: [Scripts] Mob spawn. If you set unexisting monster Id
+ then you have "novice" looking mobs with random EXP
+ for exapmple there was a mob with 1 HP and 22.000 Exp.
+Assigned: N/A
+Progress: 0%
+
+Problem: When 2 players try to pickup one dropped item at the same time
+ then both pickup the item, but 1st one gets ACTUAL item
+ and another one gets Apple - Unknown item (with random stats, random upgrade, etc)
+Assigned: N/A
+Progress: 0%
+
+Problem: [ATCommands] GMs teleportings to non-existing maps crash the server
+Assigned: N/A
+Progress: 0%
+
+Problem: [script.c] script command DOEVENT now doesn't work...
+ so Knight JOB Quest is unpassable now, Monks Job Quest is too easy (traps don't work)
+ probably more bugs...
+ I (Lupus) have script-wise solution. But it isn't good! 8((( DOEVENT used to work fine!
+Assigned: N/A
+Progress: 0%
+
+Problem: Compilers Bug: Some skills don't work under win32 builds
+ e.g. HIDE, CLOACKING, etc (both MOB's and PC's skills)
+ e.g. Whispers can't cloak... Players can't Hide, etc
+ LINUX builds work fine (or maybe 116x fukked them up...)
+ oh yeah, Celest mentoned it
+Assigned: Celest
+Progress: 100% [My bad, fixed ^^; ]
+
+Problem: Rogues Skill "back stab" works without PREPARING arrows.
+ It consumes arrows, but works even when them aren't prepered (equipped)
+Assigned: Celest
+Progress: 100%
+
+Problem: Skill Delays Bug (Hunters)
+ When you use a skill then Equip Another kind of arrows,
+ you can immediately cast another SKILL. (Bind skills on hot keys and... u get a killing machine)
+Assigned: N/A
+Progress: 0%
+
+Problem: Scripts prob
+ We can't use jA's new commands: FOR, WHILE, ELSE, etc
+Assigned: N/A
+Progress: 0%
+
+Problem: BARD HP exploit
+ When he plays that 'apple' healing song. Accidently players get HPMAX 32000.
+ With low HP, but big HPMAX.
+Assigned: N/A
+Progress: 0%
+
+Problem: Sniper
+ They have 2 skills to dismount traps: Emeny's and Our's.
+ So.. during GVG you can't use 1 of the skills at all
+ but the 2ns one dismounts BOTH types of traps: yours and enemies
+Assigned: N/A
+Progress: 0%
+
+Problem: WARP PORTAL
+ You can cast it under someone's feet. (He warps)
+Assigned: N/A
+Progress: 0%
+
+Problem: WATERBALL
+ According to http://bbs.emperium.org/viewtopic.php?t=15566&highlight=waterball+faq
+ Waterballs power depends on the TYPE of water on the map:
+ Works with Sage's Deluge, although it drains the cells.
+ Also note, if you cast Waterball with less water
+ (some areas count as shallow water and do not give the full effects either) than required for the full effect, you will shoot out less Waterballs. This skill is chainable.
+Assigned: N/A
+Progress: 0%
+
+Problem: ABRAKADABRA (HOCUS POCUS)
+ It misses half of its effects
+ According to http://bbs.emperium.org/viewtopic.php?t=15566&highlight=waterball+faq
+ This skill allows you to use any active skill from any class. However, skills that need you to have a weapon or item you cannot equip or posses will fail. So like Adrenaline Rush and Double Strafe will fail. Also, keep in mind the level of Hocus Pocus also equals the level of the skill you cast. So with Hocus Pocus level 10 you can cast Grand Cross level 10, etc. In addition to those skills you have a chance of casting any of these skills (not sure what the actual names of the skills are):
+ Monster Chant- basically the same effect as a Dead Branch (not sure if it can be used in town or not).
+ Reverse Orcish- the Sage's face becomes green like that of an...Orc...
+ Suicide- the Sage dies. You lose experience as well.
+ Full-Heal- you regenerate all SP and HP.
+ Coma- the Sage's HP/SP fall to 1.
+ Gravity - This skill was supposed to advertise Gravity but was disabled outside of kRO/jRO since other companies carry RO (not in iRO?).
+ ????- This skill will randomly become one of the following if cast on a target:
+ 1) Grim Reaper - the target will die. You won't gain any experience nor will the monster drop anything. Rumors say that you can instant-kill an MVP. This works in PvP.
+ 2) Mono Cell - Change target into a Poring. Only on monsters though.
+ 3) Class Change - Changes the target to an MVP boss monster. If cast on an Alchemist's Flora or Marine Sphere, the MVP will die after the set amount of time that monster would have died.
+ 4) Monster Tame - if you target a monster that is possible to have as a pet, you will see a slot machine pop up. Basically this is a free tame.
+Assigned: N/A
+Progress: 0%
+
+Problem: Arrows Dupe (or random amount change)
+ You should prepare/remove arrows while trade. And have both - names and unnamed arrows ^_-
+Assigned: N/A
+Progress: 0%
+
+Problem: PArty EXP shar Exploit.
+ 1. you enter the game with your HIGH-level character
+ 2. start killing some mobs (e.g. 5 Seals) within a party... Don't finish them!
+ 3. Re-enter with a LOW-LEVEL character from your account
+ 4. now finish the mobs or... let someone do it.
+ 5. u get all your HIGH-LEVEL exp!!!
+ Why does it look at ACCOUNT ID ? instead of the CHAR ID ?
+Assigned: N/A
+Progress: 0%
+
+Problem: ICE WALL
+ 1. It again lets you freeze mobs and yourself inside of the wall...
+ 2. When you set a diagonal wall - in its middle sometimes a segment's dropped. So monsters can walk trough it.
+ WHY?
+Assigned: N/A
+Progress: 0%
+
+Problem: SQL Castles Again!
+ The casltes data isn't being saved at all.
+ During WOE everything acts like it was at the previous Castles save bug time.
+Assigned: Lupus
+Progress: 100%
+
+Problem: Party EXP share bug
+ 1. Create a party
+ 2. Invite a member
+ 3. Kick him out the party
+ 4. Invite him again.
+ Now he can get His 100% EXP + 100% Yours EXP (in the party window you look like you're off )
+ * SQL parties have been fixed in Freya (but the whole file int_party.c has been rewritten there)
+Assigned: N/A
+Progress: 0%
+
+Problem: Guilds Breaking
+ When you BREAK your guild and then someone re-creates another guild with the same Name
+ Then new GULD would have LEVEL, EXP, STATS of the broken guild
+ Probably it isn't being deleted from memory.
+Assigned: N/A
+Progress: 0%
diff --git a/Dev/quotes.txt b/Dev/quotes.txt
index a82eaae68..d74c82059 100644
--- a/Dev/quotes.txt
+++ b/Dev/quotes.txt
@@ -146,3 +146,26 @@ Biography:
// Back 2 Me :P
npctalk "Sorry Valaris";
npctalk "(He Is Da Man!)";
+
+nsstrunks
+// Off on my own somewhere lol. In a town that no one visits ;)
+- General Dev, do whatever I feel like at the time
+- Real name unknown, just call me nsstrunks ;)
+- 16 years old
+- Off on my own most of the time
+- Willing to help as long as your not annoying ;)
+- *goes off into own world*
+
+Ajarn
+-------
+Real name: Ajarn?
+Age: 15
+Place: MN, USA
+Whatsa I doa: Coder/Bug Reporter extremest
+Whysa I here: Freya is slow, and they don't listen to me =(
+Into: "There isn't mush to me... I've been programming since I was 11, doing it as a hooby. I can't spell
+half the time, and the other half of the time my keyboarding sucks. I'm just here for the ride, and to get
+eA rolling along even faster.
+
+Ohh, I also have an eye for mistakes, since I make them so much..."
+
diff --git a/Dev/scripting.txt b/Dev/scripting.txt
index 5aa35e713..a242107f5 100644
--- a/Dev/scripting.txt
+++ b/Dev/scripting.txt
@@ -1,10 +1,30 @@
-Post any NPCs/DBs that need to be done or Fixed Here.
-Format is:
-
-Description - A description of the task
-Type - Whether DB, NPC or Both
-Status - The status of the task. The possible values are Pending and Completed
-Assignee - The nickname of the person whom is assigned the task
-Notes - Miscellaneous notes concerning the task
-
--------------------------- \ No newline at end of file
+Post any NPCs/DBs that need to be done or Fixed Here.
+Format is:
+
+Description - A description of the task
+Type - Whether DB, NPC or Both
+Status - The status of the task. The possible values are Pending and Completed
+Assignee - The nickname of the person whom is assigned the task
+Notes - Miscellaneous notes concerning the task
+
+--------------------------
+
+Description: -Thief Test its not working correctly
+Type: -Quest
+Status: -Pending
+Assignee: -N/A
+
+--------------------------
+
+Description: - Some one needs to check the item_db there are alot of errors.
+Type: - DB
+Status: - Pending
+Assignee: - N/A
+
+--------------------------
+
+Description: - Changing into "High" class are supposed to give you 100 stat
+ - points. It currently only gives you 88.
+Type: - Jobchanger
+Stats: - Pending
+Assignee: - N/A \ No newline at end of file
diff --git a/Makefile b/Makefile
index 2b06f38af..86ccb0189 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,17 @@
-# $Id: Makefile 158 2004-10-01 03:45:15Z PoW $
CC = gcc -pipe
+# CC = gcc -pipe -DPCRE_SUPPORT
+# CC = g++ --pipe
+# CC = gcc -pipe -DGCOLLECT
+# CC = gcc -pipe -DDMALLOC -DDMALLOC_FUNC_CHECK
+# CC = /usr/local/bin/gcc -fbounds-checking -pipe -DBCHECK
+
+# GCLIB = -lgc
+# GCLIB = -L/usr/local/lib -lpcre
+GCLIB =
+# GCLIB = -ldmalloc
-ifdef DEBUG
-PACKETDEF = -DPACKETVER=6 -DNEW_006b -DSO_REUSEPORT -DDEBUG
-else
PACKETDEF = -DPACKETVER=6 -DNEW_006b -DSO_REUSEPORT
-endif
#PACKETDEF = -DPACKETVER=5 -DNEW_006b
#PACKETDEF = -DPACKETVER=4 -DNEW_006b
#PACKETDEF = -DPACKETVER=3 -DNEW_006b
@@ -20,15 +25,20 @@ MAKE = gmake
else
MAKE = make
endif
+ifeq ($(findstring NetBSD,$(PLATFORM)), NetBSD)
+MAKE = gmake
+endif
-OPT = -g -O2 -ffast-math
+OPT = -g -O2 -ffast-math -Wall -Wno-sign-compare
+# OPT += -DDUMPSTACK -rdynamic
ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
OS_TYPE = -DCYGWIN
-CFLAGS = $(OPT) -Wall -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE)
+CFLAGS = $(OPT) -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE)
else
OS_TYPE =
-CFLAGS = $(OPT) -Wall -I../common $(PACKETDEF) $(OS_TYPE)
+CFLAGS = $(OPT) -I../common $(PACKETDEF) $(OS_TYPE)
+# CFLAGS = -DTWILIGHT $(OPT) -Wall -I../common $(PACKETDEF) $(OS_TYPE)
endif
MYSQLFLAG_INCLUDE_DEFAULT = /usr/local/include/mysql
@@ -39,10 +49,10 @@ ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /)
MYSQLFLAG_VERSION = $(shell $(MYSQLFLAG_CONFIG) --version | sed s:\\..*::)
endif
-ifeq ($(findstring 5,$(MYSQLFLAG_VERSION)), 5)
-MYSQLFLAG_CONFIG_ARGUMENT = --include
-endif
ifeq ($(findstring 4,$(MYSQLFLAG_VERSION)), 4)
+MYSQLFLAG_CONFIG_ARGUMENT = --cflags
+endif
+ifeq ($(findstring 5,$(MYSQLFLAG_VERSION)), 5)
MYSQLFLAG_CONFIG_ARGUMENT = --include
endif
ifndef MYSQLFLAG_CONFIG_ARGUMENT
@@ -63,17 +73,19 @@ else
LIB_S = $(LIB_S_DEFAULT)
endif
-MYLIB = CC="$(CC)" CFLAGS="$(CFLAGS) $(MYSQLFLAG_INCLUDE)" LIB_S="$(LIB_S)"
+MYLIB = CC="$(CC)" CFLAGS="$(CFLAGS) $(MYSQLFLAG_INCLUDE)" LIB_S="$(LIB_S) $(GCLIB)"
endif
-MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)"
+MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" LIB_S="$(GCLIB)"
all: conf txt
conf:
cp -r conf-tmpl conf
rm -rf conf/.svn conf/*/.svn
+ cp -r save-tmpl save
+ rm -rf save/.svn
txt : src/common/GNUmakefile src/login/GNUmakefile src/char/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile conf
cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd ..
@@ -84,21 +96,25 @@ txt : src/common/GNUmakefile src/login/GNUmakefile src/char/GNUmakefile src/map/
ifdef SQLFLAG
-sql: src/common/GNUmakefile src/login_sql/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile src/txt-converter/login/GNUmakefile src/txt-converter/char/GNUmakefile conf
+sql: src/common/GNUmakefile src/login_sql/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile src/txt-converter/login/GNUmakefile src/txt-converter/char/GNUmakefile conf
cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd ..
cd src ; cd login_sql ; $(MAKE) $(MYLIB) $@ ; cd ..
cd src ; cd char_sql ; $(MAKE) $(MYLIB) $@ ; cd ..
cd src ; cd map ; $(MAKE) $(MYLIB) $@ ; cd ..
- cd src ; cd ladmin ; $(MAKE) $(MKDEF) $@ ; cd ..
- cd src ; cd txt-converter ; cd login ; $(MAKE) $(MYLIB) $@ ; cd ..
- cd src ; cd txt-converter ; cd char ; $(MAKE) $(MYLIB) $@ ; cd ..
+ cd src ; cd txt-converter ; cd login ; $(MAKE) $(MYLIB) ; cd ..
+ cd src ; cd txt-converter ; cd char ; $(MAKE) $(MYLIB) ; cd ..
else
sql:
$(MAKE) CC="$(CC)" OPT="$(OPT)" SQLFLAG=1 $@
endif
-debug-sql:
- $(MAKE) CC="$(CC)" OPT="$(OPT)" DEBUG=1 sql
+
+tools:
+ cd src ; cd tool && $(MAKE) $(MKDEF) && cd ..
+
+webserver:
+ cd src ; cd webserver && $(MAKE) $(MKDEF) && cd ..
+
clean: src/common/GNUmakefile src/login/GNUmakefile src/char/GNUmakefile src/map/GNUmakefile src/ladmin/GNUmakefile src/txt-converter/login/GNUmakefile src/txt-converter/char/GNUmakefile
cd src ; cd common ; $(MAKE) $(MKDEF) $@ ; cd ..
@@ -110,16 +126,6 @@ clean: src/common/GNUmakefile src/login/GNUmakefile src/char/GNUmakefile src/map
cd src ; cd ladmin ; $(MAKE) $(MKDEF) $@ ; cd ..
cd src ; cd txt-converter ; cd login ; $(MAKE) $(MKLIB) $@ ; cd ..
cd src ; cd txt-converter ; cd char ; $(MAKE) $(MKLIB) $@ ; cd ..
- cd src ; cd webserver; $(MAKE) $(MKDEF) $@ ; cd ..
-
-tools:
- cd tool && $(MAKE) $(MKDEF) && cd ..
- $(CC) -o setupwizard setupwizard.c
-webserver:
- cd src ; cd webserver ; $(MAKE) $(MKDEF) $@ ; cd ..
-
-#webserver: src/webserver/GNUmakefile
-
src/common/GNUmakefile: src/common/Makefile
sed -e 's/$$>/$$^/' src/common/Makefile > src/common/GNUmakefile
@@ -139,5 +145,3 @@ src/txt-converter/login/GNUmakefile: src/txt-converter/login/Makefile
sed -e 's/$$>/$$^/' src/txt-converter/login/Makefile > src/txt-converter/login/GNUmakefile
src/txt-converter/char/GNUmakefile: src/txt-converter/char/Makefile
sed -e 's/$$>/$$^/' src/txt-converter/char/Makefile > src/txt-converter/char/GNUmakefile
-src/webserver/GNUmakefile: src/webserver/Makefile
- sed -e 's/$$>/$$^/' src/webserver/Makefile > src/webserver/GNUmakefile \ No newline at end of file
diff --git a/README.win32 b/README.win32
new file mode 100644
index 000000000..16a8c9524
--- /dev/null
+++ b/README.win32
@@ -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/Readme-jap b/Readme-jap
index 6bf23c87b..f43c0499c 100644
--- a/Readme-jap
+++ b/Readme-jap
@@ -1,4 +1,3754 @@
--------------------
+//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
@@ -17,7 +3767,7 @@
script.c
buildin_getitemname() •œŠˆ
-----------------------------------------
+--------------------
//1031 by huge
ENPC‚Ìscript‚ÉAmakepet‚ð’ljÁB
makepet —‘ID; ‚ÅAƒyƒbƒg‚ð쬂µ‚Ü‚·B
@@ -110,11 +3860,11 @@
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Á
@@ -125,7 +3875,7 @@
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‚é–â‘è‚ð‰ðŒˆ‚µ‚½‚‚à‚è
@@ -150,7 +3900,6 @@
EƒI[ƒ‰ƒuƒŒ[ƒh•Ší§ŒÀ‚ð‘fŽèˆÈŠO‘S‚Ä‚ÉC³
EƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“•Ší§ŒÀ‚𗼎葄‚Ì‚Ý‚©‚ç•ÐŽè‘„+—¼Žè‘„‚ÖC³
EƒgƒDƒ‹[ƒTƒCƒgŒø‰ÊŽžŠÔ‚ðC³
-Eƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg•Ší§ŒÀ‚ð‰ðœA‘fŽè‚ðŠÜ‚ß‚½‘S‚Ä‚ÅŽg—p‰Â”\‚É
(db/)
job_db2-2.txt •ÏX
@@ -164,7 +3913,7 @@
(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
@@ -403,14 +4152,18 @@
--------------------
//1014 by (Pepermint)
-I fixed again the problem if you put minus sign(-) in front of digits,
+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
+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‚É—ˆ‚Ä‚©‚ç‚Æ‚¢‚¤‚±‚Æ‚Å
diff --git a/SVN-SUPPORT b/SVN-SUPPORT
new file mode 100644
index 000000000..7e14cb461
--- /dev/null
+++ b/SVN-SUPPORT
@@ -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/conf-tmpl/atcommand_athena.conf b/conf-tmpl/atcommand_athena.conf
index f215d2db2..4ba317603 100644
--- a/conf-tmpl/atcommand_athena.conf
+++ b/conf-tmpl/atcommand_athena.conf
@@ -34,6 +34,8 @@ command_symbol: @
// -> can do anything, except administration commands
// 99: Administrator
// -> can do anything!
+// 100: Disabled
+// -> Commands that aren't used
//--------------------------
@@ -41,7 +43,6 @@ command_symbol: @
// Give server time. (6 same commands)
uptime: 0
-changesex: 0
time: 0
date: 0
server_date: 0
@@ -49,6 +50,11 @@ serverdate: 0
server_time: 0
servertime: 0
+// Show Monster info (rates, stats, drops, MVP stuff)
+mobinfo: 0
+monsterinfo: 0
+mi: 0
+
// Display your ignore list (people from which you ignore wisps)
ignorelist: 0
@@ -57,17 +63,6 @@ ignorelist: 0
// if you want be sure of each e-mail disable this option (value: 100)
email: 0
-// 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)
-gm: 100
-
-
//-------------------------
// 1: Super player commands
@@ -91,6 +86,7 @@ where: 1
// Spawns you to set points in major cities.
go: 10
+autoloot: 10
//----------------------
@@ -105,12 +101,24 @@ 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
+
// 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
@@ -162,7 +170,7 @@ exall: 20
broadcast: 40
// Broadcast to the map you are on (1 command + /lb, /nlb).
-local_broadcast: 40
+localbroadcast: 40
// Broadcast (with or without name).
kami: 40
@@ -260,12 +268,6 @@ save: 40
// Do some visual effect on your character
effect: 40
-// Display all items of a player
-charitemlist: 40
-
-// Display all items of a player's storage
-charstoragelist: 40
-
// Display all items of a player's cart
charcartlist: 40
@@ -287,9 +289,21 @@ useskill: 40
// What skills are required to get this skill
skilltree: 40
+// Marriage skills
+marry: 40
+divorce: 40
+rings: 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
@@ -312,6 +326,11 @@ monster2: 50
// To get a peco to (un)ride for another player.
charmountpeco: 50
+// ??
+monstersmall: 50
+
+// ??
+monsterbig: 50
//----------------
// 60: GM commands
@@ -340,6 +359,7 @@ charbaselvl: 60
// Changes the sex of an online player (all characters on the account)
charchangesex: 60
+changesex: 60
// Remove items from a character
chardelitem: 60
@@ -364,9 +384,6 @@ charskreset: 60
// Saves the respawn point of another character.
charsave: 60
-// Changes another character's zenny
-charzeny: 60
-
// Levels your guild to specified level (2 same commands).
guildlvup: 60
guildlvlup: 60
@@ -385,6 +402,10 @@ 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
@@ -404,6 +425,10 @@ 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
@@ -413,6 +438,10 @@ 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
@@ -538,6 +567,9 @@ enablenpc: 80
// Disables a NPC.
disablenpc: 80
+// Hides a NPC.
+hidenpc: 80
+
// Move a NPC
npcmove: 80
@@ -589,6 +621,22 @@ 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
+
+// [Un]Disguise All Players
+disguiseall: 99
+undisguiseall: 99
+
//---------------------------------------------------------------
// 99: Weather effects
@@ -602,6 +650,9 @@ sakura: 99
leaves:99
+// Stop all weather effects
+clearweather: 99
+
//---------------------------------------------------------------
// 0: Mail System - SQL Only commands - Must be enabled
@@ -626,9 +677,12 @@ sendprioritymail: 80
// Delete a message.
deletemail: 0
+//---------------------------------------------------------------
+// 100: Disabled commands
+gm: 100
//---------------------
// OTHER: not a command
-//import: conf/import/atcommand_conf.txt
+import: conf/import/atcommand_conf.txt
diff --git a/conf-tmpl/atcommand_athena.conf.orig b/conf-tmpl/atcommand_athena.conf.orig
deleted file mode 100644
index 3a3e359ae..000000000
--- a/conf-tmpl/atcommand_athena.conf.orig
+++ /dev/null
@@ -1,569 +0,0 @@
-// 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 '@'). 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!
-
-
-//--------------------------
-// 0: normal player commands
-
-// Give server time. (6 same commands)
-time: 0
-date: 0
-server_date: 0
-serverdate: 0
-server_time: 0
-servertime: 0
-
-// Display your ignore list (people from which you ignore wisps)
-ignorelist: 0
-
-// 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: 0
-
-// 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)
-gm: 100
-
-
-//-------------------------
-// 1: Super player commands
-
-// 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
-
-
-//---------------------------
-// 10: Super player+ commands
-
-// Spawns you to set points in major cities.
-go: 10
-
-
-//----------------------
-// 20: Mediator commands
-
-// Displays helpfile in Athena base directory (2 same commands).
-help: 20
-h: 20
-
-// Warp yourself to a person (3 same commands + /shift).
-jumpto: 20
-goto: 20
-warpto: 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
-
-// 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
-
-
-//--------------------
-// 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).
-local_broadcast: 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 you to view other characters stats.
-charstats: 40
-
-// Shows Stats Of All Characters Online
-charstatsall: 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
-
-//Makes an egg
-makeegg: 40
-
-//Hatches an egg
-hatch: 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
-
-// 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
-charitemlist: 40
-
-// Display all items of a player's storage
-charstoragelist: 40
-
-// Display all items of a player's cart
-charcartlist: 40
-
-
-//---------------------
-// 50: Sub-GM+ commands
-
-// Changes character's model
-charmodel: 50
-
-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
-
-// Spawns a monster with parameters not in same order of @spawn.
-monster2: 50
-
-// To get a peco to (un)ride for another player.
-charmountpeco: 50
-
-// Enables to give possibility to a player to rename his/her pet.
-charpetrename: 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
-
-// Sets another persons base level.
-charbaselvl: 60
-
-// Changes the sex of an online player (all characters on the account)
-charchangesex: 60
-
-// Remove items from a character
-chardelitem: 60
-
-// Sets another persons job level.
-charjlvl: 60
-
-// Sets the job of another character (2 same commands).
-charjob: 60
-charjobchange: 60
-
-// Set options on another character.
-charoption: 60
-
-// Gives another character status points
-charstpoint: 60
-
-// Gives another character skill points
-charskpoint: 60
-
-// Resets another character's stats
-charreset: 60
-
-// Resets another character's status, skills
-charstreset: 60
-charskreset: 60
-
-// Saves the respawn point of another character.
-charsave: 60
-
-// Changes another character's zenny
-charzeny: 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
-
-// Kill all monsters in map (with drops)
-killmonster: 60
-
-// Creates yourself a pet egg, have to use Pet ID.
-makeegg: 60
-
-// Instantly kills player whose name is entered and deals insane damage to everything around.
-nuke: 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
-
-// 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
-
-// Warp another person to a certain map, at (x,y) coordinates (2 same commands).
-rura+: 60
-charwarp: 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.)
-guildspy: 60
-
-//Allows you to spy on any party's party chat. (at least one party member must be online.)
-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
-
-// Enables platinum skills of another player.
-charquestskill: 60
-
-// Enables lost skills of another player.
-charlostskill: 60
-
-// turn on and off skills on a map
-skillon: 60
-skilloff: 60
-
-// Create a static warp portal that lasts until the next reboot
-addwarp: 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
-
-// Enables a NPC.
-enablenpc: 80
-
-// Disables a NPC.
-disablenpc: 80
-
-// Move a NPC
-npcmove: 80
-
-
-//---------------------------
-// 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
-
-// Shows information about the map
-mapinfo: 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
-
-
-//---------------------
-// OTHER: not a command
-
-//import: conf/import/atcommand_conf.txt
diff --git a/conf-tmpl/battle_athena.conf b/conf-tmpl/battle_athena.conf
index d9b39dfc1..789346b59 100644
--- a/conf-tmpl/battle_athena.conf
+++ b/conf-tmpl/battle_athena.conf
@@ -11,7 +11,7 @@
// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
//
//--------------------------------------------------------------
-//eAthena Battle Configuration File
+// eAthena Battle Configuration File
// Made in to plainer english by Ancyker
//--------------------------------------------------------------
//Note 1: Directives can be set using on/off, yes/no or 1/0.
@@ -43,7 +43,12 @@ casting_rate: 100
delay_rate: 100
// Is the delay time is dependent on the caster's DEX? (Note 1)
-delay_dependon_dex: yes
+// 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
@@ -145,7 +150,7 @@ item_drop_mvp_min: 1
item_drop_mvp_max: 10000
// Can the monster's drop rate become 0? (Note 1)
-drop_rate0item: no
+drop_rate0item: yes
// Rate at which exp. is given. (Note 2)
base_exp_rate: 100
@@ -153,7 +158,14 @@ base_exp_rate: 100
// Rate at which job exp. is given. (Note 2)
job_exp_rate: 100
-// PVP exp. Do players get exp during pvp
+// Players' maximum HP rate? (Default is 100)
+hp_rate: 100
+
+// Players' maximum SP rate? (Default is 100)
+sp_rate: 100
+
+// 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?
@@ -208,24 +220,29 @@ gm_all_skill_add_abra: no
// [GM] Can equip anything? (No or minimum GM level, can cause client errors.)
gm_all_equipment: no
-// [GM] Raise skills unconditionally, that is, put points in to a skill not in thier jobs skill tree? (no or minimum gm level)
+// [GM] Can use skills without meeting the required conditions (no
+// blue gems? no problem
gm_skill_unconditional: no
// Can a normal player by-pass the skill tree? (Note 1)
player_skillfree: no
-// When doing a skill reset, whether the skill's restriction is to be ignored or not. (Note 1)
-player_skillup_limit: yes
+// When set to yes, forces skill points gained from 1st class to be put into 1st class
+// sklls, and forces novice skill points to be put into the basic skill. (Note 1)
+player_skillup_limit: no
// Forging success rate. (Note 2)
weapon_produce_rate: 100
-// Prepare Potion succsss rate. (Note 2)
+// Prepare Potion success rate. (Note 2)
potion_produce_rate: 100
// Allow monsters to be aggresive and attack first? (Note 1)
monster_active_enable: yes
+// If a monster is attacked, will they have a delay in being able to move? (Note 1)
+monster_damage_delay: yes
+
// Monster damage delay rate (Note 1)
monster_damage_delay_rate: 100
@@ -322,8 +339,9 @@ heal_exp: 0
// 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 (100 is normal, 200 is double.)
-// The way it is calculated is (money recieved * skill lv) * shop_exp / 100.
+// 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
// The delay rate of monk's combo (Note 2)
@@ -348,8 +366,27 @@ 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
+// 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: yes
+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
// Are arrows are consumed when used on a bow? (Note 1)
arrow_decrement: yes
@@ -401,38 +438,40 @@ save_clothcolor: yes
// 0 = element undead
// 1 = race undead
// 2 = both
-undead_detect_type: 2
+undead_detect_type: 0
-// Operational mode of automatic counter.
-// 0 = disregard DEF and HIT+20 . CRI*2, 1 = 100% critical
+// Counter Attack Skill Type
+// 0 = 100% critical
+// 1 = disregard DEF and HIT+20, CRI*2
+// 2 = Same as 0, but can counter skills (?)
// Players
player_auto_counter_type: 0
// Monsters
monster_auto_counter_type: 0
-// Type of penalty that is applied to FLEE when more than agi_penaly_count monsters are targetting player
+// 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_penaly_num is reduced from FLEE as a %
-// 2 = agi_penaly_num is reduced from FLEE as an exact amount
-agi_penaly_type: 1
+// 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_penaly_count: 3
+agi_penalty_count: 3
-// Amount of FLEE penalized per each attacking monster more than agi_penaly_count
-agi_penaly_num: 10
+// 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_penaly_count monsters are targetting player
+// 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_penaly_num is reduced from FLEE as a %
-// 2 = vit_penaly_num is reduced from FLEE as an exact amount
-vit_penaly_type: 1
+// 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_penaly_count: 3
+vit_penalty_count: 3
-// Amount of VIT defense penalized per each attacking monster more than vit_penaly_count
-vit_penaly_num: 5
+// 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).
@@ -455,33 +494,42 @@ player_skill_reiteration: no
//Whether or not, ground skills of the monsters' will pile up. (Note 1)
monster_skill_reiteration: no
-//Whether or not ground based skills of a certain type such as traps can be cast straight onto other players. (Note 1)
+// 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 or not ground based skills of a certain type such as traps can be cast straight onto monsters. (Note 1)
+// 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: yes
// When a player is cloaking, Whether the wall is checked or not. (Note 1)
-// Note: When set to yes players can still cloak away from walls, but cannot move
-// as well as receive movement penalties if the skill level is below 3.
+// 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 cloacking without walls)
+// 1 = it checks for walls
+// 2 = it doesn't checks for walls + your cloaking lasts forever
+// 3 = it checks for walls, but your cloaking lasts forever
player_cloak_check_type: yes
// When a monster is cloaking, Whether the wall is checked or not. (Note 1)
monster_cloak_check_type: no
+// Damage adjustments for WOE battles against defending Guild monsters (Note 2)
+castle_defense_rate: 100
+
// Melee damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
gvg_short_attack_damage_rate: 100
// Ranged damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
-gvg_long_attack_damage_rate: 100
+gvg_long_attack_damage_rate: 60
// Magic damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
-gvg_magic_attack_damage_rate: 100
+gvg_magic_attack_damage_rate: 50
// Misc damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
-gvg_misc_attack_damage_rate: 100
+gvg_misc_attack_damage_rate: 60
-// When the empelium is broken with WoE mode on, How Long Before The Declaration Of Castle Owner
+// 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)
gvg_eliminate_time: 7000
@@ -495,9 +543,6 @@ player_attack_direction_change: yes
// Monsters's Direction Changed When Attacking? (Note 1)
monster_attack_direction_change: yes
-// If the player has Undead Elemental Equipment, should they be frozen or not. (Note 1)
-player_undead_nofreeze: no
-
// Will Player Skills Stay Within Land Limit or not? (Note 1)
player_land_skill_limit: yes
@@ -505,22 +550,22 @@ player_land_skill_limit: yes
monster_land_skill_limit: yes
// If a party uses a skill with penalties do they apply? (Note 1)
-party_skill_penaly: yes
+party_skill_penalty: yes
// If monster's class is changed will it fully recover HP and SP and Ailments? (Note 1)
monster_class_change_full_recover: no
// Do produced items have the maker's name on them? (Note 1)
-produce_item_name_input: yes
+produce_item_name_input: no
// Do produced potions have the maker's name on them? (Note 1)
-produce_potion_name_input: yes
+produce_potion_name_input: no
// Do crafted arrows have the maker's name on them? (Note 1)
-making_arrow_name_input: yes
+making_arrow_name_input: no
// Does created holy water have the maker's name on it? (Note 1)
-holywater_name_input: yes
+holywater_name_input: no
// Stop logout for 10 seconds after a hit? (Note 1)
prevent_logout: yes
@@ -560,7 +605,7 @@ pc_attack_attr_none: no
mob_attack_attr_none: no
// mob attacks againsts players wearing ghostring armor do full damage
-mob_ghostring_fix: no
+mob_ghostring_fix: yes
// Does the Golden Thief Bug card only work during pvp?
// no or 0 - gtb works all the time
@@ -572,14 +617,14 @@ gtb_pvp_only: no
// 2: Full evasion exclusion
// 3: Full evasion and evasion exclusion
// 4 or more: Except all.
-agi_penaly_count_lv: 2
+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_penaly_count_lv: 3
+vit_penalty_count_lv: 3
// Grandcross Settings (Dont mess with these)
// Even if MOB (PC) has overlapped, it HIT(s) compulsion 3. (Default no)
@@ -602,22 +647,19 @@ player_skill_partner_check: yes
// Is the character of a GM account set as the object of a display by @ command etc. or not?
hide_GM_session: no
-// ƒ†ƒjƒbƒgˆÚ“®ˆ-•?@B0‚Å-{ŽIŽd-l(‰ñü•‰‰×¨dAŽIˆ-¨Œy)A1‚ÅAthenaŽd-l(‰ñü•‰‰×¨ŒyAŽIˆ-¨d)
-// translation (babelfish):
-// Unit portable place - ? @.
-// With 0 - {mackerel SI -l (circuit load -> heavily, the mackerel place - the ? ? lightly),
-// With 1 - Athena SI -l (circuit load -> lightly, the mackerel place - the ? ? it is heavy)
+
+// Skill unit movement processing method
+// 0 - Aegis system : Network load -> Heavier, Server load -> Lighter
+// 1 - Athena system : Network load -> Lighter, Server load -> Heavier
unit_movement_type: 0
// 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
-// ƒŠ??ƒuƒgƒ‰ƒbƒv‚ÌŽd-l 0:-{ŽIŽd-lAã©1ŒÂ 1:AthenaŽd-lAŽg‚Á‚½ƒAƒCƒe?‚ðŽg‚Á‚½ŒÂ”
-// translation (babelfish):
-// SI of ???????? -l
-// 0: - {Mackerel SI -l, trap 1
-// 1:Athena SI -l, the quantity which used the item which was used
+// 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
// Will display experience gained from killing a monster. (Note 1)
@@ -708,21 +750,25 @@ hack_info_GM_level: 60
any_warp_GM_min_level: 20
// 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
-// 64: 2004-09-21aSakray Client
-// 128: 2004-10-18bSakexe Client
-// 256: 2004-10-25aSakexe Client
-// default value: 511 (all clients)
-packet_ver_flag: 511
+// Clients older than accepted versions, and versions not set to 'accepted'
+// here will be rejected when logging in
+// 1: Clients older than 2004-09-06aSakray
+// 2: 2004-09-06aSakray client
+// 4: 2004-09-21aSakray Client
+// 8: 2004-10-18bSakexe Client
+// 16: 2004-10-25aSakexe Client
+// 32: 2004-11-01aSakexe Client
+// 64: 2004-12-06aSakexe Client
+// 128: 2005-01-10aSakexe Client
+// default value: 255 (all clients)
+packet_ver_flag: 255
// Allow GMs to mute players or not?
muting_players: no
+// Allow GM commands to be used when muted?
+allow_atcommand_when_mute: yes
+
// Mail system - Only function in sql version
mail_system: no
@@ -746,5 +792,39 @@ mobs_level_up: no
// Use kRO new steal formula?
skill_steal_type: yes
+// Set this to 1 if your clients have langtype problems and can't display motd properly
+motd_type: 0
+
+// The minimum level for GMs' to drop items on the ground, use the Storage or
+// trade Items/Zeny?
+gm_can_drop_lv: 0
+
+// Allow GMs' to see the hp of every player?
+disp_hpmeter: no
+
+// Players' will drop a 'Bone' when killed?
+// 1 - Dropped only in PvP maps
+// 2 - Dropped in all situations
+// 0 - Disabled
+bone_drop: 0
+
+// The rate of monsters dropping ores by the skill Ore Discovery (Default is 100)
+finding_ore_rate: 100
+
+//Method of calculating earned experience when defeating a monster:
+//0 - jAthena's
+//1 - eAthena's, using damage given / max_hp as damage ratio
+//2 - eAthena's, using damage given / total damage as damage ratio
+exp_calc_type: 1
+
+// 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
+
+// Is exp sharing disabled for idle members in the party?
+idle_no_share: no
+
import: conf/import/battle_conf.txt
diff --git a/conf-tmpl/char_athena.conf b/conf-tmpl/char_athena.conf
index 4783f0446..06c1f4218 100644
--- a/conf-tmpl/char_athena.conf
+++ b/conf-tmpl/char_athena.conf
@@ -18,6 +18,10 @@ wisp_server_name: Server
//
// login_ip:127.0.0.1
+// What interface should we bind to.. if you have multiple IP's on one
+// machine, this lets you put multiple servers on the same ports
+// bind_ip:127.0.0.1
+
// Login Server Port
login_port: 6900
@@ -59,6 +63,9 @@ char_new: 0
// Maximum users able to connect to the server. Set to 0 for unlimited.
max_connect_user: 0
+// 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.
@@ -77,7 +84,7 @@ char_txt: save/athena.txt
// 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)
+// Character server flatfile database (backup, TXT only)
backup_txt: save/athena_backup.txt
// Friends list flatfile database
@@ -153,19 +160,16 @@ 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
-// Anti-freeze system enable
-anti_freeze_enable: 0
-// Anti-freeze system interval (in seconds)
-anti_freeze_interval: 6
-
-// If you want use an additional configuration file, uncomment and use this parameter
-//import: path/additional_configuration_file
-
// Mugendai's GUI Support
imalive_on: 0
imalive_time: 30
flush_on: 0
-flush_time: 30 \ No newline at end of file
+flush_time: 30
+
+import: conf/import/char_conf.txt
diff --git a/conf-tmpl/charcommand_athena.conf b/conf-tmpl/charcommand_athena.conf
index 17329c997..f48b7235e 100644
--- a/conf-tmpl/charcommand_athena.conf
+++ b/conf-tmpl/charcommand_athena.conf
@@ -8,11 +8,20 @@
// With default character, all commands begin by a '#', example: #save SomePlayer
command_symbol: #
-job: 60
-jobchange: 60
+stats: 40
+statsall: 40
+itemlist: 40
+effect: 40
+storagelist: 40
petrename: 50
petfriendly: 50
-stats: 40
option: 60
save: 60
-statsall: 40
+reset: 60
+spiritball: 60
+item: 60
+job: 60
+jobchange: 60
+zeny: 60
+
+import: conf/import/charcommand_conf.txt
diff --git a/conf-tmpl/help.txt b/conf-tmpl/help.txt
index fa8de1f69..62c5f5b22 100644
--- a/conf-tmpl/help.txt
+++ b/conf-tmpl/help.txt
@@ -101,6 +101,10 @@
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
+ 40: @rings - gives you the two wedding rings
60: @addwarp <map name> <x coord> <y coord>
40:
40:--- MONSTERS CMD ---
diff --git a/log/atcommandlog.log b/conf-tmpl/import/charcommand_conf.txt
index e69de29bb..e69de29bb 100644..100755
--- a/log/atcommandlog.log
+++ b/conf-tmpl/import/charcommand_conf.txt
diff --git a/log/branchlog.log b/conf-tmpl/import/log_conf.txt
index e69de29bb..e69de29bb 100644..100755
--- a/log/branchlog.log
+++ b/conf-tmpl/import/log_conf.txt
diff --git a/conf-tmpl/inter_athena.conf b/conf-tmpl/inter_athena.conf
index 475969f2b..a2155a5ac 100644
--- a/conf-tmpl/inter_athena.conf
+++ b/conf-tmpl/inter_athena.conf
@@ -23,6 +23,9 @@ castle_txt: save/castle.txt
// Options for both versions
+// Log Inter Connections, etc.?
+log_inter: 1
+
// Inter Log Filename
inter_log_filename: log/inter.log
@@ -30,15 +33,20 @@ inter_log_filename: log/inter.log
party_share_level: 10
+
+// SQL version options only
+
// The lowest GM level on your server
lowest_gm_level: 1
// How often the GM accounts will be reloaded by the map-server in minutes
read_gm_interval: 10
-
-
-// SQL version options only
+// 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
// MySQL Login SQL Server
login_server_ip: 127.0.0.1
@@ -124,5 +132,4 @@ mob_db_db: mob_db
//Use SQL item_db and mob_db for the map server
use_sql_db: no
-// Log Inter Connections, etc.?
-log_inter: 1
+import: conf/import/inter_conf.txt
diff --git a/conf-tmpl/ladmin_athena.conf b/conf-tmpl/ladmin_athena.conf
index e6f589863..dafd72388 100644
--- a/conf-tmpl/ladmin_athena.conf
+++ b/conf-tmpl/ladmin_athena.conf
@@ -30,5 +30,4 @@ ladmin_log_filename: log/ladmin.log
// 3: 2004-12-31 23:59:59 (default)
date_format: 3
-// If you want use an additional configuration file, uncomment and use this parameter
-//import: path/additional_configuration_file
+import: conf/import/ladmin_conf.txt
diff --git a/conf-tmpl/log_athena.conf b/conf-tmpl/log_athena.conf
index 1f7cd5e0e..f6337aa80 100644
--- a/conf-tmpl/log_athena.conf
+++ b/conf-tmpl/log_athena.conf
@@ -6,29 +6,64 @@ 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)
+//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 )
+
+//Example: (drops log)
+//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: 332 = logs only Healing items, Cards and those items which price is >= price_items_log
+//etc
+
+//not implemented yet
+refine_items_log: 7
+//not implemented yet
+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
-// Log Monster Drops
+// Log Monster Drops (You can use a filter)
log_drop: 0
// Log MVP Monster Drops
log_mvpdrop: 0
-// Log Present Items (Old Blue Box, etc.)
+// Log Present Items (Old Blue Box, etc.) (You can use a filter)
log_present: 0
-// Log Produced Items
+// Log Produced Items (You can use a filter)
log_produce: 0
-// Log Refining
+// Log Refining (You can use a filter)
log_refine: 0
-// Log Trading
+// Log Trading (You can use a filter)
log_trade: 0
-// Log Vending
+// Log Vending (You can use a filter)
log_vend: 0
// Log Zeny Trades
@@ -37,6 +72,9 @@ log_zeny: 0
// Log GM Commands (set to minimum level of Logged Commands)
log_gm: 40
+// Log NPC 'logmes' commands
+log_npc: 0
+
// Dead Branch Log Table
log_branch_db: branchlog
@@ -65,30 +103,38 @@ log_vend_db: vendlog
// GM Log Table
log_gm_db: atcommandlog
+// NPC Log Table
+log_npc_db: npclog
+
// Dead Branch Log File
-log_branch: log/branchlog.log
+log_branch_file: log/branchlog.log
// Drop Log File
-log_drop: log/droplog.log
+log_drop_file: log/droplog.log
// MVP Drop File
-log_mvpdrop: log/mvplog.log
+log_mvpdrop_file: log/mvplog.log
// Present Drop File
-log_present: log/presentlog.log
+log_present_file: log/presentlog.log
// Produce Log File
-log_produce: log/producelog.log
+log_produce_file: log/producelog.log
// Refine Log File
-log_refine: log/refinelog.log
+log_refine_file: log/refinelog.log
// Trade Log File
-log_trade: log/tradelog.log
+log_trade_file: log/tradelog.log
// Vend Log File
-log_vend: log/vendlog.log
+log_vend_file: log/vendlog.log
// GM Log File
-log_gm: log/atcommandlog.log \ No newline at end of file
+log_gm_file: log/atcommandlog.log
+
+// NPC Log File
+log_npc_file: log/npclog.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
index 4b25b6674..03de39051 100644
--- a/conf-tmpl/login_athena.conf
+++ b/conf-tmpl/login_athena.conf
@@ -1,7 +1,19 @@
// Athena Login Server configuration file.
// Translated by Peter Kieser <pfak@telus.net>
+
+// Login Server IP
+//
+// You should only need to set this if you are running behind a
+// firewall or on a machine with multiple interfaces. In that case,
+// you need to specify the IP address you wish to export to the entire world.
+//
+//login_ip:127.0.0.1
+
+// What interface should we bind to.. if you have multiple IP's on one
+// machine, this lets you put multiple servers on the same ports
+// bind_ip:127.0.0.1
-// Port to bind Login Server to (always binds to all IP addresses)
+// Login Server Port
login_port: 6900
// Whether remote administration is enabled or disabled (1 for enabled, 0 for disabled)
@@ -23,6 +35,9 @@ ladminallowip: all
// 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
@@ -37,6 +52,7 @@ gm_pass: gm
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 flatfile database, stores account information.
@@ -52,6 +68,9 @@ 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?
+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
@@ -119,12 +138,18 @@ check_ip_flag: yes
//deny: 123.123.123.123
//deny: 234.234.234.234
-// If you want use an additional configuration file, uncomment and use this parameter
-//import: path/additional_configuration_file
+//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
+// Use the 'online' column to set users online and offline [MySQL only]
+register_users_online: 0
+
//Ban features: read readme for more info if you dont know this.
ipban: 1
dynamic_pass_failure_ban: 1
@@ -134,11 +159,6 @@ dynamic_pass_failure_ban_how_long: 60
dynamic_account_ban: 1
dynamic_account_ban_class: 0
-// Anti-freeze system enable
-anti_freeze_enable: 0
-// Anti-freeze system interval (in seconds)
-anti_freeze_interval: 15
-
// Enable I'm Alive?
imalive_on: 0
// How often to display I'm Alive
@@ -146,4 +166,7 @@ imalive_time: 60
// Enable GUI flushing for Mugendai's GUI?
flush_on: 0
// How often to flush the buffer in Mugendai's GUI
-flush_time: 60 \ No newline at end of file
+flush_time: 60
+
+
+import: conf/import/login_conf.txt
diff --git a/conf-tmpl/map_athena.conf b/conf-tmpl/map_athena.conf
index 93bffe2e4..405af5d80 100644
--- a/conf-tmpl/map_athena.conf
+++ b/conf-tmpl/map_athena.conf
@@ -30,6 +30,10 @@ passwd: p1
//
//char_ip:127.0.0.1
+// What interface should we bind to.. if you have multiple IP's on one
+// machine, this lets you put multiple servers on the same ports
+// bind_ip:127.0.0.1
+
// Character Server Port
char_port: 6121
@@ -44,6 +48,20 @@ char_port: 6121
// Map Server Port
map_port: 5121
+//Preferred map loading method
+// 0: Read directly from grf
+// 1: Read from cache (without compression)
+// 2: Read from cache (with 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: 2
+//
+//Where is the bitmap file stored?
+map_cache_file: db/mapinfo.txt
+
// Console Commands
// Allow for console commands to be used on/off
// This prevents usage of >& log.file
@@ -60,1115 +78,16 @@ help_txt: conf/help.txt
mapreg_txt: save/mapreg.txt
+// NPCs
+import: npc/npcs_athena.conf
-//--------------------------------------------------------------
-// Map Flags
-//--------------------------------------------------------------
-// Files to set options in maps such as PVP, etc.
-//=======================================
-
-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/noicewall.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/nowarp.txt
-npc: conf/mapflag/nowarpto.txt
-npc: conf/mapflag/pvp.txt
-npc: conf/mapflag/pvp_noparty.txt
-// Water Flag
-npc: conf/mapflag/water.txt
-// How high is the water in maps?
-water_height: conf/mapflag/water_height.txt
-
-//--------------------------------------------------------------
-// Special
-//--------------------------------------------------------------
-
-// PCLoginEvent NPC. NPC which is activated for every player who logs in.
-npc: npc/sample/PCLoginEvent.txt
-
-
-//--------------------------------------------------------------
-// NPCs
-//--------------------------------------------------------------
-
-// ---------------- Your Own Npcs -----------------------
-//Add Them Here ;)
-
-
-//------------------------ Cities ----------------------------
-npc: npc/cities/alberta.txt
-npc: npc/cities/aldebaran.txt
-npc: npc/cities/amatsu.txt
-npc: npc/cities/comodo.txt
-npc: npc/cities/geffen.txt
-npc: npc/cities/izlude.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
-
-
-//-------------------------- Jobs -------------------------------
-//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/swordsman.txt
-
-//2-1 With Quest
-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 With Quest
-npc: npc/jobs/2-2/rogue.txt
-npc: npc/jobs/2-2/alchemist.txt
-npc: npc/jobs/2-2/sage.txt
-
-//2-2 Without Quest
-npc: npc/jobs/2-2/noquest/crusader.txt
-npc: npc/jobs/2-2/noquest/dancer-bard.txt
-npc: npc/jobs/2-2/noquest/monk.txt
-
-//2-1-1 Without Quest
-npc: npc/jobs/2-1-1/AssassinCross.txt
-npc: npc/jobs/2-1-1/LordKnight.txt
-npc: npc/jobs/2-1-1/HighPriest.txt
-npc: npc/jobs/2-1-1/HighWizard.txt
-npc: npc/jobs/2-1-1/WhiteSmith.txt
-npc: npc/jobs/2-1-1/Sniper.txt
-
-//2-2-1 Without Quest
-npc: npc/jobs/2-2-1/Champion.txt
-npc: npc/jobs/2-2-1/Clown.txt
-npc: npc/jobs/2-2-1/Creator.txt
-npc: npc/jobs/2-2-1/Gypsy.txt
-npc: npc/jobs/2-2-1/Paladin.txt
-npc: npc/jobs/2-2-1/Professor.txt
-npc: npc/jobs/2-2-1/Stalker.txt
-
-
-//------------------------- Merchants ----------------------------
-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/grandpa_pharmacist.txt
-npc: npc/merchants/inn.txt
-npc: npc/merchants/milk_trader.txt
-npc: npc/merchants/renters.txt
-npc: npc/merchants/alchemist.txt
-
-// Custom
-//npc: npc/merchants/custom/2-2shop.txt
-// Free Falcon & Peco breeder, Free Carts
-//npc: npc/merchants/custom/breeder.txt
-
-
-//--------------------------- Quests ------------------------------
-// Item Quests
-npc: npc/quests/quests_alberta.txt
-npc: npc/quests/quests_aldebaran.txt
-npc: npc/quests/quests_comodo.txt
-npc: npc/quests/quests_geffen.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
-
-// Extra Item Making
-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/bongun.txt
-npc: npc/quests/munak.txt
-npc: npc/quests/bongunsword.txt
-npc: npc/quests/monstertamers.txt
-
-// Custom Quests, might be balance breaking (Enable if you want)
-//npc: npc/quests/all_quest.txt
-//npc: npc/quests/magicalhatquest.txt
-//npc: npc/quests/fashion.txt
-//npc: npc/quests/custom/excalibur.txt
-//npc: npc/quests/custom/elvenear.txt
-//npc: npc/quests/custom/ironcane.txt
-//npc: npc/quests/custom/sunglasses.txt
-//npc: npc/quests/custom/berzebub.txt
-npc: npc/quests/custom/new_hats.txt
-// Above Npcs are better ^_^
-//npc: npc/quests/custom/event_32_new_hats.txt
-npc: npc/quests/custom/valhallen.txt
-//both Lord Kaho, but different and quest.txt has balmung to:
-//npc: npc/quests/custom/kaho_balmung.txt
-//npc: npc/quests/custom/kahohorn.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/swordsman_skills.txt
-npc: npc/quests/skills/thief_skills.txt
-
-//npc: npc/other/platinum_skills.txt
-
-
-// -------------------------- Guides -------------------------------
-npc: npc/guides/guides_alb.txt
-npc: npc/guides/guides_alde.txt
-npc: npc/guides/guides_com.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
-//more to come
-
-
-// -------------------------- 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
-//more to come
-
-
-//---------------------------- Events --------------------------------
-//npc: npc/events/easter.txt
-//npc: npc/events/valentinesday.txt
-//npc: npc/events/xmas.txt
-//npc: npc/events/alchemist.txt
-//npc: npc/events/twintowers.txt
-npc: npc/events/custom/uneasy_cemetery.txt
-//npc: npc/events/custom/draculax.txt
-
-
-//---------------------------- Others --------------------------------
-npc: npc/other/books.txt
-npc: npc/other/msg_boards.txt
-npc: npc/other/pvp.txt
-npc: npc/other/IceCream.txt
-npc: npc/other/card_remover.txt
-//npc: npc/other/wedding.txt
-//npc: npc/other/gefenia.txt
-//npc: npc/other/momotaro.txt
-//npc: npc/other/tougijou.txt
-//npc: npc/other/arena_mvp.txt
-
-// Global Scripts Functions ------------------
-npc: npc/other/Global_Functions.txt
-
-
-//------------------------- Unofficial NPCs --------------------------
-npc: npc/other/kafra_bank.txt
-//npc: npc/other/bank.txt
-//npc: npc/jobs/custom/reset.txt
-//npc: npc/jobs/custom/jobchange.txt
-//npc: npc/other/heal.txt
-//npc: npc/other/heal_payment.txt
-npc: npc/other/blackjack.txt
-
-// Warper NPC (Enable for free warp service)
-// 1st is Warper with only option for cities and dungeons
-//npc: npc/other/warper.txt
-// 2nd you can choose which lvl of the dungeon (you have to disabled 1 if you use 2!)
-//npc: npc/other/warper2.txt
-
-// Free Stylist NPC - Cloths/Hair Dye - (Requires 77 dye palletes)
-//npc: npc/merchants/custom/dye.txt
-
-// Dev NPCs
-npc: npc/other/devnpc.txt
-npc: npc/other/poetry/ayothaya.txt
-
-//= MC Cameri's Bank NPC
-//npc: npc/other/mc_cameri/bank.txt
-
-
-//-------------------------- 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
-//npc: npc/guild/nguild/nguild_dunsw.txt
-npc: npc/guild/nguild/nguild_treas.txt
-npc: npc/guild/nguild/nguild_guardians.txt
-
-//Guild Wars: Extras
-//npc: npc/guild/Extras/woe_gflag.txt
-npc: npc/guild/Extras/woe_warper.txt
-
-//------------------ Guild Wars(Non-optimized) -----------------------
-//Guild Wars: General
-//npc: npc/guild/old/ev_agit_event.txt
-
-//Guild Wars: Al de Baran
-//npc: npc/guild/old/aldeg_flag.txt
-//npc: npc/guild/old/ev_agit_aldeg.txt
-//npc: npc/guild/old/aldeg_cas01.txt
-//npc: npc/guild/old/guardian/aldeg_cas01_guardian.txt
-//npc: npc/guild/old/treasure/aldeg_cas01_treasure.txt
-//npc: npc/guild/old/aldeg_cas02.txt
-//npc: npc/guild/old/guardian/aldeg_cas02_guardian.txt
-//npc: npc/guild/old/treasure/aldeg_cas02_treasure.txt
-//npc: npc/guild/old/aldeg_cas03.txt
-//npc: npc/guild/old/guardian/aldeg_cas03_guardian.txt
-//npc: npc/guild/old/treasure/aldeg_cas03_treasure.txt
-//npc: npc/guild/old/aldeg_cas04.txt
-//npc: npc/guild/old/guardian/aldeg_cas04_guardian.txt
-//npc: npc/guild/old/treasure/aldeg_cas04_treasure.txt
-//npc: npc/guild/old/aldeg_cas05.txt
-//npc: npc/guild/old/guardian/aldeg_cas05_guardian.txt
-//npc: npc/guild/old/treasure/aldeg_cas05_treasure.txt
-
-//Guild Wars: Geffen
-//npc: npc/guild/old/gefg_flag.txt
-//npc: npc/guild/old/ev_agit_gefg.txt
-//npc: npc/guild/old/gefg_cas01.txt
-//npc: npc/guild/old/guardian/gefg_cas01_guardian.txt
-//npc: npc/guild/old/treasure/gefg_cas01_treasure.txt
-//npc: npc/guild/old/gefg_cas02.txt
-//npc: npc/guild/old/guardian/gefg_cas02_guardian.txt
-//npc: npc/guild/old/treasure/gefg_cas02_treasure.txt
-//npc: npc/guild/old/gefg_cas03.txt
-//npc: npc/guild/old/guardian/gefg_cas03_guardian.txt
-//npc: npc/guild/old/treasure/gefg_cas03_treasure.txt
-//npc: npc/guild/old/gefg_cas04.txt
-//npc: npc/guild/old/guardian/gefg_cas04_guardian.txt
-//npc: npc/guild/old/treasure/gefg_cas04_treasure.txt
-//npc: npc/guild/old/gefg_cas05.txt
-//npc: npc/guild/old/guardian/gefg_cas05_guardian.txt
-//npc: npc/guild/old/treasure/gefg_cas05_treasure.txt
-
-//Guild Wars: Payon
-//npc: npc/guild/old/payg_flag.txt
-//npc: npc/guild/old/ev_agit_payg.txt
-//npc: npc/guild/old/payg_cas01.txt
-//npc: npc/guild/old/guardian/payg_cas01_guardian.txt
-//npc: npc/guild/old/treasure/payg_cas01_treasure.txt
-//npc: npc/guild/old/payg_cas02.txt
-//npc: npc/guild/old/guardian/payg_cas02_guardian.txt
-//npc: npc/guild/old/treasure/payg_cas02_treasure.txt
-//npc: npc/guild/old/payg_cas03.txt
-//npc: npc/guild/old/guardian/payg_cas03_guardian.txt
-//npc: npc/guild/old/treasure/payg_cas03_treasure.txt
-//npc: npc/guild/old/payg_cas04.txt
-//npc: npc/guild/old/guardian/payg_cas04_guardian.txt
-//npc: npc/guild/old/treasure/payg_cas04_treasure.txt
-//npc: npc/guild/old/payg_cas05.txt
-//npc: npc/guild/old/guardian/payg_cas05_guardian.txt
-//npc: npc/guild/old/treasure/payg_cas05_treasure.txt
-
-//Guild Wars: Prontera
-//npc: npc/guild/old/prtg_flag.txt
-//npc: npc/guild/old/ev_agit_prtg.txt
-//npc: npc/guild/old/prtg_cas01.txt
-//npc: npc/guild/old/guardian/prtg_cas01_guardian.txt
-//npc: npc/guild/old/treasure/prtg_cas01_treasure.txt
-//npc: npc/guild/old/prtg_cas02.txt
-//npc: npc/guild/old/guardian/prtg_cas02_guardian.txt
-//npc: npc/guild/old/treasure/prtg_cas02_treasure.txt
-//npc: npc/guild/old/prtg_cas03.txt
-//npc: npc/guild/old/guardian/prtg_cas03_guardian.txt
-//npc: npc/guild/old/treasure/prtg_cas03_treasure.txt
-//npc: npc/guild/old/prtg_cas04.txt
-//npc: npc/guild/old/guardian/prtg_cas04_guardian.txt
-//npc: npc/guild/old/treasure/prtg_cas04_treasure.txt
-//npc: npc/guild/old/prtg_cas05.txt
-//npc: npc/guild/old/guardian/prtg_cas05_guardian.txt
-//npc: npc/guild/old/treasure/prtg_cas05_treasure.txt
-
-
-//--------------------- Warps ---------------------------
-//= Cities ============================
-npc: npc/warps/cities/alberta.txt
-npc: npc/warps/cities/aldebaran.txt
-npc: npc/warps/cities/amatsu.txt
-npc: npc/warps/ayothaya.txt
-npc: npc/warps/cities/comodo.txt
-npc: npc/warps/cities/geffen.txt
-npc: npc/warps/cities/gonryun.txt
-npc: npc/warps/cities/izlude.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/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/coal_mine.txt
-npc: npc/warps/dungeons/com_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/louyang_dun.txt
-npc: npc/warps/dungeons/lutie_dun.txt
-npc: npc/warps/dungeons/morroc_duns.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/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/gefenia.txt
-npc: npc/warps/fields/geffen_fild.txt
-npc: npc/warps/fields/glastheim.txt
-npc: npc/warps/fields/jawaii.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
-//= Guilds ==============================
-npc: npc/warps/guild/guildcastles.txt
-//= Other ================================
-npc: npc/warps/other/jobquests.txt
-npc: npc/warps/other/other.txt
-//= PVP ==================================
-npc: npc/warps/pvp/pvp.txt
-
-
-//--------------------- Mobs ---------------------------
-npc: npc/mobs/pvp.txt
-npc: npc/mobs/fields/amatsu.txt
-npc: npc/mobs/fields/ayothaya.txt
-npc: npc/mobs/fields/comodo.txt
-npc: npc/mobs/fields/gefenia.txt
-npc: npc/mobs/fields/geffen.txt
-npc: npc/mobs/fields/gonryun.txt
-npc: npc/mobs/fields/louyang.txt
-npc: npc/mobs/fields/lutie.txt
-npc: npc/mobs/fields/mjolnir.txt
-npc: npc/mobs/fields/morocc.txt
-npc: npc/mobs/fields/niflheim.txt
-npc: npc/mobs/fields/payon.txt
-npc: npc/mobs/fields/prontera.txt
-npc: npc/mobs/fields/umbala.txt
-npc: npc/mobs/fields/yuno.txt
-npc: npc/mobs/dungeons/amatdun.txt
-npc: npc/mobs/dungeons/anthell.txt
-npc: npc/mobs/dungeons/ayodun.txt
-npc: npc/mobs/dungeons/beachdun.txt
-npc: npc/mobs/dungeons/byalan.txt
-npc: npc/mobs/dungeons/clocktower.txt
-npc: npc/mobs/dungeons/coalmine.txt
-npc: npc/mobs/dungeons/geftower.txt
-npc: npc/mobs/dungeons/glastheim.txt
-npc: npc/mobs/dungeons/gondun.txt
-npc: npc/mobs/dungeons/guilddun.txt
-npc: npc/mobs/dungeons/louydun.txt
-npc: npc/mobs/dungeons/magmadun.txt
-npc: npc/mobs/dungeons/moc_pyramid.txt
-npc: npc/mobs/dungeons/moc_sphinx.txt
-npc: npc/mobs/dungeons/orcdun.txt
-npc: npc/mobs/dungeons/payoncave.txt
-npc: npc/mobs/dungeons/pront_maze.txt
-npc: npc/mobs/dungeons/pront_sewers.txt
-npc: npc/mobs/dungeons/sunkenship.txt
-npc: npc/mobs/dungeons/toyfactory.txt
-npc: npc/mobs/dungeons/turtleisland.txt
-npc: npc/mobs/dungeons/umbaladun.txt
-
-//------------------------- 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_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_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: iz_dun05.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_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_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_arena01.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_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
-map: gef_fild12.gat
-map: gef_fild13.gat
-map: gef_fild14.gat
-
-//---EP3.1 Quiz Revolution ---
-
-map: quiz_00.gat
-map: quiz_01.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: job_hunte.gat
-map: job_knt.gat
-map: job_prist.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: 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
-
-//--- 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.x - Some Maps ---
-//map: new_zone01.gat
-//map: new_zone02.gat
-//map: new_zone03.gat
-//map: new_zone04.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
-
-// 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
-
-//Maps that were not in the list but exist in Data.grf
-//map: ordeal_a00.gat
-//map: ordeal_a02.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
-
-import: conf/import/map_conf.txt
+// Maps:
+import: conf/maps_athena.conf
// Mugendai's GUI Support
imalive_on: 0
imalive_time: 30
flush_on: 0
flush_time: 30
+
+import: conf/import/map_conf.txt
diff --git a/conf-tmpl/mapflag/gvg.txt b/conf-tmpl/mapflag/gvg.txt
index 1df18fada..b754612b1 100644
--- a/conf-tmpl/mapflag/gvg.txt
+++ b/conf-tmpl/mapflag/gvg.txt
@@ -38,3 +38,9 @@ prtg_cas02.gat mapflag gvg
prtg_cas03.gat mapflag gvg
prtg_cas04.gat mapflag gvg
prtg_cas05.gat mapflag gvg
+
+// Guild Dungeons ==========
+gld_dun01.gat mapflag gvg
+gld_dun02.gat mapflag gvg
+gld_dun03.gat mapflag gvg
+gld_dun04.gat mapflag gvg \ No newline at end of file
diff --git a/conf-tmpl/mapflag/indoors.txt b/conf-tmpl/mapflag/indoors.txt
index 56c5060da..80f95790a 100644
--- a/conf-tmpl/mapflag/indoors.txt
+++ b/conf-tmpl/mapflag/indoors.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= eAthena Dev Team
//===== Current Version: =====================================
-//= 1.0
+//= 1.1 [Lupus]
//===== Compatible With: =====================================
//=
//===== Description: =========================================
@@ -50,4 +50,8 @@ 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 \ No newline at end of file
+ayo_in02.gat mapflag indoors
+que_sign01.gat mapflag indoors
+ein_in01.gat mapflag indoors
+airport.gat mapflag indoors
+airplane.gat mapflag indoors \ No newline at end of file
diff --git a/conf-tmpl/mapflag/jail.txt b/conf-tmpl/mapflag/jail.txt
index 5e497b911..4ccf63e8c 100644
--- a/conf-tmpl/mapflag/jail.txt
+++ b/conf-tmpl/mapflag/jail.txt
@@ -36,10 +36,10 @@ sec_pri.gat mapflag nowarp
//Uncomment following maps to let your prisoners fight with other prisoners
// PvP ===================================
-//sec_pri.gat mapflag pvp
+sec_pri.gat mapflag pvp
// No Party ==============================
-//sec_pri.gat mapflag pvp_noparty
+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/nobranch.txt b/conf-tmpl/mapflag/nobranch.txt
index d37e055f5..5fe581734 100644
--- a/conf-tmpl/mapflag/nobranch.txt
+++ b/conf-tmpl/mapflag/nobranch.txt
@@ -2,9 +2,12 @@
//= Map flags that disable dead branching
//===== By: ==================================================
//= eAthena Dev Team
+//= 1.2 [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
@@ -30,6 +33,7 @@ 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
@@ -39,6 +43,10 @@ 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
// Job Quests ====================
sword_1-1.gat mapflag nobranch
@@ -62,6 +70,10 @@ monk_in.gat mapflag nobranch
in_rogue.gat mapflag nobranch
job_sage.gat mapflag nobranch
+// Special Quests Places =========
+que_god01.gat mapflag noteleport
+que_god02.gat mapflag noteleport
+
// Guild Castles ==================
//alde_gld.gat mapflag nobranch
aldeg_cas01.gat mapflag nobranch
diff --git a/conf-tmpl/mapflag/noicewall.txt b/conf-tmpl/mapflag/noicewall.txt
index 08f46877d..7960c905c 100644
--- a/conf-tmpl/mapflag/noicewall.txt
+++ b/conf-tmpl/mapflag/noicewall.txt
@@ -5,8 +5,11 @@
//=============================================================
//= noicewall: Disables Icewall skill.
//= To disable Icewall on a specific map add the mapname here.
+//= 1.2 [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
@@ -34,6 +37,7 @@ 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
@@ -57,4 +61,8 @@ yuno_in05.gat mapflag noicewall
yuno.gat mapflag noicewall
gon_test.gat mapflag noicewall
nif_in.gat mapflag noicewall
-louyang.gat mapflag noicewall \ No newline at end of file
+louyang.gat mapflag noicewall
+que_sign01.gat mapflag noicewall
+ein_in01.gat mapflag noicewall
+airport.gat mapflag noicewall
+airplane.gat mapflag noicewall
diff --git a/conf-tmpl/mapflag/nomemo.txt b/conf-tmpl/mapflag/nomemo.txt
index 4bd5e9c36..97679fe0e 100644
--- a/conf-tmpl/mapflag/nomemo.txt
+++ b/conf-tmpl/mapflag/nomemo.txt
@@ -2,10 +2,15 @@
//= Map flags that disable warp portal memory
//===== By: ==================================================
//= eAthena Dev Team
+//= 1.2 [Lupus]
//===== Current Version: =====================================
-// Towns ==================>\\
+// 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
@@ -13,6 +18,9 @@ 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
@@ -24,23 +32,38 @@ 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
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
+yuno_fild02.gat mapflag nomemo
yuno_in01.gat mapflag nomemo
yuno_in02.gat mapflag nomemo
yuno_in03.gat mapflag nomemo
+que_sign01.gat mapflag nomemo
+ein_in01.gat mapflag nomemo
+airport.gat mapflag nomemo
+airplane.gat mapflag nomemo
-// Job quests ===================
+
+// Job quests ================
sword_1-1.gat mapflag nomemo
sword_2-1.gat mapflag nomemo
sword_3-1.gat mapflag nomemo
@@ -62,6 +85,11 @@ monk_in.gat mapflag nomemo
in_rogue.gat mapflag nomemo
job_sage.gat mapflag nomemo
+// Special Quests Places =====
+que_god01.gat mapflag nomemo
+que_god02.gat mapflag nomemo
+
+
// Dungeons =================
alde_dun01.gat mapflag nomemo
alde_dun02.gat mapflag nomemo
@@ -187,10 +215,15 @@ um_dun02.gat mapflag nomemo
// Toy Factory ---------------
xmas_dun01.gat mapflag nomemo
xmas_dun02.gat mapflag nomemo
-// Yggdrasil Tree Dun -------
+// 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
-// Guild Castles ===============
+// Guild Castles =============
//alde_gld.gat mapflag nomemo
aldeg_cas01.gat mapflag nomemo
aldeg_cas02.gat mapflag nomemo
@@ -220,14 +253,14 @@ gefg_cas03.gat mapflag nomemo
gefg_cas04.gat mapflag nomemo
gefg_cas05.gat mapflag nomemo
-// GvG Arenas =================
+// 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 ====================>\\
+// Arenas ====================
arena_room.gat mapflag nomemo
force_1-1.gat mapflag nomemo
force_1-2.gat mapflag nomemo
@@ -267,7 +300,7 @@ wizard_1-1.gat mapflag nomemo
wizard_2-1.gat mapflag nomemo
wizard_3-1.gat mapflag nomemo
-// PvP Arenas ===================
+// PvP Arenas ================
pvp_y_room.gat mapflag nomemo
pvp_y_1-1.gat mapflag nomemo
pvp_y_1-2.gat mapflag nomemo
diff --git a/conf-tmpl/mapflag/nopenalty.txt b/conf-tmpl/mapflag/nopenalty.txt
index 604653527..f0f1df1bd 100644
--- a/conf-tmpl/mapflag/nopenalty.txt
+++ b/conf-tmpl/mapflag/nopenalty.txt
@@ -2,10 +2,13 @@
//= Map flags that disable exp. penalty on death.
//===== By: ==================================================
//= eAthena Dev Team
+//= 1.1 [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
@@ -44,6 +47,7 @@ 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
diff --git a/conf-tmpl/mapflag/nopvp.txt b/conf-tmpl/mapflag/nopvp.txt
index ecddb854a..34f9a75c0 100644
--- a/conf-tmpl/mapflag/nopvp.txt
+++ b/conf-tmpl/mapflag/nopvp.txt
@@ -3,6 +3,8 @@
//= To disable PvP mode on a specific map add the mapname here.
//============================================================
+ayo_in01.gat mapflag nopvp
+ayo_in02.gat mapflag nopvp
alberta_in.gat mapflag nopvp
alberta.gat mapflag nopvp
alde_alche.gat mapflag nopvp
@@ -55,4 +57,3 @@ yuno_in04.gat mapflag nopvp
yuno_in05.gat mapflag nopvp
yuno.gat mapflag nopvp
gon_test.gat mapflag nopvp
-
diff --git a/conf-tmpl/mapflag/noreturn.txt b/conf-tmpl/mapflag/noreturn.txt
new file mode 100644
index 000000000..91bcf46ab
--- /dev/null
+++ b/conf-tmpl/mapflag/noreturn.txt
@@ -0,0 +1,198 @@
+//===== eAthena Script =======================================
+//= Map flags that disable use of Butterfly wings
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.1 [Lupus]
+//===== Notes: ===============================================
+//= For disabling Fly wings use noteleport
+//===== 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
+
+// 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_knight.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 =================
+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
+
+// 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
index c12a2df2e..a767ece14 100644
--- a/conf-tmpl/mapflag/nosave.txt
+++ b/conf-tmpl/mapflag/nosave.txt
@@ -2,6 +2,7 @@
//= Map flags that disable auto saving
//===== By: ==================================================
//= eAthena Dev Team
+//= 1.2 [Lupus]
//===== Current Version: =====================================
// Job Quests ====================
@@ -26,6 +27,11 @@ monk_in.gat mapflag nosave SavePoint
in_rogue.gat mapflag nosave SavePoint
job_sage.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
diff --git a/conf-tmpl/mapflag/noteleport.txt b/conf-tmpl/mapflag/noteleport.txt
index bd6f6d8fa..78458c574 100644
--- a/conf-tmpl/mapflag/noteleport.txt
+++ b/conf-tmpl/mapflag/noteleport.txt
@@ -1,10 +1,15 @@
//===== eAthena Script =======================================
-//= Map flags that disable use of fly/butterfly wings
+//= Map flags that disable use of fly wings
//===== By: ==================================================
//= eAthena Dev Team
+//= 1.2 [Lupus]
+//===== Notes: ===============================================
+//= For disabling Butterfly wings use noreturn
//===== Current Version: =====================================
-// Cities ===============>\\
+// 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
@@ -30,6 +35,7 @@ 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
@@ -41,8 +47,12 @@ 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
-// Job Quests =========================
+// Job Quests ====================
sword_1-1.gat mapflag noteleport
sword_2-1.gat mapflag noteleport
sword_3-1.gat mapflag noteleport
@@ -64,7 +74,11 @@ monk_in.gat mapflag noteleport
in_rogue.gat mapflag noteleport
job_sage.gat mapflag noteleport
-// Guild Castles ====================
+// 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
diff --git a/conf-tmpl/mapflag/water.txt b/conf-tmpl/mapflag/water.txt
deleted file mode 100644
index 71f98470d..000000000
--- a/conf-tmpl/mapflag/water.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-// …‚ÌÝ’èB
-// water‚Í…‚ ‚è‚Åall_water‚Í‘S‚Ä…‚¾‚Æ”»’f‚·‚éƒ}ƒbƒvB
-
-mjolnir_12.gat mapflag water
-mjolnir_02.gat mapflag water
-glast_01.gat mapflag water
-gef_fild04.gat mapflag water
-prt_fild02.gat mapflag water
-prt_fild01.gat mapflag water
-prt_fild00.gat mapflag water
-gef_fild00.gat mapflag water
-gef_fild07.gat mapflag water
-gef_fild13.gat mapflag water
-gef_fild09.gat mapflag water
-gef_fild01.gat mapflag water
-prt_fild05.gat mapflag water
-gef_fild03.gat mapflag water
-gef_fild10.gat mapflag water
-prt_fild10.gat mapflag water
-pay_arche.gat mapflag water
-moc_ruins.gat mapflag water
-comodo.gat mapflag water
-cmd_fild01.gat mapflag water
-cmd_fild02.gat mapflag water
-cmd_fild03.gat mapflag water
-cmd_fild04.gat mapflag water
-cmd_fild05.gat mapflag water
-moc_fild11.gat mapflag water
-ama_fild01.gat mapflag water
-
-iz_dun00.gat mapflag water
-iz_dun01.gat mapflag water
-iz_dun02.gat mapflag water
-//iz_dun03.gat mapflag all_water
-//iz_dun04.gat mapflag all_water
-treasure01.gat mapflag water
-treasure02.gat mapflag water
-mjo_dun01.gat mapflag water
-orcsdun02.gat mapflag water
-pay_dun01.gat mapflag water
-pay_dun02.gat mapflag water
-pay_dun03.gat mapflag water
-prt_sewb2.gat mapflag water
-prt_sewb3.gat mapflag water
-gl_prison1.gat mapflag water
-alde_dun03.gat mapflag water
-alde_dun04.gat mapflag water
-beach_dun.gat mapflag water
-beach_dun2.gat mapflag water
-beach_dun3.gat mapflag water
-tur_dun01.gat mapflag water
-gld_dun02.gat mapflag water
-gld_dun03.gat mapflag water
-gld_dun04.gat mapflag water
diff --git a/conf-tmpl/mapflag/water_height.txt b/conf-tmpl/mapflag/water_height.txt
index 9a89e29c0..979495abc 100644
--- a/conf-tmpl/mapflag/water_height.txt
+++ b/conf-tmpl/mapflag/water_height.txt
@@ -1,5 +1,5 @@
// …ê‚Ì‚‚³‚ðÝ’è
-//water_height.txt—AthenaDBŒv‰æ 2004/03/31 18:52:09 +0900 (JST)
+//water_height.txt eAthenaDB 2005/03/25 18:52:09 +0900 (JST)
xmas.gat 3
mjolnir_01.gat 0
@@ -66,3 +66,6 @@ gefg_cas05.gat 5
prtg_cas05.gat 13
tur_dun01.gat -65
ama_fild01.gat 5
+yuno_fild09.gat 10
+yuno_fild11.gat -19
+//sec_in02.gat 5 dunno what value \ 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..a82fc1305
--- /dev/null
+++ b/conf-tmpl/maps_athena.conf
@@ -0,0 +1,628 @@
+//------------------------- 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_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_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: iz_dun05.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_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_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_arena01.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_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
+map: gef_fild12.gat
+map: gef_fild13.gat
+map: gef_fild14.gat
+
+//---EP3.1 Quiz Revolution ---
+
+map: quiz_00.gat
+map: quiz_01.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: job_hunte.gat
+map: job_knt.gat
+map: job_prist.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: 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
+
+//--- 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.x - Some Maps ---
+//map: new_zone01.gat
+//map: new_zone02.gat
+//map: new_zone03.gat
+//map: new_zone04.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
+
+// --- Race Arena ---
+// -- 2005-03-08sdata_k.gpf --
+map: alde_tt02.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
+
+// 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
+
+//Maps that were not in the list but exist in Data.grf
+//map: ordeal_a00.gat
+//map: ordeal_a02.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 \ No newline at end of file
diff --git a/conf-tmpl/msg_athena.conf b/conf-tmpl/msg_athena.conf
index e9253f20d..c1121780b 100644
--- a/conf-tmpl/msg_athena.conf
+++ b/conf-tmpl/msg_athena.conf
@@ -257,6 +257,18 @@
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 authorise you to do this action.
+247: You are not authorised to warp to this map.
+248: You are not authorised to warp from your current map.
+249: You are not authorised 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 authorised to memo this map.
+254: GM commands configuration reloaded.
+255: Battle configuration reloaded.
+256: Status database reloaded.
+257: Player database reloaded.
// Messages of others (not for GM commands)
// ----------------------------------------
@@ -264,4 +276,40 @@
500: Actually, it's the night...
501: Your account time limit is: %d-%m-%Y %H:%M:%S.
502: The day has arrived!
-503: The night has fallen... \ No newline at end of file
+503: The night has fallen...
+
+//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
+
+//Guilds Default Ranks/Positions [Not implemented yet]
+507: GuildMaster
+508: Newbie
+509: Position %d
+
+//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.
+
+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.
diff --git a/conf-tmpl/packet_athena.conf b/conf-tmpl/packet_athena.conf
new file mode 100644
index 000000000..1c6d78560
--- /dev/null
+++ b/conf-tmpl/packet_athena.conf
@@ -0,0 +1,55 @@
+// Athena sockets Configuration file
+// (Untranslated yet)
+
+
+// ƒfƒoƒbƒOî•ñ‚Ì•\Ž¦iƒoƒO•ñ‚ÌۂɃRƒsƒy‚µ‚Ä’¸‚¯‚é‚Æ•‚©‚è‚Ü‚·j
+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
+
+// ƒAƒNƒZƒX§ŒÀ‚Ì”»’臘(Apache‚Æ“¯‚¶)
+// deny,allow ‚ª•W€‚É‚È‚Á‚Ä‚¢‚Ü‚·B
+
+order: deny,allow
+// order: allow,deny
+// order: mutual-failture
+
+// ƒAƒNƒZƒXƒRƒ“ƒgƒ[ƒ‹‚·‚éIPƒŠƒXƒg
+// allow : ddosƒ`ƒFƒbƒN‚ÌŒ‹‰Ê‚ÉŠÖŒW‚È‚­‹–‰Â
+// deny : •s‹–‰Â
+// Žw’è–³‚µ : ddosƒ`ƒFƒbƒN‚ÌŒ‹‰Ê‚Å‹–‰Â / •s‹–‰Â‚ðŒˆ’è
+// ‚½‚¾‚µAmutual-failture ‚Ìꇂ͕s‹–‰Â‚É‚È‚è‚Ü‚·B
+
+// 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 ----
+
+// ddosUŒ‚‚Æ”»’f‚·‚éˆ×‚̃‹[ƒ‹Ý’è
+// ddos_interval msecˆÈ“à‚ÌÚ‘±—v‹‚ªddos_count‰ñ‘±‚¢‚½ê‡‚ÉA
+// ddosUŒ‚‚³‚ꂽ‚Æ”»’肵‚Ü‚·B
+
+// Ú‘±ŠÔŠu(msec)
+ddos_interval: 3000
+
+// Ú‘±‰ñ”
+ddos_count: 5
+
+// ddos§ŒÀ‚ð‰ðœ‚·‚éŠÔŠu(msec)
+// ‚±‚ÌŽžŠÔŒo‰ß‚·‚é‚ÆAÚ‘±§ŒÀ‚ª‰ðœ‚³‚ê‚Ü‚·B
+ddos_autoreset: 600000
+
+
+//import: conf/import/packet_conf.txt \ No newline at end of file
diff --git a/conf-tmpl/readme.txt b/conf-tmpl/readme.txt
new file mode 100644
index 000000000..db8777680
--- /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
index 21d4a6f45..3e420744b 100644
--- a/conf-tmpl/script_athena.conf
+++ b/conf-tmpl/script_athena.conf
@@ -1,2 +1,54 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \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: 65536
+
+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
+
+// 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
+
+// For events to be activated do we require
+// a 'set [EventName],1;' to be called first?
+event_requires_trigger: yes
diff --git a/conf-tmpl/water.txt b/conf-tmpl/water.txt
deleted file mode 100644
index 3844802db..000000000
--- a/conf-tmpl/water.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-// …‚ÌÝ’èB
-// water‚Í…‚ ‚è‚Åall_water‚Í‘S‚Ä…‚¾‚Æ”»’f‚·‚éƒ}ƒbƒvB
-
-mjolnir_12.gat mapflag water
-mjolnir_02.gat mapflag water
-glast_01.gat mapflag water
-gef_fild04.gat mapflag water
-prt_fild02.gat mapflag water
-prt_fild01.gat mapflag water
-prt_fild00.gat mapflag water
-gef_fild00.gat mapflag water
-gef_fild07.gat mapflag water
-gef_fild13.gat mapflag water
-gef_fild09.gat mapflag water
-gef_fild01.gat mapflag water
-prt_fild05.gat mapflag water
-gef_fild03.gat mapflag water
-gef_fild10.gat mapflag water
-prt_fild10.gat mapflag water
-pay_arche.gat mapflag water
-moc_ruins.gat mapflag water
-comodo.gat mapflag water
-cmd_fild01.gat mapflag water
-cmd_fild02.gat mapflag water
-cmd_fild03.gat mapflag water
-cmd_fild04.gat mapflag water
-cmd_fild05.gat mapflag water
-moc_fild11.gat mapflag water
-ama_fild01.gat mapflag water
-
-iz_dun00.gat mapflag water
-iz_dun01.gat mapflag water
-iz_dun02.gat mapflag water
-//iz_dun03.gat mapflag all_water
-//iz_dun04.gat mapflag all_water
-treasure01.gat mapflag water
-treasure02.gat mapflag water
-mjo_dun01.gat mapflag water
-orcsdun02.gat mapflag water
-pay_dun01.gat mapflag water
-pay_dun02.gat mapflag water
-pay_dun03.gat mapflag water
-prt_sewb2.gat mapflag water
-prt_sewb3.gat mapflag water
-gl_prison1.gat mapflag water
-alde_dun03.gat mapflag water
-alde_dun04.gat mapflag water
-beach_dun.gat mapflag water
-beach_dun2.gat mapflag water
-beach_dun3.gat mapflag water
-tur_dun01.gat mapflag water
-gld_dun02.gat mapflag water
-gld_dun03.gat mapflag water
-gld_dun04.gat mapflag water
diff --git a/conf-tmpl/water_height.txt b/conf-tmpl/water_height.txt
deleted file mode 100644
index 9a89e29c0..000000000
--- a/conf-tmpl/water_height.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-// …ê‚Ì‚‚³‚ðÝ’è
-//water_height.txt—AthenaDBŒv‰æ 2004/03/31 18:52: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_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
-tur_dun01.gat -65
-ama_fild01.gat 5
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 62086b7bf..023ecea6b 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -1,13 +1,263 @@
Post here any database changes ok guys? [shadowlady]
==== progress ====
- Ayathoya mobs == Added but using poring stats ( ? )
- Ayathoya items == Added but no effect ( all are "ect" itens)
+
+ Ayothaya mobs == 90% All have correct stats now ?
+ Einbroch mobs == 5% Added but using poring stats
+ Ayothaya items == 70% Added but no effect ( all are "etc" itens)
+ Einbroch items == 5%
Skill databases == celest working on them i believe.
+
+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).
diff --git a/db/const.txt b/db/const.txt
index 6de6ad330..673c5b9de 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -44,28 +44,28 @@ Job_Clown 43
Job_Gypsy 44
Job_Paladin2 45
Job_Baby 46
-Job_Baby_Swordman 47
-Job_Baby_Mage 48
-Job_Baby_Archer 49
-Job_Baby_Acolyte 50
-Job_Baby_Merchant 51
-Job_Baby_Thief 52
-Job_Baby_Knight 53
-Job_Baby_Priest 54
-Job_Baby_Wizard 55
-Job_Baby_Blacksmith 56
-Job_Baby_Hunter 57
-Job_Baby_Assassin 58
-Job_Baby_Knight2 59
-Job_Baby_Crusader 60
-Job_Baby_Monk 61
-Job_Baby_Sage 62
-Job_Baby_Rogue 63
-Job_Baby_Alchem 64
-Job_Baby_Bard 65
-Job_Baby_Dancer 66
-Job_Baby_Crusader2 67
-Job_Super_Baby 68
+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
mf_nomemo 0
mf_noteleport 1
@@ -110,6 +110,8 @@ MaxHp 6 1
Sp 7 1
MaxSp 8 1
BaseJob 119 1
+Karma 4 1
+Manner 5 1
bMaxHP 6
bMaxSP 8
@@ -131,8 +133,8 @@ bFlee 50
bFlee2 51
bCritical 52
bAspd 53
-bFame 57
-bUnbreakable 58
+bFame 59
+bUnbreakable 60
bAtkRange 1000
bAtkEle 1001
@@ -213,6 +215,11 @@ bAgiDexStr 1075
bPerfectHide 1076
bDisguise 1077
bClassChange 1078
+bHPDrainValue 1079
+bSPDrainValue 1080
+bWeaponAtk 1081
+bWeaponAtkRate 1082
+bDelayrate 1083
bRestartFullRecover 2000
bNoCastCancel 2001
@@ -222,6 +229,36 @@ 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
Eff_Stone 0
@@ -233,6 +270,7 @@ Eff_Curse 5
Eff_Silence 6
Eff_Confusion 7
Eff_Blind 8
+Eff_Bleeding 9
SC_Stone 128
SC_Freeze 129
@@ -243,9 +281,12 @@ SC_Curse 133
SC_Silence 134
SC_Confusion 135
SC_Blind 136
+SC_Bleeding 124
SC_SpeedPot0 37
SC_SpeedPot1 38
SC_SpeedPot2 39
+SC_SpeedPot3 40
+SC_SpeedUp0 41
SC_ATKPot 185
SC_MATKPot 186
SC_EncPoison 6
@@ -254,5 +295,3 @@ SC_Flame 90
SC_Frost 91
SC_Lightning 92
SC_Seismic 93
-SC_Bleeding 124
-SC_BlockSkill 194
diff --git a/db/create_arrow_db.txt b/db/create_arrow_db.txt
index f5bd1077f..c084d4ec3 100644
--- a/db/create_arrow_db.txt
+++ b/db/create_arrow_db.txt
@@ -5,9 +5,9 @@
609,1761,40
713,1770,2
714,1757,600,1769,600,1765,600
-715,1756,10,1768,1
+715,1756,300,1768,1
716,1762,10,1763,1,1761,1
-717,1754,10,1759,1
+717,1754,300,1759,1
724,1761,50,1768,10
733,1764,50
756,1765,50
@@ -26,7 +26,7 @@
939,1762,1
947,1770,35
952,1750,50
-956,1770,80,1754,5
+956,1770,80,1754,1500
957,1762,1,1767,1
958,1767,5
959,1763,1
@@ -34,14 +34,14 @@
969,1760,50,1765,50
984,1765,250
985,1753,1000,1758,50
-990,1752,200
-991,1754,50
-992,1755,50
-993,1756,50
-994,1752,600,1769,5
-995,1754,150,1759,5
-996,1755,150,1768,5
-997,1756,150,1760,5
+990,1752,6000
+991,1754,1500
+992,1755,1500
+993,1756,1500
+994,1752,1800,1769,5
+995,1754,4500,1759,5
+996,1755,4500,1768,5
+997,1756,4500,1760,5
998,1770,100
999,1753,100
1000,1760,30
@@ -50,7 +50,8 @@
1003,1767,8
1010,1770,50
1011,1770,200,1751,40
-1018,1770,50,1756,2
+1017,1756,300
+1018,1770,50,1756,60
1019,1750,40
1021,1770,40,1767,2
1027,1750,70,1756,1
@@ -60,7 +61,7 @@
1041,1770,80
1043,1753,10
1044,1762,5
-1053,1753,20,1754,10
+1053,1753,3000,1754,10
1063,1764,2,1751,40
1064,1770,100,1753,50
1066,1750,20
@@ -78,8 +79,8 @@
2332,1751,700
2333,1751,1000,1757,10
2408,1770,700,1753,50
-2618,1755,50,1753,100,1764,10
-5014,1754,200,1753,200
+2618,1755,1500,1753,100,1764,10
+5014,1754,6000,1753,200
7002,1753,30,1762,5
7008,1758,2
7010,1753,250,1763,1
@@ -93,7 +94,7 @@
7025,1758,800,1769,400,1768,800
7026,1765,50
7027,1767,100
-7035,1752,1000
-7036,1754,100
+7035,1752,3000
+7036,1754,3000
7053,1751,40
diff --git a/db/exp.txt b/db/exp.txt
index b089fa85d..b8e1a9a73 100644
--- a/db/exp.txt
+++ b/db/exp.txt
@@ -8,7 +8,7 @@
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,508,508,508,0,604,4290,604,0,1208,8580
+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
@@ -67,33 +67,33 @@
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,0,0,0,0
-1594058,1594058,1594058,1594058,3666333,3666333,3666333,0,0,0,0,0,0,0
-1718928,1718928,1718928,1718928,3953534,3953534,3953534,0,0,0,0,0,0,0
-1848355,1848355,1848355,1848355,4251217,4251217,4251217,0,0,0,0,0,0,0
-1982340,1982340,1982340,1982340,4559382,4559382,4559382,0,0,0,0,0,0,0
-2230113,2230113,2230113,2230113,5129260,5129260,5129260,0,0,0,0,0,0,0
-2386162,2386162,2386162,2386162,5488173,5488173,5488173,0,0,0,0,0,0,0
-2547417,2547417,2547417,2547417,5859059,5859059,5859059,0,0,0,0,0,0,0
-2713878,2713878,2713878,2713878,6241919,6241919,6241919,0,0,0,0,0,0,0
-3206160,3206160,3206160,3206160,7374168,7374168,7374168,0,0,0,0,0,0,0
-3681024,3681024,3681024,3681024,9570662,9570662,9570662,0,0,0,0,0,0,0
-4022472,4022472,4022472,4022472,10458427,10458427,10458427,0,0,0,0,0,0,0
-4377024,4377024,4377024,4377024,11380262,11380262,11380262,0,0,0,0,0,0,0
-4744680,4744680,4744680,4744680,12336168,12336168,12336168,0,0,0,0,0,0,0
-5125440,5125440,5125440,5125440,13326144,13326144,13326144,0,0,0,0,0,0,0
-5767272,5767272,5767272,5767272,14994907,14994907,14994907,0,0,0,0,0,0,0
-6204000,6204000,6204000,6204000,16130400,16130400,16130400,0,0,0,0,0,0,0
-6655464,6655464,6655464,6655464,17304200,17304200,17304200,0,0,0,0,0,0,0
-7121664,7121664,7121664,7121664,18516326,18516326,18516326,0,0,0,0,0,0,0
-7602600,7602600,7602600,7602600,19766760,19766760,19766760,0,0,0,0,0,0,0
-9738720,9738720,9738720,9738720,29216160,29216160,29216160,0,0,0,0,0,0,0
-11649960,11649960,11649960,11649960,34949880,34949880,34949880,0,0,0,0,0,0,0
-13643520,13643520,13643520,13643520,40930560,40930560,40930560,0,0,0,0,0,0,0
-18339300,18339300,18339300,18339300,55017900,55017900,55017900,0,0,0,0,0,0,0
-23836800,23836800,23836800,23836800,71510400,71510400,71510400,0,0,0,0,0,0,0
-35658000,35658000,35658000,35658000,106974000,106974000,106974000,0,0,0,0,0,0,0
-48687000,48687000,48687000,48687000,146061000,146061000,146061000,0,0,0,0,0,0,0
-58135000,58135000,58135000,58135000,174405000,174405000,174405000,0,0,0,0,0,0,0
-99999999,99999999,99999999,99999999,343210000,343210000,343210000,0,0,0,0,0,0,0
+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,299999997,299999997,299999997,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/item_avail.txt b/db/item_avail.txt
index 1f35ae6e5..5f4ab95a9 100644
--- a/db/item_avail.txt
+++ b/db/item_avail.txt
@@ -1,9 +1,4 @@
// item id,sprite id
// Client will use sprite ID to display particular item.
// If 0 is used then item will be disabled.
-660,5028 //Forbidden_Red_Candle,Candle (Will use candle sprite and description)
-661,7047 //Flapping_Apron,Alice's_Apron
-9026,720 //Alice_Egg,Aquamarine
-9027,723 //Zherlthsh_Egg,Ruby
-2237,2241 //Bandit_Beard",2240 BEARD
-2240,2241
+2240,2241 //Beard - Grampa Beard
diff --git a/db/item_bluebox.txt b/db/item_bluebox.txt
index db4307c9c..2c0484d9c 100644
--- a/db/item_bluebox.txt
+++ b/db/item_bluebox.txt
@@ -7,6 +7,8 @@
2104,Buckler,20000
2106,Shield,10000
2108,Mirror Shield,10000
+2201,Sunglasses,10000
+2203,Glasses,10000
2205,Diver's Goggles,30000
2206,Wedding Veil,10000
2207,Fancy Flower,10000
diff --git a/db/item_cardalbum.txt b/db/item_cardalbum.txt
index d7202c70d..4aee23b01 100644
--- a/db/item_cardalbum.txt
+++ b/db/item_cardalbum.txt
@@ -121,38 +121,197 @@
4115,Hunter Fly Card,10000
4116,Isis Card,10000
4117,Sidewinder Card,10000
-4118,Petit Card,10000
+4118,Earth Petit Card,10000
4119,Bathory Card,10000
-4120,Petit 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 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
-4149,Bon Gun Card,10000
-4150,Orc Archer Card,10000
-4151,Mimic Card,10000
-4152,Wraith Card,10000
-4153,Alarm Card,10000
-4154,Arclouse Card,10000
-4155,Rideword Card,10000
-4156,Skel Prisoner Card,10000
-4157,Zombie Prisoner Card,10000
-4158,Dark Priest Card,10000
-4159,Punk Card,10000
-4160,Zherlthsh Card,10000
-4161,Mysteltainn Card,10000
-4164,Anolian Card,10000
-4165,Sting Card,10000
-4166,Wander Man Card,10000
-4167,Cramp Card,10000
-4168,Filamentous Card,10000
-4169,Brilight Card,10000
-4170,Iron Fist 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,Incubus Card,10000
+4269,Injustice 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
+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
+//isn't Tao Gunka a MVP?
+//4302,Tao Gunka Card,10000
+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,10000
+4328,Hyegun Card,10000
+4329,Phendark Card,10000
+4331,Heater Card,10000
diff --git a/db/item_db.txt b/db/item_db.txt
index b9c6aefa8..8fc372e07 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -1,8 +1,9 @@
//ID,Name,Name,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Gender,Loc,wLV,eLV,View,{UseScript},{EquipScript}
+//Elements: 0 Nothing, 1 Water, 2 Earth ,3 Fire, 4 Wind, 5 Poison, 6 Saint, 7 Darkness, 8 Sense, 9 Immortality
// Healing Items
//=============================================================
-0,DEFAULT,Default,0,20,,10,,,,,0,2,0,0,,,{},{},,
+0,DEFAULT,Default,0,20,,10,,,,,0,2,0,0,,,{},{}
501,Red_Potion,Red Potion,0,50,0,70,,,,,10477567,2,,,,,{ itemheal rand(45,64),0; },{}
502,Orange_Potion,Orange Potion,0,200,0,100,,,,,10477567,2,,,,,{ itemheal rand(105,144),0; },{}
503,Yellow_Potion,Yellow Potion,0,550,0,130,,,,,10477567,2,,,,,{ itemheal rand(175,234),0; },{}
@@ -14,11 +15,11 @@
509,White_Herb,White Herb,0,120,0,70,,,,,10477567,2,,,,,{ itemheal rand(75,114),0; },{}
510,Blue_Herb,Blue Herb,0,60,0,70,,,,,10477567,2,,,,,{ itemheal 0,rand(15,29); },{}
511,Green_Herb,Green Herb,0,10,0,30,,,,,10477567,2,,,,,{ sc_end SC_Poison; },{}
-512,mace,Apple,0,15,0,20,,,,,10477567,2,,,,,{ itemheal rand(16,21),0; },{}
+512,Apple,Apple,0,15,0,20,,,,,10477567,2,,,,,{ itemheal rand(16,21),0; },{}
513,Banana,Banana,0,15,0,20,,,,,10477567,2,,,,,{ itemheal rand(17,20),0; },{}
514,Grape,Grape,0,200,0,20,,,,,10477567,2,,,,,{ itemheal 0,rand(10,14); },{}
515,Carrot,Carrot,0,15,0,20,,,,,10477567,2,,,,,{ itemheal rand(18,19),0; },{}
-516,Sweet_Potato,Sweet Potato,0,15,0,20,,,,,10477567,2,,,,,{ itemheal rand(15,22),0; },{}
+516,Sweet_Potato,Sweet Potato,0,15,0,20,,,,,10477567,2,,,,,{ itemheal rand(15,22),0; if(rand(100)<3) sc_start SC_Stan,10000,0; },{} //??
517,Meat,Meat,0,50,0,150,,,,,10477567,2,,,,,{ itemheal rand(70,99),0; },{}
518,Honey,Honey,0,500,0,100,,,,,10477567,2,,,,,{ itemheal rand(70,99),rand(20,39); },{}
519,Milk,Milk,0,25,0,30,,,,,10477567,2,,,,,{ itemheal rand(27,36),0; },{}
@@ -27,7 +28,7 @@
522,Mastela_Fruit,Mastela Fruit,0,840,0,30,,,,,10477567,2,,,,,{ itemheal rand(400,599),0; },{}
523,Holy_Water,Holy Water,0,20,0,30,,,,,10477567,2,,,,,{ sc_end SC_Curse; },{}
525,Panacea,Panacea,0,500,0,100,,,,,10477567,2,,,,,{ sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse; },{}
-526,Royal_Jelly,Royal Jelly,0,7000,0,150,,,,,10477567,2,,,,,{ itemheal rand(325,404),rand(40,59); sc_end SC_Posion; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse; },{}
+526,Royal_Jelly,Royal Jelly,0,7000,0,150,,,,,10477567,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; },{}
528,Monster's_Feed,Monster Food,0,60,0,150,,,,,10477567,2,,,,,{ itemheal rand(72,107),0; },{}
529,Candy,Candy,0,10,0,30,,,,,10477567,2,,,,,{ itemheal rand(45,64),0; },{}
530,Candy_Cane,Candy Cane,0,20,0,40,,,,,10477567,2,,,,,{ itemheal rand(105,144),0; },{}
@@ -36,7 +37,7 @@
533,Grape_Juice,Grape Juice,0,250,0,40,,,,,10477567,2,,,,,{ itemheal 0,rand(15,24); },{}
534,Carrot_Juice,Carrot Juice,0,20,0,40,,,,,10477567,2,,,,,{ itemheal rand(27,32),0; },{}
535,Pumkin,Pumpkin,0,15,0,20,,,,,10477567,2,,,,,{ itemheal 19,0; },{}
-536,Ice_Cream,Ice Cream,0,150,0,80,,,,,10477567,2,,,,,{ itemheal rand(105,144),0; },{}
+536,Ice_Cream,Ice Cream,0,150,0,80,,,,,10477567,2,,,,,{ itemheal rand(105,144),0; if(rand(100)>24) end; sc_start SC_Freeze,10000,0; },{}
537,Pet_Food,Pet Food,0,1000,0,10,,,,,10477567,2,,,,,{ itemheal rand(50,89),0; },{}
538,Well-baked_Cookie,Well-baked Cookie,0,1000,0,30,,,,,10477567,2,,,,,{ itemheal rand(160,199),0; },{}
539,Piece_of_Cake,Piece of Cake,0,3000,0,100,,,,,10477567,2,,,,,{ itemheal rand(270,329),0; },{}
@@ -50,11 +51,11 @@
547,Condensed_White_Potion,Condensed White Potion,0,20,0,50,,,,,10477567,2,,,,,{ itemheal rand(325,404),0; },{}
548,Cheese,Cheese,0,2800,0,50,,,,,10477567,2,,,,,{ itemheal 0,rand(10,14); },{}
549,Yam,Hot Potato,0,180,0,80,,,,,10477567,2,,,,,{ itemheal rand(50,99),0; },{}
-550,Rice_Cake,Rice Popper,0,20,5,10,,,,,10477567,2,,,,,{ itemheal rand(10,14),0; },{}
+550,Rice_Cake,Rice Popper,0,20,5,10,,,,,10477567,2,,,,,{ itemheal 10,0; },{}
551,Sushi,Sushi,0,20,0,50,,,,,10477567,2,,,,,{ itemheal rand(50,60),0; },{}
-552,Ketupat,Ketupat,0,20,0,10,,,,,10477567,2,,,,,{ itemheal rand(100,200),0; },{}
+552,Ketupat,Ketupat,0,100,0,10,,,,,10477567,2,,,,,{ itemheal rand(100,200),0; },{}
553,Dumpling,Dumpling,0,20,0,50,,,,,10477567,2,,,,,{ itemheal rand(39,68),0; },{}
-554,Mochi,Mochi,0,100,0,80,,,,,10477567,2,,,,,{ itemheal rand(100,200),0; },{}
+554,Mochi,Mochi,0,100,0,80,,,,,10477567,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; },{} //??
556,Rolled_Rice,Rolled Rice,0,20,0,10,,,,,10477567,3,,,,,{ itemheal rand(10,50),0; },{}
557,Cut_Rice_Rolls,Cut Rice Rolls,0,20,0,10,,,,,0,3,,,,,{ itemheal rand(10,200),0; },{}
558,Chocolate,Chocolate,0,500,0,20,,,,,10477567,2,,,,,{ itemheal 1,1; },{}
@@ -62,12 +63,19 @@
560,White_Chocolate,White Chocolate,0,0,0,80,,,,,10477567,2,,,,,{ itemheal rand(100,200),0; },{}
561,Milk_Chocolate_Bar,Milk Chocolate,0,0,0,80,,,,,10477567,2,,,,,{ itemheal rand(100,200),0; },{}
562,Pizza,Pizza,0,20,0,150,,,,,10477567,2,,,,,{ itemheal rand(100,200),0; },{}
-563,Double_Growing_Swiss_Pong_Tyu_,Unknown Item,0,20,0,150,,,,,10477567,3,,,,,{ itemheal rand(100,200),0; },{}
+563,Double_Growing_Swiss_Pong_Tyu_,Doublecrust Swiss Fondue,0,20,0,150,,,,,10477567,3,,,,,{ itemheal rand(100,200),0; },{}
564,Meat_Dumpling,Meat Dumpling,0,20,0,30,,,,,0,2,,,,,{ itemheal rand(175,234),0; },{}
565,Vita_500_Bottle,Vita 500,0,2000,0,30,,,,,10477567,2,,,,,{ itemheal 500,0; },{}
-566,Tom_Yum_Goong,Tom_Yum_Goong,0,20,150,0,,,,,10477567,2,,,,,{ itemheal rand(100,200),0; },{}
-567,Prawn,Prawn,0,20,40,0,,,,,10477567,3,,,,,{ itemheal rand(50,100),0; },{}
-568,Lemon,Lemon,0,20,40,0,,,,,0,3,,,,,{},{}
+566,Tom_Yum_Goong,Tom Yum Goong,0,20,150,0,,,,,10477567,2,,,,,{ itemheal rand(100,200),0; },{}
+567,Prawn,Prawn,0,20,0,20,,,,,10477567,3,,,,,{ itemheal rand(50,100),0; },{}
+568,Lemon,Lemon,0,20,0,20,,,,,0,3,,,,,{},{}
+569,Novice's_Red_Potion,Novices Red Potion,0,50,0,70,,,,,10477567,2,,,,,{ itemheal rand(45,64),0; },{}
+// st.Valentine's Day Items
+570,Fortune_Candy,Fortune Candy,0,10,0,30,,,,,10477567,2,,,,,{ itemheal rand(45,64),0; },{}
+571,Fortune_Candy_Cane,Fortune Candy Cane,0,20,0,40,,,,,10477567,2,,,,,{ itemheal rand(105,144),0; },{}
+572,Fortune_Cookie,Fortune Cookie,0,15,0,30,,,,,10477567,2,,,,,{ itemheal rand(45,64),0; },{}
+573,Chocolate_Drink,Chocolate Drink,0,20,0,150,,,,,10477567,2,,,,,{ itemheal rand(105,144),0; },{}
+574,Egg,Egg,0,0,,30,,,,,10477567,2,,,,,{ itemheal rand(16,21),0; },{}
// Usable Items
//===================================================================
@@ -75,13 +83,13 @@
602,Butterfly_Wing,Butterfly Wing,2,300,0,50,,,,,10477567,2,,,,,{ warp "SavePoint",0,0; },{}
603,Old_Blue_Box,Old Blue Box,2,10000,0,200,,,,,10477567,2,,,,,{ getitem -1,1; },{}
604,Dead_Branch,Dead Branch,2,50,0,50,,,,,10477567,2,,,,,{ monster "this",0,0,"--ja--",-1,1,; },{}
-605,Anodyne,Anodyne,2,2000,0,100,,,,,10477567,2,,,,,{ itemskill 8,1,"??????????"; },{}
-606,Aloevera,Aloevera,2,1500,0,100,,,,,10477567,2,,,,,{ itemskill 6,1,"?????"; },{}
+605,Anodyne,Anodyne,2,2000,0,100,,,,,10477567,2,,,,,{ itemskill 8,1,"Endure"; },{}
+606,Aloevera,Aloevera,2,1500,0,100,,,,,10477567,2,,,,,{ itemskill 6,1,"Provoke"; },{}
607,Yggdrasilberry,Yggdrasilberry,0,2,0,300,,,,,10477567,2,,,,,{ percentheal 100,100; },{}
608,Yggdrasil_Seed,Yggdrasil Seed,0,5000,0,300,,,,,10477567,2,,,,,{ percentheal 50,50; },{}
609,Amulet,Amulet,2,100,0,100,,,,,10477567,2,,,,,{},{}
-610,Yggdrasil_Leaf,Yggdrasil Leaf,2,4000,0,100,,,,,10477567,2,,,,,{ itemskill 54,1,"????????"; },{}
-611,Magnifier,Magnifier,2,40,0,50,,,,,10477567,2,,,,,{ itemskill 40,1,"???"; },{}
+610,Yggdrasil_Leaf,Yggdrasil Leaf,2,4000,0,100,,,,,10477567,2,,,,,{ itemskill 54,1,"Resurrection"; },{}
+611,Magnifier,Magnifier,2,40,0,50,,,,,10477567,2,,,,,{ itemskill 40,1,"Identify"; },{}
// Smithing Items
612,Mini_Furnace,Mini Furnace,2,150,0,200,,,,,10477567,2,,,,,{ produce 16; },{}
613,Iron_Hammer,Iron Hammer,2,1000,0,200,,,,,10477567,2,,,,,{ produce 1; },{}
@@ -108,52 +116,70 @@
630,Dew_Laden_Moss,Dew Laden Moss,2,10,0,50,,,,,10477567,2,,,,,{ pet 1014; },{},
631,Deadly_Noxious_Herb,Deadly Noxious Herb,2,20,0,50,,,,,10477567,2,,,,,{ pet 1077; },{},
632,Fatty_Chubby_Earthworm,Fatty Chubby Earthworm,2,5000,0,50,,,,,10477567,2,,,,,{ pet 1019; },{},
-633,Baked_Yam,Baked Yam,2,20,0,50,,,,,10477567,2,,,,,{ pet 1056; },{},,
-634,Tropical_Banana,Tropical Banana,2,20,0,50,,,,,10477567,2,,,,,{ pet 1057; },{},,
-635,Horror_of_Tribe,Horror of Tribe,2,300,0,50,,,,,10477567,2,,,,,{ pet 1023; },{},,
-636,No_Recipient,No Recipient,2,100,0,50,,,,,10477567,2,,,,,{ pet 1026; },{},,
-637,Old_Broom,Old Broom,2,350,0,50,,,,,10477567,2,,,,,{ pet 1110; },{},,
-638,Silver_Knife_of_Chastity,Silver Knife of Chastity,2,12000,0,50,,,,,10477567,2,,,,,{ pet 1170; },{},,
-639,Armlet_of_Obedience,Armlet of Obedience,2,18000,0,50,,,,,10477567,2,,,,,{ pet 1029; },{},,
-640,Shining_Stone,Shining Stone,2,3000,0,50,,,,,10477567,2,,,,,{ pet 1155; },{},,
-641,Contract_in_Shadow,Contracts in Shadow,2,100,0,50,,,,,10477567,2,,,,,{ pet 1109; },{},,
-642,Book_of_Devil,Book of Devil,2,1800,0,50,,,,,10477567,2,,,,,{ pet 1101; },{},,
-643,Pet_Incubator,Pet Incubator,2,3000,,30,,,,,10477567,2,,,,,{ if((countitem(9030)<1)&&(countitem(9031)<1)&&(countitem(9032)<1)&&(countitem(9033)<1)&&(countitem(9034)<1)&&(countitem(9035)<1)&&(countitem(9036)<1)&&(countitem(9037)<1)&&(countitem(9038)<1)&&(countitem(9039)<1)) bpet; },{},,
+633,Baked_Yam,Baked Yam,2,20,0,50,,,,,10477567,2,,,,,{ pet 1056; },{}
+634,Tropical_Banana,Tropical Banana,2,20,0,50,,,,,10477567,2,,,,,{ pet 1057; },{}
+635,Horror_of_Tribe,Horror of Tribe,2,300,0,50,,,,,10477567,2,,,,,{ pet 1023; },{}
+636,No_Recipient,No Recipient,2,100,0,50,,,,,10477567,2,,,,,{ pet 1026; },{}
+637,Old_Broom,Old Broom,2,350,0,50,,,,,10477567,2,,,,,{ pet 1110; },{}
+638,Silver_Knife_of_Chastity,Silver Knife of Chastity,2,12000,0,50,,,,,10477567,2,,,,,{ pet 1170; },{}
+639,Armlet_of_Obedience,Armlet of Obedience,2,18000,0,50,,,,,10477567,2,,,,,{ pet 1029; },{}
+640,Shining_Stone,Shining Stone,2,3000,0,50,,,,,10477567,2,,,,,{ pet 1155; },{}
+641,Contract_in_Shadow,Contracts in Shadow,2,100,0,50,,,,,10477567,2,,,,,{ pet 1109; },{}
+642,Book_of_Devil,Book of Devil,2,1800,0,50,,,,,10477567,2,,,,,{ pet 1101; },{}
+643,Pet_Incubator,Pet Incubator,2,3000,,30,,,,,10477567,2,,,,,{ bpet; },{}
// Misc Items
//===================================================================
644,Gift_Box,Gift Box,2,2,0,200,,,,,10477567,2,,,,,{ getitem -4,1; },{},
645,Concentration_Potion,Concentration Potion,2,800,0,100,,,,,10477567,2,,,,,{ sc_start SC_SpeedPot0,1800,0; },{}
656,Awakening_Potion,Awakening Potion,2,1500,0,150,,,,,8904431,2,,,40,,{ sc_start SC_SpeedPot1,1800,0; },{}
-657,Berserk_Potion,Berserk Potion,2,3000,0,200,,,,,410786,2,,,85,,{ sc_start SC_SpeedPot2,1800,0; },{}
-658,Tribal_Solidarity,Tribal Solidarity,3,1000,0,500,,,,,,,,,,,{},{}
-659,Her_Heart,Her Heart,2,500,0,50,,,,,10477567,2,,,,,{ pet 1188; },{},,
-660,Forbidden_Red_Candle,Red Candle,2,20,0,50,,,,,10477567,2,,,,,{ pet 1200; },{},,
+657,Berserk_Potion,Berserk Potion,2,3000,0,200,,,,,411302,2,,,85,,{ sc_start SC_SpeedPot2,1800,0; },{}
+658,Tribal_Solidarity,Tribal Solidarity,2,1000,0,500,,,,,10477567,2,,,,,{ guildgetexp rand(1,10000); },{}
+659,Her_Heart,Her Heart,2,500,0,50,,,,,10477567,2,,,,,{ pet 1188; },{}
+660,Forbidden_Red_Candle,Red Candle,2,20,0,50,,,,,10477567,2,,,,,{ pet 1200; },{}
661,Sky_Apron,Soft Apron,2,20,0,50,,,,,10477567,2,,,,,{ pet 1275; },{}
-// Newer Items
+// Newer Items
+662,Horse_Crest,Crest of the Horse,2,3000,0,30,0,0,0,0,10477567,2,0,0,0,0,{ skilleffect 507,5; sc_start SC_SpeedUp0,240000,0; },{}
664,Gift_Box_,Gift Box,2,20,0,200,,,,,10477567,2,,,,,{ getitem -4,1; },{},
665,Gift_Box__,Gift Box,2,20,0,200,,,,,10477567,2,,,,,{ getitem -4,1; },{},
666,Gift_Box___,Gift Box,2,20,0,200,,,,,10477567,2,,,,,{ getitem -4,1; },{},
667,Gift_Box____,Gift Box,2,20,0,200,,,,,10477567,2,,,,,{ getitem -4,1; },{},
-668,Angpow,Angpow,0,1,0,2,,,,,10477567,2,,,,,{ set Zeny,Zeny+rand(100,10000); },{}
-669,Rice_Cake_Soup,Rice Cake Soup,2,20,0,100,,,,,,,,,,,{},{},,
-670,Gold_Coin_Pouch,Gold Coin Pouch,2,20,0,400,,,,,,,,,,,{},{},,
-671,Gold_Coin,Gold Coin,2,20,0,40,,,,,,,,,,,{},{},,
-672,Copper_Coin_Pouch,Copper Coin Pouch,2,20,0,400,,,,,,,,,,,{},{},,
-673,Copper_Coin,Copper Coin,2,20,0,40,,,,,,,,,,,{},{},,
+668,Angpow,Angpow,0,1,0,2,,,,,10477567,2,,,,,{ set Zeny,Zeny+rand(1000,10000); },{}
+669,Rice_Cake_Soup,Rice Cake Soup,2,20,0,100,,,,,,,,,,,{},{}
+670,Gold_Coin_Pouch,Gold Coin Pouch,2,20,0,400,,,,,,,,,,,{},{}
+671,Gold_Coin,Gold Coin,2,20,0,40,,,,,10477567,2,,,,,{ set Zeny,Zeny+rand(100,1000); },{}
+672,Copper_Coin_Pouch,Copper Coin Pouch,2,20,0,400,,,,,,,,,,,{},{}
+673,Copper_Coin,Copper Coin,2,20,0,40,,,,,,,,,,,{},{}
674,Mysterious_Ore_Coin,Mysterious Ore Coin,2,20,0,40,,,,,0,3,,,,,{},{}
675,Silver_Coin,Silver Coin,2,20,0,40,,,,,0,3,,,,,{},{}
676,Silver_Coin_Pouch,Silver Coin Pouch,2,20,0,400,,,,,0,3,,,,,{},{}
677,Platinum_Coin,Platinum Coin,2,20,0,40,,,,,0,3,,,,,{},{}
-678,Deadly_Poison_Bottle,Deadly Poison Bottle,2,20,0,100,,,,,0,3,,,,,{},{}
-679,Recall_Pills,Recall Pills,2,20,0,300,,,,,0,3,,,,,{},{}
-680,Carnation,Carnation,2,20,0,1000,,,,,0,3,,,,,{},{}
-681,Wedding_Photo_Album,Wedding_Photo_Album,2,20,0,10,,,,,0,3,,,,,{},{}
-682,Realgar_Wine,Realgar Wine,2,20,0,50,,,,,10477567,2,,,,,{ sc_start SC_ATKPOT,30,30; },{}
-683,Exorcize_Herb,Exorcize Herb,2,20,0,50,,,,,10477567,2,,,,,{ sc_start SC_MATKPOT,30,30; },{}
-684,Durian,Durian,2,20,0,10,,,,,0,3,,,,,{},{}
-685,Ramadan,Ramadan,2,20,10,10,,,,,0,3,,,,,{},{}
+678,Deadly_Poison_Bottle,Deadly Poison Bottle,2,20,0,100,,,,,10477567,2,,,,,{ if(Class!=4013) goto Not_ASC; sc_start SC_Poison,600000,0; sc_start SC_SpeedPot0,30,0; end; Not_ASC: percentheal -100,0; },{}
+679,Recall_Pills,Golden Pill,2,20,0,300,,,,,10477567,3,,,,,{ itemheal 50,50; },{}
+680,Carnation,Magical Carnation,2,20,0,1000,,,,,10477567,3,,,,,{ itemheal 25,0; },{}
+681,Wedding_Photo_Album,Wedding Photo Album,2,20,0,10,,,,,0,3,,,,,{},{} //should call wedding effect
+682,Realgar_Wine,Realgar Wine,2,20,0,100,,,,,10477567,2,,,,,{ sc_start SC_ATKPOT,60,30; },{}
+683,Exorcize_Herb,Exorcize Herb,2,20,0,50,,,,,10477567,2,,,,,{ sc_start SC_MATKPOT,60,30; },{}
+684,Durian,Durian,2,20,0,30,,,,,0,3,,,,,{ sc_start SC_ATKPOT,60,10; sc_start SC_MATKPOT,60,10; },{}
+685,Ramadan,Ramadan,2,20,10,300,,,,,0,3,,,,,{},{}
+
+// Scrolls
+686,Earth_Spike_3,Earth Spike Level 3,2,650,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 90,3,"Earth Spike Level 3"; },{}
+687,Earth_Spike_5,Earth Spike Level 5,2,1300,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 90,5,"Earth Spike Level 5"; },{}
+688,Cold_Bolt_3,Cold Bolt Level 3,2,500,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 14,3,"Cold Bolt Level 3"; },{}
+689,Cold_Bolt_5,Cold Bolt Level 5,2,1000,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 14,5,"Cold Bolt Level 5"; },{}
+690,Fire_Bolt_3,Fire Bolt Level 3,2,500,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 19,3,"Fire Bolt Level 3"; },{}
+691,Fire_Bolt_5,Fire Bolt Level 5,2,1000,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 19,5,"Fire bolt Level 5"; },{}
+692,Lightning_Bolt_3,Lightning Bolt Level 3,2,500,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 20,3,"Lightning Bolt Level 3"; },{}
+693,Lightning_Bolt_5,Lightning Bolt Level 5,2,1000,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 20,5,"Lightning Bolt Level 5"; },{}
+694,Soul_Strike_3,Soul Strike Level 3,2,500,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 13,3,"Soul Strike Level 3"; },{}
+695,Soul_Strike_5,Soul Strike Level 5,2,1000,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 13,5,"Soul Strike Level 5"; },{}
+696,Fire_Ball_1,Fire Ball Level 1,2,500,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 17,1,"Fire Ball Level 1"; },{}
+697,Fire_Ball_5,Fire Ball Level 5,2,1000,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 17,5,"Fire Ball Level 5"; },{}
+698,Fire_Wall_1,Fire Wall Level 1,2,350,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 18,1,"Fire Wall Level 1"; },{}
+699,Fire_Wall_5,Fire Wall Level 5,2,700,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 18,5,"Fire Wall Level 5"; },{}
+700,Frost_Diver_1,Frost Diver Level 1,2,350,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 15,1,"Frost Diver Level 1"; },{}
701,Ora_Ora,Ora Ora,3,55000,0,200,,,,,,,,,,,{},{}
702,Animal_Gore,Animal Gore,3,2,0,100,,,,,,,,,,,{},{}
@@ -432,54 +458,54 @@
1120,Tsurugi_,Tsurugi,4,51000,0,1200,130,,1,2,414946,2,2,3,27,2,{},{}
1121,Tsurugi__,Tsurugi,4,51000,0,1200,130,,1,0,414946,2,2,3,27,2,{},{}
1122,Ring_Pommel_Saber,Ring Pommel Saber,4,24000,0,900,100,,1,2,414946,2,2,2,14,2,{},{}
-1123,Haedonggum,Haedonggum,4,50000,0,900,120,,1,1,414946,2,2,3,27,2,{},{ bonus bInt,3; },,,,,,
-1124,Orcish_Sword,Orcish sword,4,20,0,800,90,,1,0,8803555,2,2,3,5,2,{},{ bonus bUnbreakable,100; },,,,,,,
-1125,Ring_Pommel_Saber_,Ring Pommel Saber,4,24000,0,900,100,,1,3,414946,2,2,2,14,2,{},{},,,,,,,
-1126,Saber,Saber,4,49000,0,1000,115,,1,2,414946,2,2,3,27,2,{},{},,,,,,,
-1127,Saber_,Saber,4,49000,0,1000,115,,1,3,414946,2,2,3,27,2,{},{},,,,,,,
-1128,Haedonggum_,Haedonggum,4,50000,0,900,120,,1,2,414946,2,2,3,27,2,{},{ bonus bInt,3; },,,,,,
-1129,Flamberge,Flamberge,4,60000,0,1500,150,,1,0,16512,2,2,3,27,2,{},{},,,,,,,
-1130,Nagan,Nagan,4,20,0,500,120,,1,0,414946,2,2,4,40,2,{},{ bonus bDoubleRate,25; bonus2 bAddRace,7,5; },,,,
+1123,Haedonggum,Haedonggum,4,50000,0,900,120,,1,1,414946,2,2,3,27,2,{},{ bonus bInt,3; }
+1124,Orcish_Sword,Orcish sword,4,20,0,800,90,,1,0,8803555,2,2,3,5,2,{},{ bonus bUnbreakableWeapon,0; }
+1125,Ring_Pommel_Saber_,Ring Pommel Saber,4,24000,0,900,100,,1,3,414946,2,2,2,14,2,{},{}
+1126,Saber,Saber,4,49000,0,1000,115,,1,2,414946,2,2,3,27,2,{},{}
+1127,Saber_,Saber,4,49000,0,1000,115,,1,3,414946,2,2,3,27,2,{},{}
+1128,Haedonggum_,Haedonggum,4,50000,0,900,120,,1,2,414946,2,2,3,27,2,{},{ bonus bInt,3; }
+1129,Flamberge,Flamberge,4,60000,0,1500,150,,1,0,16512,2,2,3,27,2,{},{}
+1130,Nagan,Nagan,4,20,0,500,120,,1,0,414946,2,2,4,40,2,{},{ bonus bDoubleRate,25; bonus2 bAddRace,7,5; }
1131,Ice_Falchion,Ice Falchion,4,20,0,600,100,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,1; skill 14,3; bonus2 bAddEff,Eff_Freeze,500; bonus3 bAutoSpell,14,3,25; }
-1132,Edge,Edge,4,20,0,700,115,,1,0,414946,2,2,4,40,2,{},{ bonus2 bAddEff,Eff_Curse,300; bonus2 bWeaponComaRace,11,10; },,,
-1133,Fire_Brand,Fire Brand,4,20,0,500,100,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,3; skill 19,3; bonus3 bAutoSpell,19,3,25; },,
-1134,Caesar's_Sword,Caesar's Sword,4,20,0,700,140,,1,0,414946,2,2,4,40,2,{},{ bonus2 bAddRace,3,25; bonus bIgnoreDefRace,3; },,,,
-1135,Cutlas,Cutlas,4,20,0,900,150,,1,0,414946,2,2,4,40,2,{},{ skill 5,5; bonus bStr,2; bonus bDef,1; },,,,
-1136,Solar_Sword,Solar Sword,4,20,0,1200,85,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,3; bonus2 bHPDrainRate,100,1; bonus2 bSPDrainRate,5,-15; },,,,
-1137,Excalibur,Excalibur,4,20,0,1200,150,,1,0,414946,2,2,4,40,2,{},{ bonus bInt,5; bonus bLuk,10; bonus bDex,-1; bonus bAtkEle,6; },,,
+1132,Edge,Edge,4,20,0,700,115,,1,0,414946,2,2,4,40,2,{},{ bonus2 bAddEff,Eff_Curse,300; bonus2 bWeaponComaRace,11,10; }
+1133,Fire_Brand,Fireblend,4,20,0,500,100,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,3; skill 19,3; bonus3 bAutoSpell,19,3,25; }
+1134,Caesar's_Sword,Caesar's Sword,4,20,0,700,140,,1,0,414946,2,2,4,40,2,{},{ bonus2 bAddRace,3,25; bonus bIgnoreDefRace,3; }
+1135,Cutlas,Cutlas,4,20,0,900,150,,1,0,414946,2,2,4,40,2,{},{ skill 5,5; bonus bStr,2; bonus bDef,1; }
+1136,Solar_Sword,Solar Sword,4,20,0,1200,85,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,3; bonus2 bHPDrainRate,100,1; bonus2 bSPDrainRate,5,-15; }
+1137,Excalibur,Excalibur,4,20,0,1200,150,,1,0,414946,2,2,4,40,2,{},{ bonus bInt,5; bonus bLuk,10; bonus bDex,-1; bonus bAtkEle,6; }
1138,Mysteltainn_,Mysteltainn,4,20,0,1000,170,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,7; bonus2 bAddEle,8,15; bonus2 bAddEff,Eff_Stone,100; bonus bDex,3; },
-1139,Talefing_,Talefing,4,20,0,1000,200,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,7; bonus2 bSPDrainRate,5,-35; },,,,,,,,,
+1139,Talefing_,Talefing,4,20,0,1000,200,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,7; bonus2 bSPDrainRate,5,-35; }
1140,Byeollungum,Byeollungum,4,20,0,900,150,,1,0,414946,2,2,4,40,2,{},{ bonus2 bSubRace,11,-10; bonus2 bAddRace,10,50; bonus bAllStats,2; }
-1141,Immaterial_Sword,Immaterial Sword,4,20,0,900,140,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,8; bonus2 bSPDrainRate,1,30; bonus2 bSPDrainRate,100,-1; },,,,,,,,,
-1142,Jewel_Sword,Crystal Sword,4,20,0,2200,104,,1,0,414946,2,2,3,68,2,{},{},,,,,,,,,,
-1143,Gaia_Sword,Gaia Sword,4,20,0,2500,115,,1,0,414946,2,2,3,74,2,{},{ bonus3 bAddMonsterDropItem,1002,50,25000; },,,,,,,,,,
-1144,Sashimi,Sashimi,4,20,0,1400,75,,1,0,414946,2,2,3,48,2,{},{ bonus bAtkEle,4; bonus3 bAddMonsterDropItem,544,5,4000; },,,,,,
-1145,Holy_Avenger,Holy Avenger,4,20,0,1350,125,,1,0,16384,2,2,3,75,2,{},{ bonus bAtkEle,6; },,,,,,,,
+1141,Immaterial_Sword,Immaterial Sword,4,20,0,900,140,,1,0,414946,2,2,4,40,2,{},{ bonus bAtkEle,8; bonus2 bSPDrainRate,1,30; bonus2 bSPDrainRate,100,-1; bonus bUnbreakableWeapon,0; }
+1142,Jewel_Sword,Crystal Sword,4,20,0,2200,104,,1,0,414946,2,2,3,68,2,{},{}
+1143,Gaia_Sword,Gaia Sword,4,20,0,2500,115,,1,0,414946,2,2,3,74,2,{},{ bonus3 bAddMonsterDropItem,1002,50,25000; }
+1144,Sashimi,Sashimi,4,20,0,1400,75,,1,0,414946,2,2,3,48,2,{},{ bonus bAtkEle,4; bonus3 bAddMonsterDropItem,544,5,4000; }
+1145,Holy_Avenger,Holy Avenger,4,20,0,1350,125,,1,0,16384,2,2,3,75,2,{},{ bonus bAtkEle,6; }
// 2 Handed Swords
-1151,Slayer,Slayer,4,15000,0,1300,90,,1,2,16514,2,34,2,18,3,{},{},,,,,,,,,,
-1152,Slayer_,Slayer,4,15000,0,1300,90,,1,3,16514,2,34,2,18,3,{},{},,,,,,,,,,
-1153,Slayer__,Slayer,4,15000,0,1300,90,,1,0,16514,2,34,2,18,3,{},{},,,,,,,,,,
-1154,Bastard_Sword,Bastard Sword,4,22500,0,1600,115,,1,2,16514,2,34,2,18,3,{},{},,,,,,,,,,
-1155,Bastard_Sword_,Bastard Sword,4,22500,0,1600,115,,1,3,16514,2,34,2,18,3,{},{},,,,,,,,,,
-1156,Bastard_Sword__,Bastard Sword,4,22500,0,1600,115,,1,0,16514,2,34,2,18,3,{},{},,,,,,,,,,
-1157,Two_handed_Sword,Two-handed Sword,4,60000,0,2200,160,,1,1,16514,2,34,3,33,3,{},{},,,,,,,,,,
-1158,Two_handed_Sword_,Two-handed Sword,4,60000,0,2200,160,,1,2,16514,2,34,3,33,3,{},{},,,,,,,,,,
-1159,Two_handed_Sword__,Two-handed Sword,4,60000,0,2200,160,,1,0,16514,2,34,3,33,3,{},{},,,,,,
-1160,Broad_Sword,Broad Sword,4,65000,0,2000,140,,1,1,16514,2,34,3,33,3,{},{ bonus bDef,5; },,,,,
-1161,Balmung,Balmung,4,20,0,1000,250,,2,0,2088959,2,2,4,48,1,{},{ bonus bInt,20; bonus bLuk,20; },,,,
-1162,Broad_Sword_,Broad Sword,4,65000,0,2000,140,,1,2,16514,2,34,3,33,3,{},{ bonus bDef,5; },,,,,
-1163,Claymore,Claymore,4,74000,0,2500,180,,1,0,16512,2,34,3,33,3,{},{},,,,,,
-1164,Muramasa,Muramasa,4,20,0,1000,155,,1,0,16514,2,34,4,48,3,{},{ bonus bCritical,30; bonus bAspdAddRate,8; bonus2 bAddEff2,Eff_Curse,200; },,
+1151,Slayer,Slayer,4,15000,0,1300,90,,1,2,16514,2,34,2,18,3,{},{}
+1152,Slayer_,Slayer,4,15000,0,1300,90,,1,3,16514,2,34,2,18,3,{},{}
+1153,Slayer__,Slayer,4,15000,0,1300,90,,1,0,16514,2,34,2,18,3,{},{}
+1154,Bastard_Sword,Bastard Sword,4,22500,0,1600,115,,1,2,16514,2,34,2,18,3,{},{}
+1155,Bastard_Sword_,Bastard Sword,4,22500,0,1600,115,,1,3,16514,2,34,2,18,3,{},{}
+1156,Bastard_Sword__,Bastard Sword,4,22500,0,1600,115,,1,0,16514,2,34,2,18,3,{},{}
+1157,Two_handed_Sword,Two-handed Sword,4,60000,0,2200,160,,1,1,16514,2,34,3,33,3,{},{}
+1158,Two_handed_Sword_,Two-handed Sword,4,60000,0,2200,160,,1,2,16514,2,34,3,33,3,{},{}
+1159,Two_handed_Sword__,Two-handed Sword,4,60000,0,2200,160,,1,0,16514,2,34,3,33,3,{},{}
+1160,Broad_Sword,Broad Sword,4,65000,0,2000,140,,1,1,16514,2,34,3,33,3,{},{ bonus bDef,5; }
+1161,Balmung,Balmung,4,20,0,1000,250,,2,0,2088959,2,2,4,48,1,{},{ bonus bInt,20; bonus bLuk,20; }
+1162,Broad_Sword_,Broad Sword,4,65000,0,2000,140,,1,2,16514,2,34,3,33,3,{},{ bonus bDef,5; }
+1163,Claymore,Claymore,4,74000,0,2500,180,,1,0,16512,2,34,3,33,3,{},{}
+1164,Muramasa,Muramasa,4,20,0,1000,155,,1,0,16514,2,34,4,48,3,{},{ bonus bCritical,30; bonus bAspdAddRate,8; bonus2 bAddEff2,Eff_Curse,200; }
1165,Masamune,Masamune,4,20,0,1000,200,,1,0,16514,2,34,4,48,3,{},{ bonus bFlee,30; bonus bStr,-5; bonus bAspd,2; bonus bDefRate,-50; bonus bDef2Rate,-50; },
-1166,Dragon_Slayer,Dragon Slayer,4,20,0,1300,150,,1,0,16514,2,34,4,48,3,{},{ bonus bIgnoreDefRace,9; bonus2 bAddRace,9,15; },,,
-1167,Schweizersabel,Schweizersabel,4,20,0,1600,160,,1,0,16514,2,34,4,48,3,{},{ bonus bAtkEle,4; skill 20,3; bonus bDef,1; bonus3 bAutoSpell,20,3,25; }
-1168,Zweihander,Zweihander,4,20,0,2200,200,,1,0,16514,2,34,4,48,3,{},{bonus bUnbreakable,100; },,,,,,
+1166,Dragon_Slayer,Dragon Slayer,4,20,0,1300,150,,1,0,16514,2,34,4,48,3,{},{ bonus bIgnoreDefRace,9; bonus2 bAddRace,9,15; }
+1167,Schweizersabel,Schweizersabel,4,20,0,1600,160,,1,0,16514,2,34,4,48,3,{},{ bonus bAtkEle,4; bonus bDef,1; bonus3 bAutoSpell,20,3,25; }
+1168,Zweihander,Zweihander,4,20,0,2200,200,,1,0,16514,2,34,4,48,3,{},{ bonus bUnbreakableWeapon,0; }
1169,Executioner_,Executioner,4,20,0,2200,155,,1,0,16514,2,34,4,48,3,{},{ bonus bIgnoreDefRace,7; bonus2 bAddRace,7,20; bonus2 bSubRace,7,-10; bonus bAtkEle,7; }
-1170,Katzbalger,Katzbalger,4,20,0,2000,175,,1,0,16514,2,34,4,48,3,{},{ bonus bVit,10; bonus bDef,10; },,,,
+1170,Katzbalger,Katzbalger,4,20,0,2000,175,,1,0,16514,2,34,4,48,3,{},{ bonus bVit,10; bonus bDef,10; }
// Knifes and Daggers
-1201,Knife,Knife,4,50,0,400,17,,1,3,10444527,2,2,1,1,1,{},{},,,,,,
-1202,Knife_,Knife,4,50,0,400,17,,1,4,10444527,2,2,1,1,1,{},{},,,,,,
-1203,Knife__,Knife,4,50,0,400,17,,1,0,10444527,2,2,1,1,1,{},{},,,,,,
+1201,Knife,Knife,4,50,0,400,17,,1,3,10444527,2,2,1,1,1,{},{}
+1202,Knife_,Knife,4,50,0,400,17,,1,4,10444527,2,2,1,1,1,{},{}
+1203,Knife__,Knife,4,50,0,400,17,,1,0,10444527,2,2,1,1,1,{},{}
1204,Cutter,Cutter,4,1250,0,500,30,,1,3,10444527,2,2,1,1,1,{},{}
1205,Cutter_,Cutter,4,1250,0,500,30,,1,4,10444527,2,2,1,1,1,{},{}
1206,Cutter__,Cutter,4,1250,0,500,30,,1,0,10444527,2,2,1,1,1,{},{}
@@ -496,117 +522,118 @@
1217,Stiletto_,Stiletto,4,19500,0,700,87,,1,3,10444527,2,2,2,12,1,{},{}
1218,Stiletto__,Stiletto,4,19500,0,700,87,,1,0,10444527,2,2,2,12,1,{},{}
1219,Gladius,Gladius,4,43000,0,700,105,,1,2,2055918,2,2,3,24,1,{},{}
-1220,Gladius_,Gladius,4,43000,0,700,105,,1,3,2055918,2,2,3,24,1,{},{},,,,,,
-1221,Gladius__,Gladius,4,43000,0,700,105,,1,0,2055918,2,2,3,24,1,{},{},,,,,,
-1222,Damascus,Damascus,4,49000,0,800,118,,1,1,2055918,2,2,3,24,1,{},{},,,,,,
-1223,Fortune_Sword,Fortune Sword,4,20,0,500,90,,1,0,2055918,2,2,4,24,1,{},{ bonus bLuk,5; bonus bFlee2,20; },,,,
-1224,Sword_Breaker,Swordbreaker,4,20,0,1000,70,,1,0,2055918,2,2,4,36,1,{},{ bonus bBreakWeaponRate,500; },,,,,,
-1225,Mail_Breaker,Mailbreaker,4,20,0,1000,70,,1,0,2055918,2,2,4,36,1,{},{ bonus bBreakArmorRate,500; },,,,,,
-1226,Damascus_,Damascus,4,49000,0,800,118,,1,2,2055918,2,2,3,24,1,{},{},,,,,,
+1220,Gladius_,Gladius,4,43000,0,700,105,,1,3,2055918,2,2,3,24,1,{},{}
+1221,Gladius__,Gladius,4,43000,0,700,105,,1,0,2055918,2,2,3,24,1,{},{}
+1222,Damascus,Damascus,4,49000,0,800,118,,1,1,2055918,2,2,3,24,1,{},{ bonus bUnbreakableWeapon,0; }
+1223,Fortune_Sword,Fortune Sword,4,20,0,500,90,,1,0,2055918,2,2,4,24,1,{},{ bonus bLuk,5; bonus bFlee2,20; }
+1224,Sword_Breaker,Swordbreaker,4,20,0,1000,70,,1,0,2055918,2,2,4,36,1,{},{ bonus bBreakWeaponRate,500; }
+1225,Mail_Breaker,Mailbreaker,4,20,0,1000,70,,1,0,2055918,2,2,4,36,1,{},{ bonus bBreakArmorRate,500; }
+1226,Damascus_,Damascus,4,49000,0,800,118,,1,2,2055918,2,2,3,24,1,{},{ bonus bUnbreakableWeapon,0; }
1227,Weeder_Knife,Weeder Knife,4,20,0,400,80,,1,0,2055918,2,2,4,36,1,{},{ bonus bIgnoreDefRace,3; bonus2 bAddRace,3,15; bonus2 bSubRace,3,15; },
1228,Combat_Knife,Combat Knife,4,20,0,400,80,,1,0,2055918,2,2,4,36,1,{},{ bonus bIgnoreDefRace,7; bonus2 bSubRace,7,10; bonus2 bSubRace,6,-10; },
1229,Mama's_Knife,Mama's Knife,4,20,0,500,75,,1,0,2055918,2,2,4,36,1,{},{ bonus bCritical,30; bonus2 bAddRace,7,3; bonus3 bAddMonsterDropItem,517,2,5000; }
-1230,House_Auger,House Auger,4,20,0,600,80,,1,0,2055918,2,2,4,36,1,{},{ bonus bDefRatioAtkRace,10; bonus bDefRatioAtkRace,11; },,,,
-1231,Bazerald,Bazerald,4,20,0,500,70,,1,0,2055918,2,2,4,36,1,{},{ bonus bAtkEle,3; bonus bInt,5; bonus bMatkRate,10; },,,
-1232,Assassin_Dagger,Assasin Dagger,4,20,0,600,140,,1,0,4096,2,2,4,36,1,{},{ bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdAddRate,2; bonus bAtkEle,7; },,
+1230,House_Auger,House Auger,4,20,0,600,80,,1,0,2055918,2,2,4,36,1,{},{ bonus bDefRatioAtkRace,10; bonus bDefRatioAtkRace,11; }
+1231,Bazerald,Bazerald,4,20,0,500,70,,1,0,2055918,2,2,4,36,1,{},{ bonus bAtkEle,3; bonus bInt,5; bonus bMatkRate,10; }
+1232,Assassin_Dagger,Assasin Dagger,4,20,0,600,140,,1,0,4096,2,2,4,36,1,{},{ bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdAddRate,2; } //!!! no Element? bonus bAtkEle,7;
1233,Exercise,Excorcise,4,20,0,700,90,,1,0,2055918,2,2,4,36,1,{},{ bonus bIgnoreDefRace,6; bonus2 bSubRace,6,5; bonus2 bSubRace,7,-10; },
-1234,Moonlight_Sword,Walgwanggum,4,20,0,700,50,,1,0,2055918,2,2,4,36,1,{},{ bonus bMaxSPrate,10; bonus2 bSPDrainRate,100,3; },,,,,
-1235,Azoth,Azoth,4,20,0,700,110,,1,0,262144,2,2,4,36,1,{},{ bonus bClassChange,50; },,,,,,
-1236,Sucsamad,Sucsamad,4,20,0,800,140,,1,0,2055918,2,2,4,36,1,{},{ bonus2 bAddEle,2,10; bonus2 bAddEle,4,10; bonus bUnbreakable,100; },,
-1237,Grimtooth_,Grimtooth,4,20,0,800,180,,1,0,2055918,2,2,4,36,1,{},{ bonus bFlee,10; bonus bFlee2,5; bonus bDefRate,-50; bonus bDef2Rate,-50; },,
-1238,Zeny_Knife,Zeny Knife,4,20,0,1200,64,,1,0,2055918,2,2,3,40,1,{},{ bonus bGetZenyNum,100; },,,,,
-1239,Poison_Knife,Poison Knife,4,20,0,800,64,,1,0,2055918,2,2,3,65,1,{},{ bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,2000; },,,,,
+1234,Moonlight_Sword,Walgwanggum,4,20,0,700,50,,1,0,2055918,2,2,4,36,1,{},{ bonus bMaxSPrate,10; bonus2 bSPDrainRate,100,3; }
+1235,Azoth,Azoth,4,20,0,700,110,,1,0,262144,2,2,4,36,1,{},{ bonus bClassChange,300; } //!!! should be 3% chance
+1236,Sucsamad,Sucsamad,4,20,0,800,140,,1,0,2055918,2,2,4,36,1,{},{ bonus2 bAddEle,2,10; bonus2 bAddEle,4,10; bonus bUnbreakableWeapon,0; }
+1237,Grimtooth_,Grimtooth,4,20,0,800,180,,1,0,2055918,2,2,4,36,1,{},{ bonus bFlee,10; bonus bFlee2,5; bonus bDefRate,-50; bonus bDef2Rate,-50; }
+1238,Zeny_Knife,Zeny Knife,4,20,0,1200,64,,1,0,2055918,2,2,3,40,1,{},{ bonus bGetZenyNum,100; }
+1239,Poison_Knife,Poison Knife,4,20,0,800,64,,1,0,2055918,2,2,3,65,1,{},{ bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,3000; }
1240,Princess_Knife,Princess Knife,4,20,0,400,84,,1,0,2055918,2,2,4,1,1,{},{ bonus bAllStats,1; }
-1241,Cursed_Dagger,Cursed Dagger,4,20,0,400,55,,1,0,66052,2,2,4,85,1,{},{ bonus2 bAddEff,Eff_Curse,500; },,,,
-1242,Counter_Dagger,Counter Dagger,4,20,0,550,75,,1,0,66052,2,2,4,55,1,{},{ bonus bCritical,5; bonus3 bAutoSpell,61,1,25; },,,,,
-1243,Main_Gauche_For_Novice,Novice Main Gauche,4,20,0,1,45,,1,0,8388609,2,2,1,1,1,{},{},,,,,,
+1241,Cursed_Dagger,Cursed Dagger,4,20,0,400,55,,1,0,66052,2,2,4,85,1,{},{ bonus2 bAddEff,Eff_Curse,500; }
+1242,Counter_Dagger,Counter Dagger,4,20,0,550,140,,1,0,66052,2,2,4,55,1,{},{ bonus bCritical,90; bonus3 bAutoSpell,61,1,25; }
+1243,Main_Gauche_For_Novice,Novice Main Gauche,4,20,0,1,45,,1,0,8388609,2,2,1,1,1,{},{}
+1244,Holy_Dagger,Holy Dagger,4,20,0,800,100,,1,0,135232,2,2,4,55,1,{},{ bonus bAtkEle,6; }
// Katars
-1250,Jur,Jur,4,19500,0,800,125,,1,2,4096,2,34,2,18,16,{},{},,,,,,
-1251,Jur_,Jur,4,19500,0,800,125,,1,3,4096,2,34,2,18,16,{},{},,,,,,
-1252,Katar,Katar,4,41000,0,1200,148,,1,1,4096,2,34,3,33,16,{},{ bonus bDex,1; },,,,,
-1253,Katar_,Katar,4,41000,0,1200,148,,1,2,4096,2,34,3,33,16,{},{ bonus bDex,1; },,,,,
-1254,Jamadhar,Jamadhar,4,37200,0,1500,165,,1,0,4096,2,34,3,33,16,{},{},,,,,,
-1255,Jamadhar_,Jamadhar,4,37200,0,1500,165,,1,1,4096,2,34,3,33,16,{},{},,,,,,
-1256,Katar_of_Cold_Icicle,Katar of Cold Icicle,4,45000,0,1200,105,,1,0,4096,2,34,3,55,16,{},{ bonus bAtkEle,1; bonus2 bAddEff,Eff_Freeze,500; },,,
-1257,Katar_of_Thornbush,Katar of Dusty Thornbush,4,45000,0,1200,105,,1,0,4096,2,34,3,55,16,{},{ bonus bAtkEle,2; bonus2 bAddEff,Eff_Blind,500; },,
-1258,Katar_of_Raging_Blaze,Katar of Raging Blaze,4,45000,0,1200,105,,1,0,4096,2,34,3,55,16,{},{ bonus bAtkEle,3; bonus2 bAddEff,Eff_Silence,500; },,
-1259,Katar_of_Piercing_Wind,Katar of Piercing Wind,4,45000,0,1200,105,,1,0,4096,2,34,3,55,16,{},{ bonus bAtkEle,4; bonus2 bAddEff,Eff_Sleep,500; },,
-1260,Sharpened_Legbone_of_Ghoul,Sharpened Legbone of Ghoul,4,52500,0,1700,150,,1,0,4096,2,34,3,65,16,{},{ bonus bAtkEle,9; },,,,
+1250,Jur,Jur,4,19500,0,800,125,,1,2,4096,2,34,2,18,16,{},{}
+1251,Jur_,Jur,4,19500,0,800,125,,1,3,4096,2,34,2,18,16,{},{}
+1252,Katar,Katar,4,41000,0,1200,148,,1,1,4096,2,34,3,33,16,{},{ bonus bDex,1; }
+1253,Katar_,Katar,4,41000,0,1200,148,,1,2,4096,2,34,3,33,16,{},{ bonus bDex,1; }
+1254,Jamadhar,Jamadhar,4,37200,0,1500,165,,1,0,4096,2,34,3,33,16,{},{}
+1255,Jamadhar_,Jamadhar,4,37200,0,1500,165,,1,1,4096,2,34,3,33,16,{},{}
+1256,Katar_of_Cold_Icicle,Katar of Cold Icicle,4,45000,0,1200,105,,1,0,4096,2,34,3,55,16,{},{ bonus bAtkEle,1; bonus2 bAddEff,Eff_Freeze,500; }
+1257,Katar_of_Thornbush,Katar of Dusty Thornbush,4,45000,0,1200,105,,1,0,4096,2,34,3,55,16,{},{ bonus bAtkEle,2; bonus2 bAddEff,Eff_Blind,500; }
+1258,Katar_of_Raging_Blaze,Katar of Raging Blaze,4,45000,0,1200,105,,1,0,4096,2,34,3,55,16,{},{ bonus bAtkEle,3; bonus2 bAddEff,Eff_Silence,500; }
+1259,Katar_of_Piercing_Wind,Katar of Piercing Wind,4,45000,0,1200,105,,1,0,4096,2,34,3,55,16,{},{ bonus bAtkEle,4; bonus2 bAddEff,Eff_Sleep,500; }
+1260,Sharpened_Legbone_of_Ghoul,Sharpened Legbone of Ghoul,4,52500,0,1700,150,,1,0,4096,2,34,3,65,16,{},{ bonus bAtkEle,9; }
1261,Infiltrator,Infiltrator,4,57000,0,1500,140,,1,0,4096,2,34,4,75,16,{},{ bonus2 bAddRace,7,50; bonus bDef,3; bonus bFlee,5; bonus bFlee2,2; }
// Axes
-1301,Axe,Axe,4,500,0,800,38,,1,3,8803555,2,2,1,3,6,{},{},,,,,
-1302,Axe_,Axe,4,500,0,800,38,,1,4,8803555,2,2,1,3,6,{},{},,,,,
-1303,Axe__,Axe,4,500,0,800,38,,1,0,8803555,2,2,1,3,6,{},{},,,,,
-1304,Orcish_Axe,Orcish Axe,4,20,0,1500,75,,1,0,8803555,2,2,3,3,6,{},{},,,,,
+1301,Axe,Axe,4,500,0,800,38,,1,3,8803555,2,2,1,3,6,{},{}
+1302,Axe_,Axe,4,500,0,800,38,,1,4,8803555,2,2,1,3,6,{},{}
+1303,Axe__,Axe,4,500,0,800,38,,1,0,8803555,2,2,1,3,6,{},{}
+1304,Orcish_Axe,Orcish Axe,4,20,0,1500,75,,1,0,8803555,2,2,3,3,6,{},{}
1305,Cleaver,Cleaver,4,20,0,1200,140,,1,0,279714,2,2,4,44,6,{},{ bonus2 bAddRace,7,5; bonus3 bAddMonsterDropItem,517,2,3000; }
-1306,War_Axe,War Axe,4,20,0,4200,145,,1,1,263168,2,2,3,76,6,{},{ bonus bDex,2; bonus bLuk,2; },,,
-1351,Battle_Axe,Battle Axe,4,5400,0,1500,80,,1,3,279714,2,34,1,3,7,{},{},,,,,
-1352,Battle_Axe_,Battle Axe,4,5400,0,1500,80,,1,4,279714,2,34,1,3,7,{},{},,,,,
-1353,Battle_Axe__,Battle Axe,4,5400,0,1500,80,,1,0,279714,2,34,1,3,7,{},{},,,,,
-1354,Hammer,Hammer,4,15500,0,2000,120,,1,2,279714,2,34,2,16,7,{},{},,,,
-1355,Hammer_,Hammer,4,15500,0,2000,120,,1,3,279714,2,34,2,16,7,{},{},,,,
-1356,Hammer__,Hammer,4,15500,0,2200,120,,1,0,279714,2,34,2,16,7,{},{},,,,
-1357,Buster,Buster,4,34000,0,2200,155,,1,1,279714,2,34,3,30,7,{},{},,,,
-1358,Buster_,Buster,4,34000,0,2200,155,,1,2,279714,2,34,3,30,7,{},{},,,,
-1359,Buster__,Buster,4,34000,0,2200,155,,1,0,279714,2,34,3,30,7,{},{},,,,
-1360,Two_handed_Axe,Two-handed Axe,4,55000,0,2500,185,,1,1,279714,2,34,3,30,7,{},{},,,,
-1361,Two_handed_Axe_,Two-handed Axe,4,55000,0,2500,185,,1,2,279714,2,34,3,30,7,{},{},,,,
-1362,Two_handed_Axe__,Two-handed Axe,4,55000,0,2500,185,,1,0,279714,2,34,3,30,7,{},{},,,,
-1363,Blood_Axe,Bloody Axe,4,20,0,400,170,,1,0,279714,2,34,4,44,7,{},{ bonus bStr,10; bonus bSpeedRate,25; },,
-1364,Great_Axe,Great Axe,4,20,0,1800,187,,1,0,279714,2,34,4,44,7,{},{ bonus2 bAddEff,Eff_Stan,1500; },,
+1306,War_Axe,War Axe,4,20,0,4200,145,,1,1,263168,2,2,3,76,6,{},{ bonus bDex,2; bonus bLuk,2; }
+1351,Battle_Axe,Battle Axe,4,5400,0,1500,80,,1,3,279714,2,34,1,3,7,{},{}
+1352,Battle_Axe_,Battle Axe,4,5400,0,1500,80,,1,4,279714,2,34,1,3,7,{},{}
+1353,Battle_Axe__,Battle Axe,4,5400,0,1500,80,,1,0,279714,2,34,1,3,7,{},{}
+1354,Hammer,Hammer,4,15500,0,2000,120,,1,2,279714,2,34,2,16,7,{},{}
+1355,Hammer_,Hammer,4,15500,0,2000,120,,1,3,279714,2,34,2,16,7,{},{}
+1356,Hammer__,Hammer,4,15500,0,2200,120,,1,0,279714,2,34,2,16,7,{},{}
+1357,Buster,Buster,4,34000,0,2200,155,,1,1,279714,2,34,3,30,7,{},{}
+1358,Buster_,Buster,4,34000,0,2200,155,,1,2,279714,2,34,3,30,7,{},{}
+1359,Buster__,Buster,4,34000,0,2200,155,,1,0,279714,2,34,3,30,7,{},{}
+1360,Two_handed_Axe,Two-handed Axe,4,55000,0,2500,185,,1,1,279714,2,34,3,30,7,{},{}
+1361,Two_handed_Axe_,Two-handed Axe,4,55000,0,2500,185,,1,2,279714,2,34,3,30,7,{},{}
+1362,Two_handed_Axe__,Two-handed Axe,4,55000,0,2500,185,,1,0,279714,2,34,3,30,7,{},{}
+1363,Blood_Axe,Bloody Axe,4,20,0,4000,170,,1,0,279714,2,34,4,44,7,{},{ bonus bStr,10; bonus bSpeedRate,25; }
+1364,Great_Axe,Great Axe,4,20,0,1800,187,,1,0,279714,2,34,4,44,7,{},{ bonus2 bAddEff,Eff_Stan,1500; }
1365,Sabbath,Sabbath,4,20,0,2300,120,,1,0,279714,2,34,4,44,7,{},{ bonus2 bWeaponComaRace,6,50; bonus bAtkEle,7; },
1366,Light_Epsilon,Light Epsilon,4,20,0,2300,180,,1,0,279714,2,34,4,44,7,{},{ bonus bAtkEle,6; skill 28,3; bonus2 bAddRace,6,3; }
1367,Slaughter,Slaughter,4,20,0,2500,120,,1,0,279714,2,34,4,44,7,{},{ bonus bIgnoreDefRace,2; bonus2 bWeaponComaRace,2,50; },
-1368,Tomahawk,Tomahawk,4,20,0,2500,165,,1,0,279714,2,34,4,44,7,{},{ bonus bAtkEle,4; },,,
-1369,Guillotine,Guillotine,4,20,0,3000,215,,1,0,279714,2,34,4,44,7,{},{ bonus2 bWeaponComaRace,7,30; bonus2 bSPDrainRate,5,2; },,
+1368,Tomahawk,Tomahawk,4,20,0,2500,165,,1,0,279714,2,34,4,44,7,{},{ bonus bAtkEle,4; skill 337,1; }
+1369,Guillotine,Guillotine,4,20,0,3000,215,,1,0,279714,2,34,4,44,7,{},{ bonus2 bWeaponComaRace,7,30; bonus2 bSPDrainRate,5,2; }
// Spears
-1401,Javelin,Javelin,4,150,0,700,28,,3,3,16514,2,2,1,4,4,{},{},,,
-1402,Javelin_,Javelin,4,150,0,700,28,,3,4,16514,2,2,1,4,4,{},{},,,
-1403,Javelin__,Javelin,4,150,0,700,28,,3,0,16514,2,2,1,4,4,{},{},,,
-1404,Spear,Spear,4,1700,0,850,44,,3,3,16514,2,2,1,4,4,{},{},,,
-1405,Spear_,Spear,4,1700,0,850,44,,3,4,16514,2,2,1,4,4,{},{},,,
-1406,Spear__,Spear,4,1700,0,850,44,,3,0,16514,2,2,1,4,4,{},{},,,
-1407,Pike,Pike,4,3450,0,1000,60,,3,3,16514,2,2,1,4,4,{},{},,,
-1408,Pike_,Pike,4,3450,0,1000,60,,3,4,16514,2,2,1,4,4,{},{},,,
-1409,Pike__,Pike,4,3450,0,1000,60,,3,0,16514,2,2,1,4,4,{},{},,,
-1410,Lance,Lance,4,60000,0,2500,185,,3,0,16514,2,34,3,33,5,{},{},,,
-1411,Lance_,Lance,4,60000,0,2500,185,,3,0,16514,2,34,3,33,5,{},{},,,
-1412,Lance__,Lance,4,60000,0,2500,185,,3,0,16514,2,34,3,33,5,{},{},,,
-1413,Gungnir,Gungnir,4,20,0,500,120,,3,0,16514,2,2,4,4,4,{},{ bonus bPerfectHitRate,25; bonus bHit,30; }
+1401,Javelin,Javelin,4,150,0,700,28,,3,3,16514,2,2,1,4,4,{},{}
+1402,Javelin_,Javelin,4,150,0,700,28,,3,4,16514,2,2,1,4,4,{},{}
+1403,Javelin__,Javelin,4,150,0,700,28,,3,0,16514,2,2,1,4,4,{},{}
+1404,Spear,Spear,4,1700,0,850,44,,3,3,16514,2,2,1,4,4,{},{}
+1405,Spear_,Spear,4,1700,0,850,44,,3,4,16514,2,2,1,4,4,{},{}
+1406,Spear__,Spear,4,1700,0,850,44,,3,0,16514,2,2,1,4,4,{},{}
+1407,Pike,Pike,4,3450,0,1000,60,,3,3,16514,2,2,1,4,4,{},{}
+1408,Pike_,Pike,4,3450,0,1000,60,,3,4,16514,2,2,1,4,4,{},{}
+1409,Pike__,Pike,4,3450,0,1000,60,,3,0,16514,2,2,1,4,4,{},{}
+1410,Lance,Lance,4,60000,0,2500,185,,3,0,16514,2,34,3,33,5,{},{}
+1411,Lance_,Lance,4,60000,0,2500,185,,3,0,16514,2,34,3,33,5,{},{}
+1412,Lance__,Lance,4,60000,0,2500,185,,3,0,16514,2,34,3,33,5,{},{}
+1413,Gungnir,Gungnir,4,20,0,500,120,,3,0,16514,2,2,4,4,4,{},{ bonus bAtkEle,4; bonus bPerfectHitRate,25; bonus bHit,30; }
1414,Gelerdria,Gelerdria,4,20,0,700,145,,3,0,16514,2,2,4,48,4,{},{ bonus bAtkEle,2; bonus bMaxHP,500; bonus bMaxSP,-50; }
1415,Skewer,Brocca,4,20,0,850,100,,3,0,16514,2,2,4,48,4,{},{ bonus bIgnoreDefRace,11; bonus2 bAddEle,0,25; }
-1416,Tjungkuletti,Tjungkuletti,4,20,0,1000,95,,3,0,16514,2,2,4,48,4,{},{ bonus2 bSPDrainRate,100,1; bonus2 bSPDrainRate,1,5; },,,
+1416,Tjungkuletti,Tjungkuletti,4,20,0,1000,95,,3,0,16514,2,2,4,48,4,{},{ bonus2 bSPDrainRate,100,1; bonus2 bSPDrainRate,1,5; }
1417,Pole_Axe,Pole Axe,4,20,0,3800,160,,3,1,16514,2,2,3,71,4,{},{ bonus bStr,1; bonus bInt,2; bonus bDex,1; }
-1451,Guisarme,Guisarme,4,13000,0,1000,84,,3,2,16514,2,34,2,18,5,{},{},,,
-1452,Guisarme_,Guisarme,4,13000,0,1000,84,,3,3,16514,2,34,2,18,5,{},{},,,
-1453,Guisarme__,Guisarme,4,13000,0,1000,84,,3,0,16514,2,34,2,18,5,{},{},,,
-1454,Glaive,Glaive,4,20000,0,1200,104,,3,2,16514,2,34,2,18,5,{},{},,,
-1455,Glaive_,Glaive,4,20000,0,1200,104,,3,3,16514,2,34,2,18,5,{},{},,,
-1456,Glaive__,Glaive,4,20000,0,1200,104,,3,0,16514,2,34,2,18,5,{},{},,,
-1457,Partizan,Partizan,4,27000,0,2000,124,,3,1,16514,2,34,2,18,5,{},{},,,
-1458,Partizan_,Partizan,4,27000,0,2000,124,,3,2,16514,2,34,2,18,5,{},{},,,
-1459,Partizan__,Partizan,4,27000,0,2000,124,,3,0,16514,2,34,3,33,5,{},{},,,
-1460,Trident,Trident,4,51000,0,1200,150,,3,2,16514,2,34,3,33,5,{},{},,,
-1461,Trident_,Trident,4,51000,0,1200,150,,3,3,16514,2,34,3,33,5,{},{},,,
-1462,Trident__,Trident,4,51000,0,1200,150,,3,0,16514,2,34,3,33,5,{},{},,,
-1463,Halberd,Halberd,4,54000,0,2500,165,,3,1,16514,2,34,3,33,5,{},{},,,
-1464,Halberd_,Halberd,4,54000,0,2500,165,,3,2,16514,2,34,3,33,5,{},{},,,,,,,
-1465,Halberd__,Halberd,4,54000,0,2500,165,,3,0,16514,2,34,3,33,5,{},{},,,,,,,
-1466,Crescent_Scythe,Crescent Scythe,4,20,0,2500,180,,3,0,16514,2,34,4,48,5,{},{ bonus bCritical,30; bonus bHit,10; },,,,,
-1467,Bill_Guisarme,Bill Guisarme,4,20,0,1000,183,,3,0,16514,2,34,4,48,5,{},{ bonus2 bAddRace,2,10; bonus2 bAddRace,7,5; },,,
-1468,Zephyrus,Zephyrus,4,20,0,2000,170,,3,0,16514,2,34,4,48,5,{},{ bonus bAtkEle,4; skill 21,3; bonus2 bAddEff,Eff_Silence,200; bonus3 bAutoSpell,21,3,25; }
-1469,Longinus's_Spear,Longinus's Spear,4,20,0,2500,180,,3,0,16514,2,34,4,48,5,{},{ bonus bAtkEle,7; bonus2 bAddRace,7,10; bonus2 bAddRace,8,10; },,
-1470,Brionac,Brionac,4,20,0,3000,190,,3,0,16514,2,34,4,48,5,{},{ bonus bAtkEle,6; skill 28,5; skill 13,3; bonus3 bAutoSpell,13,3,25; bonus2 bAddRace,10,5; },
-1471,Hellfire,Hellfire,4,20,0,3500,200,,3,0,16514,2,34,4,48,5,{},{ bonus bAtkEle,3; skill 17,3; bonus3 bAutoSpell,17,3,25; bonus bStr,3; },,
+1451,Guisarme,Guisarme,4,13000,0,1000,84,,3,2,16514,2,34,2,18,5,{},{}
+1452,Guisarme_,Guisarme,4,13000,0,1000,84,,3,3,16514,2,34,2,18,5,{},{}
+1453,Guisarme__,Guisarme,4,13000,0,1000,84,,3,0,16514,2,34,2,18,5,{},{}
+1454,Glaive,Glaive,4,20000,0,1200,104,,3,2,16514,2,34,2,18,5,{},{}
+1455,Glaive_,Glaive,4,20000,0,1200,104,,3,3,16514,2,34,2,18,5,{},{}
+1456,Glaive__,Glaive,4,20000,0,1200,104,,3,0,16514,2,34,2,18,5,{},{}
+1457,Partizan,Partizan,4,27000,0,2000,124,,3,1,16514,2,34,2,18,5,{},{}
+1458,Partizan_,Partizan,4,27000,0,2000,124,,3,2,16514,2,34,2,18,5,{},{}
+1459,Partizan__,Partizan,4,27000,0,2000,124,,3,0,16514,2,34,3,33,5,{},{}
+1460,Trident,Trident,4,51000,0,1200,150,,3,2,16514,2,34,3,33,5,{},{}
+1461,Trident_,Trident,4,51000,0,1200,150,,3,3,16514,2,34,3,33,5,{},{}
+1462,Trident__,Trident,4,51000,0,1200,150,,3,0,16514,2,34,3,33,5,{},{}
+1463,Halberd,Halberd,4,54000,0,2500,165,,3,1,16514,2,34,3,33,5,{},{}
+1464,Halberd_,Halberd,4,54000,0,2500,165,,3,2,16514,2,34,3,33,5,{},{}
+1465,Halberd__,Halberd,4,54000,0,2500,165,,3,0,16514,2,34,3,33,5,{},{}
+1466,Crescent_Scythe,Crescent Scythe,4,20,0,2500,180,,3,0,16514,2,34,4,48,5,{},{ bonus bCritical,30; bonus bHit,10; }
+1467,Bill_Guisarme,Bill Guisarme,4,20,0,1000,183,,3,0,16514,2,34,4,48,5,{},{ bonus2 bAddRace,2,10; bonus2 bAddRace,7,5; }
+1468,Zephyrus,Zephyrus,4,20,0,2000,170,,3,0,16514,2,34,4,48,5,{},{ bonus bAtkEle,4; bonus2 bAddEff,Eff_Silence,200; bonus3 bAutoSpell,21,3,25; }
+1469,Longinus's_Spear,Longinus's Spear,4,20,0,2500,180,,3,0,16514,2,34,4,48,5,{},{ bonus bAtkEle,7; bonus2 bAddRace,7,10; bonus2 bAddRace,8,10; }
+1470,Brionac,Brionac,4,20,0,3000,190,,3,0,16514,2,34,4,48,5,{},{ bonus bAtkEle,6; skill 28,5; bonus3 bAutoSpell,13,3,25; bonus2 bAddRace,10,5; },
+1471,Hellfire,Hellfire,4,20,0,3500,200,,3,0,16514,2,34,4,48,5,{},{ bonus bAtkEle,3; bonus3 bAutoSpell,17,3,25; bonus bStr,3; }
// 2 Handed Staffs
-1472,Staff_of_Soul,Soul Staff,4,20,0,1400,25,,1,0,66052,2,34,3,73,10,{},{ bonus bInt,5; bonus bAgi,2; bonus bMatkRate,15; },,,,
-1473,Wizardy_Staff,Wizardy Staff,4,20,0,2400,120,,1,0,66052,2,34,4,90,10,{},{ bonus bInt,6; bonus bDex,2; bonus bMatkRate,15; },,,,
+1472,Staff_of_Soul,Soul Staff,4,20,0,1400,25,,1,0,66052,2,34,3,73,10,{},{ bonus bInt,5; bonus bAgi,2; bonus bMatkRate,15; }
+1473,Wizardy_Staff,Wizardy Staff,4,20,0,2400,120,,1,0,66052,2,34,4,90,10,{},{ bonus bInt,6; bonus bDex,2; bonus bMatkRate,15; }
// Clubs and Maces
-1501,Club,Club,4,120,0,700,23,,1,3,8701363,2,2,1,2,8,{},{},,,,,,,
-1502,Club_,Club,4,120,0,700,23,,1,4,8701363,2,2,1,2,8,{},{},,,,,,,
-1503,Club__,Club,4,120,0,700,23,,1,0,8701363,2,2,1,2,8,{},{},,,,,,,
-1504,Mace,Mace,4,1600,0,800,37,,1,3,8701363,2,2,1,2,8,{},{},,,,,,,
-1505,Mace_,Mace,4,1600,0,800,37,,1,4,8701363,2,2,1,2,8,{},{},,,,,,,
+1501,Club,Club,4,120,0,700,23,,1,3,8701363,2,2,1,2,8,{},{}
+1502,Club_,Club,4,120,0,700,23,,1,4,8701363,2,2,1,2,8,{},{}
+1503,Club__,Club,4,120,0,700,23,,1,0,8701363,2,2,1,2,8,{},{}
+1504,Mace,Mace,4,1600,0,800,37,,1,3,8701363,2,2,1,2,8,{},{}
+1505,Mace_,Mace,4,1600,0,800,37,,1,4,8701363,2,2,1,2,8,{},{}
1506,Mace__,Mace,4,1600,0,800,37,,1,0,8701363,2,2,1,2,8,{},{}
1507,Smasher,Smasher,4,9000,0,1000,54,,1,2,8701363,2,2,2,14,8,{},{}
1508,Smasher_,Smasher,4,9000,0,1000,54,,1,3,8701363,2,2,2,14,8,{},{}
@@ -623,37 +650,37 @@
1519,Chain,Chain,4,23000,0,800,84,,1,2,312754,2,2,2,14,8,{},{}
1520,Chain_,Chain,4,23000,0,800,84,,1,3,312754,2,2,2,14,8,{},{}
1521,Chain__,Chain,4,23000,0,800,84,,1,3,312754,2,2,2,14,8,{},{}
-1522,Stunner,Stunner,4,60000,0,2000,140,,1,0,256,2,2,3,27,8,{},{ bonus2 bAddEff,Eff_Stan,1000; },,,,
-1523,Spike,Spike,4,20,0,700,85,,1,0,33040,2,2,4,40,8,{},{ bonus bCritical,40; bonus bDefRate,-67; bonus bDef2Rate,-67; },,,
-1524,Golden_Mace,Golden Mace,4,20,0,800,110,,1,1,33040,2,2,4,40,8,{},{ bonus2 bAddRace,1,10; bonus bUnbreakable,100; },,,,
-1525,Long_Mace,Long Mace,4,20,0,800,135,,3,0,33040,2,2,4,40,8,{},{ bonus bLongAtkDef,10; },,,,,
-1526,Slash,Slash,4,20,0,1000,145,,1,0,33040,2,2,4,40,8,{},{ bonus2 bAddRace,1,15; bonus2 bWeaponComaRace,1,50; },,
+1522,Stunner,Stunner,4,60000,0,2000,140,,1,0,33040,2,2,3,27,8,{},{ bonus2 bAddEff,Eff_Stan,1000; }
+1523,Spike,Spike,4,20,0,700,85,,1,0,33040,2,2,4,40,8,{},{ bonus bCritical,40; bonus bDefRate,-67; bonus bDef2Rate,-67; }
+1524,Golden_Mace,Golden Mace,4,20,0,800,110,,1,1,33040,2,2,4,40,8,{},{ bonus2 bAddRace,1,10; bonus bUnbreakableWeapon,0; }
+1525,Long_Mace,Long Mace,4,20,0,800,135,,3,0,33040,2,2,4,40,8,{},{ bonus bLongAtkDef,10; }
+1526,Slash,Slash,4,20,0,1000,145,,1,0,33040,2,2,4,40,8,{},{ bonus2 bAddRace,1,15; bonus2 bWeaponComaRace,1,50; }
1527,Quadrille,Quadrille,4,20,0,900,165,,1,0,33040,2,2,4,40,8,{},{ bonus2 bAddRace,1,10; bonus2 bAddRace,7,10; bonus2 bAddEle,2,10; }
-1528,Grand_Cross,Grand Cross,4,20,0,1500,140,,1,0,33040,2,2,4,40,8,{},{ bonus bAtkEle,6; skill 77,3; bonus3 bAutoSpell,77,3,25; bonus2 bHPDrainRate,100,1; },
-1529,Iron_Driver,Iron Driver,4,20,0,3000,155,,1,0,33024,2,2,3,78,8,{},{},,,,,,
-1530,Mjolnir,Mjolnir,4,20,0,6000,250,,1,0,8701363,2,2,4,95,8,{},{ bonus bAtkEle,4; bonus bDex,40; bonus bStr,15; bonus bAspdRate,30; },,
-1531,Spanner,Spanner,4,20,0,2500,115,,1,0,33040,2,2,3,55,8,{},{ bonus2 bAddEff,Eff_Blind,100; bonus2 bAddEff,Eff_Stan,100; bonus2 bAddEff,Eff_Poison,100; bonus2 bAddEff,Eff_Freeze,100; },,,,,,
+1528,Grand_Cross,Grand Cross,4,20,0,1500,140,,1,0,33040,2,2,4,40,8,{},{ bonus bAtkEle,6; bonus3 bAutoSpell,77,3,25; bonus2 bHPDrainRate,100,1; },
+1529,Iron_Driver,Iron Driver,4,20,0,3000,155,,1,0,33024,2,2,3,78,8,{},{}
+1530,Mjolnir,Mjolnir,4,20,0,6000,250,,1,0,8701363,2,2,4,95,8,{},{ bonus bAtkEle,4; bonus bDex,40; bonus bStr,15; bonus bAspdRate,30; }
+1531,Spanner,Spanner,4,20,0,2500,115,,1,0,33040,2,2,3,55,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,0,600,85,,1,3,65792,2,2,2,14,15,{},{},,,,,,
-1551,Bible,Bible,4,60000,0,1000,115,,1,2,65792,2,2,3,27,15,{},{ bonus bInt,2; },,,,,
-1552,Tablet,Tablet,4,51000,0,800,125,,1,1,65792,2,2,3,27,15,{},{},,,,,,
-1553,Book_of_Billows,Book of Billows,4,35000,0,750,90,,1,0,65792,2,2,3,27,15,{},{ bonus bAtkEle,1; },,,,,
-1554,Book_of_Mother_Earth,Book of Mother Earth,4,35000,0,750,90,,1,0,65792,2,2,3,27,15,{},{ bonus bAtkEle,2; },,,,,
-1555,Book_of_Blazing_Sun,Book of Blazing Sun,4,35000,0,750,90,,1,0,65792,2,2,3,27,15,{},{ bonus bAtkEle,3; },,,,,,,,,,
-1556,Book_of_Gust_of_Wind,Book of Gust of Wind,4,35000,0,750,90,,1,0,65792,2,2,3,27,15,{},{ bonus bAtkEle,4; },,,,,,,,,,
+1550,Book,Book,4,30000,0,600,85,,1,3,65792,2,2,2,14,15,{},{}
+1551,Bible,Bible,4,60000,0,1000,115,,1,2,65792,2,2,3,27,15,{},{ bonus bInt,2; }
+1552,Tablet,Tablet,4,51000,0,800,125,,1,1,65792,2,2,3,27,15,{},{}
+1553,Book_of_Billows,Book of Billows,4,35000,0,750,90,,1,0,65792,2,2,3,27,15,{},{ bonus bAtkEle,1; }
+1554,Book_of_Mother_Earth,Book of Mother Earth,4,35000,0,750,90,,1,0,65792,2,2,3,27,15,{},{ bonus bAtkEle,2; }
+1555,Book_of_Blazing_Sun,Book of Blazing Sun,4,35000,0,750,90,,1,0,65792,2,2,3,27,15,{},{ bonus bAtkEle,3; }
+1556,Book_of_Gust_of_Wind,Book of Gust of Wind,4,35000,0,750,90,,1,0,65792,2,2,3,27,15,{},{ bonus bAtkEle,4; }
1557,Book_of_the_Apocalypse,Book of the Apocalypse,4,35000,0,800,120,,1,0,65792,2,2,4,40,15,{},{ bonus bAtkEle,7; bonus2 bSubEle,6,-5; bonus2 bAddEle,1,7; bonus2 bAddEle,2,7; bonus2 bAddEle,3,7; bonus2 bAddEle,4,7; }
-1558,Girl's_Diary,Girl's Diary,4,20,0,300,60,,1,1,65792,2,2,4,40,15,{},{ bonus2 bAddDamageClass,1188,150; },,,,,,,,,
-1599,Angra_Manyu,Angra Manyu,4,120,0,10,1,,1,5,10477567,2,2,4,2,8,{},{},,,,,,,,,,,
+1558,Girl's_Diary,Girl's Diary,4,20,0,300,60,,1,1,65792,2,2,4,40,15,{},{ bonus2 bAddDamageClass,1188,150; }
+1599,Angra_Manyu,Angra Manyu,4,120,0,10,1,,1,5,10477567,2,2,4,2,8,{},{ bonus bBaseAtk,3800; bonus2 bHPDrainRate,100,100; }
// Rods and Staffs
-1601,Rod,Rod,4,50,0,400,15,,1,3,8487701,2,2,1,1,10,{},{ bonus bMatkRate,15; },,,,,,,,,,
-1602,Rod_,Rod,4,50,0,400,15,,1,4,8487701,2,2,1,1,10,{},{ bonus bMatkRate,15; },,,,,,,,,,
-1603,Rod__,Rod,4,50,0,400,15,,1,0,8487701,2,2,1,1,10,{},{ bonus bMatkRate,15; },,,,,,,,,,
-1604,Wand,Wand,4,2500,0,400,25,,1,2,8487701,2,2,2,12,10,{},{ bonus bInt,1; bonus bMatkRate,15; },,,,,,,,,
-1605,Wand_,Wand,4,2500,0,400,25,,1,3,8487701,2,2,2,12,10,{},{ bonus bInt,1; bonus bMatkRate,15; },,,,,,,,,
-1606,Wand__,Wand,4,2500,0,400,25,,1,0,8487701,2,2,2,12,10,{},{ bonus bInt,1; bonus bMatkRate,15; },,,,,,,,,
-1607,Staff,Staff,4,9500,0,400,40,,1,2,99092,2,2,2,12,10,{},{ bonus bInt,2; bonus bMatkRate,15; },,,,,,,,,
-1608,Staff_,Staff,4,9500,0,400,40,,1,3,99092,2,2,2,12,10,{},{ bonus bInt,2; bonus bMatkRate,15; },,,,,,,,,
-1609,Staff__,Staff,4,9500,0,400,40,,1,0,99092,2,2,2,12,10,{},{ bonus bInt,2; bonus bMatkRate,15; },,,,,,,,,
+1601,Rod,Rod,4,50,0,400,15,,1,3,8487701,2,2,1,1,10,{},{ bonus bMatkRate,15; }
+1602,Rod_,Rod,4,50,0,400,15,,1,4,8487701,2,2,1,1,10,{},{ bonus bMatkRate,15; }
+1603,Rod__,Rod,4,50,0,400,15,,1,0,8487701,2,2,1,1,10,{},{ bonus bMatkRate,15; }
+1604,Wand,Wand,4,2500,0,400,25,,1,2,8487701,2,2,2,12,10,{},{ bonus bInt,1; bonus bMatkRate,15; }
+1605,Wand_,Wand,4,2500,0,400,25,,1,3,8487701,2,2,2,12,10,{},{ bonus bInt,1; bonus bMatkRate,15; }
+1606,Wand__,Wand,4,2500,0,400,25,,1,0,8487701,2,2,2,12,10,{},{ bonus bInt,1; bonus bMatkRate,15; }
+1607,Staff,Staff,4,9500,0,400,40,,1,2,99092,2,2,2,12,10,{},{ bonus bInt,2; bonus bMatkRate,15; }
+1608,Staff_,Staff,4,9500,0,400,40,,1,3,99092,2,2,2,12,10,{},{ bonus bInt,2; bonus bMatkRate,15; }
+1609,Staff__,Staff,4,9500,0,400,40,,1,0,99092,2,2,2,12,10,{},{ bonus bInt,2; bonus bMatkRate,15; }
1610,Arc_Wand,Arc Wand,4,45000,0,400,60,,1,1,99092,2,2,3,24,10,{},{ bonus bInt,3; bonus bMatkRate,15; },
1611,Arc_Wand_,Arc Wand,4,45000,0,400,60,,1,2,99092,2,2,3,24,10,{},{ bonus bInt,3; bonus bMatkRate,15; },
1612,Arc_Wand__,Arc Wand,4,45000,0,400,60,,1,0,99092,2,2,3,24,10,{},{ bonus bInt,3; bonus bMatkRate,15; },
@@ -661,91 +688,93 @@
1614,Blessed_Wand,Wand of Occult,4,20,0,700,75,,1,0,99092,2,2,3,24,10,{},{ bonus bInt,3; bonus bMatkRate,15; },
1615,Bone_Wand,Bone Wand,4,20,0,700,40,,1,0,99092,2,2,3,24,10,{},{ bonus bInt,4; bonus bAtkEle,9; bonus bMatkRate,15; }
// Bows
-1701,Bow,Bow,4,1000,0,500,15,,5,3,1706056,2,34,1,4,11,{},{},,,
-1702,Bow_,Bow,4,1000,0,500,15,,5,4,1706056,2,34,1,4,11,{},{},,,
-1703,Bow__,Bow,4,1000,0,500,15,,5,0,1706056,2,34,1,4,11,{},{},,,
-1704,Composite_Bow,Composite Bow,4,2500,0,600,29,,5,3,1706056,2,34,1,4,11,{},{},,,
-1705,Composite_Bow_,Composite Bow,4,2500,0,600,29,,5,4,1706056,2,34,1,4,11,{},{},,,
-1706,Composite_Bow__,Composite Bow,4,2500,0,600,29,,5,0,1706056,2,34,1,4,11,{},{},,,
-1707,Great_Bow,Great Bow,4,10000,0,1000,50,,5,2,1706056,2,34,2,18,11,{},{},,,
-1708,Great_Bow_,Great Bow,4,10000,0,1000,50,,5,3,1706056,2,34,2,18,11,{},{},,,
-1709,Great_Bow__,Great Bow,4,10000,0,1000,50,,5,0,1706056,2,34,2,18,11,{},{},,,
-1710,CrossBow,Cross Bow,4,17000,0,900,65,,5,2,1706056,2,34,2,18,11,{},{},,,,,,,,,,,,,,
-1711,CrossBow_,Cross Bow,4,17000,0,900,65,,5,3,1706056,2,34,2,18,11,{},{},,,,,,,,,,,,,,
-1712,CrossBow__,Cross Bow,4,17000,0,900,65,,5,0,1706056,2,34,2,18,11,{},{},,,,,,,,,,,,,,
-1713,Arbalest,Arbalest,4,48000,0,1000,90,,5,1,1706056,2,34,3,33,11,{},{ bonus bDex,2; },,,,,,,,,,,,,
-1714,Gakkung,Gakkung,4,42000,0,1100,100,,5,1,1706056,2,34,3,33,11,{},{},,,,,,,,,,,,,,
-1715,Arbalest_,Arbalest,4,48000,0,1000,90,,5,2,1706056,2,34,3,33,11,{},{ bonus bDex,2; },,,,,,,,,,,,,
-1716,Gakkung_,Gakkung,4,42000,0,1100,100,,5,2,1706056,2,34,3,33,11,{},{},,,,,,,,,,,,,,
-1718,Hunter_Bow,Hunter Bow,4,64000,0,1500,125,,5,0,2048,2,34,3,33,11,{},{},,,,,,,,,,,,,,
-1719,Bow_of_Roguemaster,Roguemaster's Bow,4,20,0,500,75,,11,0,131136,2,34,4,48,11,{},{ bonus2 bAddStealRate,100,0; },,,,,,,,,,,,,,
+1701,Bow,Bow,4,1000,0,500,15,,5,3,1706056,2,34,1,4,11,{},{}
+1702,Bow_,Bow,4,1000,0,500,15,,5,4,1706056,2,34,1,4,11,{},{}
+1703,Bow__,Bow,4,1000,0,500,15,,5,0,1706056,2,34,1,4,11,{},{}
+1704,Composite_Bow,Composite Bow,4,2500,0,600,29,,5,3,1706056,2,34,1,4,11,{},{}
+1705,Composite_Bow_,Composite Bow,4,2500,0,600,29,,5,4,1706056,2,34,1,4,11,{},{}
+1706,Composite_Bow__,Composite Bow,4,2500,0,600,29,,5,0,1706056,2,34,1,4,11,{},{}
+1707,Great_Bow,Great Bow,4,10000,0,1000,50,,5,2,1706056,2,34,2,18,11,{},{}
+1708,Great_Bow_,Great Bow,4,10000,0,1000,50,,5,3,1706056,2,34,2,18,11,{},{}
+1709,Great_Bow__,Great Bow,4,10000,0,1000,50,,5,0,1706056,2,34,2,18,11,{},{}
+1710,CrossBow,Cross Bow,4,17000,0,900,65,,5,2,1706056,2,34,2,18,11,{},{}
+1711,CrossBow_,Cross Bow,4,17000,0,900,65,,5,3,1706056,2,34,2,18,11,{},{}
+1712,CrossBow__,Cross Bow,4,17000,0,900,65,,5,0,1706056,2,34,2,18,11,{},{}
+1713,Arbalest,Arbalest,4,48000,0,1000,90,,5,1,1706056,2,34,3,33,11,{},{ bonus bDex,2; }
+1714,Gakkung,Gakkung,4,42000,0,1100,100,,5,1,1706056,2,34,3,33,11,{},{}
+1715,Arbalest_,Arbalest,4,48000,0,1000,90,,5,2,1706056,2,34,3,33,11,{},{ bonus bDex,2; }
+1716,Gakkung_,Gakkung,4,42000,0,1100,100,,5,2,1706056,2,34,3,33,11,{},{}
+1718,Hunter_Bow,Hunter Bow,4,64000,0,1500,125,,5,0,2048,2,34,3,33,11,{},{}
+1719,Bow_of_Roguemaster,Roguemaster's Bow,4,20,0,500,75,,11,0,131136,2,34,4,48,11,{},{}
1720,Bow_of_Rudra,Rudra's Bow,4,20,0,1200,150,,5,0,1705992,2,34,4,48,11,{},{ bonus bAtkEle,6; 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,0,2000,95,,9,1,133184,2,34,3,65,11,{},{},,,,,,,,,,,,,,
-1722,Ballista,Ballista,4,20,0,3500,145,,5,0,1574912,2,34,4,77,11,{},{},,,,,,,,,,,,,,
+1721,Repeating_Crossbow,Repeating Crossbow,4,89000,0,2000,95,,9,1,133184,2,34,3,65,11,{},{}
+1722,Ballista,Ballista,4,20,0,3500,145,,5,0,1574912,2,34,4,77,11,{},{}
+
// Arrows
-1750,Arrow,Arrow,10,1,0,1,25,,,,1706056,2,32768,,1,,{},{},,,,,,,,,,,,,,
-1751,Silver_Arrow,Silver Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,6; },,,,,,,,,,,,,
-1752,Fire_Arrow,Fire Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,3; },,
-1753,Steel_Arrow,Steel Arrow,10,3,0,2,40,,,,1706056,2,32768,,1,,{},{},,,
-1754,Crystal_Arrow,Crystal Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,1; },,
-1755,Arrow_of_Wind,Arrow of Wind,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,4; },,
-1756,Stone_Arrow,Stone Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,2; },,
-1757,Immaterial_Arrow,Immaterial Arrow,10,3,0,1,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,8; },,
+1750,Arrow,Arrow,10,1,0,1,25,,,,1706056,2,32768,,1,,{},{}
+1751,Silver_Arrow,Silver Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,6; }
+1752,Fire_Arrow,Fire Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,3; }
+1753,Steel_Arrow,Steel Arrow,10,3,0,2,40,,,,1706056,2,32768,,1,,{},{}
+1754,Crystal_Arrow,Crystal Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,1; }
+1755,Arrow_of_Wind,Arrow of Wind,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,4; }
+1756,Stone_Arrow,Stone Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,2; }
+1757,Immaterial_Arrow,Immaterial Arrow,10,3,0,1,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,8; }
1758,Stun_Arrow,Stun Arrow,10,3,0,3,1,,,,1706056,2,32768,,1,,{},{ bonus2 bAddEff,Eff_Stan,500; },
1759,Freezing_Arrow,Freeze Arrow,10,3,0,3,1,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,1; bonus2 bAddEff,Eff_Freeze,500; }
1760,Flash_Arrow,Flash Arrow,10,3,0,3,1,,,,1706056,2,32768,,1,,{},{ bonus2 bAddEff,Eff_Blind,500; },
1761,Curse_Arrow,Curse Arrow,10,3,0,3,1,,,,1706056,2,32768,,1,,{},{ bonus2 bAddEff,Eff_Curse,500; },
-1762,Rusty_Arrow,Rusted Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,5; },,
+1762,Rusty_Arrow,Rusted Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,5; }
1763,Poison_Arrow,Poison Arrow,10,3,0,3,1,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,500; }
-1764,Incisive_Arrow,Sharp Arrow,10,3,0,3,10,,,,1706056,2,32768,,1,,{},{ bonus bCritical,10; },,
-1765,Oridecon_Arrow,Oridecon Arrow,10,3,0,3,50,,,,1706056,2,32768,,1,,{},{},,,
-1766,Arrow_of_Counter_Evil,Arrow of Counter Evil,10,40,0,3,50,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,6; },,
-1767,Arrow_of_Shadow,Shadow Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,7; },,
+1764,Incisive_Arrow,Sharp Arrow,10,3,0,3,10,,,,1706056,2,32768,,1,,{},{ bonus bCritical,10; }
+1765,Oridecon_Arrow,Oridecon Arrow,10,3,0,3,50,,,,1706056,2,32768,,1,,{},{}
+1766,Arrow_of_Counter_Evil,Arrow of Counter Evil,10,40,0,3,50,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,6; }
+1767,Arrow_of_Shadow,Shadow Arrow,10,3,0,2,30,,,,1706056,2,32768,,1,,{},{ bonus bAtkEle,7; }
1768,Sleep_Arrow,Sleep Arrow,10,3,0,3,1,,,,1706056,2,32768,,1,,{},{ bonus2 bAddEff,Eff_Sleep,500; }
1769,Silence_Arrow,Mute Arrow,10,3,0,3,1,,,,1706056,2,32768,,1,,{},{ bonus2 bAddEff,Eff_Silence,500; }
-1770,Iron_Arrow,Iron Arrow,10,2,0,1,30,,,,1706056,2,32768,,1,,{},{},,
+1770,Iron_Arrow,Iron Arrow,10,2,0,1,30,,,,1706056,2,32768,,1,,{},{}
+
// Knuckles
-1801,Waghnakh,Waghnakh,4,8000,0,400,30,,1,3,33024,2,2,1,1,12,{},{},,
-1802,Waghnakh_,Waghnakh,4,8000,0,400,30,,1,4,33024,2,2,1,1,12,{},{},,
-1803,Knuckle_Duster,Knuckle Duster,4,25000,0,450,50,,1,2,33024,2,2,2,12,12,{},{},,
-1804,Knuckle_Duster_,Knuckle Duster,4,25000,0,450,50,,1,3,33024,2,2,2,12,12,{},{},,
-1805,Hora,Hora,4,32000,0,450,65,,1,2,33024,2,2,2,12,12,{},{},,
-1806,Hora_,Hora,4,32000,0,450,65,,1,3,33024,2,2,2,12,12,{},{},,
-1807,Fist,Fist,4,53000,0,650,115,,1,0,33024,2,2,3,24,12,{},{},,
-1808,Fist_,Fist,4,53000,0,650,115,,1,1,33024,2,2,3,24,12,{},{},,
-1809,Claw,Claw,4,55000,0,500,86,,1,1,33024,2,2,3,24,12,{},{ bonus bStr,2; },
-1810,Claw_,Claw,4,55000,0,500,86,,1,2,33024,2,2,3,24,12,{},{ bonus bStr,2; },
-1811,Finger,Finger,4,58000,0,500,97,,1,1,33024,2,2,3,24,12,{},{},,
-1812,Finger_,Finger,4,58000,0,500,97,,1,2,33024,2,2,3,24,12,{},{},,
+1801,Waghnakh,Waghnakh,4,8000,0,400,30,,1,3,33024,2,2,1,1,12,{},{}
+1802,Waghnakh_,Waghnakh,4,8000,0,400,30,,1,4,33024,2,2,1,1,12,{},{}
+1803,Knuckle_Duster,Knuckle Duster,4,25000,0,450,50,,1,2,33024,2,2,2,12,12,{},{}
+1804,Knuckle_Duster_,Knuckle Duster,4,25000,0,450,50,,1,3,33024,2,2,2,12,12,{},{}
+1805,Hora,Hora,4,32000,0,450,65,,1,2,33024,2,2,2,12,12,{},{}
+1806,Hora_,Hora,4,32000,0,450,65,,1,3,33024,2,2,2,12,12,{},{}
+1807,Fist,Fist,4,53000,0,650,115,,1,0,33024,2,2,3,24,12,{},{}
+1808,Fist_,Fist,4,53000,0,650,115,,1,1,33024,2,2,3,24,12,{},{}
+1809,Claw,Claw,4,67000,0,500,86,,1,1,33024,2,2,3,24,12,{},{ bonus bStr,2; },
+1810,Claw_,Claw,4,67000,0,500,86,,1,2,33024,2,2,3,24,12,{},{ bonus bStr,2; },
+1811,Finger,Finger,4,58000,0,500,97,,1,1,33024,2,2,3,24,12,{},{}
+1812,Finger_,Finger,4,58000,0,500,97,,1,2,33024,2,2,3,24,12,{},{}
1813,Kaiser_Knuckle,Kaiser Knuckle,4,20,0,450,110,,1,0,33024,2,2,4,36,12,{},{ bonus bAtkEle,4; bonus2 bAddRace,1,5; bonus2 bAddEle,1,10; bonus2 bAddEle,2,10; bonus2 bAddEle,3,10; bonus2 bAddEle,4,10; }
-1814,Berserk,Berserk,4,20,0,500,120,,1,0,33024,2,2,4,36,12,{},{ bonus bAspdRate,12; },,,,,,,,,,
+1814,Berserk,Berserk,4,20,0,500,120,,1,0,33024,2,2,4,36,12,{},{ bonus bAspdRate,12; }
// Instruments
-1901,Violin,Violin,4,4000,0,700,50,,1,3,524288,2,2,1,2,13,{},{},,,,,,,,,,,
-1902,Violin_,Violin,4,4000,0,700,50,,1,4,524288,2,2,1,2,13,{},{},,,,,,,,,,,
-1903,Mandolin,Mandolin,4,18000,0,400,90,,1,2,524288,2,2,2,14,13,{},{},,,,,,,,,,,
-1904,Mandolin_,Mandolin,4,18000,0,400,90,,1,3,524288,2,2,2,14,13,{},{},,,,,,,,,,,
-1905,Lute,Lute,4,24500,0,500,105,,1,2,524288,2,2,2,14,13,{},{},,,,,,,,,,,
-1906,Lute_,Lute,4,24500,0,500,105,,1,3,524288,2,2,2,14,13,{},{},,,,,,,,,,,
-1907,Guitar,Guitar,4,47000,0,900,142,,1,0,524288,2,2,3,27,13,{},{},,,,,,,,,,,
-1908,Guitar_,Guitar,4,47000,0,900,142,,1,1,524288,2,2,3,27,13,{},{},,,,,,,,,,,
-1909,Harp,Harp,4,62000,0,900,114,,1,1,524288,2,2,3,27,13,{},{ bonus bInt,2; },,,,,,,,,,
-1910,Harp_,Harp,4,62000,0,900,114,,1,2,524288,2,2,3,27,13,{},{ bonus bInt,2; },,,,,,,,,,
-1911,Guh_Moon_Goh,Guhmoongoh,4,54000,0,1300,126,,1,1,524288,2,2,3,27,13,{},{},,,,,,,,,,,
-1912,Guh_Moon_Goh_,Guhmoongoh,4,54000,0,1300,126,,1,2,524288,2,2,3,27,13,{},{},,,,,,,,,,,
-1913,Electric_Guitar,Electric Guitar,4,20,0,1800,110,,1,0,524288,2,2,4,70,13,{},{ bonus3 bAutoSpell,84,1,25; bonus bAtkEle,4; bonus bInt,2; bonus bAgi,1; }
+1901,Violin,Violin,4,4000,0,700,50,,1,3,524288,2,2,1,2,13,{},{}
+1902,Violin_,Violin,4,4000,0,700,50,,1,4,524288,2,2,1,2,13,{},{}
+1903,Mandolin,Mandolin,4,18000,0,400,90,,1,2,524288,2,2,2,14,13,{},{}
+1904,Mandolin_,Mandolin,4,18000,0,400,90,,1,3,524288,2,2,2,14,13,{},{}
+1905,Lute,Lute,4,24500,0,500,105,,1,2,524288,2,2,2,14,13,{},{}
+1906,Lute_,Lute,4,24500,0,500,105,,1,3,524288,2,2,2,14,13,{},{}
+1907,Guitar,Guitar,4,47000,0,900,142,,1,0,524288,2,2,3,27,13,{},{}
+1908,Guitar_,Guitar,4,47000,0,900,142,,1,1,524288,2,2,3,27,13,{},{}
+1909,Harp,Harp,4,62000,0,900,114,,1,1,524288,2,2,3,27,13,{},{ bonus bInt,2; }
+1910,Harp_,Harp,4,62000,0,900,114,,1,2,524288,2,2,3,27,13,{},{ bonus bInt,2; }
+1911,Guh_Moon_Goh,Guhmoongoh,4,54000,0,1300,126,,1,1,524288,2,2,3,27,13,{},{}
+1912,Guh_Moon_Goh_,Guhmoongoh,4,54000,0,1300,126,,1,2,524288,2,2,3,27,13,{},{}
+1913,Electric_Guitar,Electric Guitar,4,20,0,1800,110,,1,0,524288,2,2,4,70,13,{},{ bonus3 bAutoSpell,84,1,25; skill 84,1; bonus bAtkEle,4; bonus bInt,2; bonus bAgi,1; }
// Whips
-1950,Rope,Rope,4,2500,0,400,45,,2,3,1048576,2,2,1,3,14,{},{},,,
-1951,Rope_,Rope,4,2500,0,400,45,,2,4,1048576,2,2,1,3,14,{},{},,,
-1952,Line,Line,4,12000,0,300,80,,2,2,1048576,2,2,2,16,14,{},{},,,
-1953,Line_,Line,4,12000,0,300,80,,2,3,1048576,2,2,2,16,14,{},{},,,
-1954,Wire,Wire,4,17500,0,1000,95,,2,2,1048576,2,2,2,16,14,{},{},,,
-1955,Wire_,Wire,4,17500,0,1000,95,,2,3,1048576,2,2,2,16,14,{},{},,,
-1956,Rante_Whip,Rante Whip,4,32000,0,900,135,,2,0,1048576,2,2,3,30,14,{},{},,,
-1957,Rante_Whip_,Rante Whip,4,32000,0,900,135,,2,1,1048576,2,2,3,30,14,{},{},,,
-1958,Tail,Tail,4,41000,0,700,105,,2,1,1048576,2,2,3,30,14,{},{ bonus bLuk,3; },,
-1959,Tail_,Tail,4,41000,0,700,105,,2,2,1048576,2,2,3,30,14,{},{ bonus bLuk,3; },,
-1960,Whip,Whip,4,38000,0,700,120,,2,1,1048576,2,2,3,30,14,{},{},,,
-1961,Whip_,Whip,4,38000,0,700,120,,2,2,1048576,2,2,3,30,14,{},{},,,
+1950,Rope,Rope,4,2500,0,400,45,,2,3,1048576,2,2,1,3,14,{},{}
+1951,Rope_,Rope,4,2500,0,400,45,,2,4,1048576,2,2,1,3,14,{},{}
+1952,Line,Line,4,12000,0,300,80,,2,2,1048576,2,2,2,16,14,{},{}
+1953,Line_,Line,4,12000,0,300,80,,2,3,1048576,2,2,2,16,14,{},{}
+1954,Wire,Wire,4,17500,0,1000,95,,2,2,1048576,2,2,2,16,14,{},{}
+1955,Wire_,Wire,4,17500,0,1000,95,,2,3,1048576,2,2,2,16,14,{},{}
+1956,Rante_Whip,Rante Whip,4,32000,0,900,135,,2,0,1048576,2,2,3,30,14,{},{}
+1957,Rante_Whip_,Rante Whip,4,32000,0,900,135,,2,1,1048576,2,2,3,30,14,{},{}
+1958,Tail,Tail,4,41000,0,700,105,,2,1,1048576,2,2,3,30,14,{},{ bonus bLuk,3; }
+1959,Tail_,Tail,4,41000,0,700,105,,2,2,1048576,2,2,3,30,14,{},{ bonus bLuk,3; }
+1960,Whip,Whip,4,38000,0,700,120,,2,1,1048576,2,2,3,30,14,{},{}
+1961,Whip_,Whip,4,38000,0,700,120,,2,2,1048576,2,2,3,30,14,{},{}
1962,Lariat,Lariat,4,20,0,400,100,,2,0,1048576,2,2,4,44,14,{},{ bonus bDex,5; bonus bAgi,1; },
1963,Rapture_Rose,Rapture Rose,4,20,0,300,115,,2,0,1048576,2,2,4,44,14,{},{ bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,5000; }
1964,Chemeti,Chemeti,4,20,0,700,135,,2,0,1048576,2,2,4,44,14,{},{ bonus bCritical,5; bonus bFlee,10; bonus bFlee2,2; }
@@ -755,119 +784,119 @@
// Shields
//===================================================================
-2101,Guard,Guard,5,500,0,300,,3,,0,10477567,2,32,,0,1,{},{},,,
-2102,Guard_,Guard,5,500,0,300,,3,,1,10477567,2,32,,0,1,{},{},,,
-2103,Buckler,Buckler,5,14000,0,600,,4,,0,2020850,2,32,,0,2,{},{},,,
-2104,Buckler_,Buckler,5,14000,0,600,,4,,1,2020850,2,32,,0,2,{},{},,,
-2105,Shield,Shield,5,56000,0,1300,,6,,0,16514,2,32,,0,3,{},{},,,
-2106,Shield_,Shield,5,56000,0,1300,,6,,1,16514,2,32,,0,3,{},{},,,
-2107,Mirror_Shield,Mirror Shield,5,60000,0,1000,,4,,0,16514,2,32,,0,4,{},{ bonus bMdef,5; },,
-2108,Mirror_Shield_,Mirror Shield,5,60000,0,1000,,4,,1,16514,2,32,,0,4,{},{ bonus bMdef,5; },,
+2101,Guard,Guard,5,500,0,300,,3,,0,10477567,2,32,,0,1,{},{}
+2102,Guard_,Guard,5,500,0,300,,3,,1,10477567,2,32,,0,1,{},{}
+2103,Buckler,Buckler,5,14000,0,600,,4,,0,2020850,2,32,,0,2,{},{}
+2104,Buckler_,Buckler,5,14000,0,600,,4,,1,2020850,2,32,,0,2,{},{}
+2105,Shield,Shield,5,56000,0,1300,,6,,0,16514,2,32,,0,3,{},{}
+2106,Shield_,Shield,5,56000,0,1300,,6,,1,16514,2,32,,0,3,{},{}
+2107,Mirror_Shield,Mirror Shield,5,60000,0,1000,,4,,0,16514,2,32,,0,4,{},{ bonus bMdef,5; }
+2108,Mirror_Shield_,Mirror Shield,5,60000,0,1000,,4,,1,16514,2,32,,0,4,{},{ bonus bMdef,5; }
2109,Memorize_Book,Book of Summoning,5,20,0,1000,,3,,0,66052,2,32,,0,,{},{ bonus bInt,1; bonus bMdef,2; },
2110,Holy_Guard,Holy Guard,5,20,0,1400,,5,,0,16384,2,32,,68,3,{},{ bonus bVit,2; bonus bMdef,2; },
-2111,Evangelist,Evangelist,5,20,0,1400,,5,,0,16384,2,32,,83,3,{},{ bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakable,100; }
-2112,Novice_Guard,Novice Guard,5,20,0,1,,3,,0,8388609,2,32,,0,1,{},{},,,
-2199,Ahura_Mazda,Ahura Mazda,5,20,0,100,,,,0,10477567,2,32,,,,{},{ bonus bMdef,1; bonus bDef,1; bonus bFlee2,1; bonus2 bSubEle,0,1; }
+2111,Evangelist,Evangelist,5,20,0,1400,,5,,0,16384,2,32,,83,3,{},{ bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0; }
+2112,Novice_Guard,Novice Guard,5,20,0,1,,3,,0,8388609,2,32,,0,1,{},{}
+2199,Ahura_Mazda,Ahura Mazda,5,20,0,100,,,,0,10477567,2,32,,,,{},{ bonus bMdef,1; bonus bDef,1; bonus bFlee2,1; bonus2 bSubEle,0,1; } //should be revised
// Headgear items
//===================================================================
2201,Sunglasses,Sunglasses,5,5000,0,100,,0,,0,10477567,2,512,,0,12,{},{ bonus2 bResEff,Eff_Blind,500; },
2202,Sunglasses_,Sunglasses,5,5000,0,100,,0,,1,10477567,2,512,,0,12,{},{ bonus2 bResEff,Eff_Blind,500; }
-2203,Glasses,Glasses,5,4000,0,100,,0,,0,10477567,2,512,,0,3,{},{},,
-2204,Glasses_,Glasses,5,4000,0,100,,0,,1,10477567,2,512,,0,3,{},{},,
-2205,Diver's_Goggles,Diver Goggles,5,3500,0,100,,0,,0,10477567,2,512,,0,10,{},{},,
+2203,Glasses,Glasses,5,4000,0,100,,0,,0,10477567,2,512,,0,3,{},{}
+2204,Glasses_,Glasses,5,4000,0,100,,0,,1,10477567,2,512,,0,3,{},{}
+2205,Diver's_Goggles,Diver Goggles,5,3500,0,100,,0,,0,10477567,2,512,,0,10,{},{}
2206,Wedding_Veil,Wedding Veil,5,23000,0,100,,0,,0,10477567,0,256,,0,44,{},{ bonus bMdef,5; },
2207,Fancy_Flower,Fancy Flower,5,20,0,100,,0,,0,10477567,2,256,,0,4,{},{ bonus2 bSubRace,3,10; }
2208,Ribbon,Ribbon,5,800,0,100,,1,,0,10477567,2,256,,0,17,{},{ bonus bMdef,3; },
2209,Ribbon_,Ribbon,5,800,0,100,,1,,1,10477567,2,256,,0,17,{},{ bonus bMdef,3; },
-2210,Hair_Band,Hair Band,5,500,0,100,,1,,0,10477567,2,256,,0,9,{},{},,
-2211,Bandana,Bandana,5,400,0,100,,1,,0,10477567,2,256,,0,6,{},{},,
-2212,Eye_Bandage,Eye Patch,5,1000,0,100,,0,,0,10477567,2,512,,0,13,{},{},,
-2213,Kitty_Band,Kitty Band,5,20,0,100,,2,,0,10477567,2,256,,0,2,{},{},,
+2210,Hair_Band,Hair Band,5,500,0,100,,1,,0,10477567,2,256,,0,9,{},{}
+2211,Bandana,Bandana,5,400,0,100,,1,,0,10477567,2,256,,0,6,{},{}
+2212,Eye_Bandage,Eye Patch,5,1000,0,100,,0,,0,10477567,2,512,,0,13,{},{}
+2213,Kitty_Band,Kitty Band,5,20,0,100,,2,,0,10477567,2,256,,0,2,{},{}
2214,Bunny_Band,Bunny Band,5,20,0,100,,2,,0,10477567,2,256,,0,15,{},{ bonus bLuk,2; },
-2215,Flower_Hairband,Flower Band,5,20,0,100,,2,,0,10477567,2,256,,0,5,{},{},,
-2216,Biretta,Biretta,5,9000,0,100,,4,,0,33040,2,256,,0,11,{},{},,
-2217,Biretta_,Biretta,5,9000,0,100,,4,,1,33040,2,256,,0,11,{},{},,
+2215,Flower_Hairband,Flower Band,5,20,0,100,,2,,0,10477567,2,256,,0,5,{},{}
+2216,Biretta,Biretta,5,9000,0,100,,4,,0,33040,2,256,,0,11,{},{}
+2217,Biretta_,Biretta,5,9000,0,100,,4,,1,33040,2,256,,0,11,{},{}
2218,Flu_Mask,Flu Mask,5,300,0,100,,0,,0,10477567,2,1,,0,8,{},{ bonus2 bResEff,Eff_Silence,1000; }
2219,Flu_Mask_,Flu Mask,5,300,0,100,,0,,1,10477567,2,1,,0,8,{},{ bonus2 bResEff,Eff_Silence,1000; }
-2220,Hat,Hat,5,1000,0,200,,2,,0,10477567,2,256,,0,16,{},{},,
-2221,Hat_,Hat,5,1000,0,200,,2,,1,10477567,2,256,,0,16,{},{},,
-2222,Turban,Turban,5,4500,0,300,,3,,0,2088958,2,256,,0,7,{},{},,
-2223,Turban_,Turban,5,4500,0,300,,3,,1,2088958,2,256,,0,7,{},{},,
-2224,Goggles,Goggles,5,10000,0,300,,5,,0,1989866,2,768,,0,1,{},{},,
-2225,Goggles_,Goggles,5,10000,0,300,,5,,1,1989866,2,768,,0,1,{},{},,
-2226,Cap,Cap,5,12000,0,400,,4,,0,1989866,2,256,,0,14,{},{},,
-2227,Cap_,Cap,5,12000,0,400,,4,,1,1989866,2,256,,0,14,{},{},,
-2228,Helm,Helm,5,44000,0,600,,6,,0,16514,2,256,,0,40,{},{},,
-2229,Helm_,Helm,5,44000,0,600,,6,,1,16514,2,256,,0,40,{},{},,
+2220,Hat,Hat,5,1000,0,200,,2,,0,10477567,2,256,,0,16,{},{}
+2221,Hat_,Hat,5,1000,0,200,,2,,1,10477567,2,256,,0,16,{},{}
+2222,Turban,Turban,5,4500,0,300,,3,,0,10477567,2,256,,0,7,{},{}
+2223,Turban_,Turban,5,4500,0,300,,3,,1,10477567,2,256,,0,7,{},{}
+2224,Goggles,Goggles,5,10000,0,300,,5,,0,1989866,2,768,,0,1,{},{}
+2225,Goggles_,Goggles,5,10000,0,300,,5,,1,1989866,2,768,,0,1,{},{}
+2226,Cap,Cap,5,12000,0,400,,4,,0,1989866,2,256,,0,14,{},{}
+2227,Cap_,Cap,5,12000,0,400,,4,,1,1989866,2,256,,0,14,{},{}
+2228,Helm,Helm,5,44000,0,600,,6,,0,16514,2,256,,0,40,{},{}
+2229,Helm_,Helm,5,44000,0,600,,6,,1,16514,2,256,,0,40,{},{}
2230,Gemmed_Sallet,Gemmed Sallet,5,50000,0,500,,4,,0,414946,2,256,,0,0,{},{ bonus bMdef,3; },
2231,Gemmed_Sallet_,Gemmed Sallet,5,50000,0,500,,4,,1,414946,2,256,,0,0,{},{ bonus bMdef,3; },
2232,Circlet,Circlet,5,7500,0,300,,3,,0,99092,2,256,,0,18,{},{ bonus bMdef,3; },
2233,Circlet_,Circlet,5,7500,0,300,,3,,1,99092,2,256,,0,18,{},{ bonus bMdef,3; },
-2234,Tiara,Tiara,5,20,0,400,,4,,0,2088958,0,256,,45,19,{},{ bonus bInt,2; },
-2235,Crown,Crown,5,20,0,400,,4,,0,2088958,1,256,,45,45,{},{ bonus bInt,2; },
+2234,Tiara,Tiara,5,20,0,400,,4,,0,10477567,0,256,,45,19,{},{ bonus bInt,2; },
+2235,Crown,Crown,5,20,0,400,,4,,0,10477567,1,256,,45,45,{},{ bonus bInt,2; },
2236,Santa's_Hat,Santa's Hat,5,20,0,100,,1,,0,10477567,2,256,,0,20,{},{ bonus bMdef,1; bonus bLuk,1; }
-2237,Bandit_Beard,Bandit Beard,5,2,0,100,,0,,0,10477567,2,1,,0,21,{},{},,
-2238,Moustache,Moustache,5,2,0,100,,0,,0,10477567,2,1,,0,22,{},{},,
-2239,Single_Glass,Single Glass,5,10000,0,100,,0,,0,10477567,2,512,,0,23,{},{},,
-2240,Beard,Beard,5,2,0,100,,0,,0,10477567,2,1,,0,24,{},{},,
-2241,Granpa_Beard,Granpa Beard,5,5000,0,100,,0,,0,10477567,2,1,,0,25,{},{},,
+2237,Bandit_Beard,Bandit Beard,5,2,0,100,,0,,0,10477567,2,1,,0,21,{},{}
+2238,Moustache,Moustache,5,2,0,100,,0,,0,10477567,2,1,,0,22,{},{}
+2239,Single_Glass,Single Glass,5,10000,0,100,,0,,0,10477567,2,512,,0,23,{},{}
+2240,Beard,Beard,5,2,0,100,,0,,0,10477567,2,1,,0,24,{},{}
+2241,Granpa_Beard,Granpa Beard,5,5000,0,100,,0,,0,10477567,2,1,,0,25,{},{}
2242,Purple_Sunglasses,Purple Glasses,5,24000,0,100,,1,,0,10477567,2,512,,0,26,{},{ bonus2 bResEff,Eff_Blind,1000; }
2243,Geek_Glasses,Geek Glasses,5,20000,0,100,,1,,0,10477567,2,512,,0,27,{},{ bonus2 bResEff,Eff_Blind,1500; }
-2244,Big_Ribbon,Big Ribbon,5,15000,0,200,,2,,0,2088958,2,256,,0,28,{},{ bonus bMdef,3; },
-2245,Sweet_Gent,Sweet Gent,5,15000,0,400,,3,,0,2088958,2,256,,0,29,{},{},,
-2246,Golden_Gear,Golden Gear,5,20,0,900,,5,,0,2088958,2,256,,40,30,{},{ bonus2 bSubEle,0,10; },,
-2247,Romantic_Gent,Romantic Gent,5,15000,0,400,,3,,0,2088958,2,256,,0,31,{},{},,
-2248,Western_Grace,Western Grace,5,15000,0,400,,3,,0,2088958,2,256,,0,32,{},{},,
-2249,Coronet,Coronet,5,20,0,300,,3,,0,2088958,2,256,,0,33,{},{ bonus bInt,1; },
-2250,Fillet,Cute Ribbon,5,500,0,100,,1,,0,2088958,2,256,,0,34,{},{ bonus bMaxSP,20; },,,,
-2251,Holy_Bonnet,Monk Hat,5,30000,0,100,,5,,0,33040,2,256,,0,35,{},{ bonus bMdef,3; },,,,
-2252,Wizard_Hat,Wizard Hat,5,20,0,300,,4,,0,66052,2,256,,0,36,{},{ bonus bMaxSP,100; },,,,
-2253,Sunflower,Sunflower,5,20,0,100,,1,,0,10477567,2,256,,0,37,{},{ bonus2 bSubRace,4,10; },,,
-2254,Angel_Wing,Angel Wing,5,20,0,100,,2,,0,2088958,2,256,,0,38,{},{ bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,6,3; }
-2255,Evil_Wing,Evil Wing,5,20,0,100,,3,,0,2088958,2,256,,0,39,{},{ bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,8,3; },
-2256,Majestic_Goat,Majestic Goat,5,20,0,800,,5,,0,279714,2,256,,0,41,{},{ bonus bStr,1; },,,,
-2257,Snow_Horn,Snow Horn,5,20,0,100,,2,,0,10477567,2,256,,0,42,{},{},,,,,
-2258,Spiky_Band,Spiky Band,5,20,0,1000,,6,,0,447986,2,256,,50,43,{},{},,,,,
-2259,Mini_Propeller,Mini Propeller,5,20,0,100,,1,,0,10477567,2,256,,0,46,{},{},,,,,
-2260,Mini_Glasses,Mini Glasses,5,28000,0,100,,1,,0,2088958,2,512,,0,47,{},{},,,,,
-2261,Army_Cap,Army Cap,5,20,0,400,,4,,0,414946,2,256,,0,48,{},{},,,,,
-2262,Pierrot_Nose,Pierrot Nose,5,20,0,100,,0,,0,10477567,2,1,,0,49,{},{},,,,,
-2263,Zorro_Masque,Zorro Masque,5,20,0,100,,0,,0,2088958,2,512,,0,50,{},{},,,,,
-2264,Munak_Hat,Munak Hat,5,20,0,300,,5,,0,10477567,2,769,,0,51,{},{ bonus2 bSubRace,1,10; },,,
-2265,Gangster_Mask,Gangster Mask,5,20,0,100,,0,,0,10477567,2,1,,0,52,{},{ bonus2 bResEff,Eff_Silence,1500; },,,
-2266,Iron_Cain,Iron Cain,5,20,0,300,,1,,0,16514,2,1,,50,53,{},{},,,
-2267,Cigar,Cigar,5,20,0,100,,0,,0,2088958,2,1,,0,54,{},{ bonus2 bSubRace,4,3; },
-2268,Pipe,Pipe,5,20,0,100,,0,,0,2088958,2,1,,0,55,{},{ bonus2 bSubRace,4,3; },
-2269,Centimental_Flower,Romantic Flower,5,20,0,100,,0,,0,2088958,2,1,,0,56,{},{ bonus2 bSubRace,3,3; },
-2270,Centimental_Leaf,Romantic Leaf,5,20,0,100,,0,,0,2088958,2,1,,0,57,{},{ bonus2 bSubRace,3,3; },
-2271,Jack_a_Dandy,Jack a Dandy,5,45000,0,100,,1,,0,2088958,2,256,,0,58,{},{},,,
-2272,Stop_Post,Stop Post,5,20,0,400,,1,,0,10477567,2,256,,0,59,{},{},,,
-2273,Doctor_Cap,Doctor Band,5,20,0,100,,1,,0,2088958,2,256,,0,60,{},{ bonus bInt,1; },,
-2274,Ghost_Bandana,Ghost Bandana,5,20,0,100,,0,,0,2088958,2,256,,0,61,{},{ bonus bAgi,2; bonus2 bSubEle,8,10; }
-2275,Red_Bandana,Red Bandana,5,20,0,100,,2,,0,10477567,2,256,,0,62,{},{},,,
-2276,Eagle_Eyes,Eagle Eyes,5,20,0,100,,1,,0,10477567,2,512,,0,63,{},{},,,
+2244,Big_Ribbon,Big Ribbon,5,15000,0,200,,2,,0,10477567,2,256,,0,28,{},{ bonus bMdef,3; },
+2245,Sweet_Gent,Sweet Gent,5,15000,0,400,,3,,0,10477567,2,256,,0,29,{},{}
+2246,Golden_Gear,Golden Gear,5,20,0,900,,5,,0,10477567,2,256,,40,30,{},{ bonus2 bSubEle,0,10; }
+2247,Romantic_Gent,Romantic Gent,5,15000,0,400,,3,,0,10477567,2,256,,0,31,{},{}
+2248,Western_Grace,Western Grace,5,15000,0,400,,3,,0,10477567,2,256,,0,32,{},{}
+2249,Coronet,Coronet,5,20,0,300,,3,,0,10477567,2,256,,0,33,{},{ bonus bInt,1; },
+2250,Fillet,Cute Ribbon,5,500,0,100,,1,,0,10477567,2,256,,0,34,{},{ bonus bMaxSP,20; }
+2251,Holy_Bonnet,Monk Hat,5,30000,0,100,,5,,0,33040,2,256,,0,35,{},{ bonus bMdef,3; }
+2252,Wizard_Hat,Wizard Hat,5,20,0,300,,4,,0,66052,2,256,,0,36,{},{ bonus bMaxSP,100; }
+2253,Sunflower,Sunflower,5,20,0,100,,1,,0,10477567,2,256,,0,37,{},{ bonus2 bSubRace,4,10; }
+2254,Angel_Wing,Angel Wing,5,20,0,100,,2,,0,10477567,2,256,,0,38,{},{ bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,6,3; }
+2255,Evil_Wing,Evil Wing,5,20,0,100,,3,,0,10477567,2,256,,0,39,{},{ bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,8,3; },
+2256,Majestic_Goat,Majestic Goat,5,20,0,800,,5,,0,279714,2,256,,0,41,{},{ bonus bStr,1; }
+2257,Snow_Horn,Snow Horn,5,20,0,100,,2,,0,10477567,2,256,,0,42,{},{}
+2258,Spiky_Band,Spiky Band,5,20,0,1000,,6,,0,447986,2,256,,50,43,{},{}
+2259,Mini_Propeller,Mini Propeller,5,20,0,100,,1,,0,10477567,2,256,,0,46,{},{}
+2260,Mini_Glasses,Mini Glasses,5,28000,0,100,,1,,0,10477567,2,512,,0,47,{},{}
+2261,Army_Cap,Army Cap,5,20,0,400,,4,,0,414946,2,256,,0,48,{},{}
+2262,Pierrot_Nose,Pierrot Nose,5,20,0,100,,0,,0,10477567,2,1,,0,49,{},{}
+2263,Zorro_Masque,Zorro Masque,5,20,0,100,,0,,0,10477567,2,512,,0,50,{},{}
+2264,Munak_Hat,Munak Hat,5,20,0,300,,5,,0,10477567,2,769,,0,51,{},{ bonus2 bSubRace,1,10; }
+2265,Gangster_Mask,Gangster Mask,5,20,0,100,,0,,0,10477567,2,1,,0,52,{},{ bonus2 bResEff,Eff_Silence,1500; }
+2266,Iron_Cain,Iron Cain,5,20,0,300,,1,,0,16514,2,1,,50,53,{},{}
+2267,Cigar,Cigar,5,20,0,100,,0,,0,10477567,2,1,,0,54,{},{ bonus2 bSubRace,4,3; },
+2268,Pipe,Pipe,5,20,0,100,,0,,0,10477567,2,1,,0,55,{},{ bonus2 bSubRace,4,3; },
+2269,Centimental_Flower,Romantic Flower,5,20,0,100,,0,,0,10477567,2,1,,0,56,{},{ bonus2 bSubRace,3,3; },
+2270,Centimental_Leaf,Romantic Leaf,5,20,0,100,,0,,0,10477567,2,1,,0,57,{},{ bonus2 bSubRace,3,3; },
+2271,Jack_a_Dandy,Jack a Dandy,5,45000,0,100,,1,,0,10477567,2,256,,0,58,{},{}
+2272,Stop_Post,Stop Post,5,20,0,400,,1,,0,10477567,2,256,,0,59,{},{}
+2273,Doctor_Cap,Doctor Band,5,20,0,100,,1,,0,10477567,2,256,,0,60,{},{ bonus bInt,1; }
+2274,Ghost_Bandana,Ghost Bandana,5,20,0,100,,0,,0,10477567,2,256,,0,61,{},{ bonus bAgi,2; bonus2 bSubEle,8,10; }
+2275,Red_Bandana,Red Bandana,5,20,0,100,,2,,0,10477567,2,256,,0,62,{},{}
+2276,Eagle_Eyes,Eagle Eyes,5,20,0,100,,1,,0,10477567,2,512,,0,63,{},{}
2277,Nurse_Cap,Nurse Cap,5,20,0,100,,1,,0,33040,2,256,,0,64,{},{ bonus bInt,1; bonus bLuk,1; },
-2278,Mr_Smile,Mr. Smile,5,60,0,100,,1,,0,10477567,2,513,,0,65,{},{},,,
-2279,Bomb_Wick,Bomb Wick,5,20,0,100,,1,,0,10477567,2,256,,0,66,{},{},,,
-2280,Sakkat,Sakkat,5,20,0,300,,3,,0,10477567,2,256,,0,67,{},{ bonus bAgi,1; },,
-2281,Opera_Masque,Opera Masque,5,8000,0,200,,2,,0,2088958,2,513,,0,68,{},{},,,
+2278,Mr_Smile,Mr. Smile,5,60,0,100,,1,,0,10477567,2,513,,0,65,{},{}
+2279,Bomb_Wick,Bomb Wick,5,20,0,100,,1,,0,10477567,2,256,,0,66,{},{}
+2280,Sakkat,Sakkat,5,20,0,300,,3,,0,10477567,2,256,,0,67,{},{ bonus bAgi,1; }
+2281,Opera_Masque,Opera Masque,5,8000,0,200,,2,,0,10477567,2,513,,0,68,{},{}
2282,Heaven_Ring,Heaven Ring,5,20,0,100,,0,,0,10477567,2,256,,0,69,{},{ bonus2 bSubEle,6,10; }
2283,Ear_Mufs,Ear Mufs,5,20,0,200,,3,,0,10477567,2,256,,0,70,{},{ bonus2 bResEff,Eff_Curse,1000; }
-2284,Antler,Antler,5,20,0,500,,4,,0,2088958,2,256,,0,71,{},{},,
-2285,Apple_o'_Archer,Apple o' Archer,5,20,0,200,,0,,0,2088958,2,256,,30,72,{},{ bonus bDex,3; },
-2286,Elven_Ears,Elven Ears,5,20,0,100,,0,,0,2088958,2,512,,70,73,{},{},,
-2287,Pirate_Bandana,Pirate Bandana,5,20,0,100,,3,,0,2088958,2,256,,0,74,{},{ bonus bStr,1; },
-2288,Mr_Scream,Mr. Scream,5,20,0,100,,1,,0,2088958,2,513,,0,75,{},{},,
+2284,Antler,Antler,5,20,0,500,,4,,0,10477567,2,256,,0,71,{},{}
+2285,Apple_o'_Archer,Apple o' Archer,5,20,0,200,,0,,0,10477567,2,256,,30,72,{},{ bonus bDex,3; },
+2286,Elven_Ears,Elven Ears,5,20,0,100,,0,,0,10477567,2,512,,70,73,{},{}
+2287,Pirate_Bandana,Pirate Bandana,5,20,0,100,,3,,0,10477567,2,256,,0,74,{},{ bonus bStr,1; },
+2288,Mr_Scream,Mr. Scream,5,20,0,100,,1,,0,10477567,2,513,,0,75,{},{}
2289,Poo_Poo_Hat,Poo Poo Hat,5,20,0,700,,0,,0,10477567,2,256,,0,76,{},{ bonus2 bSubRace,7,10; }
-2290,Funeral_Hat,Funeral Hat,5,3000,0,100,,1,,0,10477567,2,256,,0,77,{},{},,
-2291,Masquerade,Masquerade,5,20,0,100,,0,,0,2088958,2,512,,0,78,{},{ bonus2 bAddRace,7,3; }
+2290,Funeral_Hat,Funeral Hat,5,3000,0,100,,1,,0,10477567,2,256,,0,77,{},{}
+2291,Masquerade,Masquerade,5,20,0,100,,0,,0,10477567,2,512,,0,78,{},{ bonus2 bAddRace,7,3; }
2292,Welding_Mask,Welding Mask,5,20,0,300,,2,,0,263200,2,513,,50,79,{},{ bonus2 bSubEle,3,10; }
-2293,Pretend_Murdered,Pretend Murdered,5,20,0,100,,1,,0,10477567,2,256,,0,80,{},{},,
-2294,Stellar,Stellar,5,20,0,100,,1,,0,10477567,2,256,,0,81,{},{},,
-2295,Blinker,Blinker,5,1500,0,100,,0,,0,2088958,2,512,,0,82,{},{ bonus2 bResEff,Eff_Blind,10000; }
+2293,Pretend_Murdered,Pretend Murdered,5,20,0,100,,1,,0,10477567,2,256,,0,80,{},{}
+2294,Stellar,Stellar,5,20,0,100,,1,,0,10477567,2,256,,0,81,{},{}
+2295,Blinker,Blinker,5,1500,0,100,,0,,0,10477567,2,512,,0,82,{},{ bonus2 bResEff,Eff_Blind,10000; }
2296,Binoculars,Binoculars,5,20,0,100,,1,,0,1574920,2,512,,50,83,{},{ bonus bDex,1; },
-2297,Goblini_Mask,Goblini Mask,5,20,0,100,,1,,0,2088958,2,513,,0,84,{},{},,
+2297,Goblini_Mask,Goblini Mask,5,20,0,100,,1,,0,10477567,2,513,,0,84,{},{}
2298,Green_Feeler,Green Feeler,5,20,0,100,,2,,0,10477567,2,256,,0,85,{},{}
2299,Viking_Helm,Viking Helm,5,20,0,500,,5,,0,414946,2,256,,0,86,{},{}
@@ -879,42 +908,42 @@
2304,Leather_Jacket_,Leather Jacket,5,200,0,200,,2,,1,10477567,2,16,,0,0,{},{}
2305,Adventure_Suit,Adventurer's Suit,5,1000,0,300,,3,,0,10477567,2,16,,0,0,{},{}
2306,Adventure_Suit_,Adventurer's Suit,5,1000,0,300,,3,,1,10477567,2,16,,0,0,{},{}
-2307,Mantle,Mantle,5,10000,0,600,,4,,0,2088958,2,16,,0,0,{},{}
-2308,Mantle_,Mantle,5,10000,0,600,,4,,1,2088958,2,16,,0,0,{},{}
-2309,Coat,Coat,5,22000,0,1200,,5,,0,2088958,2,16,,0,0,{},{}
-2310,Coat_,Coat,5,22000,0,1200,,5,,1,2088958,2,16,,0,0,{},{}
-2311,Mink_Coat,Mink Coat,5,50000,0,2300,,6,,1,2088958,2,16,,30,0,{},{}
+2307,Mantle,Mantle,5,10000,0,600,,4,,0,10477567,2,16,,0,0,{},{}
+2308,Mantle_,Mantle,5,10000,0,600,,4,,1,10477567,2,16,,0,0,{},{}
+2309,Coat,Coat,5,22000,0,1200,,5,,0,10477567,2,16,,0,0,{},{}
+2310,Coat_,Coat,5,22000,0,1200,,5,,1,10477567,2,16,,0,0,{},{}
+2311,Mink_Coat,Mink Coat,5,50000,0,2300,,6,,1,10477567,2,16,,30,0,{},{}
2312,Padded_Armor,Padded Armor,5,48000,0,2800,,7,,0,414946,2,16,,0,0,{},{}
2313,Padded_Armor_,Padded Armor,5,48000,0,2800,,7,,1,414946,2,16,,0,0,{},{}
-2314,Chain_Mail,Chain Mail,5,65000,0,3300,,8,,0,414946,2,16,,0,0,{},{},,,,,
-2315,Chain_Mail_,Chain Mail,5,65000,0,3300,,8,,1,414946,2,16,,0,0,{},{},,,,,
-2316,Full_Plate,Full Plate,5,80000,0,4500,,10,,0,16514,2,16,,40,0,{},{},,,,,
-2317,Full_Plate_,Full Plate,5,80000,0,4500,,10,,1,16514,2,16,,40,0,{},{},,,,,
-2318,Clothes_of_the_Lord,Lord's Clothes,5,20,0,2500,,8,,1,263200,2,16,,70,0,{},{ bonus bMdef,5; bonus bInt,1; },,,
-2319,Glittering_Clothes,Glittering Jacket,5,20,0,2500,,7,,1,2088958,2,16,,60,0,{},{ bonus bMdef,5; bonus2 bAddEffect,Eff_Blind,500; },,,,
-2320,Formal_Suit,Formal Suit,5,20,0,300,,5,,1,2088958,2,16,,0,0,{},{},,,,,
-2321,Silk_Robe,Silk Robe,5,8000,0,400,,3,,0,378806,2,16,,0,0,{},{ bonus bMdef,10; },,,,
-2322,Silk_Robe_,Silk Robe,5,8000,0,400,,3,,1,378806,2,16,,0,0,{},{ bonus bMdef,10; },,,,
-2323,Scapulare,Scapulare,5,6500,0,400,,4,,0,33040,2,16,,0,0,{},{},,,,,
-2324,Scapulare_,Scapulare,5,6500,0,400,,4,,1,33040,2,16,,0,0,{},{},,,,,
-2325,Saint_Robe,Saint's Robe,5,54000,0,600,,6,,0,296240,2,16,,0,0,{},{ bonus bMdef,5; },,,,
-2326,Saint_Robe_,Saint's Robe,5,54000,0,600,,6,,1,296240,2,16,,0,0,{},{ bonus bMdef,5; },,,,
+2314,Chain_Mail,Chain Mail,5,65000,0,3300,,8,,0,414946,2,16,,0,0,{},{}
+2315,Chain_Mail_,Chain Mail,5,65000,0,3300,,8,,1,414946,2,16,,0,0,{},{}
+2316,Full_Plate,Full Plate,5,80000,0,4500,,10,,0,16514,2,16,,40,0,{},{}
+2317,Full_Plate_,Full Plate,5,80000,0,4500,,10,,1,16514,2,16,,40,0,{},{}
+2318,Clothes_of_the_Lord,Lord's Clothes,5,20,0,2500,,8,,1,263200,2,16,,70,0,{},{ bonus bMdef,5; bonus bInt,1; }
+2319,Glittering_Clothes,Glittering Jacket,5,20,0,2500,,7,,1,10477567,2,16,,60,0,{},{ bonus bMdef,5; bonus2 bAddEffect,Eff_Blind,500; }
+2320,Formal_Suit,Formal Suit,5,20,0,300,,5,,1,10477567,2,16,,0,0,{},{}
+2321,Silk_Robe,Silk Robe,5,8000,0,400,,3,,0,378806,2,16,,0,0,{},{ bonus bMdef,10; }
+2322,Silk_Robe_,Silk Robe,5,8000,0,400,,3,,1,378806,2,16,,0,0,{},{ bonus bMdef,10; }
+2323,Scapulare,Scapulare,5,6500,0,400,,4,,0,33040,2,16,,0,0,{},{}
+2324,Scapulare_,Scapulare,5,6500,0,400,,4,,1,33040,2,16,,0,0,{},{}
+2325,Saint_Robe,Saint's Robe,5,54000,0,600,,6,,0,296240,2,16,,0,0,{},{ bonus bMdef,5; }
+2326,Saint_Robe_,Saint's Robe,5,54000,0,600,,6,,1,296240,2,16,,0,0,{},{ bonus bMdef,5; }
2327,Holy_Robe,Holy Robe,5,20,0,1700,,7,,0,33040,2,16,,60,0,{},{ bonus bMdef,5; bonus2 bSubRace,6,15; bonus2 bSubEle,7,10; }
-2328,Wooden_Mail,Wooden Mail,5,5500,0,1000,,4,,0,279714,2,16,,0,0,{},{},,,,,
-2329,Wooden_Mail_,Wooden Mail,5,5500,0,1000,,4,,1,279714,2,16,,0,0,{},{},,,,,
+2328,Wooden_Mail,Wooden Mail,5,5500,0,1000,,4,,0,279714,2,16,,0,0,{},{}
+2329,Wooden_Mail_,Wooden Mail,5,5500,0,1000,,4,,1,279714,2,16,,0,0,{},{}
2330,Tights,Tights,5,71000,0,500,,6,,0,1574920,2,16,,45,0,{},{ bonus bDex,1; },
2331,Tights_,Tights,5,71000,0,500,,6,,1,1574920,2,16,,45,0,{},{ bonus bDex,1; },
-2332,Silver_Robe,Silver Robe,5,7000,0,700,,4,,0,66052,2,16,,0,0,{},{},,
-2333,Silver_Robe_,Silver Robe,5,7000,0,700,,4,,1,66052,2,16,,0,0,{},{},,
+2332,Silver_Robe,Silver Robe,5,7000,0,700,,4,,0,66052,2,16,,0,0,{},{}
+2333,Silver_Robe_,Silver Robe,5,7000,0,700,,4,,1,66052,2,16,,0,0,{},{}
2334,Mage_Coat,Mage Coat,5,20,0,600,,5,,0,66052,2,16,,50,0,{},{ bonus bMdef,5; bonus bInt,1; }
2335,Thief_Clothes,Thief Clothes,5,74000,0,100,,6,,0,135232,2,16,,0,0,{},{ bonus bAgi,1; },
2336,Thief_Clothes_,Thief Clothes,5,74000,0,100,,6,,1,135232,2,16,,0,0,{},{ bonus bAgi,1; },
2337,Ninja_Suit,Ninja Suit,5,20,0,1500,,7,,0,135232,2,16,,50,0,{},{ bonus bAgi,1; bonus bMdef,3; }
2338,Wedding_Dress,Wedding Dress,5,43000,0,500,,0,,0,10477566,0,16,,0,0,{},{ bonus bMdef,15; changebase 22; },
-2339,Pantie,Pantie,5,1000,0,100,,4,,0,10477567,2,16,,0,0,{},{},,
-2340,Novice_Breastplate,Novice Breastplate,5,89000,0,500,,4,,1,8388609,2,16,,10,0,{},{},,
-2341,Legion_Plate_Armor,Legion Plate Armor,5,94000,0,5500,,11,,0,16384,2,16,,70,0,{},{},,
-2342,Legion_Plate_Armor_,Legion Plate Armor,5,94000,0,5500,,11,,1,16384,2,16,,70,0,{},{},,
+2339,Pantie,Pantie,5,1000,0,100,,4,,0,10477567,2,16,,0,0,{},{}
+2340,Novice_Breastplate,Novice Breastplate,5,89000,0,500,,4,,1,8388609,2,16,,10,0,{},{}
+2341,Legion_Plate_Armor,Legion Plate Armor,5,94000,0,5500,,11,,0,16384,2,16,,70,0,{},{}
+2342,Legion_Plate_Armor_,Legion Plate Armor,5,94000,0,5500,,11,,1,16384,2,16,,70,0,{},{}
2343,Robe_of_Casting,Casting Robe,5,20,0,1100,,5,,0,66048,2,16,,75,0,{},{ bonus bCastrate,-3; },
2344,Armor_of_Fire,Lucias's Volcano Armor,5,20,0,2200,,4,,0,279714,2,16,,45,0,{},{ bonus bDefEle,3; },
2345,Armor_of_Fire_,Lucias's Volcano Armor,5,20,0,2200,,4,,1,279714,2,16,,45,0,{},{ bonus bDefEle,3; },
@@ -924,78 +953,85 @@
2349,Armor_of_Wind_,Ebeshi's Typhoon Armor,5,20,0,2200,,4,,1,279714,2,16,,45,0,{},{ bonus bDefEle,4; },
2350,Armor_of_Land,Kreitos's Earth Armor,5,20,0,2200,,4,,0,279714,2,16,,45,0,{},{ bonus bDefEle,2; },
2351,Armor_of_Land_,Kreitos's Earth Armor,5,20,0,2200,,4,,1,279714,2,16,,45,0,{},{ bonus bDefEle,2; },
-2352,Armor_For_Novice,Novice Ninja Suit,5,20,0,1,,4,,0,8388609,2,16,,0,0,{},{},,
+2352,Armor_For_Novice,Novice Ninja Suit,5,20,0,1,,4,,0,8388609,2,16,,0,0,{},{}
// Foot gear
//===================================================================
2401,Sandals,Sandals,5,400,0,200,,1,,0,10477567,2,64,,0,0,{},{}
2402,Sandals_,Sandals,5,400,0,200,,1,,1,10477567,2,64,,0,0,{},{}
-2403,Shoes,Shoes,5,3500,0,400,,2,,0,2088958,2,64,,0,0,{},{}
-2404,Shoes_,Shoes,5,3500,0,400,,2,,1,2088958,2,64,,0,0,{},{}
+2403,Shoes,Shoes,5,3500,0,400,,2,,0,10477567,2,64,,0,0,{},{}
+2404,Shoes_,Shoes,5,3500,0,400,,2,,1,10477567,2,64,,0,0,{},{}
2405,Boots,Boots,5,18000,0,600,,4,,0,1989866,2,64,,0,0,{},{}
2406,Boots_,Boots,5,18000,0,600,,4,,1,1989866,2,64,,0,0,{},{}
-2407,Crystal_Pumps,Crystal Pumps,5,20,0,100,,0,,0,2088958,0,64,,0,0,{},{ bonus bMdef,10; bonus bLuk,5; }
+2407,Crystal_Pumps,Crystal Pumps,5,20,0,100,,0,,0,10477567,0,64,,0,0,{},{ bonus bMdef,10; bonus bLuk,5; }
2408,Cuffs,Cuffs,5,5000,0,3000,,3,,0,10477567,2,64,,0,0,{},{}
-2409,Spiky_Heel,Spiky Heel,5,8500,0,600,,2,,0,2088958,2,64,,0,0,{},{ bonus bMdef,5; }
-2410,Sleipnir,Sleipnir,5,20,0,3500,,5,,0,10477567,2,64,,94,0,{},{ bonus bMaxHPrate,20; bonus bMaxSPrate,20;}
-2411,Greaves,Greaves,5,48000,0,750,,5,,0,16512,2,64,,65,0,{},{},,,,
-2412,Greaves_,Greaves,5,48000,0,750,,5,,1,16512,2,64,,65,0,{},{},,,,
-2413,Safety_Shoes,Safety Shoes,5,20,0,350,,6,,0,16514,2,64,,30,0,{},{},,,,
-2414,Sandal_For_Novice,Novice Sandals,5,20,0,1,,2,,0,8388609,2,64,,0,0,{},{},,,,
-2415,Bunny_Slippers,Bunny Slippers,5,20,0,300,,,,,2088958,0,64,,,0,{},{ bonus bLuk,3; }
+2409,Spiky_Heel,Spiky Heel,5,8500,0,600,,2,,0,10477567,2,64,,0,0,{},{ bonus bMdef,5; }
+2410,Sleipnir,Sleipnir,5,20,0,3500,,5,,0,10477567,2,64,,94,0,{},{ bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25; }
+2411,Greaves,Greaves,5,48000,0,750,,5,,0,16512,2,64,,65,0,{},{}
+2412,Greaves_,Greaves,5,48000,0,750,,5,,1,16512,2,64,,65,0,{},{}
+2413,Safety_Shoes,Safety Shoes,5,20,0,350,,6,,0,16514,2,64,,30,0,{},{}
+2414,Sandal_For_Novice,Novice Sandals,5,20,0,1,,2,,0,8388609,2,64,,0,0,{},{}
+2415,Bunny_Slippers,Bunny Slippers,5,20,0,300,,,,,10477567,0,64,,,0,{},{ bonus bLuk,3; }
// Garments
//===================================================================
-2501,Hood,Hood,5,1000,0,200,,1,,0,10477567,2,4,,0,0,{},{},,,,
-2502,Hood_,Hood,5,1000,0,200,,1,,1,10477567,2,4,,0,0,{},{},,,,
-2503,Muffler,Muffler,5,5000,0,400,,2,,0,2088958,2,4,,0,0,{},{},,,,
-2504,Muffler_,Muffler,5,5000,0,400,,2,,1,2088958,2,4,,0,0,{},{},,,,
-2505,Manteau,Manteau,5,32000,0,600,,4,,0,414946,2,4,,0,0,{},{},,,,
-2506,Manteau_,Manteau,5,32000,0,600,,4,,1,414946,2,4,,0,0,{},{},,,,
-2507,Cape_Of_Ancient_Lord,Cape of Old Marquess,5,20,0,600,,2,,0,2088958,2,4,,40,0,{},{ bonus bAgi,1; },,,
-2508,Ragamuffin_Cape,Ragamuffin Manteau,5,20,0,500,,1,,0,2088958,2,4,,0,0,{},{ bonus bMdef,10; bonus bUnbreakable,100; },,,
-2509,Manteau_of_Survival,Manteau of Life,5,20,0,550,,0,,0,66052,2,4,,75,0,{},{ bonus bVit,10; },,,
-2510,Hood_For_Novice,Novice Hood,5,20,0,1,,2,,0,8388609,2,4,,0,0,{},{},,
+2501,Hood,Hood,5,1000,0,200,,1,,0,10477567,2,4,,0,0,{},{}
+2502,Hood_,Hood,5,1000,0,200,,1,,1,10477567,2,4,,0,0,{},{}
+2503,Muffler,Muffler,5,5000,0,400,,2,,0,2088958,2,4,,0,0,{},{}
+2504,Muffler_,Muffler,5,5000,0,400,,2,,1,2088958,2,4,,0,0,{},{}
+2505,Manteau,Manteau,5,32000,0,600,,4,,0,414946,2,4,,0,0,{},{}
+2506,Manteau_,Manteau,5,32000,0,600,,4,,1,414946,2,4,,0,0,{},{}
+2507,Cape_Of_Ancient_Lord,Cape of Old Marquess,5,20,0,600,,2,,0,2088958,2,4,,40,0,{},{ bonus bAgi,1; }
+2508,Ragamuffin_Cape,Ragamuffin Manteau,5,20,0,500,,1,,0,2088958,2,4,,0,0,{},{ bonus bMdef,10; bonus bUnbreakableArmor,0; }
+2509,Manteau_of_Survival,Manteau of Life,5,20,0,550,,0,,0,66052,2,4,,75,0,{},{ bonus bVit,10; }
+2510,Hood_For_Novice,Novice Hood,5,20,0,1,,2,,0,8388609,2,4,,0,0,{},{}
+2511,Skeleton_Manteau,Skeleton's Manteau,5,20,0,700,,1,,,2088958,2,4,,75,,{},{}
// Accessories
//===================================================================
-2601,Ring,Ring,5,30000,0,100,,0,,0,2088958,2,136,,20,0,{},{ bonus bStr,2; },
-2602,Earring,Earring,5,30000,0,100,,0,,0,2088958,2,136,,20,0,{},{ bonus bInt,2; },
-2603,Necklace,Necklace,5,30000,0,100,,0,,0,2088958,2,136,,20,0,{},{ bonus bVit,2; },
-2604,Glove,Glove,5,30000,0,100,,0,,0,2088958,2,136,,20,0,{},{ bonus bDex,2; },
-2605,Brooch,Brooch,5,30000,0,100,,0,,0,2088958,2,136,,20,0,{},{ bonus bAgi,2; },
+2601,Ring,Ring,5,30000,0,100,,0,,0,10477567,2,136,,20,0,{},{ bonus bStr,2; },
+2602,Earring,Earring,5,30000,0,100,,0,,0,10477567,2,136,,20,0,{},{ bonus bInt,2; },
+2603,Necklace,Necklace,5,30000,0,100,,0,,0,10477567,2,136,,20,0,{},{ bonus bVit,2; },
+2604,Glove,Glove,5,30000,0,100,,0,,0,10477567,2,136,,20,0,{},{ bonus bDex,2; },
+2605,Brooch,Brooch,5,30000,0,100,,0,,0,10477567,2,136,,20,0,{},{ bonus bAgi,2; },
2607,Clip,Clip,5,30000,0,100,,0,,1,10477567,2,136,,0,0,{},{ bonus bMaxSP,10; },
-2608,Rosary,Rosary,5,15000,0,100,,0,,0,2088958,2,136,,20,0,{},{ bonus bMdef,5; bonus bLuk,2; }
-2609,Skull_Ring,Skull Ring,5,10000,0,100,,0,,0,10477567,2,136,,0,0,{},{},,
-2610,Gold_Ring,Gold Ring,5,30000,0,100,,0,,0,10477567,2,136,,0,0,{},{},,
-2611,Silver_Ring,Silver Ring,5,20000,0,100,,0,,0,10477567,2,136,,0,0,{},{},,
-2612,Flower_Ring,Flower Ring,5,1500,0,100,,0,,0,10477567,2,136,,0,0,{},{},,
-2613,Diamond_Ring,Diamond Ring,5,45000,0,100,,0,,0,10477567,2,136,,0,0,{},{},,
-2614,Eye_of_Dullahan,Eye of Dullahan,5,90000,0,100,,0,,0,2088958,2,136,,50,0,{},{ bonus2 bResEff,Eff_Poison,1000; bonus2 bResEff,Eff_Curse,1000; bonus2 bResEff,Eff_Silence,1000; bonus2 bResEff,Eff_Confusion,1000; bonus2 bResEff,Eff_Blind,1000; },,
-2615,Safety_Ring,Safety Ring,5,75000,0,100,,3,,0,2088958,2,136,,40,0,{},{ bonus bMdef,3; },,,,
-2616,Critical_Ring,Critical Ring,5,75000,0,100,,0,,0,2088958,2,136,,40,0,{},{ bonus bCritical,5; },,,,
-2617,Celebrant's_Mitten,Celebrant's Mitten,5,20,0,100,,1,,0,2088958,2,136,,35,0,{},{ bonus bInt,1; },,,,
-2618,Matyr's_Leash,Matyr's Leash,5,20,0,100,,1,,0,2088958,2,136,,35,0,{},{ bonus bAgi,1; },,,,
-2619,Thimble_Of_Archer,Bow Thimble,5,30000,0,100,,0,,0,1574920,2,136,,65,0,{},{},,,,,
-2620,Ring_Of_Rogue,Rogue's Treasure,5,30000,0,100,,0,,0,135232,2,136,,70,0,{},{ bonus bAddStealRate,100; },,,,,
-2621,Ring_,Ancient Ring,5,30000,0,200,,0,,1,2088958,2,136,,90,0,{},{ bonus bStr,1; },,,,
-2622,Earring_,Ancient Earring,5,30000,0,200,,0,,1,2088958,2,136,,90,0,{},{ bonus bInt,1; },,,,
-2623,Necklace_,Ancient Necklace,5,30000,0,200,,0,,1,2088958,2,136,,90,0,{},{ bonus bVit,1; },,,,
-2624,Glove_,Ancient Glove,5,30000,0,200,,0,,1,2088958,2,136,,90,0,{},{ bonus bDex,1; },,,,
-2625,Brooch_,Ancient Brooch,5,30000,0,200,,0,,1,2088958,2,136,,90,0,{},{ bonus bAgi,1; },,,,
-2626,Rosary_,Ancient Rosary,5,15000,0,200,,0,,1,2088958,2,136,,90,0,{},{ bonus bMdef,3; bonus bLuk,1; },,,
-2627,Belt,Ancient Belt,5,20000,0,1200,,0,,1,10477567,2,136,,25,0,{},{},,,,,
-2628,Novice_Armlet,Novice Armlet,5,400,0,200,,0,,1,8388609,2,136,,0,0,{},{ bonus bStr,1; bonus bInt,1; bonus bLuk,1; },,
-2629,Megingjard,Megingjard,5,20,0,8000,,2,,0,10477567,2,136,,94,0,{},{ bonus bStr,6; bonus bAgi,6; bonus bVit,6; bonus bLuk,10; },,,
-2630,Brisingamen,Brisingamen,5,20,0,1500,,1,,0,10477567,2,136,,94,0,{},{ bonus bStr,3; bonus bAgi,3; bonus bVit,3; bonus bInt,3; bonus bMdef,5; }
-2631,Celebration_Ring,Celebration Ring,5,20,0,10,,0,,0,10477567,2,136,,0,0,{},{ bonus bStr,2; bonus bAgi,2; bonus bVit,2; bonus bInt,2; bonus bDex,2; bonus bLuk,2; }
-2634,Wedding_Ring_M,Wedding Ring,4,20,0,0,,,,0,10477567,1,2,,0,,{},{ skill 334,1; skill 336,1; }
-2635,Wedding_Ring_F,Wedding Ring,4,20,0,0,,,,0,10477567,0,2,,0,,{},{ skill 335,1; skill 336,1; }
+2608,Rosary,Rosary,5,15000,0,100,,0,,0,10477567,2,136,,20,0,{},{ bonus bMdef,5; bonus bLuk,2; }
+2609,Skull_Ring,Skull Ring,5,10000,0,100,,0,,0,10477567,2,136,,0,0,{},{}
+2610,Gold_Ring,Gold Ring,5,30000,0,100,,0,,0,10477567,2,136,,0,0,{},{}
+2611,Silver_Ring,Silver Ring,5,20000,0,100,,0,,0,10477567,2,136,,0,0,{},{}
+2612,Flower_Ring,Flower Ring,5,1500,0,100,,0,,0,10477567,2,136,,0,0,{},{}
+2613,Diamond_Ring,Diamond Ring,5,45000,0,100,,0,,0,10477567,2,136,,0,0,{},{}
+2614,Eye_of_Dullahan,Eye of Dullahan,5,90000,0,100,,0,,0,10477567,2,136,,50,0,{},{ bonus2 bResEff,Eff_Poison,1000; bonus2 bResEff,Eff_Curse,1000; bonus2 bResEff,Eff_Silence,1000; bonus2 bResEff,Eff_Confusion,1000; bonus2 bResEff,Eff_Blind,1000; }
+2615,Safety_Ring,Safety Ring,5,75000,0,100,,3,,0,10477567,2,136,,40,0,{},{ bonus bMdef,3; }
+2616,Critical_Ring,Critical Ring,5,75000,0,100,,0,,0,10477567,2,136,,40,0,{},{ bonus bCritical,5; }
+2617,Celebrant's_Mitten,Celebrant's Mitten,5,20,0,100,,1,,0,10477567,2,136,,35,0,{},{ bonus bInt,1; }
+2618,Matyr's_Leash,Matyr's Leash,5,20,0,100,,1,,0,10477567,2,136,,35,0,{},{ bonus bAgi,1; }
+2619,Thimble_Of_Archer,Bow Thimble,5,30000,0,100,,0,,0,1574920,2,136,,65,0,{},{ bonus bLongAtkRate,10; }
+2620,Ring_Of_Rogue,Rogue's Treasure,5,30000,0,100,,0,,0,135232,2,136,,70,0,{},{ bonus bAddStealRate,100; }
+2621,Ring_,Ancient Ring,5,30000,0,200,,0,,1,10477567,2,136,,90,0,{},{ bonus bStr,1; }
+2622,Earring_,Ancient Earring,5,30000,0,200,,0,,1,10477567,2,136,,90,0,{},{ bonus bInt,1; }
+2623,Necklace_,Ancient Necklace,5,30000,0,200,,0,,1,10477567,2,136,,90,0,{},{ bonus bVit,1; }
+2624,Glove_,Ancient Glove,5,30000,0,200,,0,,1,10477567,2,136,,90,0,{},{ bonus bDex,1; }
+2625,Brooch_,Ancient Brooch,5,30000,0,200,,0,,1,10477567,2,136,,90,0,{},{ bonus bAgi,1; }
+2626,Rosary_,Ancient Rosary,5,15000,0,200,,0,,1,10477567,2,136,,90,0,{},{ bonus bMdef,3; bonus bLuk,1; }
+2627,Belt,Ancient Belt,5,20000,0,1200,,0,,1,10477567,2,136,,25,0,{},{}
+2628,Novice_Armlet,Novice Armlet,5,400,0,200,,0,,1,8388609,2,136,,0,0,{},{ bonus bStr,1; bonus bInt,1; bonus bLuk,1; }
+2629,Megingjard,Megingjard,5,20,0,8000,,2,,0,10477567,2,136,,94,0,{},{ bonus bStr,40; bonus bMdef,7; }
+2630,Brisingamen,Brisingamen,5,20,0,1500,,1,,0,10477567,2,136,,94,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,20,0,10,,0,,0,10477567,2,136,,0,0,{},{ bonus bAllStats,2; }
+2634,Wedding_Ring_M,Wedding Ring,5,20,0,0,,,,0,10477567,1,136,,0,,{},{ skill 334,1; skill 335,1; skill 336,1; }
+2635,Wedding_Ring_F,Wedding Ring,5,20,0,0,,,,0,10477567,0,136,,0,,{},{ skill 334,1; skill 335,1; skill 336,1; }
2636,Gold_Christmas_Ring,Gold Xmas Ring,5,20,0,0,,0,,0,10477567,2,136,,0,,{},{}
2637,Silver_Christmas_Ring,Silver Xmas Ring,5,20,0,0,,0,,0,10477567,2,136,,0,,{},{}
-2638,Exorcize_Sachet,Exorcize Sachet,5,20,0,100,,0,,,10477567,2,136,,0,,{},{ bonus bStr,1; bonus bLuk,1; },,,
-2639,Purification_Sachet,Purification Sachet,5,20,0,100,,0,,,10477567,2,136,,0,,{},{ bonus bAgi,1; bonus bInt,1; },,,
-2640,Kafra_Ring,Kafra Ring,5,20,0,10,,,,,2088958,2,136,,,,{},{ bonus bStr,1; bonus bAgi,1; bonus bInt,1; bonus bLuk,1; }
+2638,Exorcize_Sachet,Sacred Incense,5,20,0,100,,0,,,10477567,2,136,,0,,{},{ bonus bStr,1; bonus bLuk,1; }
+2639,Purification_Sachet,Occult Incense,5,20,0,100,,0,,,10477567,2,136,,0,,{},{ bonus bAgi,1; bonus bInt,1; }
+2640,Kafra_Ring,Kafra Ring,5,20,0,200,,,,,10477567,2,136,,,,{},{ bonus bStr,1; bonus bAgi,1; bonus bInt,1; bonus bLuk,1; }
+2641,Fashion_Hip_Sack,Fashion Hip Sack,5,20,0,700,,0,,0,263200,2,136,,50,,{},{ bonus bStr,2; }
+2642,Celines_Ring,Celine's Ring,5,20,0,100,,0,,0,10477567,2,136,,,,{},{}
+2643,Celines_Ring_,Celine's Ring,5,20,0,100,,0,,0,10477567,2,136,,,,{},{}
+2644,The_Sign_,The Sign,5,20,0,0,,0,,0,10477567,2,136,,,,{},{}
+2645,Moonlight_Ring,Moonlight Ring,5,20,0,200,,0,,0,135232,2,136,,60,,{},{}
+2646,Bouquet,Bunch of Carnations,5,20,0,100,,0,,0,10477567,2,136,,,,{},{ bonus bAllStats,3; }
// Cards
//===================================================================
@@ -1003,7 +1039,7 @@
4002,Fabre_Card,Fabre Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bVit,1; bonus bMaxHP,100; }
4003,Pupa_Card,Pupa Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bMaxHP,700; }
4004,Drops_Card,Drops Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bDex,1; bonus bHit,3; }
-4005,Poring__Card,Poring Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEle,7,20; }
+4005,Santa_Poring_Card,Santa Poring Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEle,7,20; }
4006,Lunatic_Card,Lunatic Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bLuk,1; bonus bCritical,1; bonus bFlee2,1; }
4007,Pecopeco_Egg_Card,Pecopeco Egg Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace,0,20; }
4008,Picky_Card,Picky Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bStr,1; bonus bBaseAtk,10; }
@@ -1043,7 +1079,7 @@
4042,Steel_Chonchon_Card,Steel Chonchon Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bSubEle,4,10; bonus bDef,2; }
4043,Andre_Card,Andre Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bBaseAtk,20; }
4044,Smokie_Card,Smokie Card,6,20,0,10,,,,,,,136,,,,{},{ skill 51,1; }
-4045,horn_Card,horn Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bLongAtkDef,35; }
+4045,Horn_Card,Horn Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bLongAtkDef,35; }
4046,Martin_Card,Martin Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bResEff,Eff_Blind,2000; bonus bDef,1; }
4047,Ghostring_Card,Ghostring Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDefEle,8; bonus bHPrecovRate,-25; }
4048,Poison_Spore_Card,Poison Spore Card,6,20,0,10,,,,,,,136,,,,{},{ skill 52,3; }
@@ -1059,7 +1095,7 @@
4058,Thara_Frog_Card,Thara Frog Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubRace,7,30; }
4059,Soldier_Andre_Card,Soldier Andre Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubRace,3,30; }
4060,Goblin_Card,Goblin Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace,2,20; }
-4061,Cornutus_Card,Cornutus Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDef,1; }
+4061,Cornutus_Card,Cornutus Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bUnbreakableArmor,0; bonus bDef,1; }
4062,Anacondaq_Card,Anacondaq Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEle,5,20; }
4063,Caramel_Card,Caramel Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace,4,20; }
4064,Zerom_Card,Zerom Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bDex,3; }
@@ -1070,12 +1106,12 @@
4069,Drainliar_Card,Drainliar Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEle,1,20; }
4070,Eggyra_Card,Eggyra Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bSPrecovRate,15; }
4071,Orc_Zombie_Card,Orc Zombie Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bSubEle,9,30; bonus bFlee,5; }
-4072,Golem_Card,Golem Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bBaseAtk,5; }
+4072,Golem_Card,Golem Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bUnbreakableWeapon,0; bonus bBaseAtk,5; }
4073,Pirate_Skel_Card,Pirate Skel Card,6,20,0,10,,,,,,,136,,,,{},{ skill 37,5; }
4074,BigFoot_Card,BigFoot Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubRace,4,30; }
4075,Argos_Card,Argos Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bResEff,Eff_Stone,2000; bonus bDef,1; }
4076,Magnolia_Card,Magnolia Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Curse,500; bonus bBaseAtk,5; }
-4077,Phen_Card,Phen Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bNoCastCancel,0; bonus bCastrate,25; }
+4077,Phen_Card,Phen Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bNoCastCancel,0; bonus bDelayrate,25; }
4078,Savage_Card,Savage Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bVit,3; }
4079,Mantis_Card,Mantis Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bStr,3; }
4080,Flora_Card,Flora Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace,5,20; }
@@ -1092,7 +1128,7 @@
4091,Kobold_Card,Kobold Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bStr,1; bonus bCritical,4; }
4092,Skel_Worker_Card,Skel Worker Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddSize,1,15; bonus bBaseAtk,5; }
4093,Obeaune_Card,Obeaune Card,6,20,0,10,,,,,,,136,,,,{},{ skill 35,1; }
-4094,Archer_Skeleton_Card,Archer Skeleton Card,6,20,0,10,,,,,,,2,,,,{},{}
+4094,Archer_Skeleton_Card,Archer Skeleton Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bLongAtkRate,10; }
4095,Marse_Card,Marse Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bSubEle,1,30; }
4096,Zenorc_Card,Zenorc Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Poison,400; bonus bBaseAtk,10; }
4097,Matyr_Card,Matyr Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bMaxHPrate,10; bonus bAgi,1; }
@@ -1110,7 +1146,7 @@
4109,Jakk_Card,Jakk Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bSubEle,3,30; bonus bFlee,5; }
4110,Ghoul_Card,Ghoul Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bResEff,Eff_Poison,2000; bonus bDef,1; }
4111,Strouf_Card,Strouf Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace,6,20; }
-4112,Marduk_Card,Marduk Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bResEff,Eff_Silence,10000; }
+4112,Marduk_Card,Marduk Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bResEff,Eff_Silence,10000; bonus bDelayrate,-5; }
4113,Marionette_Card,Marionette Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bSubEle,8,30; bonus bFlee,5; }
4114,Argiope_Card,Argiope Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDefEle,5; bonus bDef,1; }
4115,Hunter_Fly_Card,Hunter Fly Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bHpDrainRate,3,15; }
@@ -1120,18 +1156,18 @@
4119,Bathory_Card,Bathory Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDefEle,7; }
4120,Petit__Card,Petit Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubRace,9,30; }
4121,Phreeoni_Card,Phreeoni Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bHit,100; }
-4122,Deviruchi_Card,Deviruchi Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bStr,1; bonus2 bResEff,Eff_Blind,10000; }
+4122,Deviruchi_Card,Deviruchi Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bStr,1; bonus2 bResEff,Eff_Blind,10000; }
4123,Eddga_Card,Eddga Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bInfiniteEndure,0; bonus bMaxHPrate,-25; }
4124,Medusa_Card,Medusa Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubRace,6,15; bonus2 bResEff,Eff_Stone,10000; }
4125,Deviace_Card,Deviace Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace,7,7; bonus2 bAddRace,2,7; bonus2 bAddRace,3,7; bonus2 bAddRace,4,7; }
4126,Minorous_Card,Minorous Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddSize,2,15; bonus bBaseAtk,5; }
4127,Nightmare_Card,Nightmare Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bResEff,Eff_Sleep,10000; bonus bAgi,1; }
4128,Golden_Bug_Card,Golden Bug Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bNoMagicDamage,0; bonus bUseSPrate,100; }
-4129,Baphomet__Card,Baphomet Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bHit,-10; bonus bSplashRange,1; }
+4129,Baphomet__Card,Baphomet Jr Card,6,20,,10,,,,,,,4,,,,{},{bonus bAgi,3; bonus bCritical,1; }
4130,Scorpion_King_Card,Scorpion King Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEle,9,20; }
4131,Moonlight_Flower_Card,Moonlight Flower Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bSpeedRate,25; }
4132,Mistress_Card,Mistress Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bNoGemStone,0; bonus bUseSPrate,25; }
-4133,Daydric_Card,Daydric Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bSubEle,0,20; }
+4133,Raydric_Card,Raydric Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bSubEle,0,20; }
4134,Dracula_Card,Dracula Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bSpDrainRate,1,5; }
4135,Orc_Lord_Card,Orc Lord Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bShortWeaponDamageReturn,30; }
4136,Khalitzburg_Card,Khalitzburg Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubRace,6,30; }
@@ -1140,176 +1176,311 @@
4139,Joker_Card,Joker Card,6,20,0,10,,,,,,,136,,,,{},{ skill 50,1; }
4140,Knight_Of_Abyss_Card,Knight Of Abyss Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace,10,25; }
4141,Evil_Druid_Card,Evil Druid Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDefEle,9; bonus bInt,1; bonus bDef,1; }
-4142,Doppelganger_Card,Doppelganger Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAspdRate,15; }
+4142,Doppelganger_Card,Doppelganger Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAspdRate,10; }
4143,Orc_Hero_Card,Orc Hero Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bVit,3; bonus2 bResEff,Eff_Stan,10000; }
4144,Osiris_Card,Osiris Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bRestartFullRecover,0; }
-4145,Berzebub_Card,Berzebub Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bCastrate,-30; bonus bMaxSPrate,-15; bonus bMaxHPrate,-5; }
+4145,Berzebub_Card,Berzebub Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bCastrate,-30; bonus bMaxSPrate,-15; bonus bMaxHPrate,-5; } // bCastrate in description, but bDelayrate in Aegis?
4146,Maya_Card,Maya Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bMagicDamageReturn,30; }
4147,Baphomet_Card,Baphomet Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bHit,-10; bonus bSplashRange,1; }
4148,Pharaoh_Card,Pharaoh Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bUseSPrate,-30; }
-4149,Bon_Gun_Card,Bon Gun Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bInt,2; }
-4150,Orc_Archer_Card,Orc Archer Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bRange,1; }
-4151,Mimic_Card,Mimic Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bAgi,1; bonus bDex,2; bonus bLuk,3; }
-4152,Wraith_Card,Wraith Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bMatk,8; }
-4153,Alarm_Card,Alarm Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bCastrate,-10; }
-4154,Arclouse_Card,Arclouse Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bStr,2; }
-4155,Rideword_Card,Rideword Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bDex,4; }
-4156,Skeleton_Prisoner_Card,Skel Prisoner Card,6,20,0,10,,,,,,,136,,,,{},{ skill 45,3; }
-4157,Zombie_Prisoner_Card,Zombie Prisoner Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bMaxHPrate,10; }
-4158,Dark_Priest_Card,Dark Priest Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bUseSPrate,-15; }
-4159,Punk_Card,Punk Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bUseSPrate,-5; }
-4160,Zherlthsh_Card,Zherlthsh Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bUseSPrate,-10; }
-4161,Mysteltainn_Card,Mysteltainn Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bAtk,30; bonus bMaxHPrate,-22; bonus bCastrate,-10; }
-4162,Tirfing_Card,Tirfing Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAgi,3; bonus bFlee,10; }
-4163,Executioner_Card,Executioner Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bRandomAttackIncrease,300, 4; }
-4164,Anolian_Card,Anolian Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bStr,2; }
-4165,Sting_Card,Sting Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bDex,4; }
-4166,Wander_Man_Card,Wander Man Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bHit,25; bonus bCritical,5; }
-4167,Cramp_Card,Cramp Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bAgi,3; }
-4168,Filamentous_Card,Filamentous Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bResEff,Eff_Stone,100; bonus2 bResEff,Eff_Freeze,100; bonus2 bResEff,Eff_Stan,100; bonus2 bResEff,Eff_Sleep,100; bonus2 bResEff,Eff_Poison,100; bonus2 bResEff,Eff_Curse,100; bonus2 bResEff,Eff_Silence,100; bonus2 bResEff,Eff_Confusion,100; bonus2 bResEff,Eff_Blind,100; }
-4169,Brilight_Card,Brilight Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bAgi,2; bonus bLuk,3; }
-4170,Iron_Fist_Card,Iron Fist Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bVit,2; }
-4171,High_Orc_Card,High Orc Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bStr,2; }
-4172,Choco_Card,Choco Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bStr,1; bonus bAgi,1; bonus bVit,1; bonus bInt,1; bonus bDex,1; bonus bLuk,1; bonus bAtk,10; bonus bDef,1; }
-4173,Stem_Worm_Card,Stem Worm Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bDex,2; }
-4174,Penonema_Card,Penomena Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bMaxHPrate, 15; }
-4175,Marin_Card,Marin Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,1,20; }
-4176,Sasquatch_Card,Sasquatch Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bAddSize,1,20; bonus bAtk,-10; }
-4177,Antonio_Card,Antonio Card,6,20,0,10,,,,,,,136,,,,{},{ skill 50,5; skill 210,5; }
-4178,Cruiser_Card,Cruiser Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bDex,3; }
-4179,Mystcase_Card,Mystcase Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bCastrate,-10; bonus bAtk,10; }
-4180,Chepet_Card,Chepet Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bLuk,5; }
-4181,Knight_of_Windstorm_Card,Knight Of Windstorm Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bAddEff,Eff_Freeze,500; bonus bAtk,25; }
-4182,Garm_Card,Garm Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bAddSize,2,20; bonus bAtk,-10; }
-4183,Gargoyle_Card,Gargoyle Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bRange,5; }
-4184,Raggler_Card,Raggler Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Sleep,500; }
-4185,Neraid_Card,Neraid Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bAgi,2; }
-4186,Pest_Card,Pest Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,0,20; }
-4187,Injustice_Card,Injustice Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,9,20; }
-4188,Goblin_Archer_Card,Goblin Archer Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,2,20; }
-4189,Gryphon_Card,Gryphon Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Silence,500; bonus bAtk,25; }
-4190,Dark_Frame_Card,Dark Frame Card,6,20,0,10,,,,,,,769,,,,{},{ skill 32,2; }
-4191,Wind_Ghost_Card,Wind Ghost Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtkEle,4; }
-4192,Merman_Card,Merman Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtkEle,1; }
-4193,Cookie_Card,Cookie Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtkEle,7; }
-4194,Aster_Card,Aster Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,3,20; }
-4195,Carat_Card,Carat Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,6,20; }
-4196,Bloody_Knight_Card,Bloody Knight Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Blind,500; bonus bAtk,25; bonus bMaxHPrate,-10; }
-4197,Clock_Card,Clock Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bLuk,10; }
-4198,Clock_Tower_Manager_Card,C Tower Manager Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Curse,500; }
-4199,Alligator_Card,Alligator Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Poison,500; }
-4200,Dark_Lord_Card,Dark Lord Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtkEle,9; }
-4201,Orc_Lady_Card,Orc Lady Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,4,20; }
-4202,Megalith_Card,Megalith Card,6,20,0,10,,,,,,,4,,,,{},{ skill 9,1; }
-4203,Alice_Card,Alice Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtkEle,6; }
-4204,Raydric_Archer_Card,Raydric Archer Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtkEle,3; }
-4205,Greatest_General_Card,Greatest General Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,5,20; }
-4206,Stalatic_Golem_Card,Stalactic Golem Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bMaxHP,500; bonus bDex,-3; }
-4207,Tri_Joint_Card,Tri Joint Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,7,20; }
-4208,Steamrider_Goblin_Card,Steam Goblin Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubEle,8,20; }
-4209,Sage_Worm_Card,Sage Worm Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtkEle,8; }
-4210,Kobold_Archer_Card,Kobold archer Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bHit,15; bonus bAtk,15; }
-4211,Chimera_Card,Chimera Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Stan,500; bonus bAtk,25; }
+
+// New Cards
+// //OK = Tested, Works fine. //??OK = looks right, but not properly tested yet
+//bonus2 bAddItemHealRate,n,x; Increases HP recovered by n type items by x%
+// n:1=potions 2=herbs 3=fruits 4=meat 5=candy 6=juice 7=sashimi
+//bonus3 bAddMonsterDropItem,n,x; When killing a monster with physical attack, the probability which drops item n +x% (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
+
+//===================================================================
+4149,Gargoyle_Card,Gargoyle Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill?? (item not implemented)
+4150,Goat_Card,Goat Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDef,2; bonus bMdef,5+5*(getrefine>=6); } //OK
+4151,Gajomart_Card,Gajomart Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,3,-20; } //missing increaseexponracekill??
+4152,Galapago_Card,Galapago Card,6,20,0,10,,,,,,,136,,,,{},{ bonus2 bAddItemHealRate,6,50; bonus3 bAddMonsterDropItem,531,4,3300; bonus3 bAddMonsterDropItem,532,4,3300; bonus3 bAddMonsterDropItem,534,4,3300; } //??
+4153,Crab_Card,Crab Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtk,5; bonus2 bAddDamageClass,1266,30; bonus2 bAddEle,4,30; if(cardscnt(4247)&&cardscnt(4273)) bonus3 bAddMonsterDropItem,544,5,3000; } //OK
+4154,Dumpling_Child_Card,Dumpling Child Card,6,20,0,10,,,,,,,,,,,{},{}
+4155,Goblin_Leader_Card,Goblin Leader Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace2,1,30; } //OK
+4156,Goblin_Rider_Card,Goblin Steam Rider Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,0,7; } //OK
+4157,Goblin_Archer_Card,Goblin Archer Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,1,7; } //OK
+4158,Sky_Deleter_Card,Sky Deleter Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bNoRegen,1; bonus bHPGainValue,100;} // ??OK
+4159,Nine_Tail_Card,Nine Tail Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bAgi,2; if(getrefine>8) bonus bFlee,20; } //OK
+4160,Firelock_Soldier_Card,Firelock Soldier Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bStr,2; if(getrefine<=8) end; bonus bMaxHPrate,10; bonus bMaxSPrate,10; } //OK
+4161,Grand_Peco_Card,Grand Peco Card,6,20,0,10,,,,,,,769,,,,{},{ bonus4 bAutoSpellWhenHit,75,1,1,0; if(!isequipped(4031)) end; bonus bDef,3; bonus bVit,3; } //OK
+4162,Grizzly_Card,Grizzly Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDef,2; if(isequipped(4074)) bonus2 bAddEffWhenHit,Eff_Blind,3000; } //OK
+4163,Gryphon_Card,Gryphon Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bFlee,2; bonus bCritical,7; if (callfunc("Is_Sword_Class")!=0) bonus3 bAutoSpell,62,5,1; } //OK
+4164,Gullinbursti_Card,Gullinbursti Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,5,-20; } //missing increaseexponracekill??
+4165,Gig_Card,Gig Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4166,Nightmare_Terror_Card,Nightmare Terror Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDef,2; if(isequipped(4127)) bonus2 bAddEffWhenHit,Eff_Curse,3000; } //OK
+4167,Nereid_Card,Neraid Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4168,Dark_Lord_Card,Dark Lord Card,6,20,0,10,,,,,,,64,,,,{},{ bonus4 bAutoSpellWhenHit,83,5,1,0; if(!isequipped(4169)) end; bonus bMaxHPrate,20; bonus bMaxSPrate,20; } //??OK
+4169,Dark_Illusion_Card,Dark Illusion Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bMaxHPrate,-10; bonus bMaxSPrate,-10; if(isequipped(4168)) goto D_LORD; bonus bDelayrate,-10; end; D_LORD: bonus bDelayrate,-20; } //??OK
+4170,Dark_Frame_Card,Dark Frame Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Stone,2000; } //??OK
+4171,Dark_Priest_Card,Dark Priest Card,6,20,0,10,,,,,,,2,,,,{},{ bonus3 bSPDrainRate,3,10,1; if(BaseJob==Job_Sage) bonus bSPGainValue,1; } //? Now it just drains 10% SP by 3% chance.
+4172,The_Paper_Card,The Paper Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,20; bonus3 bSPDrainValue,100,-1,0; } //??OK
+4173,Demon_Pungus_Card,Demon Pungus Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Sleep,2000; } //??OK
+4174,Deviling_Card,Deviling Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bSubEle,1,-50; bonus2 bSubEle,2,-50; bonus2 bSubEle,3,-50; bonus2 bSubEle,4,-50; bonus2 bSubEle,0,50; } //??OK
+4175,Poisonous_Toad_Card,Poisonous Toad Card,6,20,0,10,,,,,,,2,,,,{},{ bonus3 bAutoSpell,52,1,2; } //OK
+4176,Dullahan_Card,Dullahan Card,6,20,10,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,9,7; } //OK
+4177,Dryad_Card,Dryad Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bSubEle,2,10; } //missing getitemonracekill??
+4178,Dragon_Tail_Card,Dragon Tail Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bAgi,1; bonus bFlee,10; bonus2 bSkillAtk,46,5; bonus2 bSkillAtk,47,5; } //??OK
+4179,Dragon_Fly_Card,Dragon Fly Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bAgi,1; if(isequipped(4009)) bonus bFlee,18; } //OK
+4180,Driller_Card,Driller Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4181,Disguise_Card,Disguise Card,6,20,0,10,,,,,,,16,,,,{},{ if(readparam(bVit)<=77) bonus2 bAddEffWhenHit,Eff_Silence,1000; if(readparam(bVit)>77) bonus2 bAddEffWhenHit,Eff_Silence,3000; } //??OK
+4182,Diabolic_Card,Diabolic Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4183,Vagabond_Wolf_Card,Vagabond Wolf Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bStr,1; if(isequipped(4029)) bonus bFlee,18; } //OK
+4184,Lava_Golem_Card,Lava Golem Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace2,4,30; } //OK
+4185,Rideword_Card,Rideword Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bInt,1; if(callfunc("Is_Holy_Class")) bonus bMdef,1; } //OK
+4186,Raggler_Card,Raggler Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bStr,1; bonus bVit,1; if(!isequipped(4233,4281,4321,4206)) end; bonus bLuk,10; bonus3 bSPDrainValue,100,2,0; bonus2 bSkillAtk,42,20; if(callfunc("Is_Merc_Class")==0) bonus bMagicDamageReturn,20; } //OK
+4187,Raydric_Archer_Card,Raydric Archer Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill?? (item not implemented)
+4188,Leib_Olmai_Card,Leib Olmai Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bSubEle,3,10; } //missing getitemonracekill??
+4189,Wraith_Dead_Card,Wraith Dead Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Curse,2000; } //missing getitemonracekill??
+4190,Wraith_Card,Wraith Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill?? (item not implemented)
+4191,Loli_Ruri_Card,Loli Ruri Card,6,20,0,10,,,,,,,16,,,,{},{ bonus4 bAutoSpellWhenHit,28,3,5,0; } //OK
+4192,Rotar_Zairo_Card,Rotar Zairo Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,5,7; } //OK
+4193,Lude_Card,Lude Card,6,20,0,10,,,,,,,136,,,,{},{ if(Class==Job_Novice||Class==Job_SuperNovice||Class==4001) bonus3 bAutoSpellWhenHit,8,1,20; if(isequipped(4294)) bonus bMaxHP,300; } //??OK
+4194,Rybio_Card,Rybio Card,6,20,0,10,,,,,,,16,,,,{},{ if(readparam(bDex)<=77) bonus2 bAddEffWhenHit,Eff_Stan,1000; if(readparam(bDex)>77) bonus2 bAddEffWhenHit,Eff_Stan,3000; } //??OK
+4195,Leaf_Cat_Card,Leaf Cat Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bSubEle,1,10; } //missing getitemonracekill??
+4196,Marin_Card,Marin Card,6,20,0,10,,,,,,,136,,,,{},{} //missing bRandomDrop,Item1,Chance,Item2,Chance,etc
+4197,Mastering_Card,Mastering Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bLuk,1; if(isequipped(4001)) bonus bFlee,18; } //OK
+4198,Maya_Purple_Card,Maya Purple Card,6,20,0,10,,,,,,,136,,,,{},{} //missing bIntravision (always see Cloaked & Hidden)
+4199,Merman_Card,Merman Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bHPrecovRate,10; bonus bSPrecovRate,10; if(!isequipped(4297,4234,4252,4178)) end; bonus bAgi,5; bonus bDex,3; bonus bLongAtkRate,20; bonus bPerfectHitAddRate,20; if(callfunc("Is_Bow_Class")==0) end; bonus2 bWeaponComaRace,2,500; } // missing increaseexponracekill
+4200,Megalith_Card,Megalith Card,6,20,0,10,,,,,,,64,,,,{},{ if(getrefine<6) bonus bMdef,7; } //OK
+4201,Majoruros_Card,Majoruros Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Stan,2000; } //?OK
+4202,Civil_Servant_Card,Civil Servant Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEle,8,20; } //OK
+4203,Mutant_Dragonoid_Card,Mutant Dragonoid Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtk,15; if(getskilllv(17)==10) goto FB_10; bonus3 bAutoSpell,17,3,1; end; FB_10: bonus3 bAutoSpell,17,10,1; } //??OK
+4204,Mini_Demon_Card,Mini Demon Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,2,-20; } //missing increaseexponracekill??
+4205,Mimic_Card,Mimic Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill??
+4206,Myst_Case_Card,Mystcase Card,6,20,0,10,,,,,,,769,,,,{},{} //missing getitemonkill??
+4207,Mysteltainn_Card,Mysteltainn Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubSize,0,25; bonus bDef,1; } //OK
+4208,Miyabi_Ningyo_Card,Miyabi Ningyo Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bMaxSPrate,10; bonus2 bSkillAtk,15,5; } //OK
+4209,Violy_Card,Violy Card,6,20,0,10,,,,,,,136,,,,{},{ if(getskilllv(318)==5) goto FJ_5; bonus3 bAutoSpell,318,1,1; end; FJ_5: bonus3 bAutoSpell,318,5,1; } //??OK
+4210,Wanderer_Card,Wanderer Card,6,20,0,10,,,,,,,4,,,,{},{ if(callfunc("Is_Thief_Class")) bonus bFlee,20; bonus3 bAutoSpell,219,1,1; } //??OK
+4211,Vocal_Card,Vocal Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bMdef,3; if(isequipped(4021)) bonus bFlee,18; } //OK
+4212,Bongun_Card,Bongun Card,6,20,0,10,,,,,,,136,,,,{},{ bonus3 bAutoSpell,5,1,1; bonus2 bAddDamageByClass,1026,100; } //??OK
+4213,Brilight_Card,Brilight Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Silence,2000; } //??OK
+4214,Bloody_Murderer_Card,Bloody Murderer Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,4,7; } //OK
+4215,Blazer_Card,Blazer Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonracekill??
+4216,Sasquatch_Card,Sasquatch Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Freeze,2000; } //??OK
+4217,Enchanted_Peach_Tree_Card,Enchanted Peach Tree Card,6,20,0,10,,,,,,,32,,,,{},{ if(!getskilllv(28)==10) bonus3 bAutoSpell,28,1,1; if(getskilllv(28)==10) bonus3 bAutoSpell,28,10,1; if(!isequipped(4280,4185,4293,4312)) end; bonus bVit,10; bonus bCastrate,-10; bonus bUseSPRate,-10; if(callfunc("Is_Holy_Class")==0) end; bonus2 bSubRace,1,30; bonus2 bSubRace,6,30; } // missing increaseexponracekill??
+4218,Succubus_Card,Succubus Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bMaxHP,1000; if(isequipped(4268)) goto L_INCUB; bonus bVit,-3; bonus bHPrecovRate,-20; end; L_INCUB: bonus bVit,4; bonus bHPrecovRate,30; } //??OK HpRecoveryRate != +30% when combo
+4219,Sage_Worm_Card,Sage Worm Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill??
+4220,Solider_Card,Solider Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDef,2; bonus bMdef,2; } //OK
+4221,Skeleton_General_Card,Skeleton General Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,4,-20; } //missing increaseexponracekill??
+4222,Skeleton_Prisoner_Card,Skel Prisoner Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDef,2; if(isequipped(4025)) bonus2 bAddEffWhenHit,Eff_Sleep,3000; } //OK
+4223,Stalactic_Golem_Card,Stalactic Golem Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bDef,1; bonus2 bResEff,Eff_Stan,2000;} //??OK
+4224,Stem_Worm_Card,Stem Worm Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill?? (item not implemented)
+4225,Stone_Shooter_Card,Stone Shooter Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtk,10; bonus bHit,10; } //OK
+4226,Sting_Card,Sting Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bDef,2; if(getrefine>8) bonus bMdef,5; } //OK
+4227,Spring_Rabbit_Card,Spring Rabbit Card,6,20,0,10,,,,,,,136,,,,{},{ bonus2 bAddItemHealRate,5,50; bonus3 bAddMonsterDropItem,517,2,5000; bonus3 bAddMonsterDropItem,528,2,5000; } //??OK
+4228,Sleeper_Card,Sleeper Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill?? (item not implemented)
+4229,Clock_Tower_Manager_Card,Clock Tower Manager Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bInt,1; bonus bDelayrate,-5; if(!isequipped(4244,4299,4313)) end; bonus bDef,3; bonus bMdef,3; } //??OK
+4230,Shinobi_Card,Shinobi Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bAgi,1; bonus4 bAutoSpellWhenHit,135,5,1,0; } //??OK
+4231,Increase_Soil_Card,Increase Soil Card,6,20,0,10,,,,,,,,,,,{},{}
+4232,Hermit_Plant_Card,Hermit Plant Card,6,20,0,10,,,,,,,,,,,{},{}
+4233,Baby_Leopard_Card,Baby Leopard Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bLuk,3; if(callfunc("Is_Merc_Class")==0) end; bonus bUnbreakableArmor,0; bonus bUnstripableArmor,0; } //??OK
+4234,Anolian_Card,Anolian Card,6,20,0,10,,,,,,,16,,,,{},{ if(getskilllv(45)==10) goto IC_10; bonus4 bAutoSpellWhenHit,45,1,1,0; end; IC_10: bonus4 bAutoSpellWhenHit,45,10,1,0; } //??OK
+4235,Cookie_Xmas_Card,Cookie Xmas Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,8,-20; } //missing increaseexponracekill??
+4236,Amon_Ra_Card,Amon Ra Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bAllStats,1; bonus4 bAutoSpellWhenHit,73,10,1+(readparam(bInt)>=99),0; } //??OK (X>=Y) returns 0 or 1
+4237,Owl_Duke_Card,Owl Duke Card,6,20,0,10,,,,,,,136,,,,{},{ bonus3 bAutoSpell,66,3,1; if(isequipped(4238)) bonus3 bAutoSpell,20,5,1; } //??OK
+4238,Owl_Baron_Card,Owl Baron Card,6,20,0,10,,,,,,,136,,,,{},{ bonus3 bAutoSpell,78,1,1; } //??OK
+4239,Iron_Fist_Card,Iron Fist Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,0,-20; } //missing increaseexponracekill??
+4240,Arclouze_Card,Arclouze Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bDef,2; bonus bMdef,3+2*(getrefine>=6); } //OK
+4241,Archangeling_Card,Archangeling Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bMaxHP,300; if(readparam(bLuk)<=77) end; bonus bHPrecovRate,100; bonus bSPrecovRate,100; } //??OK
+4242,Apocalipse_Card,Apocalipse Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bVit,2; if(getrefine>8) bonus bMaxHP,800; } //OK
+4243,Antonio_Card,Antonio Card,6,20,0,10,,,,,,,16,,,,{},{ bonus4 bAutoSpellWhenHit,26,1,1,0; } //??OK
+4244,Alarm_Card,Alarm Card,6,20,0,10,,,,,,,64,,,,{},{ bonus4 bAutoSpellWhenHit,10,1,1,0; bonus bMaxHP,300; bonus bVit,1; } //??OK
+4245,Am_Mut_Card,Am Mut Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,7,-20; } //missing increaseexponracekill??
+4246,Assulter_Card,Assulter Card,6,20,0,10,,,,,,,2,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,7,7; },{}
+4247,Aster_Card,Aster Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtk,5; bonus2 bAddDamageClass,1074,30; } //OK
+4248,Ancient_Mummy_Card,Ancient Mummy Card,6,20,0,10,,,,,,,32,,,,{},{ bonus4 bAutoSpellWhenHit,32,5,1,0; }
+4249,Ancient_Worm_Card,Ancient Worm Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,6,-20; } //missing increaseexponracekill??
+4250,Executioner_Card,Executioner Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubSize,2,25; bonus bDef,1; } //OK
+4251,Elder_Card,Elder Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace2,5,40; } //OK
+4252,Alligator_Card,Alligator Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bLongAtkDef,5; } //OK
+4253,Alice_Card,Alice Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubRace,10,40; bonus2 bSubRace,11,-40; } //??OK
+4254,Tirfing_Card,Tirfing Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubSize,1,25; bonus bDef,1; } //OK
+4255,Orc_Lady_Card,Orc Lady Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace2,3,30; } //OK
+4256,Orc_Archer_Card,Orc Archer Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill?? (item not implemented)
+4257,Wild_Rose_Card,Wild Rose Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bAgi,1; if(callfunc("Is_Thief_Class")) bonus bFlee2,5; } //OK
+4258,Evil_Nymph_Card,Evil Nymph Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bInt,1; bonus bMaxSP,50; } //OK
+4259,Wooden_Golem_Card,Wooden Golem Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bDef,1; bonus bHPrecovRate,30; } //OK
+4260,Wootan_Shooter_Card,Wootan Shooter Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bDef,1; bonus2 bResEff,Eff_Confusion,2000; } //OK
+4261,Wootan_Fighter_Card,Wootan Fighter Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bDef,1; bonus2 bResEff,Eff_Bleeding,2000; } //OK
+4262,Taoist_Hermit_Card,Taoist Hermit Card,6,20,0,10,,,,,,,,,,,{},{}
+4263,Incantation_Samurai_Card,Incantation Samurai Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bIgnoreDefMob,0; bonus bNoRegen,1; bonus2 bHPLossRate,666,10000; bonus bDamageWhenUnequip,999; } //??OK
+4264,Wind_Ghost_Card,Wind Ghost Card,6,20,0,10,,,,,,,136,,,,{},{ if(getskilllv(84)==10) goto JT_10; bonus3 bAutoSpell,84,3,1; end; JT_10: bonus3 bAutoSpell,66,10,1; } //??OK
+4265,Li_Me_Mang_Ryang_Card,Li Me Mang Ryang Card,6,20,0,10,,,,,,,,,,,{},{}
+4266,Eclipse_Card,Eclipse Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bVit,1; if(isequipped(4006)) bonus bFlee,18; } //OK
+4267,Explosion_Card,Explosion Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,9,-20; } //missing increaseexponracekill??
+4268,Incubus_Card,Incubus Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bMaxSP,150; if(isequipped(4218)) goto L_SUC; bonus bInt,-3; bonus bSPrecovRate,-20; end; L_SUC: bonus bInt,3; bonus bSPrecovRate,30; } //??OK
+4269,Injustice_Card,Injustice Card,6,20,0,10,,,,,,,2,,,,{},{ bonus3 bAutoSpell,136,1,1; if(!isequipped(4277)) end; bonus bAtk,20; bonus bLuk,3; } //??OK
+4270,Giant_Spider_Card,Giant Spider Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Poison,2000; } //??OK
+4271,Giant_Hornet_Card,Giant Hornet Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bSubEle,4,10; } //missing getitemonracekill??
+4272,Dancing_Dragon_Card,Dancing Dragon Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bAgi,1; bonus bCritical,3; } //OK
+4273,Shellfish_Card,Shellfish Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtk,5; bonus2 bAddDamageClass,1073,30; } //OK
+4274,Zombie_Master_Card,Zombie Master Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4275,Zombie_Prisoner_Card,Zombie Prisoner Card,6,20,0,10,,,,,,,64,,,,{},{ bonus2 bSubRace,1,-20; } //missing increaseexponracekill??
+4276,Lord_of_Death_Card,Lord of Death Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddEff,Eff_Stan,100; bonus2 bAddEff,Eff_Curse,100; bonus2 bAddEff,Eff_Poison,100; bonus2 bAddEff,Eff_Bleeding,100; bonus2 bAddWeaponComaRace,11,30; } //??OK
+4277,Zherlthsh_Card,Zherlthsh Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bLuk,2; bonus2 bSkillAtk,316,10; bonus2 bSkillAtk,324,10; } //??OK
+4278,Gibbet_Card,Gibbet Card,6,20,0,10,,,,,,,769,,,,{},{ if(getrefine<6) bonus bMdef,5; } //OK
+4279,Earth_Deleter_Card,Earth Deleter Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bNoRegen,2; bonus bSPGainValue,15; } //??OK
+4280,Geographer_Card,Geographer Card,6,20,0,10,,,,,,,16,,,,{},{ if(getskilllv(34)==10) goto BL_10; bonus4 bAutoSpellWhenHit,34,2,1,0; end; BL_10: bonus4 bAutoSpellWhenHit,34,10,1,0; } //??OK
+4281,Zipper_Bear_Card,Zipper Bear Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtk,30; bonus3 bSPDrainValue,100,-1,0; if(callfunc("Is_Merc_Class")==0) end; bonus bUnbreakableWeapon,0; bonus bUnstripableWeapon,0; } //??OK
+4282,Tengu_Card,Tengu Card,6,20,0,10,,,,,,,136,,,,{},{} //missing getitemonkill??
+4283,Greatest_General_Card,Greatest General Card,6,20,0,10,,,,,,,136,,,,{},{ bonus3 bAutospell,261,1,1+callfunc("Is_Holy_Class"); } //??OK
+4284,Chepet_Card,Chepet Card,6,20,0,10,,,,,,,2,,,,{},{ bonus3 bAutoSpell,28,5,5; } //??OK
+4285,Choco_Card,Choco Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bFlee2,5; bonus bFlee,10; } //OK
+4286,Karakasa_Card,Karakasa Card,6,20,0,10,,,,,,,16,,,,{},{ if(readparam(bStr)<=77) bonus2 bAddEffWhenHit,Eff_Confusion,1000; if(readparam(bStr)>77) bonus2 bAddEffWhenHit,Eff_Confusion,3000; } //??OK
+4287,Kapha_Card,Kapha Card,6,20,0,10,,,,,,,4,,,,{},{ if(getrefine<6) bonus bMdef,8; } //OK
+4288,Carat_Card,Carat Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bInt,2; if(getrefine>8) bonus bMaxSP,150; } //OK
+4289,Caterpillar_Card,Caterpillar Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4290,Cat_o'_Nine_Tail_Card,Cat o' Nine Tail Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bMdef,3; bonus bMagicDamageReturn,5; } //OK
+4291,Kobold_Leader_Card,Kobold Leader Card,6,20,0,10,,,,,,,2,,,,{},{ bonus2 bAddRace2,2,30; } //OK
+4292,Kobold_Archer_Card,Kobold Archer Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,3,7; } //OK
+4293,Cookie_Card,Cookie Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bLuk,2; bonus2 bSkillAtk,156,10; } //OK
+4294,Quve_Card,Quve Card,6,20,0,10,,,,,,,136,,,,{},{ if((Class==Job_Novice)||(Class==Job_SuperNovice)||(Class==4001)) bonus4 bAutoSpellWhenHit,29,1,20,0; if(isequipped(4193)) bonus bMaxSP,60; } //??OK
+4295,Kraben_Card,Kraben Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Blind,2000; } //??OK
+4296,Cramp_Card,Cramp Card,6,20,0,10,,,,,,,769,,,,{},{ if(isequipped(4028)) bonus bStr,3; } //missing getzenybychance??
+4297,Cruiser_Card,Cruiser Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,2,7; } //OK
+4298,Creamy_Fear_Card,Creamy Fear Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Confusion,2000; } //??OK
+4299,Clock_Card,Clock Card,6,20,0,10,,,,,,,16,,,,{},{ if(getskilllv(249)==10) goto AG_10; bonus4 bAutoSpellWhenHit,249,3,1,0; end; AG_10: bonus4 bAutoSpellWhenHit,249,10,1,0; } //??OK
+4300,Chimera_Card,Chimera Card,6,20,0,10,,,,,,,16,,,,{},{ if(BaseJob!=Job_Assassin) bonus2 bAddEffWhenHit,Eff_Poison,1000; if(BaseJob==Job_Assassin) bonus2 bAddEffWhenHit,Eff_Poison,3000; } //??OK
+4301,Killer_Mantis_Card,Killer Mantis Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Bleeding,2000; } //??OK
+4302,Tao_Gunka_Card,Tao Gunka Card,6,20,0,10,,,,,,,16,,,,{},{ bonus bMaxHPrate,100; bonus bDef,-50; bonus bMdef,-50; } //??OK
+//4303,Some_card, Whisper Boss Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bFlee,10; if(readparam(bStr)>80) bonus bAtk,20; if(readparam(bVit)>80) bonus bMaxHPrate,30; if(readparam(bLuk)>80) bonus bCritical,3; }; //Temp ID until the true one is found
+4304,Tamruan_Card,Tamruan Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bDef,2; bonus2 bSkillAtk,250,10; bonus2 bSkillAtk,251,10; } //??OK
+4305,Turtle_General_Card,Turtle General Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bAtkRate,20; if(callfunc("Is_Sword_Class")) bonus3 bAutoSpell,7,10,1; } //??OK
+4306,Toad_Card,Toad Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bFlee2,1; if(isequipped(4014)) bonus bFlee,18; } //OK
+4307,Beetle_King_Card,Beetle King Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4308,Tri_Joint_Card,Tri Joint Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4309,Parasite_Card,Parasite Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bDef,1; bonus2 bSubEle,0,5; } //OK
+4310,Panzer_Goblin_Card,Panzer Goblin Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,6,7; } //OK
+4311,Permeter_Card,Permeter Card,6,20,0,10,,,,,,,769,,,,{},{ bonus2 bSubEle,7,15; bonus2 bSubEle,9,15; } //OK
+4312,Seal_Card,Seal Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bFlee,3; bonus bHit,10; if(callfunc("Is_Holy_Class")==0) end; bonus2 bCriticalAddRace,1,9; bonus2 bCriticalAddRace,6,9; } //??OK
+4313,Punk_Card,Punk Card,6,20,0,10,,,,,,,4,,,,{},{ if(getskilllv(92)==5) goto QU_5; bonus4 bAutoSpellWhenHit,92,1,1,0; end; QU_5: bonus4 bAutoSpellWhenHit,10,5,1,0; } //??OK
+4314,Penomena_Card,Penomena Card,6,20,0,10,,,,,,,32,,,,{},{ bonus2 bSubRace,0,30; } //OK
+4315,Pest_Card,Pest Card,6,20,0,10,,,,,,,16,,,,{},{ if(readparam(bInt)<=77) bonus2 bAddEffWhenHit,Eff_Stone,1000; if(readparam(bInt)>77) bonus2 bAddEffWhenHit,Eff_Stone,3000; } //??OK
+4316,False_Angel_Card,False Angel Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4317,Mobster_Card,Mobster Card,6,20,0,10,,,,,,,2,,,,{},{ bonus bCritAtkRate,15; if(callfunc("Is_Thief_Class")) bonus bCritical,4; } //??OK
+4318,Stormy_Knight_Card,Stormy Knight Card,6,20,0,10,,,,,,,2,,,,{},{ bonus3 bAutoSpell,89,1,2; bonus2 bAddEffWhenHit,Eff_Freeze,2000; } //??OK
+4319,Freezer_Card,Freezer Card,6,20,0,10,,,,,,,64,,,,{},{ bonus bMaxHP,300; if(getrefine>7) bonus2 bSkillAtk,5,10; if(!isequipped(4246,4311,4220,4331)) end; bonus bStr,10; bonus bMaxHPrate,20; bonus bHPrecovRate,50; bonus3 bAutoSpell,112,1,1; bonus3 bAddMonsterDropItem,501,100,0; if(callfunc("Is_Sword_Class")==0) end; bonus2 bAddItemHealRate,501,50; bonus2 bAddItemHealRate,503,50; bonus2 bAddItemHealRate,504,50; } //bAddMonsterDropItem bug!
+4320,Bloody_Knight_Card,Bloody Knight Card,6,20,0,10,,,,,,,2,,,,{},{ bonus3 bAutoSpell,83,1,2; } //OK
+4321,Heirozoist_Card,Heirozoist Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bClassChange,1; } //??OK
+4322,High_Orc_Card,High Orc Card,6,20,0,10,,,,,,,32,,,,{},{ bonus bDef,1; } //missing damagereturnbychance??
+4323,Garm_Baby_Card,Garm Baby Card,6,20,0,10,,,,,,,2,,,,{},{ if(isequipped(4324)) goto GARM; bonus3 bAutoSpell,15,3,1; end; GARM: bonus3 bAutoSpell,15,3,2; } //??OK
+4324,Garm_Card,Garm Card,6,20,0,10,,,,,,,16,,,,{},{ bonus2 bAddEffWhenHit,Eff_Freeze,5000; } //OK
+4325,Harpy_Card,Harpy Card,6,20,0,10,,,,,,,4,,,,{},{ bonus2 bSubEle,0,15; bonus2 bSkillAtk,11,5; if(!isequipped(4208,4258,4309,4327)) end; bonus bMaxHP,500; bonus bDef,5; bonus bMDef,5; bonus2 bSkillAtk,14,10; bonus2 bSkillAtk,19,10; bonus2 bSkillAtk,20,10; if(callfunc("Is_Magic_Class")==0) end; bonus bMatkRate,3; bonus bCastrate,-15; } //??OK
+4326,Sea_Otter_Card,Sea Otter Card,6,20,0,10,,,,,,,136,,,,{},{ bonus2 bAddItemHealRate,7,50; bonus3 bAddMonsterDropItem,544,5,5000; bonus3 bAddMonsterDropItem,551,5,5000; }
+4327,Bloody_Butterfly_Card,Bloody Butterfly Card,6,20,0,10,,,,,,,136,,,,{},{ bonus bCastrate,30; bonus bNoCastCancel2,0; bonus2 bSkillAtk,18,5; } //??OK
+4328,Hyegun_Card,Hyegun Card,6,20,0,10,,,,,,,4,,,,{},{ bonus bFlee,15; bonus bCritical,1; if(isequipped(4090,4212)) bonus bAllStats,1; } //??OK
+4329,Phendark_Card,Phendark Card,6,20,0,10,,,,,,,2,,,,{},{} //missing recoversponracekill??
+4330,Evil_Snake_Lord_Card,Evil Snake Lord Card,6,20,0,10,,,,,,,769,,,,{},{ bonus bInt,3; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Curse,10000; } //OK
+4331,Heater_Card,Heater Card,6,20,0,10,,,,,,,,,,,{},{ bonus bCritical,3; if(callfunc("Is_Sword_Class")) bonus bFlee2,3; } //OK
// Extra Headgears
//===================================================================
-5001,Headset,Headset,5,20,0,200,,3,,0,2088958,2,256,,0,87,{},{ bonus2 bResEff,Eff_Curse,1000; },
+5001,Headset,Headset,5,20,0,200,,3,,0,10477567,2,256,,0,87,{},{ bonus2 bResEff,Eff_Curse,1000; },
5002,Jewel_Crown,Jewel Crown,5,20,0,600,,4,,0,414946,2,256,,60,88,{},{ bonus bMdef,3; bonus bInt,2; bonus bLuk,1; }
-5003,Joker_Jester,Joker Jester,5,20,0,100,,1,,0,2088958,2,256,,0,89,{},{ bonus bMdef,5; bonus bLuk,2; },
-5004,Oxygen_Mask,Oxygen Mask,5,20,0,200,,0,,0,2088958,2,1,,0,90,{},{ bonus2 bResEff,Eff_Poison,2000; },,,,
-5005,Gas_Mask,Gas Mask,5,20,0,100,,1,,0,2088958,2,513,,0,91,{},{ bonus2 bResEff,Eff_Poison,3000; },,,,
-5006,Machoman_Glasses,Machoman's Glasses,5,36000,0,100,,1,,0,2088958,2,512,,0,92,{},{},,,,,,
-5007,Grand_Circlet,Grand Circlet,5,20,0,200,,3,,0,2088958,2,256,,55,93,{},{ bonus bMdef,4; bonus bStr,1; bonus bInt,1; bonus bLuk,1; },,
-5008,Puppy_Love,Puppy Love,5,20,0,100,,1,,0,2088958,2,256,,0,94,{},{},,,,,,
-5009,Safety_Helmet,Safety Helmet,5,20,0,500,,3,,0,2088958,2,256,,0,95,{},{ bonus bMdef,3; bonus bUnbreakable,100; },,,,,
-5010,Indian_Hair_Piece,Indian Fillet,5,20,0,100,,3,,0,10477567,2,256,,0,96,{},{},,,,,,
-5011,Aerial,Aerial,5,20,0,100,,3,,0,10477567,2,256,,0,97,{},{},,,,,,
-5012,Ph.D_Hat,Ph.D Hat,5,20,0,200,,3,,0,2088958,2,256,,0,98,{},{ bonus bMdef,3; },,,,,
+5003,Joker_Jester,Joker Jester,5,20,0,100,,1,,0,10477567,2,256,,0,89,{},{ bonus bMdef,5; bonus bLuk,2; },
+5004,Oxygen_Mask,Oxygen Mask,5,20,0,200,,0,,0,10477567,2,1,,0,90,{},{ bonus2 bResEff,Eff_Poison,2000; }
+5005,Gas_Mask,Gas Mask,5,20,0,100,,1,,0,10477567,2,513,,0,91,{},{ bonus2 bResEff,Eff_Poison,3000; }
+5006,Machoman_Glasses,Machoman's Glasses,5,36000,0,100,,1,,0,10477567,2,512,,0,92,{},{}
+5007,Grand_Circlet,Grand Circlet,5,20,0,200,,3,,0,10477567,2,256,,55,93,{},{ bonus bMdef,4; bonus bStr,1; bonus bInt,1; bonus bLuk,1; }
+5008,Puppy_Love,Puppy Love,5,20,0,100,,1,,0,10477567,2,256,,0,94,{},{}
+5009,Safety_Helmet,Safety Helmet,5,20,0,500,,3,,0,10477567,2,256,,0,95,{},{ bonus bMdef,3; bonus bUnbreakableHelm,0; }
+5010,Indian_Hair_Piece,Indian Fillet,5,20,0,100,,3,,0,10477567,2,256,,0,96,{},{}
+5011,Aerial,Aerial,5,20,0,100,,3,,0,10477567,2,256,,0,97,{},{}
+5012,Ph.D_Hat,Ph.D Hat,5,20,0,200,,3,,0,10477567,2,256,,0,98,{},{ bonus bMdef,3; }
5013,Horn_Of_Lord_Kaho,Lord Kaho's Horn,5,20,0,100,,5,,0,10477567,2,256,,0,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,20,0,300,,2,,0,16514,2,512,,65,100,{},{},,,,,,
-5015,Egg_Shell,Egg Shell,5,20,0,200,,3,,0,10477567,2,256,,0,101,{},{},,,,,,
-5016,Boy's_Cap,Boy's Cap,5,20,0,100,,2,,0,2088958,2,256,,0,102,{},{},,,,,,
-5017,Bone_Helm,Bone Helm,5,20,0,800,,7,,0,279714,2,256,,70,103,{},{ bonus2 bSubEle,7,-15; },,,,
-5018,Feather_Bonnet,Feather Bonnet,5,20,0,300,,4,,0,1574920,2,256,,0,104,{},{ bonus bAgi,1; },,,,,
-5019,Corsair,Corsair,5,20,0,500,,5,,0,2088958,2,256,,0,105,{},{ bonus bVit,1; },,,,,
-5020,Kafra_Band,Kafra's Band,5,20,0,500,,3,,0,10477567,2,256,,0,106,{},{ bonus bMdef,3; },,
+5014,Fin_Helm,Fin Helm,5,20,0,300,,2,,0,16514,2,512,,65,100,{},{}
+5015,Egg_Shell,Egg Shell,5,20,0,200,,3,,0,10477567,2,256,,0,101,{},{}
+5016,Boy's_Cap,Boy's Cap,5,20,0,100,,2,,0,10477567,2,256,,0,102,{},{}
+5017,Bone_Helm,Bone Helm,5,20,0,800,,7,,0,279714,2,256,,70,103,{},{ bonus2 bSubEle,7,-15; }
+5018,Feather_Bonnet,Feather Bonnet,5,20,0,300,,4,,0,1574920,2,256,,0,104,{},{ bonus bAgi,1; }
+5019,Corsair,Corsair,5,20,0,500,,5,,0,10477567,2,256,,0,105,{},{ bonus bVit,1; }
+5020,Kafra_Band,Kafra's Band,5,20,0,500,,3,,0,10477567,2,256,,0,106,{},{ bonus bMdef,3; }
5021,Bankruptcy_of_Heart,Money Loser's Grief,5,20,0,1200,,4,,0,263200,2,256,,38,107,{},{ bonus bInt,1; bonus bDex,1; },
5022,Solar_God_Helm,Solar God Helm,5,20,0,2400,,4,,0,2088832,2,768,,0,138,{},{ bonus bStr,3; bonus bInt,2; },
-5023,Parcel_Hat,Parcel Hat,5,20,0,1000,,0,,0,263200,2,256,,0,108,{},{},,,
-5024,Cake_Hat,Cake Hat,5,20,0,1500,,1,,0,10477567,2,256,,0,109,{},{},,,
+5023,Parcel_Hat,Parcel Hat,5,20,0,1000,,0,,0,263200,2,256,,0,108,{},{}
+5024,Cake_Hat,Cake Hat,5,20,0,1500,,1,,0,10477567,2,256,,0,109,{},{}
5025,Angel_Helm,Angel Helm,5,20,0,1600,,5,,0,2088832,2,256,,74,110,{},{ bonus bAgi,1; bonus bLuk,1; bonus bMdef,3; }
-5026,Chef_Hat,Chef's Hat,5,20,0,300,,1,,0,2088958,2,256,,50,111,{},{ bonus bDex,1; },,
+5026,Chef_Hat,Chef's Hat,5,20,0,300,,1,,0,10477567,2,256,,50,111,{},{ bonus bDex,1; }
5027,Mage_Hat,Mage Hat,5,20,0,300,,1,,0,66052,2,256,,0,112,{},{ bonus bInt,2; bonus bMaxSP,150; },
-5028,Candle,Candle,5,20,0,150,,5,,0,10477567,2,256,,0,113,{},{},,,
-5029,Spore_Hat,Spore Hat,5,20,0,900,,3,,0,2088958,2,256,,20,114,{},{},,,
-5030,Panda_Hat,Panda Hat,5,20,0,800,,3,,0,2088958,2,256,,40,115,{},{},,,
-5031,Miner's_Helmet,Miner's Helmet,5,20,0,1500,,4,,0,447986,2,256,,55,116,{},{ bonus bDex,2; },,
-5032,Sunday_Hat,Sunday Hat,5,20,0,800,,1,,0,2088958,2,256,,0,117,{},{},,,
-5033,Smokie_Hat,Smokie Hat,5,20,0,900,,3,,0,2088958,2,256,,50,118,{},{},,,
-5034,Lightbulb_Hairband,Lightbulb Hairband,5,20,0,500,,0,,0,2088958,2,256,,0,119,{},{},,,
-5035,Poring_Hat,Poring Hat,5,20,0,700,,2,,0,2088958,2,256,,38,120,{},{},,,
-5036,Cross_Hairband,Cross Hairband,5,20,0,250,,1,,0,2088958,2,256,,10,121,{},{},,,
-5037,Fruit_Shell,Apple Hat,5,20,0,150,,4,,0,10477567,2,256,,5,122,{},{},,,
-5038,Deviruchi_Hat,Deviruchi Hat,5,20,0,800,,2,,0,2088958,2,256,,64,123,{},{ bonus bStr,1; bonus bInt,1; },
-5039,Rainbow_Eggshell,Rainbow Eggshell,5,20,0,400,,4,,0,10477567,2,256,,19,124,{},{},,,
-5040,Blush,Blush,5,20,0,100,,0,,0,10477567,2,512,,0,125,{},{},,,
-5041,Heart_Hairpin,Heart Hairpin,5,20,0,100,,0,,0,10477567,2,256,,0,126,{},{},,,
-5042,Hair_Protector,Dumpling Decoration,5,20,0,150,,0,,0,2088958,2,256,,14,127,{},{},,,
-5043,Opera_Ghost_Mask,Opera Ghost Mask,5,20,0,200,,1,,0,2088958,2,512,,20,128,{},{},,,
-5044,Wing_Of_Demon,Wings of Demon,5,20,0,350,,2,,0,10477567,2,256,,45,129,{},{},,,
+5028,Candle,Candle,5,20,0,150,,5,,0,10477567,2,256,,0,113,{},{}
+5029,Spore_Hat,Spore Hat,5,20,0,900,,3,,0,10477567,2,256,,20,114,{},{}
+5030,Panda_Hat,Panda Hat,5,20,0,800,,3,,0,10477567,2,256,,40,115,{},{}
+5031,Miner's_Helmet,Miner's Helmet,5,20,0,1500,,4,,0,447986,2,256,,55,116,{},{ bonus bDex,2; }
+5032,Sunday_Hat,Sunday Hat,5,20,0,800,,1,,0,10477567,2,256,,0,117,{},{}
+5033,Smokie_Hat,Smokie Hat,5,20,0,900,,3,,0,10477567,2,256,,50,118,{},{}
+5034,Lightbulb_Hairband,Lightbulb Hairband,5,20,0,500,,0,,0,10477567,2,256,,0,119,{},{}
+5035,Poring_Hat,Poring Hat,5,20,0,700,,2,,0,10477567,2,256,,38,120,{},{}
+5036,Cross_Hairband,Cross Hairband,5,20,0,250,,1,,0,10477567,2,256,,10,121,{},{}
+5037,Fruit_Shell,Apple Hat,5,20,0,150,,4,,0,10477567,2,256,,5,122,{},{}
+5038,Deviruchi_Hat,Deviruchi Hat,5,20,0,800,,2,,0,10477567,2,256,,64,123,{},{ bonus bStr,1; bonus bInt,1; },
+5039,Rainbow_Eggshell,Rainbow Eggshell,5,20,0,400,,4,,0,10477567,2,256,,19,124,{},{}
+5040,Blush,Blush,5,20,0,100,,0,,0,10477567,2,512,,0,125,{},{}
+5041,Heart_Hairpin,Heart Hairpin,5,20,0,100,,0,,0,10477567,2,256,,0,126,{},{}
+5042,Hair_Protector,Dumpling Decoration,5,20,0,150,,0,,0,10477567,2,256,,14,127,{},{}
+5043,Opera_Ghost_Mask,Opera Ghost Mask,5,20,0,200,,1,,0,10477567,2,512,,20,128,{},{}
+5044,Wing_Of_Demon,Wings of Demon,5,20,0,350,,2,,0,10477567,2,256,,45,129,{},{}
5045,Magician_Hat,Magic Hat,5,20,0,500,,3,,0,554319315732,2,256,,50,130,{},{ bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50; }
-5046,Bongun_Hat,Bongun Hat,5,20,0,300,,5,,0,10477567,2,769,,0,139,{},{},,,
-5047,Fashion_Sunglasses,Fashion Sunglasses,5,20,0,100,,0,,0,2088958,2,256,,0,131,{},{},,,
-5048,Cresent_Hairpin,Cresent Hairpin,5,20,0,100,,0,,0,10477567,2,256,,0,132,{},{},,,
-5049,Striped_Bandana,Striped Bandana,5,20,0,150,,1,,0,10477567,2,256,,0,133,{},{},,,
-5050,Mysterious_Fruit_Shell,Mysterious Fruit Shell,5,20,0,300,,5,,0,10477567,2,256,,30,134,{},{},,,
-5051,Bell_of_Pussycat,Bell of Pussycat,5,20,0,100,,5,,0,10477567,2,1,,0,135,{},{},,,
-5052,Blue_Bandana,Blue Bandana,5,20,0,150,,1,,0,10477567,2,256,,0,136,{},{},,,
-5053,Sphinx_Hat,Sphinx Hat,5,20,0,3000,,5,,0,16514,2,256,,65,137,{},{ bonus bStr,2; },,
-5054,Assassin_Mask,Assassin Mask,5,20,0,100,,0,,0,4096,2,1,,70,180,{},{},,,
-5055,Novice_Eggshell,Novice Eggshell,5,20,0,10,,3,,0,8388609,2,256,,0,101,{},{},,,
-5056,Seed_Of_Love,Seed Of Love,5,20,0,200,,0,,0,2088958,2,256,,0,140,{},{}
+5046,Bongun_Hat,Bongun Hat,5,20,0,300,,5,,0,10477567,2,769,,0,139,{},{}
+5047,Fashion_Sunglasses,Fashion Sunglasses,5,20,0,100,,0,,0,10477567,2,256,,0,131,{},{}
+5048,Cresent_Hairpin,Cresent Hairpin,5,20,0,100,,0,,0,10477567,2,256,,0,132,{},{}
+5049,Striped_Bandana,Striped Bandana,5,20,0,150,,1,,0,10477567,2,256,,0,133,{},{}
+5050,Mysterious_Fruit_Shell,Mysterious Fruit Shell,5,20,0,300,,5,,0,10477567,2,256,,30,134,{},{}
+5051,Bell_of_Pussycat,Bell of Pussycat,5,20,0,100,,5,,0,10477567,2,1,,0,135,{},{}
+5052,Blue_Bandana,Blue Bandana,5,20,0,150,,1,,0,10477567,2,256,,0,136,{},{}
+5053,Sphinx_Hat,Sphinx Hat,5,20,0,3000,,5,,0,16514,2,256,,65,137,{},{ bonus bStr,2; }
+5054,Assassin_Mask,Assassin Mask,5,20,0,100,,0,,0,4096,2,1,,70,180,{},{}
+5055,Novice_Eggshell,Novice Eggshell,5,20,0,10,,3,,0,8388609,2,256,,0,101,{},{}
+5056,Seed_Of_Love,Seed Of Love,5,20,0,200,,0,,0,10477567,2,256,,0,140,{},{}
5057,Black_Cat_Ears,Black Cat Ears,5,20,0,200,,2,,0,10477567,2,256,,45,141,{},{}
-5058,Resting_Cat,Resting Cat,5,20,0,500,,1,,0,2088958,2,256,,0,142,{},{ bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15; }
+5058,Resting_Cat,Resting Cat,5,20,0,500,,1,,0,10477567,2,256,,0,142,{},{ bonus bMDef,15; bonus2 bResEff,Eff_Curse,3000; }
5059,Bear_Hat,Bear Hat,5,20,0,800,,3,,0,10477567,2,256,,50,143,{},{}
5060,Pointy_Cap,Pointy Cap,5,20,0,300,,3,,0,10477567,2,256,,0,144,{},{ bonus bLuk,1; }
5061,Flower_Hairpin,Flower Hairpin,5,20,0,100,,1,,0,10477567,2,256,,0,145,{},{}
5062,Straw_Hat,Straw Hat,5,20,0,200,,3,,0,10477567,2,256,,50,146,{},{ bonus bAgi,1; }
-5063,Bandaid,Bandaid,5,20,0,100,,1,,0,2088958,2,256,,0,147,{},{}
+5063,Bandage,Bandage,5,20,0,100,,1,,0,10477567,2,256,,0,147,{},{}
5064,Transformation_Leaf,Transformation Leaf,5,20,0,100,,1,,0,10477567,2,256,,0,148,{},{}
5065,Fresh_Blueish_Fish,Fresh Blueish Fish,5,20,0,500,,2,,0,10477567,2,256,,50,149,{},{ bonus2 bAddRace,5,10; }
-5066,Horns_Of_Succubus,Horns of Succubus,5,20,0,800,,4,,0,2088958,2,256,,70,150,{},{ bonus bInt,1; bonus bMdef,10; }
-5067,Sombrero,Sombrero,5,20,0,350,,4,,0,2088958,2,256,,0,151,{},{ bonus bAgi,1; }
+5066,Horns_Of_Succubus,Horns of Succubus,5,20,0,800,,4,,0,10477567,2,256,,70,150,{},{ bonus bInt,1; bonus bMdef,10; }
+5067,Sombrero,Sombrero,5,20,0,350,,4,,0,10477567,2,256,,0,151,{},{ bonus bAgi,1; }
5068,Ears_of_Demon,Ears Of Demon,5,20,0,100,,1,,0,10477567,2,512,,70,152,{},{ bonus bStr,1; }
-5069,Fox_Mask,Fox Mask,5,20,0,300,,1,,0,2088958,2,256,,0,153,{},{ bonus bAgi,1; bonus bLuk,1; }
-5070,Bandage,Bandage,5,20,0,100,,1,,0,2088958,2,256,,0,154,{},{ bonus bStr,2; }
-5071,Indian_Headband,Indian Headband,5,20,0,200,,1,,0,2088958,2,256,,0,155,{},{ bonus bDex,1; }
-5072,Horns_Of_Incubus,Horns Of Incubus,5,20,0,800,,4,,0,2088958,2,256,,70,156,{},{ bonus bAgi,1; bonus bMdef,10; }
-5073,Campus_Hat,Campus Hat,5,20,0,700,,2,,0,2088958,2,256,,0,157,{},{ bonus bDex,2; }
+5069,Fox_Mask,Fox Mask,5,20,0,300,,1,,0,10477567,2,256,,0,153,{},{ bonus bAgi,1; bonus bLuk,1; }
+5070,Burning_Blood_Bandana,Burning Blood Bandana,5,20,0,100,,1,,0,10477567,2,256,,0,154,{},{ bonus bStr,2; }
+5071,Indian_Headband,Indian Headband,5,20,0,200,,1,,0,10477567,2,256,,0,155,{},{ bonus bDex,1; }
+5072,Horns_Of_Incubus,Horns Of Incubus,5,20,0,800,,4,,0,10477567,2,256,,70,156,{},{ bonus bAgi,1; bonus bMdef,10; }
+5073,Posture_Fix_Hat,Posture Fix Hat,5,20,0,700,,2,,0,10477567,2,256,,0,157,{},{ bonus bDex,2; }
5074,Ears_of_Angel,Ears of Angel,5,20,0,100,,1,,0,10477567,2,512,,70,158,{},{ bonus bStr,1; }
5075,Cowboy_Hat,Cowboy Hat,5,20,0,500,,4,,0,10477567,2,256,,0,159,{},{}
-5076,Furry_Hat,Furry Hat,5,20,0,350,,2,,0,10477567,2,256,,0,160,{},{ bonus bLuk,1; }
+5076,Wool_Hat,Wool Hat,5,20,0,350,,2,,0,10477567,2,256,,0,160,{},{ bonus bLuk,1; }
5077,Tulip_Hairpin,Tulip Hairpin,5,20,0,100,,1,,0,10477567,2,256,,0,161,{},{}
5078,Sea_Otter_Hat,Sea Otter Hat,5,20,0,800,,3,,0,10477567,2,256,,50,162,{},{ bonus bVit,1; }
5079,X_Hairpin,X Hairpin,5,20,0,100,,1,,0,10477567,2,256,,0,163,{},{}
5080,Crown_of_the_Ancient_Queen,Crown of The Ancient Queen,5,20,0,400,,4,,0,10477567,2,256,,45,164,{},{}
-5081,Crown_of_Mistress,Crown of Mistress,5,20,0,100,,1,,0,2088958,0,256,,75,165,{},{ bonus bInt,2; bonus bMaxSP,100; }
+5081,Crown_of_Mistress,Crown of Mistress,5,20,0,100,,1,,0,10477567,0,256,,75,165,{},{ bonus bMaxSP,100; }
5082,Mushroom_Hairband,Mushroom Hairband,5,20,0,100,,2,,0,10477567,2,256,,0,166,{},{}
5083,Back_Ribbon,Back Ribbon,5,20,0,200,,1,,0,10477567,0,256,,45,167,{},{ bonus bMdef,10; }
-5084,Lazy_Raccoon_Hat,Lazy Racoon Hat,5,20,0,500,,1,,0,2088958,2,256,,0,168,{},{ bonus2 bResEff,Eff_Sleep,2000; }
+5084,Lazy_Raccoon_Hat,Lazy Racoon Hat,5,20,0,500,,1,,0,10477567,2,256,,0,168,{},{ bonus2 bResEff,Eff_Sleep,2000; }
5085,Small_Twin_Ribbons,Small Twin Ribbons,5,20,0,100,,1,,0,10477567,0,512,,45,169,{},{}
-5086,Sad_Mask,Sad Mask,5,20,0,100,,2,,0,10477567,2,513,,0,170,{},{ bonus2 bResEff,Eff_Blind,5000; }
+5086,Alarm_Mask,Alarm Mask,5,20,0,100,,2,,0,10477567,2,513,,0,170,{},{ bonus2 bResEff,Eff_Blind,5000; }
5087,Expressionless_Mask,Expressionless Mask,5,20,0,100,,1,,0,10477567,2,513,,0,171,{},{}
5088,Surprised_Mask,Surprised Mask,5,20,0,100,,1,,0,10477567,2,513,,0,172,{},{}
5089,Annoyed_Mask,Annoyed Mask,5,20,0,100,,1,,0,10477567,2,513,,0,173,{},{}
-5090,Mask_of_the_Goblin_Leader,Mask of The Goblin Leader,5,20,0,100,,2,,0,10477567,2,513,,0,174,{},{}
-5091,Big_Golden_Bell,Big Golden Bell,5,20,0,200,,2,,0,2088958,2,768,,35,175,{},{}
+5090,Goblin_Leader_Mask,Goblin Leader Mask,5,20,0,100,,2,,0,10477567,2,513,,0,174,{},{}
+5091,Golden_Bells,Golden Bells,5,20,0,200,,2,,0,10477567,2,768,,35,175,{},{}
5092,Nun_Hat,Nun Hat,5,20,0,300,,5,,0,33024,0,768,,65,176,{},{}
5093,Nun_Hat_,Nun Hat,5,20,0,300,,5,,0,33024,0,768,,65,177,{},{ bonus bMaxSP,100; }
-5094,Orc_Hero_Helm,Orc Hero Helm,5,20,0,900,,5,,0,2088958,2,768,,55,178,{},{ bonus bStr,2; bonus bVit,1; }
-5096,Assassin_Mask_,Assassin Mask,5,20,0,100,,0,,0,4096,2,1,,70,180,{},{},,,
+5094,Orc_Hero_Helm,Orc Hero Helm,5,20,0,900,,5,,0,10477567,2,768,,55,178,{},{ bonus bStr,2; bonus bVit,1; }
+5096,Assassin_Mask_,Assassin Mask,5,20,0,100,,0,,0,4096,2,1,,70,180,{},{}
5097,Annual_Commemoration_Hat,Annual Commemoration Hat,5,20,0,30,,3,,0,10477567,2,256,,0,166,{},{ bonus bAllStats,3; }
5098,Tiger_Mask,Tiger Mask,5,20,0,400,,2,,,10477567,2,768,,,181,{},{ bonus bStr,3; bonus bMaxHP,100; }
+5099,Neko_Mimi,Neko Mimi,5,20,0,300,,1,,,10477567,2,256,,,182,{},{ bonus bLuk,2; bonus bMdef,10; bonus2 bSubRace,2,5; }
+5100,Sale_Sign,Sale Sign,5,20,0,800,,1,,0,10477567,2,256,,75,183,{},{ bonus bStr,1; bonus bAgi,1; bonus bLuk,1; }
+5101,Takius_Blindfold,Takius' Blindfold,5,20,0,100,,,,0,10477567,2,512,,,184,{},{}
+5102,Round_Eyes,Round Eyes,5,20,0,100,,,,0,10477567,2,512,,,185,{},{}
+5103,Sunflower_Pin,Sunflower Hairpin,5,20,0,600,,,,0,2088958,2,256,,30,186,{},{ bonus bAgi,2; bonus bCriticalRate,5; } //Not refinable
+5104,Black_Blindfold,Black Blindfold,5,20,0,100,,,,0,2088958,2,512,,,184,{},{ bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stan,200; }
// Misc items
//===================================================================
@@ -1423,7 +1594,7 @@
7108,Piece_of_Shield,Broken Shield,3,20,0,10,,,,,,,,,,,{},{}
7109,Shining_Spear_Blade,Shiny Spear Tip,3,20,0,10,,,,,,,,,,,{},{}
7110,Broken_Sword,Broken Sword,3,588,0,10,,,,,,,,,,,{},{}
-7111,Slick_Paper,String Paper,3,706,0,10,,,,,,,,,,,{},{}
+7111,Slick_Paper,Slick Paper,3,706,0,10,,,,,,,,,,,{},{}
7112,Sharp_Paper,Transparent Paper,3,906,0,10,,,,,,,,,,,{},{}
7113,Broken_Symbol_of_Pharaoh,Broken Symbol of Pharaoh,3,20,0,10,,,,,,,,,,,{},{}
7114,Masque_of_Tutankhamen,Sphinx Mask,3,20,0,10,,,,,,,,,,,{},{}
@@ -1473,7 +1644,7 @@
7158,Broken_Liquor_Bottle,Broken Liquor Bottle,3,160,0,10,,,,,,,,,,,{},{}
7159,Demon's_Nose,Demon's Nose,3,400,0,10,,,,,,,,,,,{},{}
7160,Passport_From_King,Passport From King,3,20,0,10,,,,,,,,,,,{},{}
-7161,Skin_of_the_Black_Bear,Skin of the Black Bear,3,384,0,10,,,,,,,,,,,{},{}
+7161,Bear_Skin,Bear Skin,3,384,0,10,,,,,,,,,,,{},{}
7162,Piece_of_Cloud,Piece of Cloud,3,390,0,10,,,,,,,,,,,{},{}
7163,Hard_Antennae,Hard Antennae,3,570,0,10,,,,,,,,,,,{},{}
7164,Very_Hard_Peach,Very Hard Peach,3,400,0,10,,,,,,,,,,,{},{}
@@ -1481,7 +1652,7 @@
7166,Soft_Silk_Fabric,Soft Silk Fabric,3,1200,0,10,,,,,,,,,,,{},{}
7167,Strange_Piece_of_Iron,Strange Piece of Iron,3,430,0,10,,,,,,,,,,,{},{}
7168,Big_Wing_of_Butterfly,Big Wing of Butterfly,3,614,0,10,,,,,,,,,,,{},{}
-7169,Tae_Guk_Tablet,Tae Guk Tablet,3,20,0,10,,,,,,,,,,,{},{}
+7169,Tae_Guk_Tablet,Tae Guk Tablet,3,280,0,10,,,,,,,,,,,{},{}
7170,Tuxedo,Tuxedo,5,43000,0,10,,0,,0,10477566,1,16,,0,0,{},{ changebase 22; }
7171,Skin_of_Panther,Skin of Panther,3,282,0,10,,,,,,,,,,,{},{}
7172,Claw_of_Panther,Claw of Panther,3,290,0,10,,,,,,,,,,,{},{}
@@ -1498,46 +1669,46 @@
7183,Letter_of_Younger_Sister,Letter of Younger Sister,3,20,0,10,,,,,,,,,,,{},{}
7184,Piano_Key,Piano Key,3,20,0,10,,,,,,,,,,,{},{}
7185,Quiz_Participation_Ticket,Quiz Participation Ticket,3,20,0,10,,,,,,,,,,,{},{}
-7186,Thin_Trunk,Thin Trunk,3,20,0,10,,,,,,,,,,,{},{}
-7187,Festival_Mask,Festival Mask,3,20,0,10,,,,,,,,,,,{},{}
-7188,Brown_Root,Brown_Root,3,20,0,10,,,,,,,,,,,{},{}
-7189,Wooden_Heart,Wooden Heart,3,20,0,10,,,,,,,,,,,{},{}
-7190,Hard_Back_Shell,Hard Back Shell,3,20,0,10,,,,,,,,,,,{},{}
+7186,Thin_Trunk,Thin Trunk,3,218,0,10,,,,,,,,,,,{},{}
+7187,Festival_Mask,Festival Mask,3,100,0,10,,,,,,,,,,,{},{}
+7188,Brown_Root,Brown_Root,3,560,0,10,,,,,,,,,,,{},{}
+7189,Wooden_Heart,Wooden Heart,3,680,0,10,,,,,,,,,,,{},{}
+7190,Hard_Back_Shell,Hard Back Shell,3,140,0,10,,,,,,,,,,,{},{}
7191,Paper_Lantern,Paper Lantern,3,20,0,10,,,,,,,,,,,{},{}
-7192,Pin_Wheel,Pin Wheel,3,20,0,10,,,,,,,,,,,{},{}
-7193,Sprout,Sprout,3,20,0,10,,,,,,,,,,,{},{}
-7194,Soft_Grass_Leaf,Soft Grass Leaf,3,20,0,10,,,,,,,,,,,{},{}
-7195,Slingshot,Slingshot,3,20,0,10,,,,,,,,,,,{},{}
-7196,Shoulder_Guard,Shoulder Guard,3,20,0,10,,,,,,,,,,,{},{}
-7197,Durable_Vine,Durable Vine,3,20,0,10,,,,,,,,,,,{},{}
-7198,Huge_Leaf,Huge Leaf,3,20,0,10,,,,,,,,,,,{},{}
+7192,Pin_Wheel,Pin Wheel,3,160,0,10,,,,,,,,,,,{},{}
+7193,Sprout,Sprout,3,230,0,10,,,,,,,,,,,{},{}
+7194,Soft_Grass_Leaf,Soft Grass Leaf,3,400,0,10,,,,,,,,,,,{},{}
+7195,Slingshot,Slingshot,3,210,0,10,,,,,,,,,,,{},{}
+7196,Shoulder_Guard,Shoulder Guard,3,230,0,10,,,,,,,,,,,{},{}
+7197,Durable_Vine,Durable Vine,3,500,0,10,,,,,,,,,,,{},{}
+7198,Huge_Leaf,Huge Leaf,3,610,0,10,,,,,,,,,,,{},{}
7199,Hieroglyphic,Hieroglyphic,3,20,0,10,,,,,,,,,,,{},{}
-7200,Elastic_Band,Elastic Band,3,20,0,10,,,,,,,,,,,{},{}
-7201,Log,Log,3,20,0,10,,,,,,,,,,,{},{}
-7202,Insect_Pinchers,Insect Pinchers,3,20,0,10,,,,,,,,,,,{},{}
-7203,Healthy_Branch,Healthy Branch,3,20,0,10,,,,,,,,,,,{},{}
+7200,Elastic_Band,Elastic Band,3,380,0,10,,,,,,,,,,,{},{}
+7201,Log,Log,3,250,0,10,,,,,,,,,,,{},{}
+7202,Insect_Pinchers,Insect Pinchers,3,290,0,10,,,,,,,,,,,{},{}
+7203,Healthy_Branch,Healthy Branch,3,190,0,10,,,,,,,,,,,{},{}
7204,Gun_Powder,Gun Powder,3,20,0,10,,,,,,,,,,,{},{}
-7205,Black_Piece_of_Cloth,Black Piece of Cloth,3,20,0,10,,,,,,,,,,,{},{}
-7206,Cat_Doll,Black Cat Doll,3,20,0,10,,,,,,,,,,,{},{}
-7207,Old_Mantle,Old Mantle,3,20,0,10,,,,,,,,,,,{},{}
-7208,Rusted_Knife,Rusted Knife,3,20,0,10,,,,,,,,,,,{},{}
-7209,Dullahan's_Helm,Dullahan's Helm,3,20,0,10,,,,,,,,,,,{},{}
-7210,Piece_of_Dullahan's_Armor,Dullahan's Armor Piece,3,20,0,10,,,,,,,,,,,{},{}
-7211,Rosetta_Stone_Fragment,Rosetta Stone Fragment,3,20,0,10,,,,,,,,,,,{},{}
-7212,Hanging_Doll,Hanging Doll,3,20,0,10,,,,,,,,,,,{},{}
-7213,Pin_Cusion,Pin Cusion,3,20,0,10,,,,,,,,,,,{},{}
-7214,Bat_Cage,Bat Cage,3,20,0,10,,,,,,,,,,,{},{}
-7215,Broken_Needle,Broken Needle,3,20,0,10,,,,,,,,,,,{},{}
-7216,Red_Scarf,Red Scarf,3,20,0,10,,,,,,,,,,,{},{}
-7217,Spool_of_Thread,Spool of Thread,3,20,0,10,,,,,,,,,,,{},{}
-7218,Rotted_Rope,Rotted Rope,3,20,0,10,,,,,,,,,,,{},{}
-7219,Striped_Socks,Striped Socks,3,20,0,10,,,,,,,,,,,{},{}
-7220,Ectoplasm,Ectoplasm,3,20,0,10,,,,,,,,,,,{},{}
-7221,Chains,Chains,3,20,0,10,,,,,,,,,,,{},{}
-7222,Old_Tree_Branch,Old Tree Branch,3,20,0,10,,,,,,,,,,,{},{}
-7223,Ruined_Self_Portrait,Ruined Self Portrait,3,20,0,10,,,,,,,,,,,{},{}
+7205,Black_Piece_of_Cloth,Black Piece of Cloth,3,526,0,10,,,,,,,,,,,{},{}
+7206,Cat_Doll,Black Cat Doll,3,1440,0,10,,,,,,,,,,,{},{}
+7207,Old_Mantle,Old Mantle,3,1050,0,10,,,,,,,,,,,{},{}
+7208,Rusted_Knife,Rusted Knife,3,1780,0,10,,,,,,,,,,,{},{}
+7209,Dullahan's_Helm,Dullahan's Helm,3,1350,0,10,,,,,,,,,,,{},{}
+7210,Piece_of_Dullahan's_Armor,Dullahan's Armor Piece,3,750,0,10,,,,,,,,,,,{},{}
+7211,Rosetta_Stone_Fragment,Rosetta Stone Fragment,3,2600,0,10,,,,,,,,,,,{},{}
+7212,Hanging_Doll,Hanging Doll,3,1020,0,10,,,,,,,,,,,{},{}
+7213,Pin_Cusion,Pin Cusion,3,832,0,10,,,,,,,,,,,{},{}
+7214,Bat_Cage,Bat Cage,3,880,0,10,,,,,,,,,,,{},{}
+7215,Broken_Needle,Broken Needle,3,690,0,10,,,,,,,,,,,{},{}
+7216,Red_Scarf,Red Scarf,3,660,0,10,,,,,,,,,,,{},{}
+7217,Spool_of_Thread,Spool of Thread,3,424,0,10,,,,,,,,,,,{},{}
+7218,Rotted_Rope,Rotted Rope,3,390,0,10,,,,,,,,,,,{},{}
+7219,Striped_Socks,Striped Socks,3,920,0,10,,,,,,,,,,,{},{}
+7220,Ectoplasm,Ectoplasm,3,332,0,10,,,,,,,,,,,{},{}
+7221,Chains,Chains,3,740,0,10,,,,,,,,,,,{},{}
+7222,Old_Tree_Branch,Old Tree Branch,3,468,0,10,,,,,,,,,,,{},{}
+7223,Ruined_Self_Portrait,Ruined Self Portrait,3,2032,0,10,,,,,,,,,,,{},{}
7224,Philosophers_Stone,Philosopher's Stone,3,20,0,10,,,,,,,,,,,{},{}
-7225,Silk_Lantern,Silk Lantern,3,20,0,10,,,,,,,,,,,{},{}
+7225,Silk_Lantern,Silk Lantern,3,486,0,10,,,,,,,,,,,{},{}
7226,Hallucination_Pill,Hallucination Pill,3,20,0,10,,,,,,,,,,,{},{}
7227,TCG_Card,TCG Card,3,20,0,10,,,,,,,,,,,{},{}
7228,Gold_Nugget,Gold Nugget,3,20,0,300,,,,,,,,,,,{},{}
@@ -1548,6 +1719,7 @@
7233,Mysterious_Ore,Mysterious Ore,3,20,0,150,,,,,,,,,,,{},{}
// RWC Reward items
+//===================================================================
7234,Spirit_of_Guild,Spirit of Guild,3,20,0,10,,,,,,,,,,,{},{}
7235,Spirit_of_Assault,Spirit of Assault,3,20,0,10,,,,,,,,,,,{},{}
7236,Spirit_of_Defense,Spirit of Defense,3,20,0,10,,,,,,,,,,,{},{}
@@ -1567,53 +1739,84 @@
7250,Spirit_of_Glory,Spirit of Glory,3,20,0,10,,,,,,,,,,,{},{}
7251,Spirit_of_Victory,Spirit of Victory,3,20,0,10,,,,,,,,,,,{},{}
-//Gonryun Items
+//Louyang Items
+//===================================================================
7252,Chinese_Medicine,Chinese Medicine,3,20,0,10,,,,,,,,,,,{},{}
7253,Golden_Flag,Golden Flag,3,20,0,10,,,,,,,,,,,{},{}
7254,Digitally_Printed_Ticket,Digitally Printed Ticket,3,20,0,10,,,,,,,,,,,{},{}
-7262,Paper_Fan,Paper Fan,3,233,0,,,,,,,,,,,,{},{}
+7262,Paper_Fan,Paper Fan,3,233,0,10,,,,,,,,,,,{},{}
7263,Cat's_Eye,Cat's-Eye,3,20,477,10,,,,,,,,,,,{},{}
7264,Dried_Sand,Dried Sand,3,20,161,10,,,,,,,,,,,{},{}
7265,Dragon_Horn,Dragon Horn,3,20,0,10,,,,,,,,,,,{},{}
-7266,Dragon_Teeth,Dragon Teeth,3,218,0,,,,,,,,,,,,{},{}
+7266,Dragon_Teeth,Dragon Teeth,3,218,0,10,,,,,,,,,,,{},{}
7267,Tigerskin_Underwear,Tigerskin Underwear,3,20,107,10,,,,,,,,,,,{},{}
7268,Ghost_Doll,Ghost Doll,3,20,605,10,,,,,,,,,,,{},{}
7269,Baby_Bib,Baby Bib,3,20,0,10,,,,,,,,,,,{},{}
-7270,Baby_Bottle,Baby Bottle,3,20,0,,,,,,,,,,,,{},{}
+7270,Baby_Bottle,Baby Bottle,3,20,0,10,,,,,,,,,,,{},{}
7271,Novice_Statue,Novice Statue,3,20,0,10,,,,,,,,,,,{},{}
7272,Dumpling_Doll,Dumpling Doll,3,20,0,10,,,,,,,,,,,{},{}
-7273,RWC_Necklace,RWC_Necklace,3,20,0,10,,,,,,,,,,,{},{}
-7274,Ancient_Language_Book,Ancient_Language_Book,3,20,0,10,,,,,,,,,,,{},{}
-7275,Ancient_Language_Document,Ancient_Language_Document,3,20,0,10,,,,,,,,,,,{},{}
-7276,Picture_Letter,Picture Letter,3,20,0,10,,,,,,,,,,,{},{}
+7273,RWC_Necklace,RWC Necklace,3,20,0,10,,,,,,,,,,,{},{}
+7274,Ancient_Language_Book,Translated Ancient Language,3,20,0,10,,,,,,,,,,,{},{}
+7275,Ancient_Language_Document,Record of Ancient Language,3,20,0,10,,,,,,,,,,,{},{}
+7276,Picture_Letter,Doodled Message,3,20,0,10,,,,,,,,,,,{},{}
7277,Munak_Doll,Munak Doll,3,20,0,10,,,,,,,,,,,{},{}
7278,Welfare_Letter,Welfare Letter,3,20,0,10,,,,,,,,,,,{},{}
7279,Vita_500_Bottlecap,Vita 500 Bottlecap,3,20,0,10,,,,,,,,,,,{},{}
-7280,Quiz_Participation_Certificate_1,QP Certificate 1,3,20,0,10,,,,,,,,,,,{},{}
-7281,Quiz_Participation_Certificate_2,QP Certificate 2,3,20,0,10,,,,,,,,,,,{},{}
-7282,Quiz_Participation_Certificate_3,QP Certificate 3,3,20,0,10,,,,,,,,,,,{},{}
-7283,Quiz_Participation_Certificate_4,QP Certificate 4,3,20,0,10,,,,,,,,,,,{},{}
-7284,Quiz_Participation_Certificate_5,QP Certificate 5,3,20,0,10,,,,,,,,,,,{},{}
+7280,Quiz_Participation_Certificate_1,1st Quiz Entry,3,20,0,10,,,,,,,,,,,{},{}
+7281,Quiz_Participation_Certificate_2,2nd Quiz Entry,3,20,0,10,,,,,,,,,,,{},{}
+7282,Quiz_Participation_Certificate_3,3rd Quiz Entry,3,20,0,10,,,,,,,,,,,{},{}
+7283,Quiz_Participation_Certificate_4,4th Quiz Entry,3,20,0,10,,,,,,,,,,,{},{}
+7284,Quiz_Participation_Certificate_5,5th Quiz Entry,3,20,0,10,,,,,,,,,,,{},{}
// 11/09(Ayothana) Items
-7285,Sacred_Wool_Charm,Sacred_Wool_Charm,3,20,10,0,,,,,,,,,,,{},{},,
-7286,Red_Chili,Red_Chili,3,20,10,0,,,,,,,,,,,{},{},,
-7287,Sacred_Wool_Charm_2,Sacred_Wool_Charm_2,3,20,10,0,,,,,,,,,,,{},{},,
-7288,Engagement_Ring,Engagement_Ring,3,20,10,0,,,,,,,,,,,{},{},,
-7289,Olivite,Olivite,3,20,100,0,,,,,,,,,,,{},{},,
-7290,Gold_Mica,Gold_Mica,3,20,100,0,,,,,,,,,,,{},{},,
-7291,Agate,Agate,3,20,100,0,,,,,,,,,,,{},{},,
-7292,White_Mica,White_Mica,3,20,100,0,,,,,,,,,,,{},{},,
-7293,Rose_Quartz,Rose_Quartz,3,20,100,0,,,,,,,,,,,{},{},,
-7294,Turquoise,Turquoise,3,20,100,0,,,,,,,,,,,{},{},,
-7295,Citrine,Citrine,3,20,100,0,,,,,,,,,,,{},{}
-7296,Augite,Augite,3,20,100,0,,,,,,,,,,,{},{},,
-7297,Black_Mica,Black_Mica,3,20,100,0,,,,,,,,,,,{},{},,
-7298,Leaf_Cloth,Leaf_Cloth,3,20,10,0,,,,,,,,,,,{},{},,
-7299,Bamboo_Basket,Bamboo_Basket,3,20,10,0,,,,,,,,,,,{},{},,
-7300,Jeweled_Ore,Jeweled_Ore,3,20,10,0,,,,,,,,,,,{},{}
-7301,Knife_Decoration,Knife_Decoration,3,20,10,0,,,,,,,,,,,{},{},,
-7302,Krathong,Krathong,3,20,10,0,,,,,,,,,,,{},{},,
+7285,Sacred_Wool_Charm,Sacred Siltarae,3,20,0,10,,,,,,,,,,,{},{}
+7286,Red_Chili,Red Chili,3,20,0,10,,,,,,,,,,,{},{}
+7287,Sacred_Wool_Charm_2,Sacred Siltarae 2,3,20,0,10,,,,,,,,,,,{},{}
+7288,Engagement_Ring,Engagement Ring,3,20,0,10,,,,,,,,,,,{},{}
+7289,Olivite,Olivite,3,20,0,100,,,,,,,,,,,{},{}
+7290,Gold_Mica,Gold Mica,3,20,0,100,,,,,,,,,,,{},{}
+7291,Agate,Agate,3,20,0,100,,,,,,,,,,,{},{}
+7292,White_Mica,White Mica,3,20,0,100,,,,,,,,,,,{},{}
+7293,Rose_Quartz,Rose Quartz,3,20,0,100,,,,,,,,,,,{},{}
+7294,Turquoise,Turquoise,3,20,0,100,,,,,,,,,,,{},{}
+7295,Citrine,Citrine,3,20,0,100,,,,,,,,,,,{},{}
+7296,Augite,Augite,3,20,0,100,,,,,,,,,,,{},{}
+7297,Black_Mica,Black Mica,3,20,0,100,,,,,,,,,,,{},{}
+7298,Leaf_Cloth,Leaf Cloth,3,20,0,10,,,,,,,,,,,{},{}
+7299,Bamboo_Basket,Bamboo Basket,3,20,0,10,,,,,,,,,,,{},{}
+7300,Jeweled_Ore,Jeweled Ore,3,20,0,10,,,,,,,,,,,{},{}
+7301,Knife_Decoration,Knife Decoration,3,20,0,10,,,,,,,,,,,{},{}
+7302,Krathong,Krathong,3,20,0,10,,,,,,,,,,,{},{}
+7303,Rice_Bag,Rice Straw Bag,3,20,0,800,,,,,,,,,,,{},{}
+
+// 2005
+7304,Witchs_Spellbook,Witch's Spellbook,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7305,Unknown_item,Authority of 9 worlds,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7306,Piece_of_Soul,Piece of Soul,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7307,Whisper_of_Soul,Whisper of Soul,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7308,Witchs_Potion,Witch's Potion,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7309,Crows_Wing,Crow's Wing,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7310,Peco_Coupon,Pecopeco Free Coupon,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7311,Airship_Coupon,Airship Free Coupon,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7312,Jubile,Jubilaeum,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7313,Witch's_Voucher,Witch's Voucher,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7314,The_Sign,The Sign,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+
+7315,Black_Quartz_Piece,Piece of Black Quartz,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7316,Insect_Long_leg,Insect's Long Leg,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7317,Rusted_Bolt,Rusted Bolt,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7318,Old_Pick,Old Pick,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7319,Old_Iron_Plate,Old Iron Plate,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7320,Dust,Dust,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7321,Quartz_Piece,Piece of Quartz,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7322,Poison_Gas,Poison Gas,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7323,Battered_Kettle,Battered Kettle,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7324,Toothed_Wheel,Gear,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7325,Tube,Tube,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7326,Fluorescent_Colored_Liquid,Fluorescent Liquid,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7327,Flashlight,Flashlight,3,20,0,10,0,0,0,0,0,0,0,0,0,0,{},{}
+7328,Songkran_Legend,Songkran Legend,3,20,0,10,0,0,0,0,0,0,0,0,0,0,0,{},{}
+7329,Old_Copper_Key,Old Copper Key,3,20,0,10,0,0,0,0,0,0,0,0,0,0,0,{},{}
7500,THG_Membership,THG Membership,3,20,0,10,,,,,,,,,,,{},{}
7501,Token_Bag,Token Bag,3,20,0,10,,,,,,,,,,,{},{}
@@ -1684,8 +1887,8 @@
11006,Payon_History_Book,Payon History Book,3,20,0,0,,,,,,,,,,,{},{}
11007,History_Book,Unknown Item,3,20,0,0,,,,,,,,,,,{},{}
11009,History_Book,Unknown Item,3,20,0,0,,,,,,,,,,,{},{}
-11010,Archer_Village_History_Book,Unknown Item,3,20,0,0,,,,,,,,,,,{},{}
-11011,Lutie_History_Book,Luite History Book,3,20,0,0,,,,,,,,,,,{},{}
+11010,Archer_Village_History_Book,Archer Village History Book,3,20,0,0,,,,,,,,,,,{},{}
+11011,Lutie_History_Book,Lutie History Book,3,20,0,0,,,,,,,,,,,{},{}
11012,Jawaii_History_Book,Jawaii History Book,3,20,0,0,,,,,,,,,,,{},{}
11013,Gonryun_History_Book,Gonryun History Book,3,20,0,0,,,,,,,,,,,{},{}
11014,Mjolnir_History_Book,Mjolnir History Book,3,20,0,0,,,,,,,,,,,{},{}
@@ -1695,3 +1898,33 @@
11018,Morroc_History_Book,Morroc History Book,3,20,0,0,,,,,,,,,,,{},{}
11019,Comodo_History_Book,Comodo History Book,3,20,0,0,,,,,,,,,,,{},{}
11020,Louyang_History_Book,Louyang History Book,3,20,0,0,,,,,,,,,,,{},{}
+
+// More Scrolls
+//===================================================================
+12000,Frost_Diver_5,Frost Diver Level 5,2,700,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 15,5,"Frost Diver Level 5"; },{}
+12001,Heal_3,Heal Level 3,2,1000,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 28,3,"Heal Level 3"; },{}
+12002,Heal_5,Heal Level 5,2,2000,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 28,5,"Heal Level 5"; },{}
+12003,Teleport_1,Teleport Level 1,2,100,0,10,0,0,0,0,10477567,2,0,0,0,0,{ itemskill 26,1,"Teleport Level 1"; },{}
+
+// Arrow Quivers
+//===================================================================
+12004,Arrow_Quiver,Arrow Quiver,2,500,,250,,,,,10477567,2,,,,,{ getitem 1750,500; },{}
+12005,Iron_Arrow_Quiver,Iron Arrow Quiver,2,1000,,250,,,,,10477567,2,,,,,{ getitem 1770,500; },{}
+12006,Steel_Arrow_Quiver,Steel Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1753,500; },{}
+12007,Oridecon_Arrow_Quiver,Oridecon Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1765,500; },{}
+12008,Fire_Arrow_Quiver,Fire Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1752,500; },{}
+12009,Silver_Arrow_Quiver,Silver Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1751,500; },{}
+12010,Arrow_of_Wind_Quiver,Arrow of Wind Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1755,500; },{}
+12011,Stone_Arrow_Quiver,Stone Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1756,500; },{}
+12012,Crystal_Arrow_Quiver,Crystal Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1754,500; },{}
+12013,Shadow_Arrow_Quiver,Shadow Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1767,500; },{}
+12014,Immaterial_Arrow_Quiver,Immaterial Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1757,500; },{}
+12015,Rusty_Arrow_Quiver,Rusty Arrow Quiver,2,1500,,250,,,,,10477567,2,,,,,{ getitem 1762,500; },{}
+
+12016,Speed_Increasing_Potion,Speed Potion,2,1000,0,100,,,,,10477567,2,,,,,{},{}
+12017,Speed_Decreasing_Potion,Speed Potion,2,1000,0,100,,,,,10477567,2,,,,,{},{}
+12018,Fire_Cracker,Fire Cracker,2,250,0,20,,,,,10477567,2,,,,,{ misceffect(256); },{}
+
+// 2005
+12019,Sacred_Egg,Sacred Egg,2,20,0,150,,,,,10477567,2,,,,,{},{} //Acts like Yggdra
+12020,Dark_Water,Dark Water,2,20,0,10,,,,,10477567,2,,,,,{},{}
diff --git a/db/item_db2.txt b/db/item_db2.txt
new file mode 100644
index 000000000..67f130811
--- /dev/null
+++ b/db/item_db2.txt
@@ -0,0 +1,6 @@
+//ID,Name,Name,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Gender,Loc,wLV,eLV,View,{UseScript},{EquipScript}
+//Elements: 0 Nothing, 1 Water, 2 Earth ,3 Fire, 4 Wind, 5 Poison, 6 Saint, 7 Darkness, 8 Sense, 9 Immortality
+
+// Custom Items go here
+//=============================================================
+0,DEFAULT,Default,0,20,,10,,,,,0,2,0,0,,,{},{} \ No newline at end of file
diff --git a/db/item_findingore.txt b/db/item_findingore.txt
new file mode 100644
index 000000000..d14d14f29
--- /dev/null
+++ b/db/item_findingore.txt
@@ -0,0 +1,24 @@
+// zΔ­Œ©ƒXƒLƒ‹‚Ńhƒƒbƒv‚³‚ê‚ézÎ
+// item ID, Jname (dummy), Šm—¦‚ð 1 –œ”{ (100% ‚È‚ç 1000000)
+// 0 ‚̓fƒtƒHƒ‹ƒg€–Ú
+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_noequip.txt b/db/item_noequip.txt
index 5eb369733..81763e81e 100644
--- a/db/item_noequip.txt
+++ b/db/item_noequip.txt
@@ -1,4 +1,7 @@
-// The equipment restriction file
+// The equipment/items restriction file
// here equipment at PvP and GvG
-// where it is possible to restrict, the prescribed form: < ItemID> < Mode>
+// where it is possible to restrict, the prescribed form: <item id>,<mode>
// mode = 1- So with PvP restriction, 2- GvG restriction, 3- PvP and GvG which restriction
+
+//1201,1 you can't use KNIFE(ID 1201) on PvP
+//608,3 you can't use Yggdrasil Seed(ID 608) on both PvP & GvG \ No newline at end of file
diff --git a/db/item_violetbox.txt b/db/item_violetbox.txt
index c7f442af7..3fba75ecd 100644
--- a/db/item_violetbox.txt
+++ b/db/item_violetbox.txt
@@ -7,6 +7,8 @@
2104,Buckler,10000
2106,Shield,10000
2108,Mirror Shield,10000
+2202,Sunglasses,10000
+2204,Glasses,10000
2207,Fancy Flower,10000
2209,Ribbon,10000
2213,Kitty Band,10000
diff --git a/db/mob_avail.txt b/db/mob_avail.txt
index 0a079b507..1220dba3a 100644
--- a/db/mob_avail.txt
+++ b/db/mob_avail.txt
@@ -9,8 +9,12 @@
//1002,1039 //Poring,Baphomet (Make Porings look like Baphomet)
// eAthena Dev Team
+// Valaris
1900,12,1,1,1,16,0,67,12,54,16,1
+// Valaris Worshiping
1901,6,1,1,1,1,2,67,12,54,0,1
+// MC Cameri
+1902,14,1,6,6,16,14,0,0,0,32,3
1920,1047,0
1921,1093,0
diff --git a/db/mob_branch.txt b/db/mob_branch.txt
index ba5c8721a..a84a9f381 100644
--- a/db/mob_branch.txt
+++ b/db/mob_branch.txt
@@ -5,6 +5,8 @@
// ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å–¢ŽÀ‘•‚Ì‚à‚Ì‚ð‘‚­‚ƃNƒ‰ƒCƒAƒ“ƒg‚ªd—̓Gƒ‰[
// ‚»‚µ‚Ä‚»‚Ì“G‚ªƒLƒƒƒ‰ƒNƒ^[‚Ì•t‹ß‚É‚¢‚éŠÔƒƒOƒCƒ“‚Å‚«‚È‚¢‚Ì‚Å’ˆÓB
+// Never add an MVP Monster in the DB (Only SAGE's Hocus Pocus on Alchemyst's Flora can make MVP)
+
0,SCORPION,Scorpion,1001
1001,Scorpion,1000000
1002,Poring,1000000
@@ -23,10 +25,12 @@
1018,Creamy,1000000
1019,PecoPeco,1000000
1020,Mandragora,1000000
+//1022,Werewolf,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
@@ -37,14 +41,14 @@
1035,Hunter Fly,1000000
1036,Ghoul,1000000
1037,Sidewinder,1000000
-1038,Osiris,1000000
-1039,Baphomet,1000000
+//1038,Osiris,1000000
+//1039,Baphomet,1000000
1040,Golem,1000000
1041,Mummy,1000000
1042,Steel ChonChon,1000000
1044,Obeaune,1000000
1045,Marc,1000000
-1046,Doppelganger,1000000
+//1046,Doppelganger,1000000
1047,PecoPeco Egg,1000000
1048,Thief Bug Egg,1000000
1049,Picky,1000000
@@ -57,7 +61,7 @@
1056,Smokie,1000000
1057,Yoyo,1000000
1058,Metaller,1000000
-1059,Mistress,1000000
+//1059,Mistress,1000000
1060,Bigfoot,1000000
1061,Nightmare,1000000
1062,Santa Poring,1000000
@@ -79,8 +83,8 @@
1083,Shining Plant,1000000
1084,Black Mushroom,1000000
1085,Red Mushroom,1000000
-1086,Golden Thief Bug,1000000
-1087,Orc Hero,1000000
+//1086,Golden Thief Bug,1000000
+//1087,Orc Hero,1000000
1088,Vocal,1000000
1089,Toad,1000000
1090,Mastering,1000000
@@ -104,30 +108,30 @@
1109,Deviruchi,1000000
1110,Dokebi,1000000
1111,Drainliar,1000000
-1112,Drake,1000000
+//1112,Drake,1000000
1113,Drops,1000000
1114,Dustiness,1000000
-1115,Eddga,1000000
+//1115,Eddga,1000000
1116,Eggyra,1000000
1117,Evil Druid,1000000
1118,Flora,1000000
1119,Frilldora,1000000
1120,Ghostring,1000000
1121,Giearth,1000000
-1122,Goblin 1,1000000
-1123,Goblin 2,1000000
-1124,Goblin 3,1000000
-1125,Goblin 4,1000000
-1126,Goblin 5,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 1,1000000
-1134,Kobold 2,1000000
-1135,Kobold 3,1000000
+1133,Kobold,1000000
+1134,Kobold,1000000
+1135,Kobold,1000000
1138,Magnolia,1000000
1139,Mantis,1000000
1140,Marduk,1000000
@@ -137,21 +141,22 @@
1144,Marse,1000000
1145,Martin,1000000
1146,Matyr,1000000
-1147,Maya,1000000
+//1147,Maya,1000000
1148,Medusa,1000000
1149,Minorous,1000000
-1150,Moonlight Flower,1000000
+//1150,Moonlight Flower,1000000
1151,Myst,1000000
1152,Orc Skeleton,1000000
1153,Orc Zombie,1000000
1154,Pasana,1000000
1155,Earth Petite,1000000
1156,Sky Petite,1000000
-1157,Pharaoh,1000000
+//1157,Pharaoh,1000000
1158,Phen,1000000
-1159,Phreeoni,1000000
+//1159,Phreeoni,1000000
1160,Piere,1000000
1161,Plankton,1000000
+1162,Rafflesia,1000000
1163,Raydric,1000000
1164,Requiem,1000000
1165,Sandman,1000000
@@ -173,7 +178,7 @@
1186,Giant Whisper,1000000
1188,Bon Gun,1000000
1189,Orc Archer,1000000
-1190,Orc Lord,1000000
+//1190,Orc Lord,1000000
1191,Mimic,1000000
1192,Wraith,1000000
1193,Alarm,1000000
@@ -206,8 +211,8 @@
1248,Cruiser,1000000
1249,Myst Case,1000000
1250,Chepet,1000000
-1251,Stormy Knight,1000000
-1252,Garm,1000000
+//1251,Stormy Knight,1000000
+//1252,Garm,1000000
1253,Gargoyle,1000000
1254,Raggler,1000000
1255,Neraid,1000000
@@ -227,7 +232,7 @@
1269,Clock,1000000
1270,Tower Keeper,1000000
1271,Alligator,1000000
-1272,Dark Lord,1000000
+//1272,Dark Lord,1000000
1273,Orc Lady,1000000
1274,Megalith,1000000
1275,Alice,1000000
@@ -261,7 +266,7 @@
1309,Gajomart,1000000
1310,Majoruros,1000000
1311,Gullinbursti,1000000
-1312,Turtle General,1000000
+//1312,Turtle General,1000000
1313,Mobster,1000000
1314,Perimeter,1000000
1315,Assaulter,1000000
@@ -282,7 +287,7 @@
1370,Succubus,1000000
1371,Fake Angel,1000000
1372,Goat,1000000
-1373,Lord of Death,1000000
+//1373,Lord of Death,1000000
1374,Incubus,1000000
1375,The Paper,1000000
1376,Harpy,1000000
@@ -298,7 +303,7 @@
1386,Sleeper,1000000
1387,Gig,1000000
1388,Archangeling,1000000
-1389,Dracula,1000000
+//1389,Dracula,1000000
1390,Violy,1000000
1391,Galapago,1000000
1392,Rotar Zairo,1000000
@@ -317,14 +322,14 @@
1415,Baby Leopard,1000000
1416,Evil Nymph,1000000
1417,Zipper Bear,1000000
-1418,Evil Snake Lord,1000000
-1492,Incantation Samurai,1000000
+//1418,Evil Snake Lord,1000000
+//1492,Incantation Samurai,1000000
1493,Dryad,1000000
-1494,Kind of Beetle,1000000
+1494,Beetle King,1000000
1495,Stone Shooter,1000000
1497,Wooden Golem,1000000
-1498,Wooden Shooter,1000000
-1499,Wooden Fighter,1000000
+1498,Wootan Shooter,1000000
+1499,Wootan Fighter,1000000
1500,Parasite,1000000
1502,Fire Poring,1000000
1503,Gibbet,1000000
@@ -335,14 +340,14 @@
1508,Quve,1000000
1509,Lude,1000000
1510,Hylozoist,1000000
-1511,Amon Ra,1000000
+//1511,Amon Ra,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
-1518,Bacsojin,1000000
+//1518,Bacsojin,1000000
1519,Chung E,1000000
1520,Boiled Rice,1000000
1582,Deviling,1000000
diff --git a/db/mob_db.txt b/db/mob_db.txt
index f660720ef..1ef2bde7e 100644
--- a/db/mob_db.txt
+++ b/db/mob_db.txt
@@ -1,554 +1,535 @@
-//File created using Spamrat's Athena Database Editor v1.3.1
+//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
//
-//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,Item1,Item2,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
-//
-1001,SCORPION,Scorpion,24,1109,0,287,176,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,149,200,1564,864,576,990,70,904,5500,757,57,943,210,7041,100,508,200,625,20,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,4001,20,0,0,0,0,0,0,0,0,,
-1003,TESTEGG,Test Egg,2,10,0,10000,10000,0,3,9,99,0,1,99,1,1,1,1,10,12,0,4,22,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,137,150,1292,792,216,992,50,939,5500,909,3500,1208,15,511,350,518,100,512,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,133,150,1276,576,384,913,5500,1105,20,2209,15,601,50,514,100,507,700,645,50,4020,1,0,0,0,0,0,0,0,0,,
-1006,THIEF_BUG_LARVA,Thief Bug Larva,0,0,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,,
-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,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,128,1000,1001,1,1,1010,80,915,5500,938,600,2102,2,935,1000,938,600,1002,200,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,137,150,1148,648,480,917,6500,1702,150,715,80,1750,5500,517,400,916,2000,512,0,4015,2,0,0,0,0,0,0,0,0,,
-1010,WILLOW,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,1019,100,907,600,516,700,1068,3500,512,0,1066,2000,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,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,512,0,512,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,137,200,1054,54,432,1011,20,920,5500,2308,10,517,650,528,1050,919,5500,512,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,512,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,133,400,2612,912,288,957,5500,724,5,938,1000,958,50,727,55,512,0,512,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,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,139,200,988,288,768,955,3500,910,250,1108,15,928,200,507,400,716,50,1002,400,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,512,0,4040,3,0,0,0,0,0,0,0,0,,
-1019,PECOPECO,PecoPeco,13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,153,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,512,0,512,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,512,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,141,300,988,288,768,1011,40,928,5500,955,1500,1152,10,508,90,729,5,1116,50,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,181,200,1500,768,652,999,500,1034,4000,984,500,985,500,7017,800,714,380,1912,300,4091,50,0,0,0,0,0,0,0,0,,
-1023,ORC_WARRIOR,Orc Warrior,24,1400,0,261,160,1,104,126,10,5,1,24,48,25,34,10,10,12,1,7,22,133,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,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,4034,5,0,0,0,0,0,0,0,0,,
-1025,BOA,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,512,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,133,200,2468,768,288,901,5500,2264,1,2404,15,609,20,2337,1,2305,100,1558,5,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,129,200,2000,1000,500,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,133,200,2276,576,432,932,5500,756,60,1214,12,501,700,934,10,1201,150,1216,50,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,149,200,1384,768,336,936,5500,2233,5,2603,1,733,150,732,20,954,1000,731,5,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,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,512,0,512,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,512,0,2612,200,639,20,4107,1,0,0,0,0,0,0,0,0,,
-1033,ELDER_WILLOW,Elder Willow,20,693,0,163,101,1,58,70,10,30,1,20,25,35,38,30,10,12,1,3,43,133,200,1452,672,432,990,50,907,5500,1019,3500,757,37,2329,30,516,1000,512,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,512,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,133,150,676,576,480,996,30,999,100,943,5500,912,1300,756,129,2259,1,1226,2,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,11,49,133,250,2456,912,504,958,5500,756,110,509,670,506,800,2609,60,934,150,1260,1,4110,2,0,0,0,0,0,0,0,0,,
-1037,SIDEWINDER,Sidewinder,43,4929,0,1996,993,1,240,320,5,10,1,43,40,15,115,20,10,12,1,2,25,149,200,1576,576,576,954,5500,912,1400,756,134,1120,2,937,2500,926,5000,509,1000,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,181,100,1072,672,384,617,2000,1232,150,2235,200,1255,600,1009,1000,985,3500,984,3900,4144,1,7710,0,603,4000,608,3000,751,500,603,4000
-1039,BAPHOMET,Baphomet,81,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,181,100,1068,768,576,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,4147,1,13000,0,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,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,133,300,1772,72,384,930,5500,756,100,934,550,2604,1,2611,10,525,250,502,450,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,139,150,1076,576,480,992,70,999,30,910,2400,935,3500,943,30,998,200,1002,500,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,129,200,1500,800,600,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1872,672,288,995,13,950,5500,5014,1,2326,10,720,10,951,500,748,25,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,133,150,1272,72,480,995,18,956,5500,756,95,951,1000,720,10,717,200,509,600,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,181,100,480,480,288,2258,350,2317,250,1162,220,1168,150,1411,550,985,3800,984,2700,4142,1,5340,0,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,128,1000,1001,1,1,1010,250,935,1500,2102,2,501,400,501,400,713,1800,736,10,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,128,1000,701,1,1,1010,300,915,5000,2102,2,938,600,716,100,737,10,1002,350,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,512,0,4008,10,0,0,0,0,0,0,0,0,,
-1050,SHELL_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,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,139,150,1288,288,768,955,2500,2304,80,507,350,909,2000,2303,120,1002,350,512,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,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,139,200,988,288,768,955,3500,910,250,1108,15,928,200,507,400,716,50,1002,400,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,141,300,988,288,768,1011,40,928,5500,955,1500,1152,10,508,90,729,5,1116,50,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,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,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,139,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,512,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,139,200,1708,1008,540,990,60,940,6500,911,400,757,49,707,20,935,3000,512,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,181,100,1148,648,300,1413,150,518,10000,2249,250,616,1000,7018,10,985,4400,984,3300,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,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,149,150,1816,816,432,944,5500,510,500,2608,2,603,30,505,100,1261,1,984,60,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,512,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,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,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,133,150,1872,672,384,951,5500,756,115,2241,2,1461,2,949,3000,720,20,956,1500,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,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,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,512,0,4035,1,0,0,0,0,0,0,0,0,,
-1069,SWORDFISH,Swordfish,30,4299,0,529,319,1,168,199,5,20,1,30,30,41,62,30,10,12,2,5,41,133,200,1968,768,384,995,10,963,5500,756,33,2257,2,757,45,1117,25,956,600,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,4027,5,0,0,0,0,0,0,0,0,,
-1071,PIRATE_SKELETON,Pirate Skeleton,25,1676,0,233,142,1,145,178,10,15,1,13,25,5,25,10,10,12,1,1,29,133,200,1754,554,288,932,3000,2287,15,1125,25,2211,250,1104,250,756,43,628,20,4073,1,0,0,0,0,0,0,0,0,,
-1072,KAHO,Kaho,24,1141,0,287,176,1,128,156,0,50,1,24,24,25,44,5,10,12,1,6,83,133,200,1700,1000,500,994,30,1003,100,953,3000,911,1000,757,10,716,100,970,5,512,0,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,512,0,512,0,757,37,512,0,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,512,0,757,18,512,0,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,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,512,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,133,200,1672,672,288,7033,5500,2221,20,511,550,510,50,972,30,921,1200,912,6,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,,
-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,,
-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,,
-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,,
-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,,
-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,,
-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,,
-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,,
-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,187,100,768,768,480,969,1000,1524,150,2246,250,10016,500,714,300,984,2000,985,2000,4128,1,25,5000,2610,2000,701,1000,2610,2000,,
-1087,ORC_HERO,Orc Hero,77,295700,0,58630,32890,1,2257,2542,40,45,1,91,99,70,105,90,10,10,2,7,42,181,150,1678,780,648,968,10000,10018,500,1366,150,2106,250,1124,10,984,3700,985,4700,4143,1,4500,5000,725,2000,607,1500,999,5000,725,2000
-1088,VOCAL,Vocal,18,3016,0,110,88,1,71,82,10,30,1,28,26,30,53,40,10,10,1,4,22,181,200,1080,648,480,2247,50,940,8000,721,1000,752,1500,912,700,645,3000,532,60,4021,60,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,181,200,1236,336,432,2244,50,518,2000,729,1000,746,1500,970,100,971,100,512,0,4014,5,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,181,300,1072,672,480,2257,200,619,50,722,1000,741,1500,512,8000,512,8000,531,4000,4001,100,0,0,0,0,0,0,0,0,,
-1091,DRAGONFLY,Dragonfly,8,2400,0,88,44,1,22,27,40,0,1,20,8,15,17,5,10,10,0,4,24,181,100,1076,576,480,2245,200,501,8000,719,1500,742,2000,2607,200,625,50,533,3000,4009,40,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,181,150,1048,648,432,2248,200,920,8000,728,1500,919,5500,725,11,517,8000,626,50,4029,40,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,181,200,1456,456,336,2250,200,515,8000,727,1200,746,1500,706,30,622,50,534,5000,4006,70,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,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,139,300,1288,288,384,955,5500,910,1000,938,500,993,40,1001,4,1002,450,757,28,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,181,200,1272,672,672,2254,100,2324,60,610,500,2282,1,504,1000,512,250,714,40,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,128,1000,1001,1,1,1010,320,935,2500,909,2000,938,650,713,2000,1002,300,512,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,181,200,2000,1000,500,2602,5,504,600,2601,5,1007,15,512,0,512,0,512,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,149,300,1792,792,336,1042,5500,912,1200,757,175,2406,5,511,1500,719,10,512,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,149,300,1468,468,768,1025,5500,911,1200,1042,500,757,61,511,670,508,250,10017,15,4075,2,0,0,0,0,0,0,0,0,,
-1101,BAPHOMET_JR,Baphomet Jr.,50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,100,868,480,120,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,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,149,100,1504,840,900,1001,200,1061,5500,2252,3,1611,5,1000,30,1006,15,637,20,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,512,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,512,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,139,150,1288,288,576,955,6000,910,3000,938,1200,990,45,1001,8,1002,550,757,34,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,141,200,1120,420,288,1253,5,7030,5500,2311,1,517,1200,920,2000,756,53,1217,140,4082,1,0,0,0,0,0,0,0,0,,
-1107,DESERT_WOLF_B,Desert Wolf Puppy,9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,137,300,1600,900,240,1010,85,919,5500,2306,60,517,600,2301,200,512,0,512,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,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,149,150,980,600,384,1038,5500,1039,400,2255,2,1458,2,1009,5,912,1500,756,154,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,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,149,250,1276,576,384,1011,60,913,3000,725,20,507,1000,7006,5500,7006,1500,756,40,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,181,400,620,420,360,1127,600,1125,950,1135,150,1128,400,5019,300,985,3200,984,2300,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,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,512,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,181,300,872,1344,432,1133,150,2268,250,518,10000,1258,500,1030,250,985,2300,984,1700,4123,1,6179,5000,1029,5000,1030,1000,994,3000,1029,5000
-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,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,149,300,2276,576,336,2217,10,1615,1,2508,2,1551,10,610,200,609,10,509,2000,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,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,145,300,1540,720,432,1012,5500,757,90,903,1500,721,15,715,200,501,800,912,120,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,181,300,1220,1080,648,1059,5500,2274,100,2336,50,604,500,603,10,714,30,2335,150,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,512,0,4087,1,0,0,0,0,0,0,0,0,,
-1122,GOBLIN_1,Goblin 1,25,1176,0,310,188,1,118,140,10,5,1,53,25,20,38,10,10,12,1,7,24,149,100,1120,620,240,998,270,911,1200,756,43,2297,3,1211,10,2104,5,501,800,4060,1,0,0,0,0,0,0,0,0,,
-1123,GOBLIN_2,Goblin 2,24,1034,0,287,176,1,88,100,10,5,1,24,24,15,66,10,10,12,1,7,23,149,150,1320,620,240,998,250,911,1000,5010,3,1511,10,2104,1,501,550,508,120,4060,1,0,0,0,0,0,0,0,0,,
-1124,GOBLIN_3,Goblin 3,24,1034,0,357,176,1,132,165,10,5,1,24,24,15,24,10,10,12,1,7,25,141,250,1624,624,240,998,230,911,1000,2275,3,512,0,2104,1,501,550,508,120,4060,1,0,0,0,0,0,0,0,0,,
-1125,GOBLIN_4,Goblin 4,23,1359,0,264,164,1,109,131,10,5,1,23,46,15,36,10,10,12,1,7,22,141,200,1624,624,240,993,100,998,170,911,800,2263,3,1508,10,2104,1,501,500,4060,1,0,0,0,0,0,0,0,0,,
-1126,GOBLIN_5,Goblin 5,22,1952,0,241,152,1,105,127,10,5,1,22,22,15,32,10,10,12,1,7,21,141,300,3074,1874,480,998,150,911,800,1605,15,2104,1,508,100,501,500,508,120,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,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,512,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,141,400,1888,1152,828,953,6500,912,500,2279,5,1752,10000,757,118,633,20,970,50,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,149,200,1180,480,648,1062,5500,912,900,985,31,2331,5,1008,5,535,1000,512,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,149,100,1364,864,432,912,0,616,0,641,0,502,0,1259,0,984,0,512,0,4139,0,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,149,350,528,1000,396,932,8000,985,191,5017,1,2108,2,1004,10,504,1000,1127,2,4136,1,0,0,0,0,0,0,0,0,,
-1133,KOBOLD_1,Kobold 1,36,3893,0,988,625,1,265,318,15,10,1,90,36,30,52,20,10,12,1,7,44,141,150,1028,528,360,999,100,1034,5500,912,700,985,25,1220,2,2104,5,512,0,4091,1,0,0,0,0,0,0,0,0,,
-1134,KOBOLD_2,Kobold 2,31,2179,0,806,407,1,262,324,15,10,1,31,31,20,46,20,10,12,1,7,45,141,200,1528,528,360,999,100,1034,5500,912,200,2104,3,502,100,2101,100,512,0,4091,1,0,0,0,0,0,0,0,0,,
-1135,KOBOLD_3,Kobold 3,31,2179,0,644,407,1,186,216,15,10,1,31,31,20,88,20,10,12,1,7,43,141,300,1228,528,360,990,35,999,100,1034,5500,912,200,512,0,2104,3,502,100,4091,1,0,0,0,0,0,0,0,0,,
-1136,KOBOLD_4,Kobold 4,30,3503,0,481,290,1,168,199,15,10,1,30,30,20,50,20,10,12,1,7,41,141,200,2200,1000,500,999,50,1034,5500,912,100,1355,5,2104,3,502,100,1301,150,4091,1,0,0,0,0,0,0,0,0,,
-1137,KOBOLD_5,Kobold 5,30,2462,0,481,290,1,168,199,15,10,1,30,60,20,45,20,10,12,1,7,42,141,200,2000,1000,500,999,40,1034,5500,912,100,1514,5,2104,3,502,100,1501,150,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,512,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,149,200,1528,660,432,993,110,1031,5500,911,1400,757,70,943,250,721,10,501,650,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,149,300,1540,840,504,994,35,1045,4500,1608,10,2617,1,1614,3,1006,8,642,20,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,512,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,512,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,149,300,1480,480,1056,1060,5500,2294,5,2605,1,1008,10,1520,15,2407,1,656,200,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,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,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,149,150,432,432,360,2618,10,528,5000,919,5500,537,400,757,100,656,200,512,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,181,100,864,1000,480,10006,500,2615,200,2234,200,639,500,7020,10,985,3500,984,2500,4146,1,10500,5000,730,2000,603,3000,617,2000,730,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,149,180,2000,1000,500,1048,6000,522,2500,702,200,2610,150,722,250,7062,3500,1007,3,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,149,200,1360,960,432,941,5500,756,196,1361,2,1005,10,516,1500,1301,200,657,150,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,181,150,1276,576,288,5008,1000,1234,100,1525,150,10008,500,985,2600,984,1900,638,500,4131,1,1250,0,1022,5000,504,1500,728,500,1022,5000
-1151,MYST,Myst,38,3745,0,1391,688,1,365,445,0,40,1,38,18,1,53,10,10,12,2,0,25,149,200,1576,576,384,5005,2,1019,800,10005,10,756,65,757,97,605,20,512,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,133,200,2420,720,648,922,5500,932,3500,757,80,2299,2,1358,10,506,50,512,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,133,400,2852,1152,840,1043,5500,938,3000,714,1,512,0,512,0,512,0,512,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,149,165,1700,1000,500,7110,4500,7121,2500,757,20,1105,500,1217,150,512,0,512,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,149,200,1624,620,384,1035,5500,1037,300,756,140,509,1000,1510,150,912,1500,606,15,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,149,150,1420,1080,528,1036,5500,1037,300,985,61,509,1000,602,500,912,1500,606,15,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,181,125,2000,1000,500,7113,6000,7114,2500,1136,100,2327,150,5002,500,1552,300,984,4500,4148,1,1,5000,1009,5500,526,2000,732,1000,607,6000
-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,512,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,181,200,1020,1020,288,1015,10000,1223,500,1236,150,1014,5000,2288,300,985,2900,984,2100,4121,1,2700,0,1008,500,730,1000,1000,4000,1008,500
-1160,PIERE,Piere,18,733,0,122,78,1,64,75,15,0,1,18,26,20,27,15,10,12,0,4,22,139,200,1288,288,576,955,5700,910,1100,938,600,992,15,1001,5,1002,500,757,31,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,4024,1,0,0,0,0,0,0,0,0,,
-1162,RAFFLESIA,Rafflesia,27,1950,0,388,242,1,105,120,20,10,1,27,54,1,76,27,10,10,0,3,22,133,200,1000,2652,1056,1033,5500,911,1600,706,2,708,10,703,10,711,550,509,30,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,149,150,824,780,420,985,106,2266,1,2315,2,1158,2,1116,100,1004,10,7054,5500,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,133,400,1516,816,432,603,35,714,1,912,2500,958,3500,934,1500,2308,10,512,0,4104,1,0,0,0,0,0,0,0,0,,
-1165,SANDMAN,Sandman,34,3413,0,810,492,1,180,205,10,25,1,34,58,38,60,5,10,12,1,0,62,133,250,1672,720,288,997,35,1056,5500,757,118,7043,200,1001,200,1257,2,728,2,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,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,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,512,0,4130,1,0,0,0,0,0,0,0,0,,
-1169,SKELETON_WORKER,Skeleton Worker,30,2872,0,397,240,1,242,288,0,15,1,15,30,5,42,10,10,12,1,1,29,133,400,2420,720,384,998,400,1041,5500,757,90,5009,2,999,100,1003,200,1002,800,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,512,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,149,200,1001,1,1,1014,2700,911,800,757,10,1111,15,1001,30,943,150,512,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,149,200,2000,1000,500,1014,5500,911,2000,757,15,1111,20,943,270,1001,50,512,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,149,200,1001,1,1,1014,3100,911,800,911,10,1114,15,1001,35,943,200,512,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,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,512,0,512,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,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,512,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,133,200,1780,1080,432,1011,55,998,190,2339,200,2265,3,2408,10,1002,400,1002,400,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,149,150,1960,960,504,1001,150,1059,5500,2282,1,2333,10,512,0,512,0,512,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,149,150,840,540,480,1022,5500,919,7000,603,100,604,100,526,250,525,350,756,100,746,200,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,181,400,2700,1000,500,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1076,576,480,998,50,935,6500,909,1500,1205,55,601,100,742,5,1002,150,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,133,400,1672,672,480,914,2000,949,250,1502,80,721,2,511,350,705,500,1501,200,4002,0,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,1001,10,1059,100,2282,0,2333,1,512,0,512,0,512,0,4102,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,149,250,2536,1536,672,1001,150,1059,5500,2282,1,2333,10,512,0,512,0,512,0,4102,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,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1720,500,420,1094,5500,7014,40,618,60,2337,2,609,15,508,1000,502,250,5046,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,149,300,1960,620,480,1063,5500,1753,1000,1756,2500,1755,2500,1716,2,501,1400,509,900,2330,5,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,181,100,1248,500,360,1363,200,2601,500,5007,150,2627,1000,512,0,985,4400,984,3100,4135,1,12800,5000,968,5500,617,900,512,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,149,100,972,500,288,617,5,603,45,1065,1200,611,3000,714,3,2626,1,757,270,2205,120,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,149,300,1816,576,240,1059,6500,2206,10,2506,2,716,650,602,1300,2505,10,731,5,735,10,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,149,300,1020,500,768,1095,5500,2607,20,7005,1500,611,1300,984,105,7026,20,912,1500,4153,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,149,100,960,500,480,1096,3500,938,3000,943,800,912,450,716,300,997,20,912,2500,4154,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,149,150,864,500,192,1097,5500,1553,4,1554,4,1555,3,1556,2,7015,300,1006,20,722,5,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,141,350,1848,500,576,1098,3500,7016,100,2320,1,716,600,930,3500,2408,35,934,1500,2282,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,141,350,1768,500,192,1099,3500,7016,105,2266,1,716,600,930,3500,2408,3,985,112,1093,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,149,200,1500,500,1000,1557,2,2608,30,505,100,716,450,1009,50,4158,1,512,0,512,0,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,149,300,1500,500,1000,7001,5500,715,800,1001,300,1061,1000,1057,3000,601,1100,10004,10,2502,15,0,0,0,0,0,0,0,0,,
-1200,ZHERLTHSH,Zherlthsh,63,18300,0,3608,2304,1,700,850,10,15,1,85,40,30,125,60,10,12,1,7,60,141,200,800,792,384,7017,5,504,800,503,1200,2331,8,2622,1,984,134,2291,3,4160,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,149,200,1500,500,1000,1015,4000,7017,3,504,800,731,30,1008,10,984,100,512,0,512,0,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,149,175,1500,500,1000,1015,4000,7017,4,504,800,512,0,984,150,512,0,512,0,512,0,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,181,250,1152,500,240,7019,1,1117,100,1152,70,1155,40,1163,2,999,120,984,243,985,210,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,181,100,816,500,240,7022,1,638,50,1211,100,1214,70,1217,40,999,120,984,189,1157,25,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,181,200,768,500,384,7024,5,1108,100,1111,80,1114,60,1125,40,999,120,984,145,4163,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,149,200,900,500,864,7003,5500,1754,2000,504,650,10019,10,943,5500,2625,1,984,134,526,5,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,149,300,528,500,240,7004,5500,1756,1500,2624,2,1003,130,997,25,10007,10,2209,350,719,3,0,0,0,0,0,0,0,0,,
-1208,WANDERER,Wanderer,74,8170,0,5786,4730,2,450,550,5,5,1,192,38,45,127,85,10,12,1,6,24,149,100,672,500,192,7005,5500,616,1,724,217,2270,5,610,650,984,217,608,3,732,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,149,100,1000,500,1000,7007,5500,528,1000,726,80,746,110,657,150,510,70,984,95,4167,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,149,200,1500,500,1000,7008,5500,947,8000,943,4000,993,200,1451,40,757,18,509,1600,4168,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,149,200,1500,500,1000,7009,5500,992,200,912,1200,602,1000,757,220,610,250,509,1600,4169,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,149,200,1500,500,1000,7010,5500,757,229,757,22,1002,850,999,180,998,300,512,0,4170,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,149,150,1500,500,1000,7002,2500,1304,10,999,90,931,7500,912,1300,756,196,502,900,4171,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,149,200,1500,500,1000,7011,5500,942,7000,985,53,513,5000,634,20,532,1000,607,25,4051,2,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,149,200,1500,500,1000,7012,5500,509,1800,912,1200,756,115,997,5,1454,20,608,45,4173,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,149,400,832,500,600,7013,5500,962,8000,938,7000,525,200,719,15,1258,1,716,550,4174,1,0,0,0,0,0,0,0,0,,
-1219,ABYSS_KNIGHT,Knight of Abyss,79,36140,0,8469,6268,1,1600,2150,55,50,1,68,64,25,135,50,10,12,2,7,87,149,300,1500,500,1000,1064,5500,7023,5,2318,1,1410,25,1162,1,985,369,984,259,1162,15,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,181,200,1120,420,288,1253,5,7030,5500,2311,1,517,1200,920,2000,756,53,1217,140,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,181,150,1960,960,384,1028,6000,656,150,702,3,2276,2,605,15,757,70,512,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,181,200,1500,500,1000,7002,2500,1304,10,999,120,931,8000,912,1600,756,196,502,1100,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,181,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,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,181,200,1672,672,288,921,8000,2221,20,511,650,510,55,972,35,512,0,512,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,181,200,1500,500,1000,7011,5500,942,7000,508,1900,513,5000,2311,2,532,1000,607,25,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,181,200,1028,528,360,999,90,1034,6000,912,750,985,25,1220,2,2104,5,512,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,181,100,1120,620,240,998,270,911,1200,756,43,2297,3,1211,10,2104,5,501,800,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,181,150,2544,1344,1152,1023,6000,963,2300,720,8,517,1100,951,550,756,25,512,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,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,128,1000,1001,1,1,1010,300,915,6000,938,700,2102,2,935,1300,938,700,1002,400,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,512,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,128,1000,1001,1,1,1010,120,935,1500,2102,2,501,450,501,450,713,2000,736,15,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,145,200,1564,864,576,925,6000,2402,20,508,55,507,950,1604,100,512,0,512,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,139,200,1054,54,384,942,6000,513,2000,508,130,919,5500,753,7,512,0,512,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,141,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,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,128,1000,1001,1,1,1010,135,935,2740,909,3000,938,750,713,2000,1002,320,512,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,139,300,1288,288,576,955,6000,910,3000,938,1000,935,3000,1001,6,1002,450,757,28,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,139,200,1288,288,576,955,5700,910,1100,938,600,992,15,1001,5,1002,500,757,31,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,139,150,1288,288,576,955,6000,910,3000,938,1200,990,45,1001,8,1002,550,757,34,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,512,0,4008,2,0,0,0,0,0,0,0,0,,
-1241,META_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,512,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,4175,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,149,300,1260,192,192,912,750,509,800,949,1000,5030,1,948,5000,727,30,757,90,4176,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,149,200,1180,480,648,1062,5500,912,900,985,31,2331,5,1008,5,535,1000,2236,70,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,149,100,1120,620,240,998,270,911,1200,756,43,2297,3,1211,10,2104,5,2236,40,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,512,0,0,0,0,0,0,0,0,0,,
-1247,ANTONIO,Antonio,10,10,0,3,2,1,13,20,100,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,4177,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,149,400,1296,1296,432,1098,900,2251,2,998,320,996,5,911,3500,719,35,756,87,4178,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,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,149,400,672,672,288,7035,2500,912,750,512,5500,619,40,10019,5,502,300,2508,5,4180,1,0,0,0,0,0,0,0,0,,
-1251,STORMY_KNIGHT,Stormy Knight,77,240000,0,64350,21450,2,1425,1585,35,60,1,185,83,55,130,79,10,12,2,0,84,181,200,468,468,288,1468,150,603,3000,617,4000,2621,200,2506,500,985,4700,984,3500,5007,1,1,5000,720,4500,2406,500,995,3000,720,4700
-1252,GARM,Garm,73,197000,0,50050,20020,3,1700,1900,40,45,1,126,82,65,95,60,10,12,2,2,81,181,400,608,408,336,7036,5500,1131,150,1256,500,4182,1,512,0,985,4100,984,2900,512,0,28473,5000,7036,1000,603,3000,995,3000,7036,1000
-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,4183,1,512,0,2619,1,1769,2000,757,238,512,0,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,149,200,1000,900,384,7053,3000,916,5000,645,200,656,100,992,90,2225,7,756,32,7054,1500,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,149,200,776,576,288,1055,5500,7053,1000,510,230,717,250,656,250,757,180,985,37,4185,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,149,200,700,648,480,1055,5500,7054,200,702,10,605,60,716,230,4186,1,756,115,512,0,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,149,400,770,720,336,999,300,7054,5500,7053,3500,2313,5,2316,2,4187,1,1255,2,512,0,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,512,0,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,181,100,704,504,432,7048,2500,7054,5500,7063,120,1452,1500,757,150,984,185,996,150,1417,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,149,200,920,720,200,7054,5500,734,1000,2505,30,4190,1,512,0,1000,80,747,3,512,0,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,512,0,0,0,0,0,0,0,0,0,,
-1262,MUTANT_DRAGONOID,Mutant Dragonoid,65,62600,0,4730,3536,4,2400,3400,15,20,1,47,30,68,45,35,10,12,2,9,43,181,250,1280,1080,240,7054,5500,1035,500,1036,500,930,500,2627,30,522,150,505,150,504,250,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,149,150,1056,1056,336,912,5000,932,6000,7005,500,1610,25,1611,8,996,100,1615,1,4191,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,149,200,916,816,336,1054,1300,523,300,657,200,720,40,995,35,1460,3,756,203,4192,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,145,200,1036,936,240,538,1000,530,150,979,1,645,280,2402,30,1001,40,2502,20,529,320,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,4194,1,512,0,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,149,200,1078,768,384,7054,3200,536,1000,2409,5,5003,1,4195,1,512,0,504,450,512,0,0,0,0,0,0,0,0,0,,
-1268,BLOODY_KNIGHT,Blood Knight,82,57870,0,10120,6820,3,2150,3030,60,50,1,75,70,77,125,55,10,12,2,0,87,149,250,828,528,192,7054,5500,2229,45,2317,5,2106,65,1170,1,984,304,985,433,1417,2,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,4197,1,0,0,0,0,0,0,0,0,,
-1270,TOWER_KEEPER,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,4198,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,4199,1,512,0,756,129,512,0,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,181,100,868,768,480,1615,800,5017,500,1237,300,2334,300,2507,100,985,5300,984,4100,2609,140,1,5000,7005,6000,512,0,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,149,200,1050,900,288,7053,5500,998,300,2602,1,756,40,1352,10,508,900,2338,1,2206,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,512,0,512,0,985,61,757,207,512,0,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,1152,480,7047,2500,637,40,2407,3,739,30,5085,5,503,400,2215,5,4203,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,4204,1,2315,2,1701,150,1764,2000,1715,3,985,106,512,0,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,512,0,2272,1,503,150,609,35,512,0,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,4206,1,757,250,985,163,512,0,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,149,200,860,660,624,7053,100,943,380,606,200,993,160,1001,140,4207,1,757,106,512,0,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,4208,1,757,124,744,2,0,0,0,0,0,0,0,0,,
-1281,SAGEWORM,Sageworm,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,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,512,0,1763,2000,1711,5,756,79,4210,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,181,200,772,672,360,7054,5500,1048,2500,657,500,1306,1,504,560,1364,1,984,160,4211,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,100,512,100,512,100,512,100,512,100,512,100,512,100,512,100,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,133,265,1200,1200,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,275,1200,1200,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,265,1288,288,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,4,22,0,300,1288,288,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1289,MAYA_PURPLE,Maya Purple,81,54331,0,10496,3893,2,1446,1999,68,48,1,90,80,95,90,119,10,12,2,4,82,181,100,1024,1000,480,7053,4550,757,250,756,300,969,100,984,150,985,100,639,50,10006,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,149,150,2276,576,432,7068,2550,756,160,503,800,1220,35,1219,80,1222,3,512,0,2274,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,149,175,1816,576,240,1059,4550,2206,10,2506,8,716,700,732,5,717,850,657,150,603,100,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,149,150,1000,600,384,1038,4550,1039,450,2255,6,757,160,912,2500,1009,10,1410,3,7054,2500,0,0,0,0,0,0,0,0,,
-1293,CREAMY_FEAR,Creamy Fear,62,13109,0,7365,2691,2,667,830,45,30,1,40,16,15,68,55,10,12,0,4,24,149,155,1136,720,840,924,4550,2333,10,518,550,602,200,1550,8,1611,8,522,50,7053,1800,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,149,175,1528,660,432,1031,4550,943,2500,721,10,504,5,656,25,2224,3,2108,1,7053,2500,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,181,175,1345,824,440,7071,3500,7063,2500,1716,2,1472,1,1402,25,1514,10,5045,5,7054,2500,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,149,150,1028,528,360,999,450,1034,6500,912,1200,1511,6,1613,2,525,150,526,100,7053,1500,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,149,175,1772,120,384,930,4550,934,1800,2624,1,2611,150,503,350,756,150,757,100,7053,2500,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,149,175,2612,912,288,7071,4550,938,1500,958,1500,723,200,727,100,1260,1,2324,2,2627,2,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,149,120,1120,620,240,998,1200,999,800,756,120,2297,5,2106,2,503,650,2611,240,7054,1500,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,149,300,1672,672,480,949,3000,7054,5500,2227,20,1000,100,997,50,501,1000,502,500,505,12,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,149,200,1156,456,384,1021,4550,757,250,1517,3,969,5,2282,1,912,1200,746,250,616,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,181,145,1024,768,480,1615,3,5017,2,2508,3,7054,5500,522,120,504,550,1162,2,7053,2500,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,149,155,1292,792,340,526,550,518,1200,522,12,610,15,1608,3,722,20,2627,1,516,3500,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,149,165,1468,468,768,1025,4550,1042,1200,757,140,525,450,943,1200,1096,680,7053,800,7054,800,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,149,165,1792,792,336,1042,4550,912,2500,2406,1,719,15,1096,680,938,3500,7054,2500,7053,2500,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,149,175,1260,230,192,948,4550,2289,8,740,120,518,500,526,1,969,5,7053,800,512,0,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,181,155,1276,576,288,5008,1,638,150,10008,5,985,600,984,800,969,6,617,1,7054,5500,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,149,200,960,1008,840,7053,4550,7054,3500,999,180,998,360,1003,580,744,800,994,160,512,0,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,149,300,1000,1152,828,953,6500,912,2300,503,870,2279,8,1752,10000,999,640,994,180,512,0,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,149,250,1100,960,780,941,4550,1361,4,657,300,984,16,504,850,2611,160,2607,1,1000,250,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,149,150,1960,960,384,1028,3500,656,290,702,6,2276,1,605,15,2627,1,912,160,512,0,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,181,200,900,1000,500,1529,8,1306,5,512,0,1417,9,7070,5500,512,0,912,5500,658,1,1,5000,967,5500,607,1500,617,2000,967,5500
-1313,MOBSTER,Mobster,61,11347,0,4424,1688,1,910,1128,41,37,1,46,20,35,76,55,10,12,1,7,20,149,250,1100,560,580,1239,3,2601,2,2621,1,716,600,912,2500,525,450,505,60,726,4700,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,0,0,0,0,0,0,,
-1315,ASSAULTER,Assaulter,71,15861,0,4854,2654,2,764,1499,35,28,1,74,10,35,100,100,10,12,1,7,44,149,155,1000,900,432,967,4550,7069,1200,7072,840,503,1280,912,1240,522,45,603,1,512,0,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,512,0,0,0,0,0,0,0,0,0,,
-1317,SEAL,Seal,63,9114,0,3765,1824,1,845,1202,25,33,1,28,22,15,69,84,10,12,1,2,21,133,250,1612,622,583,912,4500,510,250,2310,5,7053,1200,1452,1,525,200,746,120,512,0,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,149,250,1452,483,528,967,4550,7070,750,501,2400,912,1640,526,140,7054,600,1505,2,7068,1250,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,149,250,1452,483,528,967,4550,7070,850,7066,1250,912,1800,526,160,7053,600,1504,5,512,0,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,181,195,1345,824,440,7071,4550,7063,1500,1714,1,747,1,1451,3,1513,2,5045,1,7054,1500,0,0,0,0,0,0,0,0,,
-1321,DRAGON_TAIL,Dragon Tail,61,8368,0,3587,1453,1,520,715,25,19,0,68,15,5,67,67,10,12,1,4,44,149,175,862,534,312,7064,4550,1096,400,943,800,2207,8,2226,2,601,300,602,150,512,0,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,512,0,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,133,190,1132,583,532,722,150,965,5500,7065,4500,725,50,726,50,746,650,7053,1200,512,0,0,0,0,0,0,0,0,0,,
-1324,TREASURE_BOX1,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1325,TREASURE_BOX2,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7073,80,658,500,604,10000,984,5000,985,7500,1239,1500,2252,75,1165,8,0,0,0,0,0,0,0,0,,
-1326,TREASURE_BOX3,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1327,TREASURE_BOX4,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7074,80,658,500,604,10000,984,5000,985,7500,2108,1000,1306,75,5022,8,0,0,0,0,0,0,0,0,,
-1328,TREASURE_BOX5,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1329,TREASURE_BOX6,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7075,80,658,500,604,10000,984,5000,985,7500,2102,834,5019,100,5002,9,0,0,0,0,0,0,0,0,,
-1330,TREASURE_BOX7,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1331,TREASURE_BOX8,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7076,80,658,500,604,10000,984,5000,985,7500,2616,500,2334,125,2622,9,0,0,0,0,0,0,0,0,,
-1332,TREASURE_BOX9,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1333,TREASURE_BOX10,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7077,80,658,500,604,10000,984,5000,985,7500,2104,500,2331,150,2623,10,0,0,0,0,0,0,0,0,,
-1334,TREASURE_BOX11,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1335,TREASURE_BOX12,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7078,80,658,500,604,10000,984,5000,985,7500,2270,500,1716,150,2256,10,0,0,0,0,0,0,0,0,,
-1336,TREASURE_BOX13,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1337,TREASURE_BOX14,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7079,80,658,500,604,10000,984,5000,985,7500,1238,375,1531,150,2318,10,0,0,0,0,0,0,0,0,,
-1338,TREASURE_BOX15,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1339,TREASURE_BOX16,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7080,80,658,500,604,10000,984,5000,985,7500,2626,300,1472,167,2327,10,0,0,0,0,0,0,0,0,,
-1340,TREASURE_BOX17,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1341,TREASURE_BOX18,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7081,80,658,500,604,10000,984,5000,985,7500,1143,250,1237,188,2235,12,0,0,0,0,0,0,0,0,,
-1342,TREASURE_BOX19,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1343,TREASURE_BOX20,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7082,80,658,500,604,10000,984,5000,985,7500,617,250,1229,188,5007,19,0,0,0,0,0,0,0,0,,
-1344,TREASURE_BOX21,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1345,TREASURE_BOX22,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7083,80,658,500,604,10000,984,5000,985,7500,2508,1000,2336,69,2621,20,0,0,0,0,0,0,0,0,,
-1346,TREASURE_BOX23,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1347,TREASURE_BOX24,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7084,80,658,500,604,10000,984,5000,985,7500,2106,1000,1164,50,5025,24,0,0,0,0,0,0,0,0,,
-1348,TREASURE_BOX25,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1349,TREASURE_BOX26,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7085,80,658,500,604,10000,984,5000,985,7500,2231,750,2624,46,2286,25,0,0,0,0,0,0,0,0,,
-1350,TREASURE_BOX27,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1351,TREASURE_BOX28,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7086,80,658,500,604,10000,984,5000,985,7500,2283,500,2615,41,2234,32,0,0,0,0,0,0,0,0,,
-1352,TREASURE_BOX29,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1353,TREASURE_BOX30,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7087,80,658,500,604,10000,984,5000,985,7500,2507,500,2625,38,5027,34,0,0,0,0,0,0,0,0,,
-1354,TREASURE_BOX31,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1355,TREASURE_BOX32,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7088,80,658,500,604,10000,984,5000,985,7500,2407,429,2269,250,2317,35,0,0,0,0,0,0,0,0,,
-1356,TREASURE_BOX33,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1357,TREASURE_BOX34,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7089,80,658,500,604,10000,984,5000,985,7500,2109,300,2406,273,2258,38,0,0,0,0,0,0,0,0,,
-1358,TREASURE_BOX35,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1359,TREASURE_BOX36,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7090,80,658,500,604,10000,984,5000,985,7500,1142,215,2255,60,5017,38,0,0,0,0,0,0,0,0,,
-1360,TREASURE_BOX37,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1361,TREASURE_BOX38,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7091,80,658,500,604,10000,984,5000,985,7500,1417,50,5053,50,2229,50,0,0,0,0,0,0,0,0,,
-1362,TREASURE_BOX39,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,,
-1363,TREASURE_BOX40,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7092,80,658,500,604,10000,984,5000,985,7500,2506,43,2254,43,1529,38,0,0,0,0,0,0,0,0,,
-1364,G_ASSULTER,Assaulter,59,18251,0,1,1,2,195,227,35,36,85,55,10,35,145,100,10,12,1,7,44,149,155,1000,900,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,400,1564,864,576,7095,5500,7094,2400,7093,2200,985,5,757,15,2506,20,512,0,512,0,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,133,400,1564,864,576,7096,5000,7097,3800,2317,1,2316,2,504,2500,512,0,512,0,512,0,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,133,180,1564,864,576,7097,5500,7098,3700,504,4000,512,0,512,0,512,0,512,0,512,0,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,512,0,512,0,512,0,512,0,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,137,165,1564,864,576,7101,5000,522,300,992,1000,969,1,4205,1,512,0,512,0,512,0,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,133,155,1564,864,576,522,1500,2407,3,2611,500,2613,150,2601,2,1472,1,505,1000,512,0,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,133,160,1564,864,576,7104,5500,7105,3500,717,1000,715,1000,716,1000,512,0,512,0,512,0,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,145,165,1564,864,576,7106,5000,7107,2500,713,5000,507,500,510,1000,508,2500,511,5500,512,0,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,181,300,1564,864,576,7108,5500,1417,5,607,2500,2621,2,2624,2,1306,1,1529,2,658,1,10000,1000,732,2000,617,2000,607,5500,732,2000
-1374,INCUBUS,Incubus,75,17281,0,5254,4212,1,1408,1873,58,46,1,97,95,150,89,87,10,12,1,6,67,133,165,1564,864,576,522,1500,504,5500,1306,2,2621,1,2610,500,2613,150,504,1200,5072,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,133,170,1564,864,576,7111,5500,7112,3200,503,800,511,2000,512,0,512,0,512,0,512,0,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,133,155,1564,864,576,7115,5500,7116,2500,502,1500,503,800,512,0,512,0,512,0,512,0,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,133,165,1564,864,576,7099,4500,7117,1500,7118,1500,1472,4,1473,1,512,0,512,0,512,0,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,133,170,1564,864,576,7119,4200,7001,4700,715,4000,512,0,512,0,512,0,512,0,512,0,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,133,165,1564,864,576,7120,5500,2626,1,2608,30,505,50,510,150,512,0,512,0,512,0,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,133,165,1564,864,576,1012,7500,715,4000,716,3500,512,0,512,0,512,0,512,0,512,0,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,133,165,1564,864,576,948,7500,919,7500,549,2500,512,0,512,0,512,0,512,0,512,0,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,133,150,1564,864,576,1038,6800,1039,5700,2605,3,984,20,512,0,512,0,512,0,512,0,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,133,165,1564,864,576,7006,6500,7097,2500,7122,3500,756,1000,522,500,512,0,512,0,512,0,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,133,175,1564,864,576,7123,4200,1035,5500,1037,4000,1036,3700,512,0,512,0,512,0,512,0,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,133,175,1564,864,576,7123,4200,1035,5500,1037,4000,1036,3700,512,0,512,0,512,0,512,0,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,133,195,1564,864,576,7124,5500,1056,5500,997,3500,756,300,1226,5,1222,20,7043,1400,512,0,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,133,170,1564,864,576,7125,5000,904,7500,716,150,525,2500,994,850,512,0,512,0,512,0,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,181,180,1564,864,576,2255,5,610,1800,608,150,985,15,984,55,2317,3,512,500,512,0,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,181,145,1564,864,576,607,4700,1473,5,1722,5,2507,15,2621,4,1557,4,512,0,4134,1,500,5000,607,5500,732,3000,522,1000,607,5000
-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,512,0,512,0,512,0,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,131,165,1564,864,576,7053,6700,610,1500,503,2500,606,100,605,100,512,0,512,0,512,0,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,0,0,0,0,0,0,,
-1393,G_MUMMY,G Mummy,0,0,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,,
-1394,G_ZOMBIE,G Zombie,0,0,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,,
-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,,
-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,,
-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,,
-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,,
-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,181,100,1068,768,576,1417,550,1306,680,2110,640,1145,480,2327,1500,2111,500,2621,1720,2256,1550,608,0,1000,1000,607,1000,526,500,732,100
-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,512,1,512,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,133,200,1480,480,720,7156,5500,7157,2000,7053,2300,739,30,2337,8,2335,8,2336,1,4001,0,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,909,0,4001,0,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,512,0,2285,0,512,1,0,0,0,0,0,0,0,0,,
-1404,MIYABI_DOLL,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,512,0,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,133,150,1056,1056,336,7159,4000,7158,6000,999,80,7063,50,522,200,2278,0,909,0,4001,0,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,133,200,1152,1152,384,7149,6500,7053,4000,912,600,521,2300,520,2000,640,10,708,100,512,1,0,0,0,0,0,0,0,0,,
-1407,DOKEBI_,Dokebi,0,0,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,,
-1408,BLOODY_BUTTERFLY,Bloody Butterfly,57,8082,0,2119,1562,2,354,575,5,23,1,65,35,37,116,30,10,13,1,4,44,133,150,872,500,300,7163,4700,7168,2500,602,1000,924,5500,1962,1,1802,5,512,1,512,1,0,0,0,0,0,0,0,0,,
-1409,DUMPLING_CHILD,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,512,0,512,0,0,0,0,0,0,0,0,0,,
-1410,ENCHANTED_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,512,0,512,0,4001,0,0,0,0,0,0,0,0,0,,
-1412,TAOIST_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,5500,553,5000,548,5500,550,5000,1908,250,757,0,512,1,512,1,0,0,0,0,0,0,0,0,,
-1413,HERMIT_PLANT,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,512,0,512,0,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,133,150,988,288,168,7171,5500,7172,3700,517,2000,756,129,537,600,1214,100,512,1,512,1,0,0,0,0,0,0,0,0,,
-1416,EVIL_NYMPH,Evil Nymph,63,18029,0,3945,2599,1,691,1382,12,75,1,64,12,69,100,80,10,13,1,6,67,133,200,1672,672,288,7165,4000,7166,4000,1904,1,984,105,1906,1,512,0,512,0,512,0,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,512,1,512,1,512,1,0,0,0,0,0,0,0,0,,
-1418,EVIL_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,181,200,976,500,400,7169,6500,10020,6500,5012,300,617,1500,512,0,512,0,512,0,512,0,524,0,985,2000,607,3600,608,1000,,
-1419,G_FARMILIAR,Farmoloar,8,155,0,0,0,1,20,28,0,0,1,12,8,5,28,1,10,12,0,2,27,133,150,1276,576,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,300,2864,864,576,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1384,768,336,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,150,676,576,480,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,250,2456,912,504,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1576,576,576,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1872,672,288,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,150,1272,72,480,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,150,1816,816,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,200,1672,672,288,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,1792,792,336,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1430,G_ARGOS,Argor,25,1117,0,0,0,1,158,191,15,0,1,25,25,5,32,15,10,12,2,4,25,149,300,1468,468,768,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1431,G_BAPHOMET_,Baphomet,50,8578,0,0,0,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,100,868,480,120,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,141,200,1120,420,288,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,150,980,600,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,250,1276,576,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,2276,576,336,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1180,480,648,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,100,1364,864,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,350,528,1000,396,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,150,1500,500,1000,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1500,500,1000,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,400,832,500,600,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,1260,192,192,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,400,1296,1296,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,400,672,672,288,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1000,900,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,400,770,720,336,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,181,100,704,504,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,920,720,200,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,181,250,1280,1080,240,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,150,1056,1056,336,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,916,816,336,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1050,900,288,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,200,1152,1152,480,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,860,660,624,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,200,1008,1008,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,181,200,772,672,360,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1528,660,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,1540,840,504,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,1480,480,1056,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,150,432,432,360,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1360,960,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,200,2420,720,648,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,400,2852,1152,840,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,165,1700,1000,500,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1624,620,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,150,1420,1080,528,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,150,824,780,420,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,400,1516,816,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,400,2420,720,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,133,200,1780,1080,432,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1471,G_NINE_TAIL,NineTail,51,9466,0,0,0,1,610,734,10,25,1,80,46,1,89,85,10,12,1,2,63,149,150,840,540,480,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1720,500,420,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,1960,620,480,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,100,972,500,288,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,1816,576,240,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,1020,500,768,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,100,960,500,480,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,150,864,500,192,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,141,350,1848,500,576,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,141,350,1768,500,192,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,1500,500,1000,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,141,200,800,792,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,1500,500,1000,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,175,1500,500,1000,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,181,250,1152,500,240,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,181,100,816,500,240,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,181,200,768,500,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,200,900,500,864,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,300,528,500,240,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,149,100,672,500,192,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,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,145,250,1156,456,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-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,181,200,1152,1152,480,512,0,1165,1,999,5000,984,3500,985,1000,607,5000,512,0,504,5000,5000,1000,607,500,608,1000,985,2000,607,6000
-1493,DRYAD,Dryad,50,8791,0,2763,1493,3,499,589,15,33,1,75,55,1,78,45,10,12,1,3,64,149,200,1152,1152,384,7188,3000,7198,1100,7197,6000,1951,200,2269,2,1964,1,7100,3200,512,0,0,0,0,0,0,0,0,0,,
-1494,KIND_OF_BEETLE,Kind of Beetle,34,1874,0,679,442,1,191,243,45,12,1,34,10,1,50,1,10,12,0,4,22,149,200,1152,1152,384,7190,9000,7202,6000,928,600,955,600,2102,15,512,0,512,0,512,0,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,133,150,1872,1248,428,7203,8000,7188,6000,7201,3000,7049,1500,1019,1000,756,197,0,0,0,0,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,149,200,1152,1584,400,7188,6500,7189,5000,757,120,604,100,2270,3,921,1000,7201,900,0,0,0,0,0,0,0,0,0,0,,
-1498,WOODEN_SHOOTER,Wooden Shooter,39,3977,0,886,453,9,224,271,10,28,1,35,29,15,120,42,10,12,1,7,42,133,200,1152,1152,384,7049,1000,513,1000,7195,4500,7200,3500,512,100,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1499,WOODEN_FIGHTER,Wooden Fighter,41,4457,0,1790,833,1,395,480,30,19,1,41,31,10,67,30,10,12,1,7,43,149,200,1152,1152,384,517,4700,7196,4000,513,1000,7198,900,1801,5,1812,3,512,0,512,0,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,149,200,1152,1152,384,7194,2000,7186,3500,7193,6700,711,2300,7198,1000,2270,20,1957,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,4001,20,0,0,0,0,0,0,0,0,,
-1503,GIBBET,Gibbet,58,6841,0,4011,1824,3,238,418,28,31,1,42,42,27,46,28,10,12,2,6,27,149,150,1152,1584,400,7218,5500,7212,2000,7222,1000,604,100,716,100,724,10,512,0,512,0,0,0,0,0,0,0,0,0,,
-1504,DULLAHAN,Dullahan,62,12437,0,4517,2963,3,418,647,47,38,1,30,5,45,62,22,10,12,1,1,49,149,155,1152,1152,428,7210,5500,7209,2000,2505,100,2506,2,2614,5,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1505,LOLI_RURI,Loli Ruri,71,23470,0,6641,4314,3,841,1476,39,44,1,66,54,74,81,43,10,12,2,6,87,149,155,1152,1632,424,7206,5500,7219,5500,7214,1000,985,100,7019,2,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1506,DISGUISE,Disguise,55,7543,0,2815,1919,3,267,279,18,29,1,72,45,35,48,65,10,12,1,6,82,149,147,1152,768,732,7221,5500,7216,2000,518,200,2508,10,2502,10,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1507,BLOODY_MURDERER,Bloody Murderer,72,27521,0,9742,3559,3,217,864,37,41,1,30,90,15,52,12,10,12,2,7,67,149,175,1152,1344,400,7208,5500,7207,2000,7223,200,7017,200,984,100,969,10,2288,5,1229,2,0,0,0,0,0,0,0,0,,
-1508,QUVE,Quve,40,4559,0,414,306,3,170,299,12,12,1,61,24,19,37,24,10,12,0,1,29,149,150,1152,1248,400,7220,5500,7205,2000,601,1000,756,100,2504,2,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1509,LUDE,Lude,36,3214,0,392,247,3,164,287,14,10,1,59,60,18,36,21,10,12,0,1,29,149,150,1152,960,752,1059,5500,7220,5500,7225,1000,2282,2,2274,1,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1510,HYLOZOIST,Hylozoist,51,7186,0,2314,1297,3,181,317,16,51,1,28,26,47,66,14,10,12,0,1,47,149,155,1152,1536,969,7217,5500,7215,2000,7213,1000,7220,1000,740,200,757,100,512,0,512,0,0,0,0,0,0,0,0,0,,
-1511,AMON_RA,Amon Ra,88,1214138,0,87264,35891,5,929,1647,26,52,1,1,90,124,74,45,10,12,2,7,62,181,200,1872,672,480,7211,5500,984,2000,985,2000,607,1000,616,100,5053,10,1557,10,2615,2,8000,3000,7114,10,617,100,512,0,,
-1512,HYEGUN,Hyegun,56,9981,0,2199,1032,3,318,710,12,10,1,40,36,10,73,15,10,12,1,1,49,133,200,1152,1152,384,512,0,512,0,512,0,512,0,512,0,617,10,2614,5,616,10,0,0,0,0,0,0,0,0,,
-1513,CIVIL_SERVANT,Civil Servant,62,14390,0,4023,2750,3,360,650,42,5,1,15,20,60,80,50,10,12,1,2,44,133,200,1152,1152,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1514,DANCING_DRAGON,Dancing Dragon,54,9136,0,3030,769,3,239,550,39,10,1,62,55,25,72,22,10,12,1,9,44,131,200,1152,1152,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1515,GARM_BABY,Hatii Baby,61,20119,0,1022,2980,3,499,680,34,13,1,30,56,55,85,30,10,12,1,2,41,133,300,1152,1152,384,512,0,512,0,512,0,512,0,512,0,617,10,1305,15,616,10,0,0,0,0,0,0,0,0,,
-1516,INCREASE_SOIL,Increase Soil,51,8230,0,2760,2110,3,140,560,30,12,1,45,23,12,69,12,10,12,1,0,62,145,200,1152,1152,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1517,LI_ME_MANG_RYANG,Li Me Mang Ryang,48,5920,0,1643,1643,3,199,434,23,16,1,51,19,8,57,30,10,12,1,6,62,133,200,1152,1152,384,512,0,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,0,0,0,0,0,0,,
-1518,BACSOJIN,Bacsojin,75,218652,0,33095,18214,1,1219,2169,10,51,1,85,78,85,150,60,10,12,2,1,67,181,200,1152,1152,480,1164,2,1165,2,999,500,984,1000,985,1000,607,500,7151,2000,504,500,5000,1000,607,500,608,500,985,500,,
-1519,Chung_E,Chung E,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,512,0,4100,1,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,3,25,131,300,1672,672,480,564,5500,512,0,512,0,512,0,512,0,512,0,512,0,512,0,0,0,,,,,,,,
-1582,DEVILING,Deviling,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,4001,20,0,0,0,0,0,0,0,0,,
-1583,TAO_GUNKA,Tao Gunka,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,4001,20,0,0,0,0,0,0,0,0,,
-1584,TAMRUAN,Tamruan,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,4001,20,0,0,0,0,0,0,0,0,,
-1585,MIME_MONKEY,Mime Monkey,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,4001,20,0,0,0,0,0,0,0,0,,
-1586,LEAF_CAT,Leaf Cat,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,4001,20,0,0,0,0,0,0,0,0,,
-1587,KRABEN,Kraben,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,4001,20,0,0,0,0,0,0,0,0,,
-1900,VALARIS,Valaris,99,668000,0,107250,37895,1,440,510,35,45,1,152,96,85,120,95,10,10,0,7,67,181,100,676,1152,768,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,4147,1,13000,0,608,1000,750,400,923,3800,,
-1901,VALARIS_WORSHIPPER,Valaris's Worshipper,50,8578,0,2706,1480,1,260,310,15,25,1,75,55,1,93,45,10,12,0,7,27,149,100,868,480,120,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,4129,1,0,0,0,0,0,0,0,0,,
-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,,
-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,4006,70,0,0,0,0,0,0,0,0,,
-1970,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,4001,20,0,0,0,0,0,0,0,0,,
-1971,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,4009,5,0,0,0,0,0,0,0,0,,
-1972,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,512,0,4022,5,0,0,0,0,0,0,0,0,,
-1973,PECOPECO_,PecoPeco,13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,137,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,512,0,512,0,4031,3,0,0,0,0,0,0,0,0,,
-1974,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,133,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,4066,1,0,0,0,0,0,0,0,0,,
-1975,MUNAK_,Munak,30,2872,0,361,218,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,609,20,2337,1,2305,100,1558,5,4090,3,0,0,0,0,0,0,0,0,,
-1976,ISIS_,Isis,43,4828,0,2396,993,1,423,507,10,35,1,65,43,30,72,15,10,12,2,6,27,149,200,1384,768,336,936,5500,2233,5,2603,1,733,150,732,20,954,1000,731,5,4116,1,0,0,0,0,0,0,0,0,,
-1977,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,512,0,512,0,4033,5,0,0,0,0,0,0,0,0,,
-1978,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,133,150,676,576,480,996,30,999,100,943,5500,912,1300,756,129,2259,1,1226,2,4115,1,0,0,0,0,0,0,0,0,,
-1979,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,139,150,1076,576,480,992,70,999,30,910,2400,935,3500,943,30,998,200,1002,500,4042,1,0,0,0,0,0,0,0,0,,
-1980,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,512,0,4008,10,0,0,0,0,0,0,0,0,,
-1981,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,4021,10,0,0,0,0,0,0,0,0,,
-1982,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,4044,1,0,0,0,0,0,0,0,0,,
-1983,YOYO_,Yoyo,19,879,0,148,93,1,71,82,0,0,1,24,30,35,32,55,10,12,0,2,22,139,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,512,0,4051,1,0,0,0,0,0,0,0,0,,
-1984,METALLER_,Metaller,22,926,0,241,152,1,131,159,15,30,1,22,22,20,49,50,10,12,1,4,23,139,200,1708,1008,540,990,60,940,6500,911,400,757,49,707,20,935,3000,512,0,4057,1,0,0,0,0,0,0,0,0,,
-1985,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,4006,15,0,0,0,0,0,0,0,0,,
-1986,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,133,200,1672,672,288,7033,5500,2221,20,511,550,510,50,972,30,921,1200,912,6,4048,2,0,0,0,0,0,0,0,0,,
-1987,BAPHOMET__,Baphomet Jr.,50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,100,868,480,120,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,4129,1,0,0,0,0,0,0,0,0,,
-1988,DESERT_WOLF_B_,Desert Wolf Puppy,9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,137,300,1600,900,240,1010,85,919,5500,2306,60,517,600,2301,200,512,0,512,0,4023,10,0,0,0,0,0,0,0,0,,
-1989,DEVIRUCHI_,Deviruchi,46,7360,0,2662,1278,1,475,560,10,25,1,69,40,55,87,30,10,12,0,6,27,149,150,980,600,384,1038,5500,1039,400,2255,2,1458,2,1009,5,912,1500,756,154,4122,1,0,0,0,0,0,0,0,0,,
-1990,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,4098,1,0,0,0,0,0,0,0,0,,
-1991,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,4004,10,0,0,0,0,0,0,0,0,,
-1992,PETIT__,Petit,44,6881,0,1677,1034,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,149,200,1624,620,384,1035,5500,1037,300,756,140,509,1000,1510,150,912,1500,606,15,4118,1,0,0,0,0,0,0,0,0,,
-1993,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,4017,1,0,0,0,0,0,0,0,0,,
-1994,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,512,0,4100,1,0,0,0,0,0,0,0,0,,
-1995,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,149,200,1720,500,420,1094,5500,7014,40,618,60,2337,2,609,15,508,1000,502,250,5046,1,0,0,0,0,0,0,0,0,,
+1001,SCORPION,Scorpion,24,1109,0,287,176,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,149,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,10,0,10000,10000,0,3,9,99,0,1,99,1,1,1,1,10,12,0,4,22,0,512,0,512,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
+1004,HORNET,Hornet,8,169,0,19,15,1,22,27,5,5,1,20,8,10,17,5,10,12,0,4,24,137,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,133,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,0,0,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
+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,128,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,137,150,1148,648,480,917,6500,1702,150,715,80,1750,5500,517,400,916,2000,0,0,0,0,0,0,4015,2,0,0,0,0,0,0,0,0
+1010,WILLOW,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,1019,100,907,600,516,700,1068,3500,0,0,1066,2000,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,137,200,1054,54,432,1011,20,920,5500,2308,10,517,650,528,1050,919,5500,0,0,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,0,0,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,133,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,139,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,0,0,0,0,0,0,4040,3,0,0,0,0,0,0,0,0
+1019,PECOPECO,PecoPeco,13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,153,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,0,0,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,0,0,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,141,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,181,200,1500,768,652,999,500,1034,4000,984,500,985,500,7017,800,714,380,1912,300,0,0,0,0,4091,50,0,0,0,0,0,0,0,0
+1023,ORC_WARRIOR,Orc Warrior,24,1400,0,261,160,1,104,126,10,5,1,24,48,25,34,10,10,12,1,7,22,133,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,BOA,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,0,0,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,133,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,129,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,133,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,149,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,512,0,2612,200,639,20,0,0,0,0,4107,1,0,0,0,0,0,0,0,0
+1033,ELDER_WILLOW,Elder Willow,20,693,0,163,101,1,58,70,10,30,1,20,25,35,38,30,10,12,1,3,43,133,200,1452,672,432,990,50,907,5500,1019,3500,757,37,2329,30,516,1000,0,0,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,133,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,11,49,133,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,SIDEWINDER,Sidewinder,43,4929,0,1996,993,1,240,320,5,10,1,43,40,15,115,20,10,12,1,2,25,149,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,181,100,1072,672,384,617,2000,1232,150,2235,200,1255,600,1009,1000,985,3500,984,3900,0,0,0,0,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,181,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,133,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,139,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,129,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,149,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,133,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,181,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,128,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,128,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,SHELL_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,139,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,139,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,141,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,139,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,0,0,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,139,200,1708,1008,540,990,60,940,6500,911,400,757,49,707,20,935,3000,0,0,0,0,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,181,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,149,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,133,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,SWORDFISH,Swordfish,30,4299,0,529,319,1,168,199,5,20,1,30,30,41,62,30,10,12,2,5,41,133,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_SKELETON,Pirate Skeleton,25,1676,0,233,142,1,145,178,10,15,1,13,25,5,25,10,10,12,1,1,29,133,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,24,1141,0,287,176,1,128,156,0,50,1,24,24,25,44,5,10,12,1,6,83,133,200,1700,1000,500,994,30,1003,100,953,3000,911,1000,757,10,716,100,970,5,0,0,0,0,0,0,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,512,0,512,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,512,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,133,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,187,100,768,768,480,969,1000,1524,150,2246,250,10016,500,714,300,984,2000,985,2000,0,0,0,0,4128,1,1250,5000,2610,2000,701,1000,2610,2000
+1087,ORC_HERO,Orc Hero,77,295700,0,58630,32890,1,2257,2542,40,45,1,91,99,70,105,90,10,10,2,7,42,181,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,181,200,1080,648,480,2247,50,940,8000,721,1000,752,1500,912,700,645,3000,532,60,0,0,4021,60,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,181,200,1236,336,432,2244,50,518,2000,729,1000,746,1500,970,100,971,100,0,0,0,0,4014,5,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,181,300,1072,672,480,2257,200,619,50,722,1000,741,1500,512,8000,512,8000,531,4000,0,0,4001,100,4197,1,0,0,0,0,0,0,0,0
+1091,DRAGONFLY,Dragon Fly,8,2400,0,88,44,1,22,27,40,0,1,20,8,15,17,5,10,10,0,4,24,181,100,1076,576,480,2245,200,501,8000,719,1500,742,2000,2607,200,625,50,533,3000,0,0,4009,40,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,181,150,1048,648,432,2248,200,920,8000,728,1500,919,5500,725,11,517,8000,626,50,0,0,4029,40,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,181,200,1456,456,336,2250,200,515,8000,727,1200,746,1500,706,30,622,50,534,5000,0,0,4006,70,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,0,0,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,139,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,181,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,128,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,181,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,149,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,149,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_JR,Baphomet Jr.,50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,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,149,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,139,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,141,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,Desert Wolf Puppy,9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,137,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,149,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,149,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,181,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,181,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,149,300,2276,576,336,2217,10,1615,1,2508,2,1551,10,610,200,609,10,509,2000,0,0,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,145,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,181,300,1220,1080,648,1059,5500,2274,100,2336,50,604,500,603,10,714,30,2335,150,0,0,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 1,25,1176,0,310,188,1,118,140,10,5,1,53,25,20,38,10,10,12,1,7,24,149,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
+1123,GOBLIN_2,Goblin 2,24,1034,0,287,176,1,88,100,10,5,1,24,24,15,66,10,10,12,1,7,23,149,150,1320,620,240,998,250,911,1000,5010,3,1511,10,2104,1,501,550,508,120,0,0,0,0,4060,1,0,0,0,0,0,0,0,0
+1124,GOBLIN_3,Goblin 3,24,1034,0,357,176,1,132,165,10,5,1,24,24,15,24,10,10,12,1,7,25,141,250,1624,624,240,998,230,911,1000,2275,3,512,0,2104,1,501,550,508,120,0,0,0,0,4060,1,0,0,0,0,0,0,0,0
+1125,GOBLIN_4,Goblin 4,23,1359,0,264,164,1,109,131,10,5,1,23,46,15,36,10,10,12,1,7,22,141,200,1624,624,240,993,100,998,170,911,800,2263,3,1508,10,2104,1,501,500,0,0,0,0,4060,1,0,0,0,0,0,0,0,0
+1126,GOBLIN_5,Goblin 5,22,1952,0,241,152,1,105,127,10,5,1,22,22,15,32,10,10,12,1,7,21,141,300,3074,1874,480,998,150,911,800,1605,15,2104,1,508,100,501,500,508,120,0,0,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,0,0,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,141,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,149,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,149,100,1364,864,432,912,2000,616,2,641,20,502,1000,1259,1,984,100,0,0,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,149,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 1,36,3893,0,988,625,1,265,318,15,10,1,90,36,30,52,20,10,12,1,7,44,141,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 2,31,2179,0,806,407,1,262,324,15,10,1,31,31,20,46,20,10,12,1,7,45,141,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 3,31,2179,0,644,407,1,186,216,15,10,1,31,31,20,88,20,10,12,1,7,43,141,300,1228,528,360,990,35,999,100,1034,5500,912,200,512,0,2104,3,502,100,0,0,0,0,4091,1,0,0,0,0,0,0,0,0
+1136,KOBOLD_4,Kobold 4,30,3503,0,481,290,1,168,199,15,10,1,30,30,20,50,20,10,12,1,7,41,141,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 5,30,2462,0,481,290,1,168,199,15,10,1,30,60,20,45,20,10,12,1,7,42,141,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,0,0,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,149,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,149,300,1540,840,504,994,35,1045,4500,1608,10,2617,1,1614,3,1006,8,642,20,0,0,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,149,300,1480,480,1056,1060,5500,2294,5,2605,1,1008,10,1520,15,2407,1,656,200,0,0,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,149,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,181,100,864,1000,480,10006,500,2615,200,2234,200,639,500,7020,10,985,3500,984,2500,0,0,0,0,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,149,180,2000,1000,500,1048,6000,522,2500,702,200,2610,150,722,250,7062,3500,1007,3,0,0,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,149,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,181,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,149,200,1576,576,384,5005,2,1019,800,10005,10,756,65,757,97,605,20,0,0,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,133,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,133,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,149,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,EARTH_PETIT,Earth Petite,44,6881,0,1677,1034,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,149,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,SKY_PETIT,Sky Petite,45,5747,0,1758,1075,1,300,355,20,45,1,113,45,69,73,80,10,12,1,9,24,149,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,181,125,2000,1000,500,7113,6000,7114,2500,1136,100,2327,150,5002,500,1552,300,984,4500,0,0,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,181,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,139,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,1,105,120,20,10,1,27,54,1,76,27,10,10,0,3,22,133,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,149,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,133,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,SANDMAN,Sandman,34,3413,0,810,492,1,180,205,10,25,1,34,58,38,60,5,10,12,1,0,62,133,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,SKELETON_WORKER,Skeleton Worker,30,2872,0,397,240,1,242,288,0,15,1,15,30,5,42,10,10,12,1,1,29,133,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,0,0,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,149,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,149,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,149,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,512,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,133,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,149,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,149,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,181,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,149,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,133,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,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
+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,149,250,2536,1536,672,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
+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,149,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,149,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,181,100,1248,500,360,1363,200,2601,500,5007,150,2627,1000,512,0,985,4400,984,3100,0,0,0,0,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,149,100,972,500,288,617,5,603,45,1065,1200,611,3000,714,3,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,149,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,149,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,149,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,149,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,141,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,141,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,149,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,149,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,Zherlthsh,63,18300,0,3608,2304,1,700,850,10,15,1,85,40,30,125,60,10,12,1,7,60,141,200,800,792,384,7017,5,504,800,503,1200,2331,8,2622,1,984,134,2291,3,0,0,0,0,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,149,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,149,175,1500,500,1000,1015,4000,7017,4,504,800,512,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,181,250,1152,500,240,7019,1,1117,100,1152,70,1155,40,1163,2,999,120,984,243,985,210,0,0,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,181,100,816,500,240,7022,1,638,50,1211,100,1214,70,1217,40,999,120,984,189,1157,25,0,0,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,181,200,768,500,384,7024,5,1108,100,1111,80,1114,60,1125,40,999,120,984,145,0,0,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,149,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,149,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,WANDERER,Wanderer,74,8170,0,5786,4730,2,450,550,5,5,1,192,38,45,127,85,10,12,1,6,24,149,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,149,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,149,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,149,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,149,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,149,150,1500,500,1000,7002,2500,1304,10,999,90,931,7500,912,1300,756,196,502,900,0,0,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,149,200,1500,500,1000,7011,5500,942,7000,985,53,513,5000,634,20,532,1000,607,25,0,0,4051,2,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,149,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,149,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,ABYSS_KNIGHT,Knight of Abyss,79,36140,0,8469,6268,1,1600,2150,55,50,1,68,64,25,135,50,10,12,2,7,87,149,300,1500,500,1000,1064,5500,7023,5,2318,1,1410,25,1162,1,985,369,984,259,1162,15,0,0,0,0,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,181,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,181,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,181,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,181,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,181,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,181,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,181,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,181,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,181,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,128,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,512,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,128,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,145,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,139,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,141,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,128,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,139,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,139,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,139,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,0,0,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,149,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,149,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,149,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,0,0,0,0,4235,1,0,0,0,0,0,0,0,0
+1247,ANTONIO,Antonio,10,10,0,3,2,1,13,20,100,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,149,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,149,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,STORMY_KNIGHT,Stormy Knight,77,240000,0,64350,21450,2,1425,1585,35,60,1,185,83,55,130,79,10,12,2,0,84,181,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,181,400,608,408,336,7036,5500,1131,150,1256,500,0,0,512,0,985,4100,984,2900,0,0,0,0,4324,1,28473,5000,7036,1000,603,3000,995,3000
+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,512,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,149,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,149,200,776,576,288,1055,5500,7053,1000,510,230,717,250,656,250,757,180,985,37,0,0,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,149,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,149,400,770,720,336,999,300,7054,5500,7053,3500,2313,5,2316,2,0,0,1255,2,0,0,0,0,4269,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,181,100,704,504,432,7048,2500,7054,5500,7063,120,1452,1500,757,150,984,185,996,150,1417,1,0,0,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,149,200,920,720,200,7054,5500,734,1000,2505,30,0,0,512,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_DRAGONOID,Mutant Dragonoid,65,62600,0,4730,3536,4,2400,3400,15,20,1,47,30,68,45,35,10,12,2,9,43,181,250,1280,1080,240,7054,5500,1035,500,1036,500,930,500,2627,30,522,150,505,150,504,250,0,0,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,149,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,149,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,145,200,1036,936,240,538,1000,530,150,979,1,645,280,2402,30,1001,40,2502,20,529,320,0,0,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,149,200,1078,768,384,7054,3200,536,1000,2409,5,5003,1,0,0,512,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,149,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,TOWER_KEEPER,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,512,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,181,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,512,0,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,149,200,1050,900,288,7053,5500,998,300,2602,1,756,40,1352,10,508,900,2338,1,2206,1,0,0,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,512,0,512,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,1152,480,7047,2500,637,40,2407,3,739,30,5085,5,503,400,2215,5,0,0,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,512,0,2272,1,503,150,609,35,0,0,0,0,0,0,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,149,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,0,0,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,512,0,1763,2000,1711,5,756,79,0,0,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,181,200,772,672,360,7054,5500,1048,2500,657,500,1306,1,504,560,1364,1,984,160,0,0,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,100,512,100,512,100,512,100,512,100,512,100,512,100,512,100,0,0,0,0,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,133,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,133,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,133,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,4,22,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_PURPLE,Maya Purple,81,54331,0,10496,3893,2,1446,1999,68,48,1,90,80,95,90,119,10,12,2,4,82,181,100,1024,1000,480,7053,4550,757,250,756,300,969,100,984,150,985,100,639,50,10006,1,0,0,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,149,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,149,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,149,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,CREAMY_FEAR,Creamy Fear,62,13109,0,7365,2691,2,667,830,45,30,1,40,16,15,68,55,10,12,0,4,24,149,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,149,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,181,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,149,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,149,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,149,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,149,120,1120,620,240,998,1200,999,800,756,120,2297,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,149,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,149,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,181,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_HORNET,Giant Hornet,56,12834,0,5785,2006,1,650,851,38,43,1,38,32,10,71,64,10,12,0,4,24,149,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,149,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,149,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,149,175,1260,230,192,948,4550,2289,8,740,120,518,500,526,1,969,5,7053,800,512,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,181,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,149,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,149,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,149,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,149,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,181,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,149,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,149,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,SEAL,Seal,63,9114,0,3765,1824,1,845,1202,25,33,1,28,22,15,69,84,10,12,1,2,21,133,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,149,250,1452,483,528,967,4550,7070,750,501,2400,912,1640,526,140,7054,600,1505,2,7068,1250,0,0,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,149,250,1452,483,528,967,4550,7070,850,7066,1250,912,1800,526,160,7053,600,1504,5,0,0,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,181,195,1345,824,440,7071,4550,7063,1500,1714,1,747,1,1451,3,1513,2,5045,1,7054,1500,0,0,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,149,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,133,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7073,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7074,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7075,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7076,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7077,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7078,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7079,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7080,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7081,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7082,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7083,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7084,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7085,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7086,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7087,80,658,500,604,10000,984,5000,985,7500,2507,500,2625,38,5027,34,0,0,0,0,0,0,0,0,0,0,0,0
+1354,TREASURE_BOX31,Treasure Chest,99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7088,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7089,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7090,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7091,80,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7092,80,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,1,1,2,195,227,35,36,85,55,10,35,145,100,10,12,1,7,44,149,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,133,400,1564,864,576,7095,5500,7094,2400,7093,2200,985,5,757,15,2506,20,0,0,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,133,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,133,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,0,0,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,137,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,133,155,1564,864,576,522,1500,2407,3,2611,500,2613,150,2601,2,1472,1,505,1000,0,0,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,133,160,1564,864,576,7104,5500,7105,3500,717,1000,715,1000,716,1000,0,0,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,145,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,181,300,1564,864,576,7108,5500,1417,5,607,2500,2621,2,2624,2,1306,1,1529,2,658,1,0,0,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,133,165,1564,864,576,522,1500,504,5500,1306,2,2621,1,2610,500,2613,150,504,1200,5072,1,0,0,4268,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,133,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,133,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,133,165,1564,864,576,7099,4500,7117,1500,7118,1500,1472,4,1473,1,0,0,0,0,0,0,0,0,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,133,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,133,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,133,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,133,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,133,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,133,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,SKY_DELETER,Sky Deleter,66,17292,0,3403,2066,1,446,593,45,53,1,105,40,65,72,54,10,12,1,9,44,133,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,EARTH_DELETER,Earth Deleter,65,15168,0,3403,2066,1,446,593,52,53,1,67,40,65,72,68,10,12,1,9,42,133,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,133,195,1564,864,576,7124,5500,1056,5500,997,3500,756,300,1226,5,1222,20,7043,1400,0,0,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,133,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,181,180,1564,864,576,2254,5,610,1800,608,150,985,15,984,55,2317,3,0,500,0,0,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,181,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,0,0,0,0,0,0,0,0,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,131,165,1564,864,576,7053,6700,610,1500,503,2500,606,100,605,100,0,0,0,0,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,G Mummy,0,0,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
+1394,G_ZOMBIE,G Zombie,0,0,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
+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,181,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,512,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,133,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,909,0,0,0,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,0,0,2285,0,0,0,0,0,4160,1,0,0,0,0,0,0,0,0
+1404,MIYABI_DOLL,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,0,0,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,133,150,1056,1056,336,7159,4000,7158,6000,999,80,7063,50,522,200,2278,0,909,0,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,133,200,1152,1152,384,7149,6500,7053,4000,912,600,521,2300,520,2000,640,10,708,100,0,0,0,0,4287,1,0,0,0,0,0,0,0,0
+1407,DOKEBI_,Dokebi,0,0,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,BLOODY_BUTTERFLY,Bloody Butterfly,57,8082,0,2119,1562,2,354,575,5,23,1,65,35,37,116,30,10,13,1,4,44,133,150,872,500,300,7163,4700,7168,2500,602,1000,924,5500,1962,1,1802,5,0,0,0,0,0,0,4327,1,0,0,0,0,0,0,0,0
+1409,DUMPLING_CHILD,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,0,0,0,0,0,0,0,0,0,0
+1410,ENCHANTED_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,TAOIST_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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1413,HERMIT_PLANT,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,0,0,0,0,0,0,0,0,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,133,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,EVIL_NYMPH,Evil Nymph,63,18029,0,3945,2599,1,691,1382,12,75,1,64,12,69,100,80,10,13,1,6,67,133,200,1672,672,288,7165,4000,7166,4000,1904,1,984,105,1906,1,0,0,0,0,0,0,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,EVIL_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,181,200,976,500,400,7169,6500,10020,6500,5012,300,617,1500,0,0,0,0,0,0,0,0,0,0,4330,1,524,5000,985,2000,607,3600,608,1000
+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,133,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,133,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,149,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,133,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,133,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,149,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,149,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,133,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,149,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,133,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,149,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,Argor,25,1117,0,0,0,1,158,191,15,0,1,25,25,5,32,15,10,12,2,4,25,149,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,50,8578,0,0,0,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,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,141,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,181,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,149,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,181,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,149,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,149,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,149,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,133,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,149,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,133,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,181,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,149,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,149,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,149,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,149,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,149,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,133,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,133,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,149,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,149,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,149,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,149,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,133,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,133,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,133,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,149,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,141,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,141,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,149,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,141,200,800,792,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,149,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,149,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,181,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,181,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,181,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,149,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,149,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,149,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,145,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
+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,181,200,1152,1152,480,7146,5000,505,500,999,500,984,1000,985,1000,607,500,608,500,504,500,0,0,4263,1,5000,1000,7146,6000,608,500,0,0
+1493,DRYAD,Dryad,50,8791,0,2763,1493,3,499,589,15,33,1,75,55,1,78,45,10,12,1,3,64,149,200,1152,1152,384,7188,3000,7198,1100,7197,6000,1951,200,2269,2,1964,1,7100,3200,0,0,0,0,4177,1,0,0,0,0,0,0,0,0
+1494,BEETLE_KING,Beetle King,34,1874,0,679,442,1,191,243,45,12,1,34,10,1,50,1,10,12,0,4,22,149,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,133,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,149,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,133,200,1152,1152,384,7049,1000,513,1000,7195,4500,7200,3500,512,100,0,0,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,149,200,1152,1152,384,517,4700,7196,4000,513,1000,7198,900,1801,5,1812,3,0,0,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,148,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
+1503,GIBBET,Gibbet,58,6841,0,4011,1824,3,238,418,28,31,1,42,42,27,46,28,10,12,2,6,27,149,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,3,418,647,47,38,1,30,5,45,62,22,10,12,1,1,49,149,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,3,841,1476,39,44,1,66,54,74,81,43,10,12,2,6,87,149,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,3,267,279,18,29,1,72,45,35,48,65,10,12,1,6,82,149,147,1152,768,732,7221,5500,7216,2000,518,200,2508,10,2502,10,0,0,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,3,217,864,37,41,1,30,90,15,52,12,10,12,2,7,67,149,175,1152,1344,400,7208,5500,7207,2000,7223,200,7017,200,984,100,969,10,2288,5,1229,2,0,0,4214,1,0,0,0,0,0,0,0,0
+1508,QUVE,Quve,40,4559,0,414,306,3,170,299,12,12,1,61,24,19,37,24,10,12,0,1,29,149,150,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,3,164,287,14,10,1,59,60,18,36,21,10,12,0,1,29,149,150,1152,960,752,1059,5500,7220,5500,7225,1000,2282,2,2274,1,0,0,0,0,0,0,0,0,4193,1,0,0,0,0,0,0,0,0
+1510,HYLOZOIST,Hylozoist,51,7186,0,2314,1297,3,181,317,16,51,1,28,26,47,66,14,10,12,0,1,47,149,155,1152,1536,969,7217,5500,7215,2000,7213,1000,7220,1000,740,200,757,100,0,0,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,181,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
+1512,HYEGUN,Hyegun,56,9981,0,2199,1032,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,617,10,2614,5,616,10,0,0,4328,1,0,0,0,0,0,0,0,0
+1513,CIVIL_SERVANT,Civil Servant,62,14390,0,4023,2750,3,650,1010,42,5,58,15,20,60,80,50,10,12,1,2,44,133,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,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,3,550,789,39,10,55,62,55,25,72,22,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,4272,1,0,0,0,0,0,0,0,0
+1515,GARM_BABY,Hatii Baby,61,20119,0,1022,2980,3,680,1179,34,13,45,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,617,10,1305,15,616,10,0,0,4323,1,0,0,0,0,0,0,0,0
+1516,INCREASE_SOIL,Increase Soil,51,8230,0,2760,2110,3,560,700,30,12,40,45,23,12,69,12,10,12,1,0,62,145,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
+1517,LI_ME_MANG_RYANG,Li Me Mang Ryang,48,5920,0,1643,1643,3,434,633,23,16,46,51,19,8,57,30,10,12,2,6,62,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
+1518,BACSOJIN,Bacsojin,75,218652,0,33095,18214,1,1219,2169,10,51,1,85,78,85,150,60,10,12,2,7,67,181,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,Chung E,33,5628,0,739,455,1,210,251,0,10,1,33,33,10,58,15,10,12,1,7,25,145,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,131,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
+1582,DEVILING,Deviling,31,64500,0,211,412,1,135,270,5,70,1,62,1,1,72,1,10,12,1,6,87,131,400,1872,672,480,909,3500,983,100,912,700,512,1000,7221,1500,7208,500,2255,60,0,0,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,79,74,1,40,40,40,40,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,4302,1,0,0,0,0,0,0,0,0
+1584,TAMRUAN,Tamruan,52,10234,0,3812,55,3,489,534,38,94,1,40,40,40,40,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,4304,1,0,0,0,0,0,0,0,0
+1585,MIME_MONKEY,Mime Monkey,40,6000,0,200,22,3,300,350,40,40,1,40,40,40,40,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,0,0,0,0,0,0,0,0,0,0
+1586,LEAF_CAT,Leaf Cat,38,2396,0,165,1212,1,266,307,12,51,1,40,40,40,40,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,4195,1,0,0,0,0,0,0,0,0
+1587,KRABEN,Kraben,50,5880,0,257,1652,1,125,765,1,66,1,40,40,40,40,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,4295,1,0,0,0,0,0,0,0,0
+1613,METALING,Metaling,26,889,0,200,100,1,50,150,30,10,20,20,20,20,26,30,10,12,1,0,20,131,350,1272,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1614,MINERAL,Mineral,56,7950,0,3000,2500,1,300,800,20,40,50,50,50,50,56,50,10,12,1,0,20,129,300,1072,672,480,728,200,984,200,7053,500,1011,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1615,OBSIDIAN,Obsidian,50,8812,0,2500,1800,1,300,500,10,10,50,50,50,50,50,50,10,12,1,0,20,133,350,1572,672,480,985,100,730,10,7053,500,998,300,999,100,1003,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1616,PITMAN,Pitman,43,5015,0,1800,1300,1,300,500,5,5,50,50,50,50,50,50,10,12,1,1,20,133,300,1672,672,480,1002,500,1011,500,1010,500,998,300,999,100,1041,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1617,WASTE_STOVE,Waste Stove,68,15895,0,5000,3000,1,300,1000,50,30,60,60,60,60,60,60,10,12,1,0,20,133,300,872,672,480,1002,500,625,300,7054,500,7068,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1618,UNGOLIANT,Ungoliant,80,25000,0,7000,5000,1,500,1500,60,40,80,80,80,80,80,80,10,12,2,0,20,133,300,672,672,480,1014,500,1013,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
+1619,PORCELLIO,Porcellio,28,1654,0,400,200,1,100,300,10,5,30,30,30,30,30,30,10,12,1,0,20,131,150,1072,672,480,1052,500,911,500,928,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1620,NOXIOUS,Noxious,35,2038,0,600,400,1,100,300,0,0,30,30,30,30,30,30,10,12,1,0,20,133,300,1472,672,480,7001,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
+1621,VENOMOUS,Venomous,35,2038,0,600,400,1,100,300,0,0,30,30,30,30,30,30,10,12,1,0,20,133,300,1472,672,480,7119,500,7154,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
+1622,TEDDY_BEAR,Teddy Bear,71,8109,0,6000,4000,1,500,1000,30,50,70,70,70,70,70,70,10,12,1,0,20,131,500,572,672,480,538,500,7053,450,518,400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1623,RSX_0806,RSX 0806,80,218652,0,2,1,1,1219,2169,10,51,1,85,78,85,150,60,10,12,2,7,67,181,200,1152,1152,480,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
+1624,WASTE_STOVE_,Waste Stove,68,15895,0,5000,3000,1,300,1000,50,30,60,60,60,60,60,60,10,12,1,0,20,133,300,872,672,480,1002,500,625,300,7054,500,7068,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1625,PORCELLIO_,Porcellio,28,1654,0,400,200,1,100,300,10,5,30,30,30,30,30,30,10,12,1,0,20,131,150,1072,672,480,1052,500,911,500,928,500,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
index 3564039ca..e4806cacd 100644
--- a/db/mob_db2.txt
+++ b/db/mob_db2.txt
@@ -1,74 +1,112 @@
-//knight quest mobs with poring stats
-1419,G_FARMILIAR,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1420,G_ARCHER_SKELETON,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1421,G_ISIS,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1422,G_HUNTER_FLY,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1423,G_GHOUL,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1424,G_SIDE_WINDER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1425,G_OBEAUNE,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1426,G_MARC,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1427,G_NIGHTMARE,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1428,G_POISON_SPORE,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1429,G_ARGIOPE,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1430,G_ARGOS,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1431,G_BAPHOMET_,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1432,G_DESERT_WOLF,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1433,G_DEVIRUCHI,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1434,G_DRAINLIAR,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1435,G_EVIL_DRUID,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1436,G_JAKK,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1437,G_JOKER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1438,G_KHALITZBURG,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1439,G_HIGH_ORC,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1440,G_STEM_WORM,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1441,G_PENOMENA,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1442,G_SASQUATCH,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1443,G_CRUISER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1444,G_CHEPET,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1445,G_RAGGLER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1446,G_INJUSTICE,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1447,G_GRYPHON,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1448,G_DARK_FRAME,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1449,G_MUTANT_DRAGON,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1450,G_WIND_GHOST,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1451,G_MERMAN,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1452,G_ORC_LADY,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1453,G_RAYDRIC_ARCHER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1454,G_TRI_JOINT,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1455,G_KOBOLD_ARCHER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1456,G_CHIMERA,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1457,G_MANTIS,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1458,G_MARDUK,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1459,G_MARIONETTE,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1460,G_MATYR,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1461,G_MINOROUS,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1462,G_ORC_SKELETON,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1463,G_ORC_ZOMBIE,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1464,G_PASANA,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1465,G_PETIT,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1466,G_PETIT_,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1467,G_RAYDRIC,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1468,G_REQUIEM,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1469,G_SKEL_WORKER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1470,G_ZEROM,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1471,G_NINE_TAIL,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1472,G_BON_GUN,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1473,G_ORC_ARCHER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1474,G_MIMIC,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1475,G_WRAITH,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1476,G_ALARM,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1477,G_ARCLOUSE,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1478,G_RIDEWORD,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1479,G_SKEL_PRISONER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1480,G_ZOMBIE_PRISONER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1481,G_PUNK,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1482,G_ZHERLTHSH,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1483,G_RYBIO,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1484,G_PHENDARK,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1485,G_MYSTELTAINN,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1486,G_TIRFING,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1487,G_EXECUTIONER,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1488,G_ANOLIAN,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1489,G_STING,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1490,G_WANDER_MAN,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
-1491,G_DOKEBI,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,3,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,4001,20,0,0
+//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
+//
+//Knight quest monsters with poring stats
+1419,G_FARMILIAR,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
+1420,G_ARCHER_SKELETON,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
+1421,G_ISIS,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
+1422,G_HUNTER_FLY,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
+1423,G_GHOUL,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
+1424,G_SIDE_WINDER,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
+1425,G_OBEAUNE,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
+1426,G_MARC,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
+1427,G_NIGHTMARE,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
+1428,G_POISON_SPORE,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
+1429,G_ARGIOPE,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
+1430,G_ARGOS,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
+1431,G_BAPHOMET_,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
+1432,G_DESERT_WOLF,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
+1433,G_DEVIRUCHI,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
+1434,G_DRAINLIAR,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
+1435,G_EVIL_DRUID,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
+1436,G_JAKK,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
+1437,G_JOKER,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
+1438,G_KHALITZBURG,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
+1439,G_HIGH_ORC,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
+1440,G_STEM_WORM,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
+1441,G_PENOMENA,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
+1442,G_SASQUATCH,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
+1443,G_CRUISER,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
+1444,G_CHEPET,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
+1445,G_RAGGLER,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
+1446,G_INJUSTICE,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
+1447,G_GRYPHON,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
+1448,G_DARK_FRAME,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
+1449,G_MUTANT_DRAGON,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
+1450,G_WIND_GHOST,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
+1451,G_MERMAN,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
+1452,G_ORC_LADY,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
+1453,G_RAYDRIC_ARCHER,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
+1454,G_TRI_JOINT,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
+1455,G_KOBOLD_ARCHER,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
+1456,G_CHIMERA,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
+1457,G_MANTIS,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
+1458,G_MARDUK,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
+1459,G_MARIONETTE,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
+1460,G_MATYR,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
+1461,G_MINOROUS,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
+1462,G_ORC_SKELETON,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
+1463,G_ORC_ZOMBIE,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
+1464,G_PASANA,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
+1465,G_PETIT,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
+1466,G_PETIT_,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
+1467,G_RAYDRIC,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
+1468,G_REQUIEM,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
+1469,G_SKEL_WORKER,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
+1470,G_ZEROM,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
+1471,G_NINE_TAIL,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
+1472,G_BON_GUN,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
+1473,G_ORC_ARCHER,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
+1474,G_MIMIC,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
+1475,G_WRAITH,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
+1476,G_ALARM,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
+1477,G_ARCLOUSE,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
+1478,G_RIDEWORD,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
+1479,G_SKEL_PRISONER,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
+1480,G_ZOMBIE_PRISONER,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
+1481,G_PUNK,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
+1482,G_ZHERLTHSH,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
+1483,G_RYBIO,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
+1484,G_PHENDARK,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
+1485,G_MYSTELTAINN,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
+1486,G_TIRFING,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
+1487,G_EXECUTIONER,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
+1488,G_ANOLIAN,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
+1489,G_STING,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
+1490,G_WANDER_MAN,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
+1491,G_DOKEBI,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
+
+//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
+
+//Some Custon Shit
+1900,VALARIS,Valaris,99,668000,0,107250,37895,1,440,510,35,45,1,152,96,85,120,95,10,10,0,7,67,181,100,676,1152,768,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1,13000,1000,608,1000,750,400,923,3800
+1901,VALARIS_WORSHIPPER,Valaris's Worshipper,50,8578,0,2706,1480,1,260,310,15,25,1,75,55,1,93,45,10,12,0,7,27,149,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,1,440,510,35,45,1,152,96,85,120,95,10,10,0,7,67,181,100,676,1152,768,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1,13000,1000,608,1000,750,400,923,3800
+
+1970,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
+1971,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
+1972,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,512,0,0,0,0,0,4022,5,0,0,0,0,0,0,0,0
+1973,PECOPECO_,PecoPeco,13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,137,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,512,0,512,0,0,0,0,0,4031,3,0,0,0,0,0,0,0,0
+1974,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,133,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_,Munak,30,2872,0,361,218,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,609,20,2337,1,2305,100,1558,5,0,0,0,0,4090,3,0,0,0,0,0,0,0,0
+1976,ISIS_,Isis,43,4828,0,2396,993,1,423,507,10,35,1,65,43,30,72,15,10,12,2,6,27,149,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_,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,512,0,512,0,0,0,0,0,4033,5,0,0,0,0,0,0,0,0
+1978,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,133,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_,Steel ChonChon,17,530,0,109,71,1,54,65,15,0,1,43,17,5,33,10,10,12,0,4,24,139,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__,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,512,0,0,0,0,0,4008,10,0,0,0,0,0,0,0,0
+1981,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
+1982,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
+1983,YOYO_,Yoyo,19,879,0,148,93,1,71,82,0,0,1,24,30,35,32,55,10,12,0,2,22,139,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,512,0,0,0,0,0,4051,1,0,0,0,0,0,0,0,0
+1984,METALLER_,Metaller,22,926,0,241,152,1,131,159,15,30,1,22,22,20,49,50,10,12,1,4,23,139,200,1708,1008,540,990,60,940,6500,911,400,757,49,707,20,935,3000,512,0,0,0,0,0,4057,1,0,0,0,0,0,0,0,0
+1985,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
+1986,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,133,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
+1987,BAPHOMET__,Baphomet Jr.,50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,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
+1988,DESERT_WOLF_B_,Desert Wolf Puppy,9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,137,300,1600,900,240,1010,85,919,5500,2306,60,517,600,2301,200,512,0,512,0,0,0,0,0,4023,10,0,0,0,0,0,0,0,0
+1989,DEVIRUCHI_,Deviruchi,46,7360,0,2662,1278,1,475,560,10,25,1,69,40,55,87,30,10,12,0,6,27,149,150,980,600,384,1038,5500,1039,400,2255,2,1458,2,1009,5,912,1500,756,154,0,0,0,0,4122,1,0,0,0,0,0,0,0,0
+1990,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
+1991,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
+1992,PETIT__,Petit,44,6881,0,1677,1034,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,149,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
+1993,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
+1994,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,512,0,0,0,0,0,4100,1,0,0,0,0,0,0,0,0
+1995,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,149,200,1720,500,420,1094,5500,7014,40,618,60,2337,2,609,15,508,1000,502,250,5046,1,0,0,0,0,0,0,0,0,0,0,0,0
diff --git a/db/mob_race2_db.txt b/db/mob_race2_db.txt
new file mode 100644
index 000000000..c36945cb2
--- /dev/null
+++ b/db/mob_race2_db.txt
@@ -0,0 +1,6 @@
+// RACE,Mob ID1,Mob ID2,Mob ID3,...,Mob ID9
+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 // 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
index a3c12702d..f40adeb67 100644
--- a/db/mob_skill_db.txt
+++ b/db/mob_skill_db.txt
@@ -1996,6 +1996,8 @@ Only place specification skill is good for a round system. friend is good only o
1900,Grimtooth,chase,137,5,2500,0,0,no,target,always,0,,,,,,
// Valaris's Worshipper
1901,Envenom,attack,52,10,500,0,10000,no,target,always,0,,,,,,
+// MC Cameri
+
// Easter Bunny
1921,Summon Minions,attack,196,5,1000,3000,10000,no,self,slavele,2,1063,,,,,
diff --git a/db/packet_db.txt b/db/packet_db.txt
index e555bcb59..81bcf2c89 100644
--- a/db/packet_db.txt
+++ b/db/packet_db.txt
@@ -1,7 +1,23 @@
-//The packet database allows you to add support for new clients, because packets change every release.
-//This only allows 1 type of client at a time, make sure your client is the last one in the list
-//EX: You have client 628 and it goes up to 1021, delete or comment (use //) till your client is last.
+// The packet database allows you to add support for new clients,
+// because packets change every release.
+// By default this only allows 1 type of client at a time, make sure your
+// client is the last one in the list
+// EX: You have client 628 and it goes up to 1021,
+// delete or comment (use //) till your client is last.
+
+// Whether to allow identifying clients via the packet DB
+enable_packet_db: yes
+
+// Main packet version of the DB (default = Auto Detect)
+packet_db_ver: default
+
+// Whether the packet DB takes higher precedence over the hardcoded packet
+// length and functions, and whether to overwrite them when reading
+prefer_packet_db: yes
+
+
+// packet_ver: 5
0x0064,55
0x0065,17
0x0066,3
@@ -221,7 +237,7 @@
0x013c,4
0x013d,6
0x013e,24
-0x013f,26
+0x013F,26,itemmonster,2
0x0140,22,mapmove,2:18:20
0x0141,14
0x0142,6
@@ -434,143 +450,200 @@
//jRO‚Í‚±‚±‚Ü‚Å
//2004-07-06kRO
-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,useskilltopos,4:9:11:13:15
+// 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,useskilltopos,4:9:11:13:15
//2004-07-13kRO
-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,useskilltopos,7:9:15:17:19
+// 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,useskilltopos,7:9:15:17:19
//2004-07-26kRO
-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,useskilltopos,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
+// 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,useskilltopos,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
-0x0072,17,dropitem,8:15
+// 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,useskilltopos,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
+// 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,useskilltopos,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
+// 0x020f,0
+// 0x0210,0
+// 0x0211,0
+// 0x0212,26
+// 0x0213,26
+// 0x0214,42
//2004-08-17aSakexe
-0x020f,10
-0x0210,22
+// 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,useskilltopos,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
+// 0x007e,19,movetokafra,3:15
+// 0x0085,23,actionrequest,9:22
+// 0x0089,9,walktoxy,6
+// 0x008c,105,useskilltopos,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
+// 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
-0x0072,18,useitem,10:14
-0x007e,25,movetokafra,6:21
-0x0085,9,actionrequest,3:8
-0x0089,14,walktoxy,11
-0x008c,109,useskilltopos,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
+// packet_ver: 11
+// 0x0072,18,useitem,10:14
+// 0x007e,25,movetokafra,6:21
+// 0x0085,9,actionrequest,3:8
+// 0x0089,14,walktoxy,11
+// 0x008c,109,useskilltopos,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
-0x0072,17,useitem,6:13
-0x007e,16,movetokafra,5:12
-0x0089,6,walktoxy,3
-0x008c,103,useskilltopos,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
+// packet_ver: 12
+// 0x0072,17,useitem,6:13
+// 0x007e,16,movetokafra,5:12
+// 0x0089,6,walktoxy,3
+// 0x008c,103,useskilltopos,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
-0x0072,13,useitem,5:9
-0x007e,13,movetokafra,6:9
-0x0085,15,actionrequest,4:14
-0x008c,108,useskilltopos,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
+// packet_ver: 13
+// 0x0072,13,useitem,5:9
+// 0x007e,13,movetokafra,6:9
+// 0x0085,15,actionrequest,4:14
+// 0x008c,108,useskilltopos,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
-0x0215,6
-0x0143,23,npcamountinput,2:6
-0x0145,19
-//0x01f9,6,adopt,5 \ No newline at end of file
+// packet_ver: 14
+// 0x0215,6
+// 0x0143,23,npcamountinput,2:6
+// 0x0145,19
+//0x01f9,6,adopt,5
+
+//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,useskilltopos,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
+// 0x0222,6
+// 0x0221,-1
+// 0x021d,6
+// 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,useskilltopos,9:18:22:32:34
+0x00a2,11,solvecharname,7
+0x0143,10,npcamountinput,2:6
+
+// packet_ver: 17
+// Add new packets here \ No newline at end of file
diff --git a/db/produce_db.txt b/db/produce_db.txt
index 9eb918afe..82c708dda 100644
--- a/db/produce_db.txt
+++ b/db/produce_db.txt
@@ -9,8 +9,6 @@
995,16,96,991,10
997,16,96,993,10
996,16,96,992,10
-984,16,97,756,3,1003,1
-985,16,97,757,3,1003,1
// Weapon ItemLV=wLV
1101,1,99,998,2
1104,1,99,998,30
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index cc4218f52..10aa46ac1 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -2,7 +2,7 @@
//id,cast_list,delay_list,upkeep_time,upkeep_time2
6,0,0,30000,0 //SM_PROVOKE#ƒvƒƒ{ƒbƒN#
-
+7,0,2000,0,0 //SM_MAGNUM#ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN#
8,0,0,10000:13000:16000:19000:22000:25000:28000:31000:34000:37000,0 //SM_ENDURE#ƒCƒ“ƒfƒ…ƒA#
10,0,0,10000,0 //MG_SIGHT#ƒTƒCƒg#
@@ -10,13 +10,13 @@
12,4000:3500:3500:2500:2000:1500:1000:1000:1000:1000,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0 //MG_SAFETYWALL#ƒZƒCƒtƒeƒBƒEƒH[ƒ‹#
13,500,1200:1400:1600:1800:2000:2200:2400:2600:2800:2700,0,0 //MG_SOULSTRIKE#ƒ\ƒEƒ‹ƒXƒgƒ‰ƒCƒN#
14,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0 //MG_COLDBOLT#ƒR[ƒ‹ƒhƒ{ƒ‹ƒg#
-15,800,1500,0,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000 //MG_FROSTDIVER#ƒtƒƒXƒgƒ_ƒCƒo[#
+15,800,1500,0,3000:6000:9000:12000:15000:18000:21000:24000:27000:30000 //MG_FROSTDIVER#ƒtƒƒXƒgƒ_ƒCƒo[#
16,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //MG_STONECURSE#ƒXƒg[ƒ“ƒJ[ƒX#
17,1600,1600,0,0 //MG_FIREBALL#ƒtƒ@ƒCƒA[ƒ{[ƒ‹#
18,2000:1850:1700:1550:1400:1250:1100:950:800:650,0,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0 //MG_FIREWALL#ƒtƒ@ƒCƒA[ƒEƒH[ƒ‹#
19,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0 //MG_FIREBOLT#ƒtƒ@ƒCƒA[ƒ{ƒ‹ƒg#
20,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0 //MG_LIGHTNINGBOLT#ƒ‰ƒCƒgƒjƒ“ƒOƒ{ƒ‹ƒg#
-21,1000:2000:3000:4000:5000:6000:7000:8000:9000:10000,2000,0,0 //MG_THUNDERSTORM#ƒTƒ“ƒ_[ƒXƒg[ƒ€#
+21,1000:2000:3000:4000:5000:6000:7000:8000:9000:10000,2000,500,0 //MG_THUNDERSTORM#ƒTƒ“ƒ_[ƒXƒg[ƒ€#
24,0,0,10000,0 //AL_RUWACH#ƒ‹ƒAƒt#
25,0,0,10000,0 //AL_PNEUMA#ƒjƒ…[ƒ}#
@@ -25,14 +25,14 @@
28,0,1000,0,0 //AL_HEAL#ƒq[ƒ‹#
29,1000,1000,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0 //AL_INCAGI#‘¬“x‘‰Á#
30,1000,1000,40000:50000:60000:70000:80000:90000:100000:110000:120000:130000,0 //AL_DECAGI#‘¬“xŒ¸­#
-31,0,2000,0,0 //AL_HOLYWATER#ƒAƒNƒAƒxƒlƒfƒBƒNƒ^#
+31,1000,500,0,0 //AL_HOLYWATER#ƒAƒNƒAƒxƒlƒfƒBƒNƒ^#
32,500,2000,0,0 //AL_CRUCIS#ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX#
33,500,3500,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0 //AL_ANGELUS#ƒGƒ“ƒWƒFƒ‰ƒX#
34,0,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0 //AL_BLESSING#ƒuƒŒƒbƒVƒ“ƒO#
35,0,1000,0,0 //AL_CURE#ƒLƒ…ƒA[#
45,0,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0 //AC_CONCENTRATION#W’†—ÍŒüã#
-46,0,1500,100,0 //AC_DOUBLE
+46,0,-300,100,0 //AC_DOUBLE
47,0,1500,100,0 //AC_SHOWER
51,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0 //TF_HIDING#ƒnƒCƒfƒBƒ“ƒO#
@@ -62,17 +62,17 @@
78,0,3000,600000,0 //PR_LEXAETERNA#ƒŒƒbƒNƒXƒG[ƒeƒ‹ƒi#
79,15000,4000,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0 //PR_MAGNUS#ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€#
80,3000:2700:2400:2100:1800:1500:1200:900:600:300,2000,30000,0 //WZ_FIREPILLAR#ƒtƒ@ƒCƒA[ƒsƒ‰[#
-81,700,2000,0,0 //WZ_SIGHTRASHER#ƒTƒCƒgƒ‰ƒbƒVƒƒ[#
+81,700,2000,500,0 //WZ_SIGHTRASHER#ƒTƒCƒgƒ‰ƒbƒVƒƒ[#
-83,15000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,0,3200:3400:3600:3800:4000:4200:4400:4600:4800:5000 //WZ_METEOR#ƒƒeƒIƒXƒg[ƒ€#
+83,15000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,500,3200:3400:3600:3800:4000:4200:4400:4600:4800:5000 //WZ_METEOR#ƒƒeƒIƒXƒg[ƒ€#
84,2500:3000:3500:4000:4500:5000:5500:6000:6500:7000,0,0,0 //WZ_JUPITEL#ƒ†ƒsƒeƒ‹ƒTƒ“ƒ_[#
-85,15000:14500:14000:13500:13000:12500:12000:11500:11000:10500,5000,0,5500:6000:6500:7000:7500:8000:8500:9000:9500:10000 //WZ_VERMILION#ƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“#
+85,15000:14500:14000:13500:13000:12500:12000:11500:11000:10500,5000,4100,5500:6000:6500:7000:7500:8000:8500:9000:9500:10000 //WZ_VERMILION#ƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“#
86,1000:2000:3000:4000:5000,0,0,0 //WZ_WATERBALL#ƒEƒH[ƒ^[ƒ{[ƒ‹#
87,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0 //WZ_ICEWALL#ƒAƒCƒXƒEƒH[ƒ‹#
-88,5000:4700:4400:4100:3800:3500:3200:2900:2700:2500,1000,0,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000 //WZ_FROSTNOVA#ƒtƒƒXƒgƒmƒ”ƒ@#
-89,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000,5000,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //WZ_STORMGUST#ƒXƒg[ƒ€ƒKƒXƒg#
+88,5000:4700:4400:4100:3800:3500:3200:2900:2700:2500,1000,0,1500:3000:4500:6000:7500:9000:10500:12000:13500:15000 //WZ_FROSTNOVA#ƒtƒƒXƒgƒmƒ”ƒ@#
+89,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000,5000,4600,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //WZ_STORMGUST#ƒXƒg[ƒ€ƒKƒXƒg#
90,1000:2000:3000:4000:5000,700,0,0 //WZ_EARTHSPIKE#ƒA[ƒXƒXƒpƒCƒN#
-91,1000:2000:3000:4000:5000,700,0,0 //WZ_HEAVENDRIVE#ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu#
+91,1000:2000:3000:4000:5000,700,500,0 //WZ_HEAVENDRIVE#ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu#
92,0,1000,5000:10000:15000:20000:25000,5000:10000:15000:20000:25000 //WZ_QUAGMIRE#ƒNƒ@ƒOƒ}ƒCƒA#
110,0,0,0,6000:7000:8000:9000:10000:11000 //BS_HAMMERFALL#ƒnƒ“ƒ}[ƒtƒH[ƒ‹#
@@ -97,7 +97,7 @@
135,0,0,500:1000:2000:3000:4000:5000:6000:7000:8000:9000,0 //AS_CLOAKING#ƒNƒ[ƒLƒ“ƒO#
136,0,0,0,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000 //AS_SONICBLOW#ƒ\ƒjƒbƒNƒuƒ[#
-138,0,0,30000:45000:60000:75000:90000:105000:120000:135000:150000:165000,0 //AS_ENCHANTPOISON#ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“#
+138,0,0,30000:45000:60000:75000:90000:105000:120000:135000:150000:165000,10000:20000:30000:40000:50000:60000:70000:80000:90000:100000 //AS_ENCHANTPOISON#ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“#
139,0,0,20000:25000:30000:35000:40000:45000:50000:55000:60000:65000,0 //AS_POISONREACT#?ƒCƒYƒ“ƒŠƒAƒNƒg#
140,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000 //AS_VENOMDUST#ƒxƒiƒ€ƒ_ƒXƒg#
141,1000,0,5500:6000:6500:7000:7500:8000:8500:9000:9500:10000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000 //AS_SPLASHER#ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[#
@@ -141,22 +141,22 @@
220,0,0,180000,0 //RG_GRAFFITI#ƒOƒ‰ƒtƒBƒeƒB#
229,1000,0,40000:45000:50000:55000:60000,0 //AM_DEMONSTRATION#ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“#
-230,1000,0,3:7:10:12:13,0 //AM_ACIDTERROR#ƒAƒVƒbƒhƒeƒ‰[#
+230,1000,0,3:7:10:12:13,60000 //AM_ACIDTERROR#ƒAƒVƒbƒhƒeƒ‰[#
-232,2000,500,40000:50000:60000:70000:80000,0 //AM_CANNIBALIZE#ƒoƒCƒIƒvƒ‰ƒ“ƒg#
-233,2000,500,30000,0 //AM_SPHEREMINE#ƒXƒtƒBƒA[ƒ}ƒCƒ“#
-234,2000,0,60000:120000:180000:240000:300000,0 //AM_CP_WEAPON#ƒPƒ~ƒJƒ‹ƒEƒFƒ|ƒ“ƒ`ƒƒ[ƒW#
-235,2000,0,60000:120000:180000:240000:300000,0 //AM_CP_SHIELD#ƒPƒ~ƒJƒ‹ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW#
-236,2000,0,60000:120000:180000:240000:300000,0 //AM_CP_ARMOR#ƒPƒ~ƒJƒ‹ƒA[ƒ}[ƒ`ƒƒ[ƒW#
-237,2000,0,60000:120000:180000:240000:300000,0 //AM_CP_HELM#ƒPƒ~ƒJƒ‹ƒwƒ‹ƒ€ƒ`ƒƒ[ƒW#
+232,2000,500,300000:240000:180000:120000:60000,0 //AM_CANNIBALIZE#ƒoƒCƒIƒvƒ‰ƒ“ƒg#
+233,2000,500,40000:50000:60000:70000:80000,0 //AM_SPHEREMINE#ƒXƒtƒBƒA[ƒ}ƒCƒ“#
+234,2000,0,120000:240000:360000:480000:600000,0 //AM_CP_WEAPON#ƒPƒ~ƒJƒ‹ƒEƒFƒ|ƒ“ƒ`ƒƒ[ƒW#
+235,2000,0,120000:240000:360000:480000:600000,0 //AM_CP_SHIELD#ƒPƒ~ƒJƒ‹ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW#
+236,2000,0,120000:240000:360000:480000:600000,0 //AM_CP_ARMOR#ƒPƒ~ƒJƒ‹ƒA[ƒ}[ƒ`ƒƒ[ƒW#
+237,2000,0,120000:240000:360000:480000:600000,0 //AM_CP_HELM#ƒPƒ~ƒJƒ‹ƒwƒ‹ƒ€ƒ`ƒƒ[ƒW#
249,0,0,300000,0 //CR_AUTOGUARD#ƒI[ƒgƒK[ƒh#
250,0,0,0,8000:9000:10000:11000:12000 //CR_SHIELDCHARGE#ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW#
251,0,700,0,0 //CR_SHIELDBOOMERANG#ƒV[ƒ‹ƒhƒu[ƒƒ‰ƒ“#
252,0,0,300000,0 //CR_REFLECTSHIELD#ƒŠƒtƒŒƒNƒgƒV[ƒ‹ƒh#
253,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //CR_HOLYCROSS#ƒz[ƒŠ[ƒNƒƒX#
-254,3000,1500,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //CR_GRANDCROSS#ƒOƒ‰ƒ“ƒhƒNƒƒX#
-
+254,3000,1500,1000,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //CR_GRANDCROSS#ƒOƒ‰ƒ“ƒhƒNƒƒX#
+255,3000,0,0,0 //CR_DEVOTION#ƒfƒBƒ{[ƒVƒ‡ƒ“
256,3000,0,180000,0 //CR_PROVIDENCE#ƒvƒƒ”ƒBƒfƒ“ƒX#
257,0,800,180000,0 //CR_DEFENDER#ƒfƒBƒtƒFƒ“ƒ_[#
258,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0 //CR_SPEARQUICKEN#ƒXƒsƒAƒNƒCƒbƒPƒ“#
@@ -166,7 +166,7 @@
266,1000,500,0,0 //MO_INVESTIGATE#”­™¤#
267,1000,500,0,0 //MO_FINGEROFFENSIVE#Žw’e#
-268,0,0,30000:60000:90000:120000:150000,0 //MO_STEELBODY#‹à„#
+268,5000,0,30000:60000:90000:120000:150000,0 //MO_STEELBODY#‹à„#
269,0,0,500:700:900:1100:1300,20000:30000:40000:50000:60000 //MO_BLADESTOP#”’nŽæ‚è#
270,0,0,180000,0 //MO_EXPLOSIONSPIRITS#”š—ô”g“®#
271,4000:3500:3000:2500:2000,3000:2500:2000:1500:1000,0,300000 //MO_EXTREMITYFIST#ˆ¢C—…”e™€Œ#
@@ -174,17 +174,16 @@
276,0,1500,400:600:800:1000:1200,0 //SA_MAGICROD#ƒ}ƒWƒbƒNƒƒbƒh#
277,700,0,0,0 //SA_SPELLBREAKER#ƒXƒyƒ‹ƒuƒŒƒCƒJ[#
-//279,3000,0,120000:150000:180000:210000:240000:270000:300000:360000:390000,0 //SA_AUTOSPELL#ƒI[ƒgƒXƒyƒ‹#
-279,3000,0,0,0 //SA_AUTOSPELL#ƒI[ƒgƒXƒyƒ‹#
-280,3000,0,1200000,0 //SA_FLAMELAUNCHER#ƒtƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ[#
-281,3000,0,1200000,0 //SA_FROSTWEAPON#ƒtƒƒXƒgƒEƒFƒ|ƒ“#
-282,3000,0,1200000,0 //SA_LIGHTNINGLOADER#ƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[#
-283,3000,0,1200000,0 //SA_SEISMICWEAPON#ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“#
-
-285,5000,0,180000,180000 //SA_VOLCANO#ƒ{ƒ‹ƒP[ƒm#
-286,5000,0,180000,180000 //SA_DELUGE#ƒfƒŠƒ…[ƒW#
-287,5000,0,180000,180000 //SA_VIOLENTGALE#ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹#
-288,5000,0,180000,180000 //SA_LANDPROTECTOR#ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[#
+279,3000,0,120000:150000:180000:210000:240000:270000:300000:360000:390000,0 //SA_AUTOSPELL#ƒI[ƒgƒXƒyƒ‹#
+280,3000,0,1200000:1200000:1200000:1200000:1800000,0 //SA_FLAMELAUNCHER#ƒtƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ[#
+281,3000,0,1200000:1200000:1200000:1200000:1800000,0 //SA_FROSTWEAPON#ƒtƒƒXƒgƒEƒFƒ|ƒ“#
+282,3000,0,1200000:1200000:1200000:1200000:1800000,0 //SA_LIGHTNINGLOADER#ƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[#
+283,3000,0,1200000:1200000:1200000:1200000:1800000,0 //SA_SEISMICWEAPON#ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“#
+
+285,5000,0,60000:120000:180000:240000:300000,60000:120000:180000:240000:300000 //SA_VOLCANO#ƒ{ƒ‹ƒP[ƒm#
+286,5000,0,60000:120000:180000:240000:300000,60000:120000:180000:240000:300000 //SA_DELUGE#ƒfƒŠƒ…[ƒW#
+287,5000,0,60000:120000:180000:240000:300000,60000:120000:180000:240000:300000 //SA_VIOLENTGALE#ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹#
+288,5000,0,60000:120000:180000:240000:300000,60000:120000:180000:240000:300000 //SA_LANDPROTECTOR#ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[#
289,2000,0,0,0 //SA_DISPELL#ƒfƒBƒXƒyƒ‹#
304,0,0,0,5000 //BD_ADAPTATION#ƒAƒhƒŠƒu#
@@ -219,34 +218,35 @@
335,3000,0,0,0 //WE_FEMALE#‚ ‚È‚½‚És‚­‚µ‚Ü‚·#
336,0,0,10000,0 //WE_CALLPARTNER#‚ ‚È‚½‚Ɉ§‚¢‚½‚¢#
+339,3000,1500,1000,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000 //NPC_DARKGRANDCROSS#ˆÅƒOƒ‰ƒ“ƒhƒNƒƒX
+
355,0,0,40000:60000:80000:100000:120000,0 //LK_AURABLADE#ƒI[ƒ‰ƒuƒŒ[ƒh#
-356,0,0,10000:12000:14000:16000:18000:20000:18000:16000:14000:12000,0 //LK_PARRYING#ƒpƒŠƒCƒ“ƒO#
+356,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0 //LK_PARRYING#ƒpƒŠƒCƒ“ƒO#
357,0,0,25000:30000:35000:40000:45000,0 //LK_CONCENTRATION#ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“#
358,0,0,180000,0 //LK_TENSIONRELAX#ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX#
359,0,0,300000,0 //LK_BERSERK
360,0,0,300000,0 //LK_FURY
-
361,1000:1500:2000:2500:3000,1100:1200:1300:1400:1500,20000:30000:40000:50000:60000,0 //HP_ASSUMPTIO#ƒAƒXƒ€ƒvƒeƒBƒI#
362,5000:6000:7000:8000:9000,2000:3000:4000:5000:6000,20000:25000:30000:35000:40000,20000:25000:30000:35000:40000 //HP_BASILICA#ƒoƒWƒŠƒJ#
365,300,300,0,0 //HW_MAGICCRASHER
-366,700,0,360000,0 //HW_MAGICPOWER#–‚–@—Í‘•#
-
-367,2000:2500:3000:3500:4000,2000:3000:4000:5000:6000,0,0 //PA_PRESSURE
-369,0,0,360000,0 //PA_GOSPEL#ƒSƒXƒyƒ‹#
+366,700,0,30000,0 //HW_MAGICPOWER#–‚–@—Í‘•#
+367,2000:2500:3000:3500:4000,2000:3000:4000:5000:6000,0,2000:3000:4000:5000:6000 //PA_PRESSURE
+369,0,0,60000,20000 //PA_GOSPEL#ƒSƒXƒyƒ‹#
370,0,300,0,0 //CH_PALMSTRIKE
+371,0,0,0,2000:4000:6000:8000:10000 //CH_TIGERFIST#•šŒÕŒ#
372,0,800:800:800:800:800:1000:1000:1000:1000:1000,0,0 //CH_CHAINCRUSH#˜A’Œ•öŒ‚#
-373,0,2000:2500:3000:3500:4000,0,0 //PF_HPCONVERSION#ƒ‰ƒCƒt’u‚«Š·‚¦#
+373,0,1000:1200:1400:1600:1800,0,0 //PF_HPCONVERSION#ƒ‰ƒCƒt’u‚«Š·‚¦#
374,3000,5000,0,0 //PF_SOULCHANGE#ƒ\ƒEƒ‹ƒ`ƒFƒ“ƒW#
-375,0,10000:10000:10000:10000:15000,0,0 //PF_SOULBURN#ƒ\ƒEƒ‹ƒo[ƒ“#
+//375,0,10000:10000:10000:10000:15000,0,0 //PF_SOULBURN#ƒ\ƒEƒ‹ƒo[ƒ“#
378,0,2000,20000:30000:40000:50000:60000,20000:30000:40000:50000:60000 //ASC_EDP#ƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“#
-379,0,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0 //ASC_BREAKER
+379,1000,2000:2200:2400:2600:2800:3000:3200:3400:3600:3800,0,0 //ASC_BREAKER
380,0,0,30000,0 //SN_SIGHT#ƒgƒDƒ‹[ƒTƒCƒg#
381,1000,1200,0,0,0 //SN_FALCONASSAULT
-382,2000,0,0,0 //SN_SHARPSHOOTING
-383,2000:2400:2800:3200:3600:4000:4400:4800:5200:5600,0,65000:80000:95000:110000:125000:140000:155000:170000:185000:200000,0 //SN_WINDWALK#ƒEƒCƒ“ƒhƒEƒH[ƒN#
-384,5000:5000:6000:6000:7000:7000:8000:8000:9000:10000,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0 //WS_MELTDOWN#ƒƒ‹ƒgƒ_ƒEƒ“#
+382,2000,500,0,0 //SN_SHARPSHOOTING
+383,2000:2400:2800:3200:3600:4000:4400:4800:5200:5600,0,130000:160000:190000:220000:250000:280000:310000:340000:370000:400000,0 //SN_WINDWALK#ƒEƒCƒ“ƒhƒEƒH[ƒN#
+384,5000:5000:6000:6000:7000:7000:8000:8000:9000:10000,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,5000 //WS_MELTDOWN#ƒƒ‹ƒgƒ_ƒEƒ“#
387,0,0,60000,0 //WS_CARTBOOST#ƒJ[ƒgƒu[ƒXƒg#
389,0,0,10000,0 //ST_CHASEWALK
@@ -268,11 +268,15 @@
406,0,0,0,3000 //ASC_METEORASSAULT#ƒƒeƒIƒAƒTƒ‹ƒg#
407,0,5000,0,0 //ASC_CDP
-475,0,0,300000,0 //ST_PRESERVE##
+475,1000,0,600000,0 //ST_PRESERVE##
476,1000,1000,75000:90000:105000:120000:135000,0 //ST_FULLSTRIP##
-479,2000,0,60000:120000:180000:240000:300000,0 //CR_FULLPROTECTION##
-
-10010,100,60000,0 //GD_BATTLEORDER##
-10011,100,60000,0 //GD_REGENERATION##
-10012,100,0,0 //GD_RESTORE##
-10013,100,0,0 //GD_EMERGENCYCALL##
+479,2000,0,120000:240000:360000:480000:600000,0 //CR_FULLPROTECTION##
+
+10006,0,0,300000,0 //GD_LEADERSHIP##
+10007,0,0,300000,0 //GD_GLORYWOUNDS##
+10008,0,0,300000,0 //GD_SOULCOLD##
+10009,0,0,300000,0 //GD_HAWKEYES##
+10010,100,1000,60000,0 //GD_BATTLEORDER##
+10011,100,1000,60000,0 //GD_REGENERATION##
+10012,100,1000,0,0 //GD_RESTORE##
+10013,100,1000,0,0 //GD_EMERGENCYCALL##
diff --git a/db/skill_castnodex_db.txt b/db/skill_castnodex_db.txt
index 6f205f516..eaa8226a5 100644
--- a/db/skill_castnodex_db.txt
+++ b/db/skill_castnodex_db.txt
@@ -1,12 +1,17 @@
-//<Skill id>,<1 or 0>
-// With 1, dex does not effect the skill's cast rate
-// With 0, dex effects the skill's cast rate
-46,1
-47,1
-129,1
-366,1
-381,1
-382,1
-383,1
-394,1
-403,1 \ No newline at end of file
+//<Skill id>,<Cast: 1 or 0>,<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
+// Example - 46,1,1 = Double Strafe's casting time and delay is not affected by dex.
+
+46,1 //AC_DOUBLE
+47,1 //AC_SHOWER
+129,1 //HT_FALCON
+366,1 //HW_MAGICPOWER
+381,1 //SN_FALCONASSAULT
+382,1 //SN_SHARPSHOOTING
+383,1 //SN_WINDWALK
+394,1 //CG_ARROWVULCAN
+403,1 //PF_MEMORIZE
+406,0,1 //ASC_METEORASSAULT \ No newline at end of file
diff --git a/db/skill_db.txt b/db/skill_db.txt
index 7d6745196..db2e66370 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -6,7 +6,7 @@
4,0,0,0,0,0,10,0,no,0,0,0,none,0 //SM_RECOVERY#HP‰ñ•œ—ÍŒüã#
5,-1,6,1,0,0,10,1,no,0,0,0,weapon,0 //SM_BASH#ƒoƒbƒVƒ…#
6,8,6,1,0,1,10,1,no,0,0,0,none,0 //SM_PROVOKE#ƒvƒ?ƒbƒN#
-7,-1,6,1,3,2,10,5,no,0,0,0,weapon,2 //SM_MAGNUM#?ƒOƒi?ƒuƒŒƒCƒN#
+7,0,6,4,3,2,10,5,no,0,16,0,weapon,2 //SM_MAGNUM#?ƒOƒi?ƒuƒŒƒCƒN#
8,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //SM_ENDURE#ƒCƒ“ƒfƒ…ƒA#
9,0,0,0,0,0,10,0,no,0,0,0,none,0 //MG_SRECOVERY#SP‰ñ•œ—ÍŒüã#
10,8,6,4,3,1,1,1,yes,0,0,0,magic,0 //MG_SIGHT#ƒTƒCƒg#
@@ -20,7 +20,7 @@
18,8,6,2,3,0,10,1,yes,0,0,3,magic,2 //MG_FIREWALL#ƒt?ƒCƒA?ƒEƒH?ƒ‹#
19,8,8,1,3,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //MG_FIREBOLT#ƒt?ƒCƒA??ƒ‹ƒg#
20,8,8,1,4,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //MG_LIGHTNINGBOLT#ƒ‰ƒCƒgƒjƒ“ƒO?ƒ‹ƒg#
-21,5,8,2,4,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //MG_THUNDERSTORM#ƒTƒ“??ƒXƒg??#
+21,8,8,2,4,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //MG_THUNDERSTORM#ƒTƒ“??ƒXƒg??#
22,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //AL_DP#ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“#
23,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //AL_DEMONBANE#ƒf?ƒ‚ƒ“ƒxƒCƒ“#
24,8,6,4,0,1,1,1,yes,0,0,0,magic,0 //AL_RUWACH#ƒ‹ƒAƒt#
@@ -56,7 +56,7 @@
54,8,6,16,6,1,4,1,yes,0,0,0,magic,0 //ALL_RESURRECTION#ƒŠƒUƒŒƒNƒVƒ‡ƒ“#
55,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //KN_SPEARMASTERY#‘„C—û#
56,-1,8,1,0,0,10,3,no,0,0,0,weapon,0 //KN_PIERCE#ƒsƒA?ƒX#
-57,1,6,1,0,1,10,1,no,33,0,0,weapon,1 //KN_BRANDISHSPEAR#ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA#
+57,1,6,1,0,1,10,1,no,33,0,0,weapon,3 //KN_BRANDISHSPEAR#ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA#
58,4,6,1,0,2,10,1,no,0,0,0,weapon,6 //KN_SPEARSTAB#ƒXƒsƒAƒX?ƒu#
59,-3:-5:-7:-9:-11,6,1,0,0,5,1,no,0,0,0,weapon,0 //KN_SPEARBOOMERANG#ƒXƒsƒAƒu?ƒƒ‰ƒ“#
60,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //KN_TWOHANDQUICKEN#ƒc?ƒnƒ“ƒhƒNƒCƒbƒPƒ“#
@@ -91,7 +91,7 @@
89,8,6,2,1,1,10,1,yes,0,0,0,magic,2 //WZ_STORMGUST#ƒXƒg??ƒKƒXƒg#
90,8,8,1,2,0,5,1:2:3:4:5,yes,0,0,0,magic,0 //WZ_EARTHSPIKE#ƒA?ƒXƒXƒpƒCƒN#
91,8,8,2,2,0,5,1:2:3:4:5,yes,0,0,0,magic,0 //WZ_HEAVENDRIVE#ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu#
-92,8,6,2,2,1,5,1,yes,0,0,3,magic,0 //WZ_QUAGMIRE#ƒN?ƒO?ƒCƒA#
+92,8,6,2,2,1,5,1,yes,0,128,3,magic,0 //WZ_QUAGMIRE#ƒN?ƒO?ƒCƒA#
93,8,6,1,0,1,1,1,yes,0,0,0,magic,0 //WZ_ESTIMATION#ƒ‚ƒ“ƒX??î•ñ#
94,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //BS_IRON#“S»‘¢#
95,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //BS_STEEL#?“S»‘¢#
@@ -120,7 +120,7 @@
118,3,6,2,0,1,5,1,no,0,128,0,misc,0 //HT_SHOCKWAVE#ƒVƒ‡ƒbƒNƒEƒF?ƒuƒgƒ‰ƒbƒv#
119,3,6,2,0,1,5,1,no,0,128,0,misc,0 //HT_SANDMAN#ƒTƒ“ƒh?ƒ“#
120,3,6,2,0,1,5,1,no,0,128,0,misc,0 //HT_FLASHER#ƒtƒ‰ƒbƒVƒƒ?#
-121,3,6,2,2,1,5,1,no,0,128,0,misc,0 //HT_FREEZINGTRAP#ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv#
+121,3,6,2,1,1,5,1,no,0,128,0,misc,0 //HT_FREEZINGTRAP#ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv#
122,3,6,2,3,1,5,1,no,0,128,0,misc,0 //HT_BLASTMINE#ƒuƒ‰ƒXƒg?ƒCƒ“#
123,3,6,2,2,1,5,1,no,0,128,0,misc,0 //HT_CLAYMORETRAP#ƒNƒŒƒCƒ‚ƒAƒgƒ‰ƒbƒv#
124,2,6,32,0,1,1,1,no,0,0,0,misc,0 //HT_REMOVETRAP#ƒŠ??ƒuƒgƒ‰ƒbƒv#
@@ -138,14 +138,14 @@
136,-1,8,1,0,0,10,8,no,0,0,0,weapon,0 //AS_SONICBLOW#?ƒjƒbƒNƒuƒ?#
137,3:4:5:6:7,6,1,0,0,5,1,no,0,0,0,weapon,0 //AS_GRIMTOOTH#ƒOƒŠ?ƒgƒD?ƒX#
138,8,6,16,5,1,10,1,no,0,1024,0,weapon,0 //AS_ENCHANTPOISON#ƒGƒ“?ƒƒƒ“ƒg?ƒCƒYƒ“#
-139,0,6,16,5,1,10,1,no,0,0,0,weapon,0 //AS_POISONREACT#?ƒCƒYƒ“ƒŠƒAƒNƒg#
+139,0,6,4,5,1,10,1,no,0,0,0,weapon,0 //AS_POISONREACT#?ƒCƒYƒ“ƒŠƒAƒNƒg#
140,2,6,2,5,1,10,1,no,0,0,0,weapon,0 //AS_VENOMDUST#ƒxƒi??ƒXƒg#
141,2,6,1,0,1,10,1,yes,0,0,0,weapon,0 //AS_SPLASHER#ƒxƒi?ƒXƒvƒ‰ƒbƒVƒƒ?#
142,0,6,4,0,1,1,1,no,0,1,0,none,0 //NV_FIRSTAID#‰ž?Žè“–#
143,0,6,4,0,1,1,1,no,0,1,0,none,0 //NV_TRICKDEAD#?‚ñ‚¾‚Ó‚è#
144,0,0,0,0,0,1,0,no,0,1,0,none,0 //SM_MOVINGRECOVERY#ˆÚ“®ŽžHP‰ñ•œ#
145,0,0,0,0,0,1,0,no,0,1,0,weapon,0 //SM_FATALBLOW#?ŠUŒ‚#
-146,0,0,0,0,0,1,0,no,0,1,0,weapon,0 //SM_AUTOBERSERK#ƒI?ƒgƒo?ƒT?ƒN#
+146,0,6,4,0,1,1,1,no,0,1,0,weapon,0 //SM_AUTOBERSERK#ƒI?ƒgƒo?ƒT?ƒN#
147,0,0,4,0,1,1,0,no,0,1,0,weapon,0 //AC_MAKINGARROW#–îì¬#
148,-3,6,1,0,2,1,1,no,0,1,0,weapon,6 //AC_CHARGEARROW#?ƒƒ?ƒWƒAƒ?#
149,8,6,1,2,0,1,1,no,0,1,0,weapon,0 //TF_SPRINKLESAND#»‚Ü‚«#
@@ -261,13 +261,13 @@
//208 193‚É“¯‚¶
210,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //RG_SNATCHER#ƒXƒiƒb?ƒƒ?#
211,1,6,1,0,1,10,1,no,0,0,0,weapon,0 //RG_STEALCOIN#ƒXƒeƒB?ƒ‹ƒRƒCƒ“#
-212,-1,6,1,0,0,10,1,no,0,0,0,weapon,1 //RG_BACKSTAP#ƒoƒbƒNƒX?ƒu#
+212,-1,6,1,0,0,10,1,no,0,0,0,weapon,0 //RG_BACKSTAP#ƒoƒbƒNƒX?ƒu#
213,0,0,0,0,0,5,0,no,0,0,0,none,0 //RG_TUNNELDRIVE#ƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒu#
214,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //RG_RAID#ƒTƒvƒ‰ƒCƒYƒA?ƒbƒN#
-215,1,6,1,0,1,5,1,yes,0,0,0,weapon,0 //RG_STRIPWEAPON#ƒXƒgƒŠƒbƒvƒEƒF?ƒ“#
-216,1,6,1,0,1,5,1,yes,0,0,0,weapon,0 //RG_STRIPSHIELD#ƒXƒgƒŠƒbƒvƒV?ƒ‹ƒh#
-217,1,6,1,0,1,5,1,yes,0,0,0,weapon,0 //RG_STRIPARMOR#ƒXƒgƒŠƒbƒvƒA???#
-218,1,6,1,0,1,5,1,yes,0,0,0,weapon,0 //RG_STRIPHELM#ƒXƒgƒŠƒbƒvƒwƒ‹?#
+215,1,6,1,0,1,5,1,no,0,0,0,weapon,0 //RG_STRIPWEAPON#ƒXƒgƒŠƒbƒvƒEƒF?ƒ“#
+216,1,6,1,0,1,5,1,no,0,0,0,weapon,0 //RG_STRIPSHIELD#ƒXƒgƒŠƒbƒvƒV?ƒ‹ƒh#
+217,1,6,1,0,1,5,1,no,0,0,0,weapon,0 //RG_STRIPARMOR#ƒXƒgƒŠƒbƒvƒA???#
+218,1,6,1,0,1,5,1,no,0,0,0,weapon,0 //RG_STRIPHELM#ƒXƒgƒŠƒbƒvƒwƒ‹?#
219,-1,6,1,0,0,5,1,no,0,0,0,weapon,0 //RG_INTIMIDATE#ƒCƒ“ƒeƒB?ƒfƒCƒg#
220,1,6,2,0,1,1,1,no,0,0,0,none,0 //RG_GRAFFITI#ƒOƒ‰ƒtƒBƒeƒB#
221,0,6,2,0,1,5,1,no,0,0,0,none,0 //RG_FLAGGRAFFITI#ƒtƒ‰ƒbƒOƒOƒ‰ƒtƒBƒeƒB#
@@ -278,11 +278,10 @@
226,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //AM_AXEMASTERY#?C—û#
227,0,0,0,0,0,10,0,no,0,0,0,none,0 //AM_LEARNINGPOTION#ƒ‰?ƒjƒ“ƒO??ƒVƒ‡ƒ“#
228,0,6,4,0,1,10,0,no,0,0,0,none,0 //AM_PHARMACY#ƒt???ƒV?#
-229,8,6,2,3,1,5,1,no,0,128,0,weapon,0 //AM_DEMONSTRATION#ƒfƒ‚ƒ“ƒXƒgƒŒ?ƒVƒ‡ƒ“#
-230,8,6,1,0,0,5,0,no,0,0,0,weapon,0 //AM_ACIDTERROR#ƒAƒVƒbƒhƒeƒ‰?#
-231,8,6,16,0,1,5,1,yes,0,0,0,none,0 //AM_POTIONPITCHER#??ƒVƒ‡ƒ“ƒsƒb?ƒƒ?#
-//231,8,6,16,0,1,10,1,yes,0,0,0,magic,0
-232,3,6,2,0,1,5,1,no,0,0,3,none,0 //AM_CANNIBALIZE#ƒoƒCƒIƒvƒ‰ƒ“ƒg#
+229,8,6,2,3,1,5,1,yes,0,128,0,weapon,0 //AM_DEMONSTRATION#ƒfƒ‚ƒ“ƒXƒgƒŒ?ƒVƒ‡ƒ“#
+230,8,6,1,0,0,5,0,yes,0,0,0,weapon,0 //AM_ACIDTERROR#ƒAƒVƒbƒhƒeƒ‰?#
+231,8,6,16,0,1,5,1,yes,0,3072,0,none,0 //AM_POTIONPITCHER#??ƒVƒ‡ƒ“ƒsƒb?ƒƒ?#
+232,3,6,2,0,1,5,1,no,0,0,5,none,0 //AM_CANNIBALIZE#ƒoƒCƒIƒvƒ‰ƒ“ƒg#
233,3,6,2,0,1,5,1,no,0,128,3,none,0 //AM_SPHEREMINE#ƒXƒtƒBƒA??ƒCƒ“#
234,1,6,16,0,1,5,1,yes,0,0,0,weapon,0 //AM_CP_WEAPON#ƒP?ƒJƒ‹ƒEƒF?ƒ“?ƒƒ?ƒW#
235,1,6,16,0,1,5,1,yes,0,0,0,weapon,0 //AM_CP_SHIELD#ƒP?ƒJƒ‹ƒV?ƒ‹ƒh?ƒƒ?ƒW#
@@ -304,7 +303,7 @@
251,3:5:7:9:11,6,1,0,0,5,1,no,0,0,0,weapon,0 //CR_SHIELDBOOMERANG#ƒV?ƒ‹ƒhƒu?ƒƒ‰ƒ“#
252,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //CR_REFLECTSHIELD#ƒŠƒtƒŒƒNƒgƒV?ƒ‹ƒh#
253,-2,8,1,6,0,10,2,no,0,0,0,weapon,0 //CR_HOLYCROSS#ƒz?ƒŠ?ƒNƒƒX#
-254,0,6,4,6,0,10,1,no,33,256,0,magic,0 //CR_GRANDCROSS#ƒOƒ‰ƒ“ƒhƒNƒƒX#
+254,0,5,4,6,0,10,1,no,33,256,0,magic,0 //CR_GRANDCROSS#ƒOƒ‰ƒ“ƒhƒNƒƒX#
255,8,6,16,0,1,5,1,yes,0,0,0,magic,0 //CR_DEVOTION#ƒfƒB??ƒVƒ‡ƒ“#
256,8,6,16,0,1,5,1,yes,0,0,0,magic,0 //CR_PROVIDENCE#ƒvƒƒ”ƒBƒfƒ“ƒX#
257,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //CR_DEFENDER#ƒfƒBƒtƒFƒ“??#
@@ -314,9 +313,9 @@
261,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //MO_CALLSPIRITS#‹CŒ÷#
262,6,6,16,0,1,1,1,no,0,0,0,weapon,0 //MO_ABSORBSPIRITS#‹C’D#
263,0,8,0,0,0,10,3,no,0,0,0,weapon,0 //MO_TRIPLEATTACK#ŽO’i¶#
-264,50,6,2,0,1,1,1,no,0,0,0,none,0 //MO_BODYRELOCATION#Žc‰e#
+264,14,6,2,0,1,1,1,no,0,0,0,none,0 //MO_BODYRELOCATION#Žc‰e#
265,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //MO_DODGE#Œ©Ø‚è#
-266,-1,6,1,0,0,5,1,no,0,0,0,weapon,0 //MO_INVESTIGATE#”­™¤#
+266,8,6,1,0,0,5,1,no,0,0,0,weapon,0 //MO_INVESTIGATE#”­™¤#
267,10,8,1,0,0,5,1:2:3:4:5,no,0,0,0,weapon,0 //MO_FINGEROFFENSIVE#Žw’e#
268,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //MO_STEELBODY#‹à„#
269,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //MO_BLADESTOP#”’nŽæ‚è#
@@ -327,7 +326,7 @@
274,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SA_ADVANCEDBOOK#ƒAƒhƒoƒ“ƒXƒhƒuƒbƒN#
275,0,6,4,0,1,5,1,no,0,0,0,magic,0 //SA_CASTCANCEL#ƒLƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹#
276,0,6,4,0,1,5,1,yes,0,0,0,magic,0 //SA_MAGICROD#?ƒWƒbƒNƒƒbƒh#
-277,8,6,1,0,1,5,1,yes,0,0,0,maigc,0 //SA_SPELLBREAKER#ƒXƒyƒ‹ƒuƒŒƒCƒJ?#
+277,8,6,1,0,1,5,1,yes,0,0,0,magic,0 //SA_SPELLBREAKER#ƒXƒyƒ‹ƒuƒŒƒCƒJ?#
278,0,0,0,0,0,10,0,no,0,0,0,magic,0 //SA_FREECAST#ƒtƒŠ?ƒLƒƒƒXƒg#
279,0,6,4,0,1,10,1,yes,0,0,0,magic,0 //SA_AUTOSPELL#ƒI?ƒgƒXƒyƒ‹#
280,8,6,16,0,1,5,1,yes,0,0,0,magic,0 //SA_FLAMELAUNCHER#ƒtƒŒƒC?ƒ‰ƒ“?ƒƒ?#
@@ -386,8 +385,32 @@
334,8,6,4,0,1,1,1,yes,0,0,0,magic,0 //WE_MALE#ŒN‚¾‚¯‚ÍŒì‚é‚æ#
335,8,6,4,0,1,1,1,yes,0,0,0,magic,0 //WE_FEMALE#‚ ‚È‚½‚És‚­‚µ‚Ü‚·#
336,8,6,4,0,1,1,1,yes,0,0,1,magic,0 //WE_CALLPARTNER#‚ ‚È‚½‚Ɉ§‚¢‚½‚¢#
+337,9,6,1,0,0,1,1,no,0,0,0,weapon,0 //ITM_TOMAHAWK#«È«Þ«Û?«¯÷᪲#
-//338,0,0,0,0,0,0,0,no,0,0,0,none,0 //NPC_DARKCROSS#??ƒNƒNƒƒX#
+//338 //NPC_DARKCROSS#ƒ_[ƒNƒNƒƒX#
+339,0,6,4,7,0,10,1,no,33,256,0,magic,0 //NPC_DARKGRANDCROSS#ˆÅƒOƒ‰ƒ“ƒhƒNƒƒX#
+340,8,8,1,7,0,10,1:1:2:2:3:3:4:4:5:5,yes,0,2,0,magic,0 //NPC_DARKSOULSTRIKE#ˆÅƒ\ƒEƒ‹ƒXƒgƒ‰ƒCƒN#
+341,8,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_DARKJUPITEL#ˆÅƒ†ƒsƒeƒ‹#
+
+343,8,6,1,0,0,5,1,no,0,2,0,weapon,0 //NPC_BREAKWEAPON#ƒuƒŒƒCƒNƒEƒFƒ|ƒ“#
+344,8,6,1,0,0,5,1,no,0,2,0,weapon,0 //NPC_BREAKARMOR#ƒuƒŒƒCƒNƒA[ƒ}[#
+345,8,6,1,0,0,5,1,no,0,2,0,weapon,0 //NPC_BREAKHELM#ƒuƒŒƒCƒNƒwƒ‹ƒ€#
+346,8,6,1,0,0,5,1,no,0,2,0,weapon,0 //NPC_BREAKSIELD#ƒuƒŒƒCƒNƒV[ƒ‹ƒh#
+347,-1,6,1,9,0,10,1,no,0,2,0,weapon,0 //NPC_UNDEADATTACK
+
+//342‘©”›
+//343•Ší‰ó‚µ
+//344ŠZ‰ó‚µ
+//345Š•‰ó‚µ
+//346‚‰ó‚µ
+//347•sŽ€‘®«UŒ‚
+348,2,6,4,0,1,20,0,no,0,0,0,magic,0 //NPC_RUNAWAY#Œã‘Þ#
+349,0,6,4,0,1,5,0,no,0,0,0,weapon,0 //NPC_EXPLOSIONSPIRITS#NPC”š—ô”g“®#
+//350‘¬“x‘‰ÁƒGƒtƒFƒNƒg
+//351UŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg
+//352UŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg
+//353UŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg
+354,2,0,4,0,1,1,0,no,0,0,0,magic,0 //NPC_RECALL#Žæ‚芪‚«ŒÄ‚Ñ–ß‚µ#
355,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //LK_AURABLADE#ƒI?ƒ‰ƒuƒŒ?ƒh#
356,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //LK_PARRYING#ƒpƒŠƒCƒ“ƒO#
@@ -402,21 +425,21 @@
365,8,8,1,0,2,1,1,yes,0,0,0,magic,0 //HW_MAGICCRASHER#?ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ?#
366,0,6,4,0,1,10,1,no,0,0,0,magic,0 //HW_MAGICPOWER#–‚?—Í‘•#
367,8,8,1,0,2,5,1,no,0,0,0,magic,0 //PA_PRESSURE#ƒvƒŒƒbƒVƒƒ?#
-368,8,6,1,0,2,5,1,yes,0,0,0,magic,0 //PA_SACRIFICE#ƒTƒNƒŠƒt?ƒCƒX#
+368,0,6,4,0,1,5,1,yes,0,0,0,magic,0 //PA_SACRIFICE#ƒTƒNƒŠƒtƒ@ƒCƒX#
369,0,6,4,0,1,10,1,yes,0,0,0,magic,0 //PA_GOSPEL#ƒSƒXƒyƒ‹#
370,-2,6,1,0,0,5,1,yes,0,0,0,weapon,3 //CH_PALMSTRIKE#–ÒŒÕd”hŽR#
371,-2,8,4,0,0,5,1,no,0,0,0,weapon,0 //CH_TIGERFIST#•šŒÕŒ#
372,-2,8,4,0,0,10,1:1:2:2:3:3:4:4:5:5,no,0,0,0,weapon,0 //CH_CHAINCRUSH#˜A’Œ•öŒ‚#
373,0,6,4,0,1,5,1,no,0,0,0,magic,0 //PF_HPCONVERSION#ƒ‰ƒCƒt’u‚«Š·‚¦#
-374,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //PF_SOULCHANGE#?ƒEƒ‹?ƒFƒ“ƒW#
-375,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //PF_SOULBURN#?ƒEƒ‹ƒo?ƒ“#
+374,8,6,16,0,1,1,1,yes,0,0,0,none,0 //PF_SOULCHANGE#?ƒEƒ‹?ƒFƒ“ƒW#
+375,8,6,1,0,0,5,1,yes,0,0,0,magic,0 //PF_SOULBURN#?ƒEƒ‹ƒo?ƒ“#
376,0,0,0,0,1,5,1,no,0,0,0,weapon,0 //ASC_KATAR#ƒAƒhƒoƒ“ƒXƒhƒJ??ƒ‹Œ¤‹†#
377,0,0,4,0,1,10,1,no,0,0,0,misc,0 //ASC_HALLUCINATION#ƒnƒ‹ƒVƒl?ƒVƒ‡ƒ“ƒEƒH?ƒN#
-378,0,6,4,5,1,10,1,no,0,1024,0,weapon,0 //ASC_EDP#ƒGƒ“?ƒƒƒ“ƒgƒfƒbƒhƒŠ??ƒCƒYƒ“#
-379,5,6,1,0,0,10,1,no,0,0,0,weapon,0 //ASC_BREAKER#?ƒEƒ‹ƒuƒŒ?ƒJ?#
+378,0,6,4,5,1,5,1,no,0,1024,0,weapon,0 //ASC_EDP#ƒGƒ“?ƒƒƒ“ƒgƒfƒbƒhƒŠ??ƒCƒYƒ“#
+379,9,6,1,0,0,10,1,yes,0,0,0,weapon,0 //ASC_BREAKER#?ƒEƒ‹ƒuƒŒ?ƒJ?#
380,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //SN_SIGHT#ƒgƒDƒ‹?ƒTƒCƒg#
381,9,8,1,0,0,5,1:2:3:4:5,yes,0,0,0,misc,0 //SN_FALCONASSAULT#ƒt?ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg#
-382,9,8,1,0,0,5,1,no,0,0,0,weapon,0 //SN_SHARPSHOOTING#ƒVƒƒ?ƒvƒVƒ…?ƒeƒBƒ“ƒO#
+382,14,8,1,0,0,5,1,no,0,0,0,weapon,0 //SN_SHARPSHOOTING#ƒVƒƒ?ƒvƒVƒ…?ƒeƒBƒ“ƒO#
383,0,6,4,0,1,10,1,yes,0,0,0,magic,0 //SN_WINDWALK#ƒEƒCƒ“ƒhƒEƒH?ƒN#
384,0,0,4,0,1,10,1,yes,0,0,0,magic,0 //WS_MELTDOWN#ƒƒ‹ƒg?ƒEƒ“#
385,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //WS_CREATECOIN#ƒNƒŠƒGƒCƒgƒRƒCƒ“#
@@ -428,23 +451,24 @@
//391,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //ST_STEALBACKPACK#ƒXƒeƒB?ƒ‹ƒoƒbƒNƒpƒbƒN#
392,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //CR_ALCHEMY#ƒAƒ‹ƒP??#
393,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //CR_SYNTHESISPOTION#??ƒVƒ‡ƒ“ƒVƒ“ƒZƒVƒX#
-394,8,8,1,0,0,10,2,no,0,0,0,weapon,0 //CG_ARROWVULCAN#ƒAƒ?ƒoƒ‹ƒJƒ“#
+394,8,8,1,0,0,10,9,no,0,0,0,weapon,0 //CG_ARROWVULCAN#ƒAƒ?ƒoƒ‹ƒJƒ“#
395,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //CG_MOONLIT#ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç#
396,0,6,16,0,1,1,1,yes,0,0,0,magic,1 //CG_MARIONETTE#?ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹#
-397,4,8,1,0,0,5,1,no,0,0,0,weapon,0 //LK_SPIRALPIERCE#ƒXƒpƒCƒ‰ƒ‹ƒsƒA?ƒX#
+397,5,8,1,0,0,5,5,no,0,0,0,weapon,0 //LK_SPIRALPIERCE#ƒXƒpƒCƒ‰ƒ‹ƒsƒA?ƒX#
398,4,6,1,0,0,5,1,no,0,0,0,weapon,0 //LK_HEADCRUSH#ƒwƒbƒhƒNƒ‰ƒbƒVƒ…#
399,4,6,1,0,0,10,1,no,0,0,0,weapon,0 //LK_JOINTBEAT#ƒWƒ‡ƒCƒ“ƒgƒr?ƒg#
400,8,8,1,8,0,5,1:2:3:4:5,yes,0,0,0,magic,0 //HW_NAPALMVULCAN#ƒiƒp??ƒoƒ‹ƒJƒ“#
401,0,6,4,0,1,1,1,yes,0,0,0,weapon,0 //CH_SOULCOLLECT#‹¶‹CŒ÷#
-402,8,6,1,0,1,10,1,no,0,0,0,none,0 //PF_MINDBREAKER#?ƒCƒ“ƒhƒuƒŒ?ƒJ?#
+402,8,6,1,0,1,5,1,no,0,0,0,none,0 //PF_MINDBREAKER#?ƒCƒ“ƒhƒuƒŒ?ƒJ?#
403,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //PF_MEMORIZE#ƒƒ‚ƒ‰ƒCƒY#
-404,3,6,2,2,1,5,1,yes,0,128,1,magic,0 //PF_FOGWALL#ƒtƒHƒOƒEƒH?ƒ‹#
-405,3,6,2,0,1,5,1,no,0,128,2,misc,0 //PF_SPIDERWEB#ƒXƒpƒC??ƒEƒFƒbƒu#
-406,-1,6,1,0,2,10,1,no,33,0,0,weapon,0 //ASC_METEORASSAULT#ƒƒeƒIƒAƒTƒ‹ƒg#
-407,0,6,4,0,1,10,0,no,0,0,0,none,0 //ASC_CDP#ƒfƒbƒhƒŠ??ƒCƒYƒ“»‘¢#
-408,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //WE_BABY##
-409,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //WE_CALLPARENT##
-410,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //WE_CALLBABY##
+404,3,6,2,2,1,5,1,yes,0,256,2,magic,0 //PF_FOGWALL#ƒtƒHƒOƒEƒH?ƒ‹#
+405,3,6,1,0,1,1,1,no,0,128,2,misc,0 //PF_SPIDERWEB#ƒXƒpƒC??ƒEƒFƒbƒu#
+406,0,6,4,0,1,10,1,no,33,0,0,weapon,0 //ASC_METEORASSAULT#ƒƒeƒIƒAƒTƒ‹ƒg#
+407,0,6,4,0,1,1,0,no,0,0,0,none,0 //ASC_CDP#ƒfƒbƒhƒŠ??ƒCƒYƒ“»‘¢#
+408,8,6,4,0,1,1,1,yes,0,0,0,magic,0 //WE_BABY##
+409,8,6,4,0,1,1,1,yes,0,0,0,magic,0 //WE_CALLPARENT##
+410,8,6,4,0,1,1,1,yes,0,0,0,magic,0 //WE_CALLBABY##
+
411,0,0,0,0,0,0,0,no,0,0,0,none,0 //TK_RUN##
412,0,0,0,0,0,0,0,no,0,0,0,none,0 //TK_READYSTORM##
413,0,0,0,0,0,0,0,no,0,0,0,none,0 //TK_STORMKICK##
@@ -518,7 +542,7 @@
10000,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_APPROVAL#³‹KƒMƒ‹ƒh³”F#
10001,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_KAFRACONTRACT#ƒJƒvƒ‰ŒÙ—p#
10002,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_GUARDRESEARCH#ƒK?ƒfƒBƒAƒ“Œ¤‹†#
-10003,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_CHARISMA#ƒJƒŠƒX?#Later changed to GD_GUARDUP#
+10003,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_CHARISMA#ƒJƒŠƒX?#
10004,0,0,0,0,0,10,0,no,0,0,0,none,0 //GD_EXTENSION#ƒMƒ‹ƒhŠg’£#
10005,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_GLORYGUILD##
10006,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_LEADERSHIP##
@@ -530,6 +554,3 @@
10012,0,0,4,0,1,1,0,no,0,0,0,none,0 //GD_RESTORE##
10013,0,0,4,0,1,1,0,no,0,0,0,none,0 //GD_EMERGENCYCALL##
10014,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_DEVELOPMENT##
-
-
-// ITM_TOMAHAWK#Å丶ȣũ_´øÁö±â# 337 \ No newline at end of file
diff --git a/db/skill_nocast_db.txt b/db/skill_nocast_db.txt
index e27ae3ab7..fdcdb4634 100644
--- a/db/skill_nocast_db.txt
+++ b/db/skill_nocast_db.txt
@@ -7,11 +7,10 @@
// 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)
-8,12
-26,12
-27,12
-87,12
-150,12
-361,12
-362,12
-389,12 \ No newline at end of file
+26,4 //AL_TELEPORT
+27,4 //AL_WARP
+87,4 //WZ_ICEWALL
+150,4 //TF_BACKSLIDING
+214,4 //RG_RAID
+361,4 //HP_ASSUMPTIO
+362,4 //HP_BASILICA \ No newline at end of file
diff --git a/db/skill_require_db.txt b/db/skill_require_db.txt
index a3765d1b4..2cccdfe72 100644
--- a/db/skill_require_db.txt
+++ b/db/skill_require_db.txt
@@ -3,7 +3,7 @@
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,15,0,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_MAGNUM#ƒ}ƒOƒiƒ€ƒuƒŒƒCƒ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#
@@ -37,7 +37,7 @@
42,0,0,5,0,0,100:200:300:400:500:600:700:800:900:1000,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 //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:13:14,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#
+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,7 +51,7 @@
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,2,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ƒ“ƒ^?#
+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#
@@ -85,8 +85,8 @@
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,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:9,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ƒ…#
+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ƒ?#
@@ -112,10 +112,11 @@
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,33:36:39:42:45:48:51:54:57: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 //AS_SPLASHER#ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ?#
+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,99,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#»‚Ü‚«#
@@ -145,7 +146,7 @@
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,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 //AM_CANNIBALIZE#ƒoƒCƒIƒvƒ‰ƒ“ƒg#
+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#
@@ -166,7 +167,7 @@
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,10,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#
+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?#
@@ -191,7 +192,7 @@
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,716,1,715,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_DISPELL#ƒfƒBƒXƒyƒ‹#
+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ƒ|ƒŠƒ“#
@@ -219,7 +220,7 @@
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,8,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#
+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,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#
@@ -227,7 +228,7 @@
321,0,0,40:45:50:55:60:65:70:75:80:85,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_POEMBRAGI#ƒuƒ‰ƒM‚ÌŽ#
322,0,0,40:45:50:55:60:65:70:75:80:85,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_APPLEIDUN#ƒCƒhƒDƒ“‚Ì—ÑŒç#
-324,0,0,8,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#–î?‚¿#
+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,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#
@@ -238,8 +239,7 @@
334,0,0,1,15,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,15,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#
@@ -250,24 +250,24 @@
361,0,0,25:30:35:40: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 //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,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 //HW_MAGICCRASHER#ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ?#
+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,20:25:30:35:40,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,9,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#
+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,12:14:16:18:20,0,0,0,99,explosionspirits,1,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,12:14:16:18:20,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,12:14:16:18:20:22:24:26:28:30,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’Œ•ö?#
+370,0,0,2:4:6:8:10,0,0,0,99,explosionspirits,1,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_HPCONVERSION#ƒ‰ƒCƒt’u‚«Š·‚¦#
+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,weapon,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,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 //SN_WINDWALK#ƒEƒCƒ“ƒhƒEƒH?ƒN#
+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#‰ò»‘¢#
@@ -281,7 +281,7 @@
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:23:25:28,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,22:24:26:28:30:32:34:36:38:40,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#
+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?#
@@ -289,14 +289,13 @@
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,937,1,952,1,939,1,7033,1,972,1,657,1,713,1,0,0,0,0,0,0 //ASC_CDP
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ƒ“ì¬#
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,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 //ST_FULLSTRIP##
+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,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 //CR_FULLPROTECTION##
+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##
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##
diff --git a/db/skill_tree.txt b/db/skill_tree.txt
index 64ac742bd..debfaef00 100644
--- a/db/skill_tree.txt
+++ b/db/skill_tree.txt
@@ -445,7 +445,7 @@
18,235,5,237,3,0,0,0,0,0,0,0,0//AM_CP_SHIELD #ƒPƒ~ƒJƒ‹ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW#
18,236,5,235,3,0,0,0,0,0,0,0,0//AM_CP_ARMOR #ƒPƒ~ƒJƒ‹ƒA[ƒ}[ƒ`ƒƒ[ƒW#
18,237,5,228,2,0,0,0,0,0,0,0,0//AM_CP_HELM #ƒPƒ~ƒJƒ‹ƒwƒ‹ƒ€ƒ`ƒƒ[ƒW#
-// ŠØ‘‚Å‚à–¢ŽÀ‘•‚Ȃ̂ňȉº‚̃cƒŠ[ƒRƒƒ“ƒgƒAƒEƒg
+// Homonculus skill tree (disabled as for now)
//18,238,1,0,0,0,0,0,0,0,0,0,0//AM_BIOETHICS #¶–½—Ï—#
//18,239,10,238,1,0,0,0,0,0,0,0,0//AM_BIOTECHNOLOGY #¶–½HŠwŒ¤‹†#
//18,240,5,239,7,0,0,0,0,0,0,0,0//AM_CREATECREATURE #”í‘¢•¨‘n‘¢#
@@ -484,7 +484,7 @@
19,311,1,320,10,0,0,0,0,0,0,0,0//BD_ROKISWEIL #ƒƒL‚Ì‹©‚Ñ#
19,312,1,306,1,0,0,0,0,0,0,0,0//BD_INTOABYSS #[•£‚Ì’†‚É#
19,313,5,321,10,0,0,0,0,0,0,0,0//BD_SIEGFRIED #•sŽ€g‚̃W[ƒNƒtƒŠ[ƒh#
-19,314,1,312,1,308,1,0,0,0,0,0,0//BD_RAGNAROK #ƒ‰ƒOƒiƒƒN#
+//19,314,1,312,1,308,1,0,0,0,0,0,0//BD_RAGNAROK #ƒ‰ƒOƒiƒƒN#
// Dancer
20,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
20,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -513,7 +513,7 @@
20,311,1,328,10,0,0,0,0,0,0,0,0//BD_ROKISWEIL #ƒƒL‚Ì‹©‚Ñ#
20,312,1,306,1,0,0,0,0,0,0,0,0//BD_INTOABYSS #[•£‚Ì’†‚É#
20,313,5,329,10,0,0,0,0,0,0,0,0//BD_SIEGFRIED #•sŽ€g‚̃W[ƒNƒtƒŠ[ƒh#
-20,314,1,312,1,308,1,0,0,0,0,0,0//BD_RAGNAROK #ƒ‰ƒOƒiƒƒN#
+//20,314,1,312,1,308,1,0,0,0,0,0,0//BD_RAGNAROK #ƒ‰ƒOƒiƒƒN#
// Peco Crusader
21,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
21,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -580,7 +580,7 @@
23,32,10,23,3,0,0,0,0,0,0,0,0//AL_CRUCIS #ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX#
23,33,10,22,3,0,0,0,0,0,0,0,0//AL_ANGELUS #ƒGƒ“ƒWƒFƒ‰ƒX#
23,34,10,22,5,0,0,0,0,0,0,0,0//AL_BLESSING #ƒuƒŒƒbƒVƒ“ƒO#
-23,35,1,0,0,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
+23,35,1,28,2,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
23,36,10,0,0,0,0,0,0,0,0,0,0//MC_INCCARRY #ŠŽŒÀŠE—Ê‘‰Á#
23,37,10,36,3,0,0,0,0,0,0,0,0//MC_DISCOUNT #ƒfƒBƒXƒJƒEƒ“ƒg#
23,38,10,37,3,0,0,0,0,0,0,0,0//MC_OVERCHARGE #ƒI[ƒo[ƒ`ƒƒ[ƒW#
@@ -598,10 +598,10 @@
23,52,10,0,0,0,0,0,0,0,0,0,0//TF_POISON #ƒCƒ“ƒxƒiƒ€#
23,53,1,52,3,0,0,0,0,0,0,0,0//TF_DETOXIFY #‰ð“Å#
//Wedding Class
-22,1,9,0,0,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî-{ƒXƒLƒ‹#
-22.334,1,0,0,0,0,0,0,0,0,0,0,0
-22,335,5,0,0,0,0,0,0,0,0,0,0,0//
-22,336,5,0,0,0,0,0,0,0,0,0,0,0//
+22,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî-{ƒXƒLƒ‹#
+22,334,1,0,0,0,0,0,0,0,0,0,0
+22,335,5,0,0,0,0,0,0,0,0,0,0//
+22,336,5,0,0,0,0,0,0,0,0,0,0//
// JobNo,Skill-ID,MaxLV,‘O’ñSkill-ID-1,‘O’ñSkill-ID-1-Lv,Œv5ŒÂ‚Ü‚ÅŒJ‚è•Ô‚µ
//Novice High
4001,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
@@ -664,7 +664,7 @@
4005,32,10,23,3,0,0,0,0,0,0,0,0//AL_CRUCIS #ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX#
4005,33,10,22,3,0,0,0,0,0,0,0,0//AL_ANGELUS #ƒGƒ“ƒWƒFƒ‰ƒX#
4005,34,10,22,5,0,0,0,0,0,0,0,0//AL_BLESSING #ƒuƒŒƒbƒVƒ“ƒO#
-4005,35,1,0,0,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
+4005,35,1,28,2,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
4005,156,1,0,0,0,0,0,0,0,0,0,0//AL_HOLYLIGHT #ƒz[ƒŠ[ƒ‰ƒCƒg#
//Merchant High
4006,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
@@ -714,14 +714,12 @@
4008,61,5,3,1,0,0,0,0,0,0,0,0//KN_AUTOCOUNTER #ƒI[ƒgƒJƒEƒ“ƒ^[#
4008,62,10,5,10,7,3,3,5,60,10,61,5//KN_BOWLINGBASH #ƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…#
4008,63,1,8,1,0,0,0,0,0,0,0,0//KN_RIDING #ƒ‰ƒCƒfƒBƒ“ƒO#
-4008,5,10,63,1,0,0,0,0,0,0,0,0//KN_CAVALIERMASTERY#‹R•ºC—û#
+4008,64,5,63,1,0,0,0,0,0,0,0,0//KN_CAVALIERMASTERY#‹R•ºC—û#
4008,355,5,5,5,7,3,3,5,0,0,0,0//LK_AURABLADE
4008,356,10,3,10,6,5,60,3,0,0,0,0//LK_PARRYING
4008,357,5,4,1,55,5,63,1,0,0,0,0//LK_CONCENTRATE
4008,358,1,4,10,6,5,8,3,0,0,0,0//LK_TENSIONRELAX
-4008,359,1,55,7,56,5,57,5,58,2,63,1//LK_BERSERK
-4008,360,1,3,10,4,6,62,6,0,0,0,0//LK_FURY
-4008,397,5,55,10,56,10,58,5,63,1,0,0//LK_SPIRALPIERCE
+4008,359,1,50,0,0,0,0,0,0,0,0,0,0//LK_BERSERK
4008,398,5,55,9,63,1,0,0,0,0,0,0//LK_HEADCRUSH
4008,399,10,55,9,64,3,398,3,0,0,0,0//LK_JOINTBEAT#ƒWƒ‡ƒCƒ“ƒgƒr[ƒg#
//High Priest
@@ -740,10 +738,10 @@
4009,32,10,23,3,0,0,0,0,0,0,0,0//AL_CRUCIS #ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX#
4009,33,10,22,3,0,0,0,0,0,0,0,0//AL_ANGELUS #ƒGƒ“ƒWƒFƒ‰ƒX#
4009,34,10,22,5,0,0,0,0,0,0,0,0//AL_BLESSING #ƒuƒŒƒbƒVƒ“ƒO#
-4009,35,1,0,0,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
+4009,35,1,28,2,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
4009,156,1,0,0,0,0,0,0,0,0,0,0//AL_HOLYLIGHT #ƒz[ƒŠ[ƒ‰ƒCƒg#
4009,9,10,0,0,0,0,0,0,0,0,0,0//MG_SRECOVERY #SP‰ñ•œ—ÍŒüã#
-4009,12,10,68,4,0,0,0,0,0,0,0,0//MG_SAFETYWALL #ƒZƒCƒtƒeƒBƒEƒH[ƒ‹#
+4009,12,10,68,4,70,3,0,0,0,0,0,0//MG_SAFETYWALL #ƒZƒCƒtƒeƒBƒEƒH[ƒ‹#
4009,54,4,72,1,9,4,0,0,0,0,0,0//ALL_RESURRECTION #ƒŠƒUƒŒƒNƒVƒ‡ƒ“#
4009,65,10,0,0,0,0,0,0,0,0,0,0//PR_MACEMASTERY #ƒƒCƒXC—û#
4009,66,5,0,0,0,0,0,0,0,0,0,0//PR_IMPOSITIO #ƒCƒ€ƒ|ƒVƒeƒBƒIƒ}ƒkƒX#
@@ -785,17 +783,17 @@
//4010,82,10,0,0,0,0,0,0,0,0,0,0//WZ_FIREIVY #ƒtƒ@ƒCƒAƒAƒCƒr[#
4010,83,10,81,2,0,0,0,0,0,0,0,0//WZ_METEOR #ƒƒeƒIƒXƒg[ƒ€#
4010,84,10,11,1,20,1,0,0,0,0,0,0//WZ_JUPITEL #ƒ†ƒsƒeƒ‹ƒTƒ“ƒ_[#
-4010,85,10,11,1,21,1,84,5,0,0,0,0//WZ_VERMILION #ƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“#
+4010,85,10,21,1,84,5,0,0,0,0,0,0//WZ_VERMILION #ƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“#
4010,86,5,14,1,20,1,0,0,0,0,0,0//WZ_WATERBALL #ƒEƒH[ƒ^[ƒ{[ƒ‹#
4010,87,10,16,1,15,1,0,0,0,0,0,0//WZ_ICEWALL #ƒAƒCƒXƒEƒH[ƒ‹#
4010,88,10,87,1,0,0,0,0,0,0,0,0//WZ_FROSTNOVA #ƒtƒƒXƒgƒmƒ”ƒ@#
4010,89,10,15,1,84,3,0,0,0,0,0,0//WZ_STORMGUST #ƒXƒg[ƒ€ƒKƒXƒg#
4010,90,5,16,1,0,0,0,0,0,0,0,0//WZ_EARTHSPIKE #ƒA[ƒXƒXƒpƒCƒN#
4010,91,5,90,3,0,0,0,0,0,0,0,0//WZ_HEAVENDRIVE #ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu#
-4010,92,5,14,1,91,1,0,0,0,0,0,0//WZ_QUAGMIRE #ƒNƒ@ƒOƒ}ƒCƒA#
+4010,92,5,91,1,0,0,0,0,0,0,0,0//WZ_QUAGMIRE #ƒNƒ@ƒOƒ}ƒCƒA#
4010,93,1,0,0,0,0,0,0,0,0,0,0//WZ_ESTIMATION #ƒ‚ƒ“ƒXƒ^[î•ñ#
4010,364,10,9,5,13,7,0,0,0,0,0,0//HW_SOULDRAIN #Šî–{ƒXƒLƒ‹#
-4010,365,10,9,1,0,0,0,0,0,0,0,0//HW_MAGICCRASHER #Šî–{ƒXƒLƒ‹#
+4010,365,1,9,1,0,0,0,0,0,0,0,0//HW_MAGICCRASHER #Šî–{ƒXƒLƒ‹#
4010,366,10,0,0,0,0,0,0,0,0,0,0//HW_MAGICPOWER #Šî–{ƒXƒLƒ‹#
4010,400,5,11,5,0,0,0,0,0,0,0,0//HW_NAPALMVULCAN
//Whitesmith
@@ -833,11 +831,11 @@
4011,113,5,111,3,0,0,0,0,0,0,0,0//BS_OVERTHRUST #ƒI[ƒo[ƒgƒ‰ƒXƒg#
4011,114,5,112,3,113,2,0,0,0,0,0,0//BS_MAXIMIZE #ƒ}ƒLƒVƒ}ƒCƒYƒpƒ[#
4011,384,10,109,3,105,1,107,5,113,3,0,0//WS_MELTDOWN #Šî–{ƒXƒLƒ‹#
-4011,385,3,109,5,94,5,96,3,97,2,0,0//WS_CREATECOIN #Šî–{ƒXƒLƒ‹#
-4011,386,3,97,3,106,1,107,5,0,0,0,0//WS_CREATENUGGET #Šî–{ƒXƒLƒ‹#
+//4011,385,3,109,5,94,5,96,3,97,2,0,0//WS_CREATECOIN #Šî–{ƒXƒLƒ‹#
+//4011,386,3,97,3,106,1,107,5,0,0,0,0//WS_CREATENUGGET #Šî–{ƒXƒLƒ‹#
4011,387,1,39,5,153,1,154,1,105,1,0,0//WS_CARTBOOST #Šî–{ƒXƒLƒ‹#
-4011,388,1,107,10,112,3,0,0,0,0,0,0//WS_SYSTEMCREATE #Šî–{ƒXƒLƒ‹#
-4011,477,10,109,5,94,5,96,3,97,2,0,0//WS_WEAPONREFINE
+//4011,388,1,107,10,112,3,0,0,0,0,0,0//WS_SYSTEMCREATE #Šî–{ƒXƒLƒ‹#
+4011,477,10,107,10,0,0,0,0,0,0,0,0//WS_WEAPONREFINE
//Sniper
4012,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
4012,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -868,7 +866,7 @@
4012,380,10,43,10,44,10,45,10,127,1,0,0//SN_SIGHT #Šî–{ƒXƒLƒ‹#
4012,381,5,128,3,44,10,129,5,127,1,0,0//SN_FALCONASSAULT #Šî–{ƒXƒLƒ‹#
4012,382,5,45,10,46,5,0,0,0,0,0,0//SN_SHARPSHOOTING #Šî–{ƒXƒLƒ‹#
-4012,383,5,45,9,0,0,0,0,0,0,0,0//SN_WINDWALK #Šî–{ƒXƒLƒ‹#
+4012,383,10,45,9,0,0,0,0,0,0,0,0//SN_WINDWALK #Šî–{ƒXƒLƒ‹#
//Assassin Cross
4013,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
4013,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -892,10 +890,10 @@
4013,139,10,138,3,0,0,0,0,0,0,0,0//AS_POISONREACT #ƒ|ƒCƒYƒ“ƒŠƒAƒNƒg#
4013,140,10,138,5,0,0,0,0,0,0,0,0//AS_VENOMDUST #ƒxƒiƒ€ƒ_ƒXƒg#
4013,141,10,139,5,140,5,0,0,0,0,0,0//AS_SPLASHER #ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[#
-4013,376,10,48,5,134,7,0,0,0,0,0,0//ASC_KATAR #Šî–{ƒXƒLƒ‹#
-4013,377,10,49,5,135,5,0,0,0,0,0,0//ASC_HALLUCINATION #Šî–{ƒXƒLƒ‹#
-4013,378,10,407,1,0,0,0,0,0,0,0,0//ASC_ENCHANTPOISON #Šî–{ƒXƒLƒ‹#
-4013,379,10,48,5,135,3,138,6,140,5,0,0//ASC_BREAKER #Šî–{ƒXƒLƒ‹#
+4013,376,5,48,5,134,7,0,0,0,0,0,0//ASC_KATAR #Šî–{ƒXƒLƒ‹#
+//4013,377,10,49,5,135,5,0,0,0,0,0,0//ASC_HALLUCINATION #Šî–{ƒXƒLƒ‹#
+4013,378,5,407,1,0,0,0,0,0,0,0,0//ASC_ENCHANTPOISON #Šî–{ƒXƒLƒ‹#
+4013,379,10,48,5,135,3,138,6,52,5,0,0//ASC_BREAKER #Šî–{ƒXƒLƒ‹#
4013,406,10,132,3,134,5,136,5,379,1,0,0//ASC_METEORASSUALT
4013,407,1,52,10,53,1,138,5,0,0,0,0//ASC_CDP
// Peco Lord Knight
@@ -925,11 +923,11 @@
4014,356,10,3,10,6,5,60,3,0,0,0,0//LK_PARRYING
4014,357,5,4,1,55,5,63,1,0,0,0,0//LK_CONCENTRATE
4014,358,1,4,10,6,5,8,3,0,0,0,0//LK_TENSIONRELAX
-4014,359,1,55,7,56,5,57,5,58,2,63,1//LK_BERSERK
-4014,360,1,3,10,4,6,62,6,0,0,0,0//LK_FURY
-4014,397,5,0,0,0,0,0,0,0,0,0,0//LK_SPIRALPIERCE
-4014,398,5,0,0,0,0,0,0,0,0,0,0//LK_HEADCRUSH
-4014,399,10,0,0,0,0,0,0,0,0,0,0//LK_HEADCRUSH
+4008,359,1,50,0,0,0,0,0,0,0,0,0,0//LK_BERSERK
+//4014,360,1,3,10,4,6,62,6,0,0,0,0//LK_FURY
+4014,397,5,55,10,56,10,58,5,63,1,0,0//LK_SPIRALPIERCE
+4014,398,5,55,9,63,1,0,0,0,0,0,0//LK_HEADCRUSH
+4014,399,10,55,9,64,3,398,3,0,0,0,0//LK_JOINTBEAT#ƒWƒ‡ƒCƒ“ƒgƒr[ƒg#
//Paladin
4015,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
4015,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -949,7 +947,7 @@
4015,35,1,248,5,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
4015,22,10,35,1,0,0,0,0,0,0,0,0//AL_DP #ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“#
4015,23,10,22,3,0,0,0,0,0,0,0,0//AL_DEMONBANE #ƒf[ƒ‚ƒ“ƒxƒCƒ“#
-4015,28,10,23,5,0,0,0,0,0,0,0,0//AL_HEAL #ƒq[ƒ‹#
+4015,28,10,23,5,248,10,0,0,0,0,0,0//AL_HEAL #ƒq[ƒ‹#
4015,248,10,0,0,0,0,0,0,0,0,0,0//CR_TRUST #ƒtƒFƒCƒX#
4015,249,10,0,0,0,0,0,0,0,0,0,0//CR_AUTOGUARD #ƒI[ƒgƒK[ƒh#
4015,250,5,249,5,0,0,0,0,0,0,0,0//CR_SHIELDCHARGE #ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW#
@@ -980,26 +978,26 @@
4016,32,10,23,3,0,0,0,0,0,0,0,0//AL_CRUCIS #ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX#
4016,33,10,22,3,0,0,0,0,0,0,0,0//AL_ANGELUS #ƒGƒ“ƒWƒFƒ‰ƒX#
4016,34,10,22,5,0,0,0,0,0,0,0,0//AL_BLESSING #ƒuƒŒƒbƒVƒ“ƒO#
-4016,35,1,0,0,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
+4016,35,1,28,2,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
4016,156,1,0,0,0,0,0,0,0,0,0,0//AL_HOLYLIGHT #ƒz[ƒŠ[ƒ‰ƒCƒg#
4016,259,10,23,10,22,10,0,0,0,0,0,0//MO_IRONHAND #“SŒ#
4016,260,5,269,2,0,0,0,0,0,0,0,0//MO_SPIRITSRECOVERY #Ԥ#
4016,261,5,259,2,0,0,0,0,0,0,0,0//MO_CALLSPIRITS #‹CŒ÷#
4016,262,1,261,5,0,0,0,0,0,0,0,0//MO_ABSORBSPIRITS #‹C’D#
4016,263,10,265,5,0,0,0,0,0,0,0,0//MO_TRIPLEATTACK #ŽO’i¶#
-4016,264,1,271,3,260,2,0,0,0,0,0,0//MO_BODYRELOCATION #Žc‰e#
+4016,264,1,271,3,260,2,268,3,0,0,0,0//MO_BODYRELOCATION #Žc‰e#
4016,265,10,259,5,261,5,0,0,0,0,0,0//MO_DODGE #Œ©Ø‚è#
4016,266,5,261,5,0,0,0,0,0,0,0,0//MO_FINGEROFFENSIVE #Žw’e#
-4016,267,5,266,3,0,0,0,0,0,0,0,0/MO_INVESTIGATE #”­™¤#
+4016,267,5,266,3,0,0,0,0,0,0,0,0//MO_INVESTIGATE #”­™¤#
4016,268,5,273,3,0,0,0,0,0,0,0,0//MO_STEELBODY #‹à„#
4016,269,5,265,5,0,0,0,0,0,0,0,0//MO_BLADESTOP #”’nŽæ‚è#
4016,270,5,262,1,0,0,0,0,0,0,0,0//MO_EXPLOSIONSPIRITS #”š—ô”g“®#
-4016,271,5,261,5,267,3,0,0,0,0,0,0//MO_EXTREMITYFIST #ˆ¢C—…”e–PŒ#
+4016,271,5,270,3,267,3,0,0,0,0,0,0//MO_EXTREMITYFIST #ˆ¢C—…”e–PŒ#
4016,272,5,263,5,0,0,0,0,0,0,0,0//MO_CHAINCOMBO #˜A‘Ŷ#
4016,273,5,272,3,0,0,0,0,0,0,0,0//MO_COMBOFINISH #–Ò—´Œ#
4016,370,5,259,7,261,5,0,0,0,0,0,0//CH_PALMSTRIKE #Šî–{ƒXƒLƒ‹#
4016,371,5,259,5,263,5,261,5,273,3,0,0//CH_TIGERFIST #Šî–{ƒXƒLƒ‹#
-4016,372,10,259,5,261,5,0,0,0,0,0,0//CH_CHAINCRUSH #Šî–{ƒXƒLƒ‹#
+4016,372,10,259,5,261,5,371,2,0,0,0,0//CH_CHAINCRUSH #Šî–{ƒXƒLƒ‹#
4016,401,1,261,5,262,1,270,5,0,0,0,0//CH_SOULCOLLECT
//Professor
4017,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
@@ -1009,7 +1007,7 @@
4017,12,10,11,7,13,5,0,0,0,0,0,0//MG_SAFETYWALL #ƒZƒCƒtƒeƒBƒEƒH[ƒ‹#
4017,13,10,11,4,0,0,0,0,0,0,0,0//MG_SOULSTRIKE #ƒ\ƒEƒ‹ƒXƒgƒ‰ƒCƒN#
4017,14,10,0,0,0,0,0,0,0,0,0,0//MG_COLDBOLT #ƒR[ƒ‹ƒhƒ{ƒ‹ƒg#
-4017,15,10,0,0,0,0,0,0,0,0,0,0//MG_FROSTDIVER #ƒtƒƒXƒgƒ_ƒCƒo[#
+4017,15,10,14,5,0,0,0,0,0,0,0,0//MG_FROSTDIVER #ƒtƒƒXƒgƒ_ƒCƒo[#
4017,16,10,0,0,0,0,0,0,0,0,0,0//MG_STONECURSE #ƒXƒg[ƒ“ƒJ[ƒX#
4017,17,10,19,4,0,0,0,0,0,0,0,0//MG_FIREBALL #ƒtƒ@ƒCƒA[ƒ{[ƒ‹#
4017,18,10,10,1,17,5,0,0,0,0,0,0//MG_FIREWALL #ƒtƒ@ƒCƒA[ƒEƒH[ƒ‹#
@@ -1037,14 +1035,14 @@
4017,288,5,285,3,286,3,287,3,0,0,0,0//SA_LANDPROTECTOR #ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[#
4017,289,5,277,3,0,0,0,0,0,0,0,0//SA_DISPELL #ƒfƒBƒXƒyƒ‹#
4017,290,10,279,5,288,1,289,1,0,0,0,0//SA_ABRACADABRA #ƒAƒuƒ‰ƒJƒ^ƒuƒ‰#
-4017,364,10,9,5,13,7,0,0,0,0,0,0//HW_SOULDRAIN #ƒ\ƒEƒ‹ƒhƒŒƒCƒ“#
+//4017,364,10,9,5,13,7,0,0,0,0,0,0//HW_SOULDRAIN #ƒ\ƒEƒ‹ƒhƒŒƒCƒ“#
4017,373,5,9,1,276,1,0,0,0,0,0,0//PF_HPCONVERSION #ƒ‰ƒCƒt’u‚«Š·‚¦#
4017,374,1,276,3,277,2,0,0,0,0,0,0//PF_SOULCHANGE #ƒ\ƒEƒ‹ƒ`ƒFƒ“ƒW#
4017,375,5,275,5,276,3,277,3,0,0,0,0//PF_SOULBURN #ƒ\ƒEƒ‹ƒo[ƒ“#
-4017,402,1,9,3,289,2,0,0,0,0,0,0//PF_MINDBREAKER #ƒ}ƒCƒ“ƒhƒuƒŒ[ƒJ[#
+4017,402,5,9,3,289,2,0,0,0,0,0,0//PF_MINDBREAKER #ƒ}ƒCƒ“ƒhƒuƒŒ[ƒJ[#
4017,403,1,274,5,278,5,279,1,0,0,0,0//PF_MEMORIZE #ƒƒ‚ƒ‰ƒCƒY#
4017,404,1,286,2,287,2,0,0,0,0,0,0//PF_FOGWALL #ƒtƒHƒOƒEƒH[ƒ‹#
-4017,405,5,284,4,0,0,0,0,0,0,0,0//PF_SPIDERWEB #ƒXƒpƒCƒ_[ƒEƒFƒbƒu#
+4017,405,1,284,4,0,0,0,0,0,0,0,0//PF_SPIDERWEB #ƒXƒpƒCƒ_[ƒEƒFƒbƒu#
//Stalker
4018,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
4018,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -1065,24 +1063,24 @@
4018,210,10,50,1,0,0,0,0,0,0,0,0//RG_SNATCHER #ƒXƒiƒbƒ`ƒƒ[#
4018,211,10,210,4,0,0,0,0,0,0,0,0//RG_STEALCOIN #ƒXƒeƒB[ƒ‹ƒRƒCƒ“#
4018,212,10,211,4,0,0,0,0,0,0,0,0//RG_BACKSTAP #ƒoƒbƒNƒXƒ^ƒu#
-4018,213,10,51,1,0,0,0,0,0,0,0,0//RG_TUNNELDRIVE #ƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒu#
+4018,213,5,51,1,0,0,0,0,0,0,0,0//RG_TUNNELDRIVE #ƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒu#
4018,214,5,212,2,213,2,0,0,0,0,0,0//RG_RAID #ƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒN#
4018,215,5,217,5,0,0,0,0,0,0,0,0//RG_STRIPWEAPON #ƒXƒgƒŠƒbƒvƒEƒGƒ|ƒ“#
4018,216,5,218,5,0,0,0,0,0,0,0,0//RG_STRIPSHIELD #ƒXƒgƒŠƒbƒvƒV[ƒ‹ƒh#
4018,217,5,216,5,0,0,0,0,0,0,0,0//RG_STRIPARMOR #ƒXƒgƒŠƒbƒvƒA[ƒ}[#
-4018,218,5,211,1,0,0,0,0,0,0,0,0//RG_STRIPHELM #ƒXƒgƒŠƒbƒvƒwƒ‹ƒ€#
-4018,219,10,212,4,214,5,0,0,0,0,0,0//RG_INTIMIDATE#ƒCƒ“ƒeƒBƒ~ƒfƒCƒg#
+4018,218,5,211,2,0,0,0,0,0,0,0,0//RG_STRIPHELM #ƒXƒgƒŠƒbƒvƒwƒ‹ƒ€#
+4018,219,5,212,4,214,5,0,0,0,0,0,0//RG_INTIMIDATE#ƒCƒ“ƒeƒBƒ~ƒfƒCƒg#
4018,220,1,221,5,0,0,0,0,0,0,0,0//RG_GRAFFITI #ƒOƒ‰ƒtƒBƒeƒB#
4018,221,5,222,1,0,0,0,0,0,0,0,0//RG_FLAGGRAFFITI #ƒtƒ‰ƒbƒOƒOƒ‰ƒtƒBƒeƒB#
4018,222,1,223,1,0,0,0,0,0,0,0,0//RG_CLEANER #ƒNƒŠ[ƒi[#
-4018,223,5,216,3,0,0,0,0,0,0,0,0//RG_GANGSTER #ƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒX#
+4018,223,1,216,3,0,0,0,0,0,0,0,0//RG_GANGSTER #ƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒX#
4018,224,5,223,1,0,0,0,0,0,0,0,0//RG_COMPULSION #ƒRƒ€ƒpƒ‹ƒVƒ‡ƒ“ƒfƒBƒXƒJƒEƒ“ƒg#
4018,225,10,219,5,0,0,0,0,0,0,0,0//RG_PLAGIARISM #ƒNƒ[ƒ“ƒXƒLƒ‹#
4018,389,5,51,5,213,3,0,0,0,0,0,0//ST_CHASEWALK
4018,390,5,215,1,0,0,0,0,0,0,0,0//ST_REJECTSWORD
-4018,391,5,215,1,0,0,0,0,0,0,0,0//ST_STEALBACKPACK
-4018,475,1,219,5,225,1,0,0,0,0,0,0//ST_PRESERVE
-4018,476,5,215,1,216,1,217,1,218,1,0,0//ST_FULLSTRIP
+//4018,391,5,215,1,0,0,0,0,0,0,0,0//ST_STEALBACKPACK
+4018,475,1,225,10,0,0,0,0,0,0,0,0//ST_PRESERVE
+4018,476,5,215,5,216,5,217,5,218,5,0,0//ST_FULLSTRIP
//Creator
4019,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
4019,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -1109,10 +1107,7 @@
4019,235,5,237,3,0,0,0,0,0,0,0,0//AM_CP_SHIELD #ƒPƒ~ƒJƒ‹ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW#
4019,236,5,235,3,0,0,0,0,0,0,0,0//AM_CP_ARMOR #ƒPƒ~ƒJƒ‹ƒA[ƒ}[ƒ`ƒƒ[ƒW#
4019,237,5,228,2,0,0,0,0,0,0,0,0//AM_CP_HELM #ƒPƒ~ƒJƒ‹ƒwƒ‹ƒ€ƒ`ƒƒ[ƒW#
-4019,478,10,228,3,0,0,0,0,0,0,0,0//CR_SLIMPITCHER
-4019,479,5,234,1,235,1,236,1,237,1,0,0//CR_FULLPROTECTION
-
-// ŠØ‘‚Å‚à–¢ŽÀ‘•‚Ȃ̂ňȉº‚̃cƒŠ[ƒRƒƒ“ƒgƒAƒEƒg
+// Homonculus skill tree (disabled as for now)
//4019,238,1,0,0,0,0,0,0,0,0,0,0//AM_BIOETHICS #¶–½—Ï—#
//4019,239,10,238,1,0,0,0,0,0,0,0,0//AM_BIOTECHNOLOGY #¶–½HŠwŒ¤‹†#
//4019,240,5,239,7,0,0,0,0,0,0,0,0//AM_CREATECREATURE #”í‘¢•¨‘n‘¢#
@@ -1123,8 +1118,11 @@
//4019,245,10,246,3,0,0,0,0,0,0,0,0//AM_DRILLMASTER #ƒhƒŠƒ‹ƒ}ƒXƒ^[#
//4019,246,10,241,5,0,0,0,0,0,0,0,0//AM_HEALHOMUN #ƒq[ƒ‹ƒzƒ€ƒ“ƒNƒ‹ƒX#
//4019,247,10,246,5,0,0,0,0,0,0,0,0//AM_RESURRECTHOMUN #ƒŠƒUƒŒƒNƒVƒ‡ƒ“ƒzƒ€ƒ“ƒNƒ‹ƒX#
-4019,392,5,228,5,0,0,0,0,0,0,0,0//CR_ALCHEMY #Alchemy#
-4019,393,5,228,5,390,2,0,0,0,0,0,0//CR_SYNTHESISPOTION #Potion Synthesis#
+//4019,392,5,228,5,0,0,0,0,0,0,0,0//CR_ALCHEMY #Alchemy#
+//4019,393,5,228,5,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
+4019,479,5,234,5,235,5,236,5,237,5,0,0//CR_FULLPROTECTION
+
//Clown
4020,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
4020,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -1154,7 +1152,7 @@
4020,312,1,306,1,0,0,0,0,0,0,0,0//BD_INTOABYSS #[•£‚Ì’†‚É#
4020,313,5,321,10,0,0,0,0,0,0,0,0//BD_SIEGFRIED #•sŽ€g‚̃W[ƒNƒtƒŠ[ƒh#
4020,314,1,312,1,308,1,0,0,0,0,0,0//BD_RAGNAROK #ƒ‰ƒOƒiƒƒN#
-4020,394,10,0,0,0,0,0,0,0,0,0,0//CG_ARROWVULCAN
+4020,394,10,47,5,316,1,0,0,0,0,0,0//CG_ARROWVULCAN
4020,395,5,45,5,315,7,0,0,0,0,0,0//CG_MOONLIT
4020,396,1,45,5,315,5,0,0,0,0,0,0//CG_MARIONETTE
//Gypsy
@@ -1168,7 +1166,7 @@
4021,147,1,0,0,0,0,0,0,0,0,0,0//AC_MAKINGARROW #–îì¬#
4021,148,1,0,0,0,0,0,0,0,0,0,0//AC_CHARGEARROW #ƒ`ƒƒ[ƒWƒAƒ[#
4021,323,10,0,0,0,0,0,0,0,0,0,0//DC_DANCINGLESSON #ƒ_ƒ“ƒX‚Ì—ûK#
-4021,324,10,0,0,0,0,0,0,0,0,0,0//DC_THROWARROW #–‚¿#
+4021,324,5,323,3,0,0,0,0,0,0,0,0//DC_THROWARROW #–‚¿#
4021,325,5,323,1,304,1,0,0,0,0,0,0//DC_UGLYDANCE #Ž©•ªŸŽè‚ȃ_ƒ“ƒX#
4021,326,5,305,1,0,0,0,0,0,0,0,0//DC_SCREAM #ƒXƒNƒŠ[ƒ€#
4021,327,10,325,3,0,0,0,0,0,0,0,0//DC_HUMMING #ƒnƒ~ƒ“ƒO#
@@ -1186,7 +1184,7 @@
4021,312,1,306,1,0,0,0,0,0,0,0,0//BD_INTOABYSS #[•£‚Ì’†‚É#
4021,313,5,329,10,0,0,0,0,0,0,0,0//BD_SIEGFRIED #•sŽ€g‚̃W[ƒNƒtƒŠ[ƒh#
4021,314,1,312,1,308,1,0,0,0,0,0,0//BD_RAGNAROK #ƒ‰ƒOƒiƒƒN#
-4021,394,10,0,0,0,0,0,0,0,0,0,0//CG_ARROWVULCAN
+4021,394,10,47,5,324,1,0,0,0,0,0,0//CG_ARROWVULCAN
4021,395,5,45,5,323,7,0,0,0,0,0,0//CG_MOONLIT
4021,396,1,45,5,323,5,0,0,0,0,0,0//CG_MARIONETTE
// Peco Paladin
@@ -1208,7 +1206,7 @@
4022,35,1,248,5,0,0,0,0,0,0,0,0//AL_CURE #ƒLƒ…ƒA[#
4022,22,10,35,1,0,0,0,0,0,0,0,0//AL_DP #ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“#
4022,23,10,22,3,0,0,0,0,0,0,0,0//AL_DEMONBANE #ƒf[ƒ‚ƒ“ƒxƒCƒ“#
-4022,28,10,23,5,0,0,0,0,0,0,0,0//AL_HEAL #ƒq[ƒ‹#
+4022,28,10,23,5,248,10,0,0,0,0,0,0//AL_HEAL #ƒq[ƒ‹#
4022,248,10,0,0,0,0,0,0,0,0,0,0//CR_TRUST #ƒtƒFƒCƒX#
4022,249,10,0,0,0,0,0,0,0,0,0,0//CR_AUTOGUARD #ƒI[ƒgƒK[ƒh#
4022,250,5,249,5,0,0,0,0,0,0,0,0//CR_SHIELDCHARGE #ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW#
@@ -1669,7 +1667,7 @@
4041,235,5,237,3,0,0,0,0,0,0,0,0//AM_CP_SHIELD #ƒPƒ~ƒJƒ‹ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW#
4041,236,5,235,3,0,0,0,0,0,0,0,0//AM_CP_ARMOR #ƒPƒ~ƒJƒ‹ƒA[ƒ}[ƒ`ƒƒ[ƒW#
4041,237,5,228,2,0,0,0,0,0,0,0,0//AM_CP_HELM #ƒPƒ~ƒJƒ‹ƒwƒ‹ƒ€ƒ`ƒƒ[ƒW#
-// ŠØ‘‚Å‚à–¢ŽÀ‘•‚Ȃ̂ňȉº‚̃cƒŠ[ƒRƒƒ“ƒgƒAƒEƒg
+// Homonculus skill tree (disabled as for now)
//4041,238,1,0,0,0,0,0,0,0,0,0,0//AM_BIOETHICS #¶–½—Ï—#
//4041,239,10,238,1,0,0,0,0,0,0,0,0//AM_BIOTECHNOLOGY #¶–½HŠwŒ¤‹†#
//4041,240,5,239,7,0,0,0,0,0,0,0,0//AM_CREATECREATURE #”í‘¢•¨‘n‘¢#
@@ -1737,7 +1735,7 @@
4043,311,1,328,10,0,0,0,0,0,0,0,0//BD_ROKISWEIL #ƒƒL‚Ì‹©‚Ñ#
4043,312,1,306,1,0,0,0,0,0,0,0,0//BD_INTOABYSS #[•£‚Ì’†‚É#
4043,313,5,329,10,0,0,0,0,0,0,0,0//BD_SIEGFRIED #•sŽ€g‚̃W[ƒNƒtƒŠ[ƒh#
-4043,314,1,312,1,308,1,0,0,0,0,0,0//BD_RAGNAROK #ƒ‰ƒOƒiƒƒN#
+//4043,314,1,312,1,308,1,0,0,0,0,0,0//BD_RAGNAROK #ƒ‰ƒOƒiƒƒN#
// Peco Crusader
4044,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #Šî–{ƒXƒLƒ‹#
4044,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #‰ž‹}Žè“–#
@@ -1820,4 +1818,4 @@
4045,50,10,0,0,0,0,0,0,0,0,0,0//TF_STEAL #ƒXƒeƒB[ƒ‹#
4045,51,10,50,5,0,0,0,0,0,0,0,0//TF_HIDING #ƒnƒCƒfƒBƒ“ƒO#
4045,52,10,0,0,0,0,0,0,0,0,0,0//TF_POISON #ƒCƒ“ƒxƒiƒ€#
-4045,53,1,52,3,0,0,0,0,0,0,0,0//TF_DETOXIFY #‰ð“Å# \ No newline at end of file
+4045,53,1,52,3,0,0,0,0,0,0,0,0//TF_DETOXIFY #‰ð“Å#
diff --git a/db/skill_unit_db.txt b/db/skill_unit_db.txt
new file mode 100644
index 000000000..800548745
--- /dev/null
+++ b/db/skill_unit_db.txt
@@ -0,0 +1,80 @@
+// 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 / all / enemy
+// flag 0x001(UF_DEFNOTENEMY) Affected by 'defunit_not_enemy'
+// 0x002(UF_NOREITERRATION) Spell cannot be stacked
+// 0x004(UF_NOFOOTSET) Spell cannot be cast near/on players
+// 0x008(UF_NOOVERLAP) Spell effects do not overlap
+// 0x100(UF_DANCE) Dance skill
+// 0x200(UF_ENSEMBLE) Ensemble skill
+// Example: 0x006 = 0x002+0x004 -> Cannot be stacked nor cast near players
+//
+// Notes:
+// ------
+// 0x89,0x8a,0x8b •\Ž¦–³‚µ
+// 0x9a ‰Š‘®«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
+// 0x9b …‘®«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
+// 0x9c •—‘®«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
+// 0x9d ”’‚¢¬‚³‚ȃGƒtƒFƒNƒg
+//
+//
+// 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, 0x000 //MG_FIREWALL#ƒtƒ@ƒCƒA[ƒEƒH[ƒ‹
+ 21,0x86, , 0, 1,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, 0x000 //PR_SANCTUARY#ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ
+ 79,0x84, , -1, 1,3000,enemy, 0x000 //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,1000,enemy, 0x008 //WZ_VERMILION#ƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“
+ 87,0x8d, , -1, 0, -1,all, 0x004 //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, 0x000 //WZ_STORMGUST#ƒXƒg[ƒ€ƒKƒXƒg
+ 91,0x86, , 0, 2,1000,enemy, 0x000 //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, 0x000 //AM_DEMONSTRATION#ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“
+254,0x86, , -1, 0, 300,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, 0, -1,all, 0x000 //SA_LANDPROTECTOR#ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[
+306,0x9e, , 4, 0, -1,all, 0x300 //BD_LULLABY#ŽqŽç‰Ì
+307,0x9f, , 4, 0, -1,party, 0x300 //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, -1,enemy, 0x100 //BA_DISSONANCE#•s‹¦˜a‰¹
+319,0xa7, , 3, 0, -1,friend,0x100 //BA_WHISTLE#Œû“J
+320,0xa8, , 3, 0, -1,friend,0x100 //BA_ASSASSINCROSS#—[—z‚̃AƒTƒVƒ“ƒNƒƒX
+321,0xa9, , 3, 0, -1,friend,0x100 //BA_POEMBRAGI#ƒuƒ‰ƒM‚ÌŽ
+322,0xaa, , 3, 0, -1,friend,0x100 //BA_APPLEIDUN#ƒCƒhƒDƒ“‚Ì—ÑŒç
+325,0xab, , 3, 0, -1,enemy, 0x100 //DC_UGLYDANCE#Ž©•ªŸŽè‚ȃ_ƒ“ƒX
+327,0xac, , 3, 0, -1,friend,0x100 //DC_HUMMING#ƒnƒ~ƒ“ƒO
+328,0xad, , 3, 0, -1,enemy, 0x100,0 //DC_DONTFORGETME#Ž„‚ð–Y‚ê‚È‚¢‚Åc
+329,0xae, , 3, 0, -1,friend,0x100,0 //DC_FORTUNEKISS#K‰^‚̃LƒX
+330,0xaf, , 3, 0, -1,party, 0x100,0 //DC_SERVICEFORYOU#ƒT[ƒrƒXƒtƒH[ƒ†[
+336,0xb2, , 0,-1, -1,all, 0x000,0 //WE_CALLPARTNER#‚ ‚È‚½‚Ɉ§‚¢‚½‚¢
+339,0x86, , -1, 0, 300,enemy, 0x000,0 //NPC_DARKGRANDCROSS#ˆÅƒOƒ‰ƒ“ƒhƒNƒƒX
+362,0xb4, , 0, 3, 300,all, 0x000,0 //HP_BASILICA#ƒoƒWƒŠƒJ
+369,0xb3, , -1, 0,10000,all, 0x000,0 //PA_GOSPEL#ƒSƒXƒyƒ‹
+404,0xb6, , -1, 0, -1,all, 0x000,0 //PF_FOGWALL#ƒtƒHƒOƒEƒH[ƒ‹
+405,0xb7, , 0, 1,1000,enemy, 0x006,0 //PF_SPIDERWEB#ƒXƒpƒCƒ_[ƒEƒFƒbƒu
diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt
index 30202ee2d..9560aa53f 100644
--- a/doc/item_bonus.txt
+++ b/doc/item_bonus.txt
@@ -1,137 +1,184 @@
-skill n,x; skill n of level x
-
-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 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 bMdef,n; Magical defensive power + n
-bonus bDef,n; DEF + n
-bonus bHit,n; On-target hit power + n
-bonus bCritical,n; Critical + n
-bonus bCriticalRate,n; Critical ratio + n%
-bonus bFlee,n; Evasion power + n
-bonus bFlee2,n; Perfection evasion + n
-bonus bSpeed,n; Drift speed + n
-bonus bAspd,n; Attack speed + n
-bonus bSpeedRate,n; Drift speed + n% (just high ones application)
-bonus bAspdRate,n; Attack speed + n% (just high ones application)
-bonus bSpeedAddRate drift speed + n%
-bonus bAspdAddRate attack speed + n%
-bonus bAtkRange,n; Attack Range + n
-bonus bCastrate,n; Cast rate + n%
-bonus bUseSPrate,n; SP consumption + n%
-bonus bHPrecovRate,n; HP automatic recovery ratio + n% (you exclude the recovery with skill)
-bonus bSPrecovRate,n; SP automatic recovery ratio + n% (you exclude the recovery with skill)
-bonus bDoubleRate,n; attack probability n% (with weapon disregard just high ones application)
-bonus bDoubleAddRate,n; Double attack probability + n% (weapon disregard)
-bonus bPerfectHitRate,n; On-target impact attack probability n% (just high ones application)
-bonus bPerfectHitAddRate,n; On-target impact attack probability +n%
-bonus bGetZenyNum,n; When pushing down the monster with physical attack, rand () ゼニ of %n+1 is obtained, (as for n just high ones application)
-bonus bAddGetZenyNum,n; When pushing down 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; The damage of short-range attack n% reduction (magic and the trap, the é·¹ is excluded)
-bonus bLongAtkDef,n; damage of stand off attack n% reduction (magic and the trap, the é·¹ is excluded)
-bonus bMagicAtkDef the damage of magical attack n% reduction
-bonus bMiscAtkDef MISC attack (the trap and ?) the damage n% reduction
-
-bonus bIgnoreDefRace,n Defense disregard of enemy of n race
- 0,Intangibility 1,Immortality 2,Animal 3,Plant 4,Insect 5,Fish and shellfish 6,Demon 7,Human 8,Angel 9,Dragon family 10:Boss monster 11:Other than (normal monster) boss monster
-bonus bIgnoreDefEle,n; Defense disregard of enemy of n attribute
- 0,Nothing 1,Water 2,Earth 3,Fire 4,Wind 5,Poison 6,Saint 7,Darkness 8,Sense 9,Immortality
-bonus bIgnoreMDefRace n race the magical defensive power disregard damage
- 0,Intangibility 1,Immortality 2,Animal 3,Plant 4,Insect 5,Fish and shellfish 6,Demon 7,Human 8,Angel 9,Dragon family 10:Boss monster 11:Other than boss monster (normal monster)
-bonus bIgnoreMDefEle n attribute the magical defensive power disregard damage
- 0,Nothing 1,Water 2,Earth 3,Fire 4,Wind 5,Poison 6,Saint 7,Darkness 8,Sense 9,Immortality
-bonus bDefRatioAtkRace,n; n race if defensive power is high the high extent big damage is given, (defense disregard)
- 0,Intangibility 1,Immortality 2,Animal 3,Plant 4,Insect 5,Fish and shellfish 6,Demon 7,Human 8,Angel 9,Dragon family 10:Boss monster 11:Other than boss monster (normal monster)
-bonus bDefRatioAtkEle,n; n attribute if defensive power is high the high extent big damage is given, (defense disregard)
- 0,Nothing 1,Water 2,Earth 3,Fire 4,Wind 5,Poison 6,Saint 7,Darkness 8,Sense 9,Immortality
-bonus bAtkEle,n; Attack with element n
- 0,Nothing 1,Water 2,Earth 3,Fire 4,Wind 5,Poison 6,Saint 7,Darkness 8,Sense 9,Immortality
-bonus bDefEle,n; Guard against element n
- 0,Nothing 1,Water 2,Earth 3,Fire 4,Wind 5,Poison 6,Saint 7,Darkness 8,Sense 9,Immortality
-bonus bHitRate,n; on-target hit ratio +n%
-bonus bFleeRate,n; evasion ratio +n%
-bonus bFlee2Rate,n; complete evasion ratio +n%
-bonus bDefRate,n; earned-run average +n% (equipment)
-bonus bDef2Rate,n; earned-run average +n% (those due to vit)
-bonus bMdefRate,n; magical earned-run average +n% (equipment)
-bonus bMdef2Rate,n; magical earned-run average +n% (those due to int)
-bonus bSplashRange n; damage is given to the peripheral n cell of the target with usual weapon attack, if (as for n just high ones application, 1 if the 3*3, 2 the 5*5)
-bonus bSplashAddRange n; damage is given to the peripheral n cell of the target with usual weapon attack, (range + n)
-
-bonus bInfiniteEndure,n; Unlimited Endure (n is meaningless)
-bonus bRestartFullRecover,n; When reviving, HP and SP all recoveries (non mind there is no n)
-bonus bNoCastCancel,n; The casting is not cancelled (non mind there is no n)
-bonus bNoCastCancel2,n; The casting is not cancelled (is not cancelled even with GVG, n is meaningless)
-bonus bNoSizeFix,n; The attack revision with the size of the monster is not received, (non mind there is no n)
-bonus bNoWeaponDamage,n; The damage is not received to physical attack, (non mind there is no n)
-bonus bNoMagicDamage,n; The damage is not received to magic, (including also the heel, non mind there is no n)
-bonus bNoGemStone,n; When using skill, the gemstone is not consumed (non mind there is no n)
-
-
-bonus2 bAddEff,Eff_Blind,n; With the establishment of n% dark grant
-bonus2 bAddEff,Eff_Sleep,n; With the establishment of n% sleep grant
-bonus2 bAddEff,Eff_Poison,n; With the establishment of n% poison grant
-bonus2 bAddEff,Eff_Freeze,n; With the establishment of n% freezing grant
-bonus2 bAddEff,Eff_Silence,n; With the establishment of n% silence grant
-bonus2 bAddEff,Eff_Stan,n; With the establishment of n% stun grant
-bonus2 bAddEff,Eff_Curse,n; You curse with the establishment of n%, grant
-bonus2 bAddEff,Eff_Confusion,n; With the establishment of n% confusion grant
-bonus2 bAddEff,Eff_Stone,n; With the establishment of n% petrochemical grant
-
-bonus2 bResEff,Eff_Blind,n; Dark tolerance + n%
-bonus2 bResEff,Eff_Sleep,n; Sleep tolerance + n%
-bonus2 bResEff,Eff_Poison,n; Poison tolerance + n%
-bonus2 bResEff,Eff_Freeze,n; Freezing tolerance + n%
-bonus2 bResEff,Eff_Silence,n; Silence tolerance + n%
-bonus2 bResEff,Eff_Stan,n; Stun tolerance + n%
-bonus2 bResEff,Eff_Curse,n; Cursing tolerance + n%
-bonus2 bResEff,Eff_Confusion,n; Confusion tolerance + n%
-bonus2 bResEff,Eff_Stone,n; Petrochemical tolerance + n%
+//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 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 all recoveries, 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 one | 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%
- 0,Small size 1,Medium size 2,Large size
+ n: 0=Small 1=Medium 2=Large
bonus2 bAddRace,n,x; In n race the damage addition of x%
- 0,Intangibility 1,Immortality 2,Animal 3,Plant 4,Insect 5,Fish and shellfish 6,Demon 7,Human 8,Angel 9,Dragon family 10:Boss monster 11:Other than boss monster (normal monster)
+ 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
- 0,Intangibility 1,Immortality 2,Animal 3,Plant 4,Insect 5,Fish and shellfish 6,Demon 7,Human 8,Angel 9,Dragon family 10:Boss monster 11:Other than boss monster (normal monster)
+ 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)
- 0,Intangibility 1,Immortality 2,Animal 3,Plant 4,Insect 5,Fish and shellfish 6,Demon 7,Human 8,Angel 9,Dragon family 10:Boss monster 11:Other than boss monster (normal monster)
+ 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 bMagicSubRace,n,x; Magical damage x% reduction from n race
- 0,Intangibility 1,Immortality 2,Animal 3,Plant 4,Insect 5,Fish and shellfish 6,Demon 7,Human 8,Angel 9,Dragon family 10:Boss monster 11:Other than boss monster (normal monster)
+ 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%
- 0,Nothing 1,Water 2,Earth 3,Fire 4,Wind 5,Poison 6,Saint 7,Darkness 8,Sense 9,Immortality
-bonus2 bMagicAddEle,n,x; In n attribute the damage addition of x% (only magical attack)
- 0,Nothing 1,Water 2,Earth 3,Fire 4,Wind 5,Poison 6,Saint 7,Darkness 8,Sense 9,Immortality
+ 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
- 0,Nothing 1,Water 2,Earth 3,Fire 4,Wind 5,Poison 6,Saint 7,Darkness 8,Sense 9,Immortality
+ 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 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)
-bonus3 bAddMonsterDropItem,n,x; When pushing down the monster with physical attack, the probability which drops item n +x% (the item which the monster drops unrelated ones)
- 0,Intangibility 1,Immortality 2,Animal 3,Plant 4,Insect 5,Fish and shellfish 6,Demon 7,Human 8,Angel 9,Dragon family 10:Boss monster 11:Other than boss monster (normal monster)
+bonus3 bAddMonsterDropItem,n,x; When killing the monster with physical attack, the probability which drops item n +x% (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
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)
+bonus2 bSubSize,n,x; Damage x% reduction from n size
+ n: 0=Small 1=Medium 2=Large
+
+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 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%
+ n: 1=potions, 2=herbs, 3=fruits, 4=meat, 5=candy, 6=juices, 7=sashimi
+
+//---- 3/15 new card effects ----
+
+bonus bLoseSPWhenUnequip,n; Lose n SP when the item is unequipped
+
+bonus2 bExpAddRace,n,x; Increase exp gained by n% vs. enemies of type x
+bonus2 bSPGainRace,n,x; When killing a monster of type x by physical
+ attack gain n amount of sp
+bonus2 bSPSubRace2,n,x; Damage x% reduction from enemies of race n
+ (Check db/mob_race2_db.txt)
diff --git a/eAthena.sln b/eAthena.sln
new file mode 100644
index 000000000..66b082b91
--- /dev/null
+++ b/eAthena.sln
@@ -0,0 +1,58 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_txt", "vcproj\map-server_txt.vcproj", "{D356871D-58E1-450B-967A-E1E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_txt", "vcproj\login-server_txt.vcproj", "{D356871D-58E1-450B-967A-E2E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_txt", "vcproj\char-server_txt.vcproj", "{D356871D-58E1-450B-967A-E3E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj\char-server_sql.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj\login-server_sql.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj\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-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-E6E9646175AF}.Debug.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release.ActiveCfg = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/log/char.log b/log/char.log
deleted file mode 100644
index 37bea3401..000000000
--- a/log/char.log
+++ /dev/null
@@ -1,544 +0,0 @@
-<<<<<<< .mine
-<<<<<<< .mine
-
-11-11-2004 16:42:58.156: The char-server starting...
-11-11-2004 16:42:58.181: mmo_char_init: No character found in save/athena.txt.
-11-11-2004 16:42:58.181: Id for the next created character: 150000.
-11-11-2004 16:42:58.202: The char-server is ready (Server is listening on the port 6121).
-
-11-11-2004 16:43:41.281: The char-server starting...
-11-11-2004 16:43:41.292: mmo_char_init: No character found in save/athena.txt.
-11-11-2004 16:43:41.293: Id for the next created character: 150000.
-11-11-2004 16:43:41.296: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:43:42.305: From login-server: receiving of 0 GM accounts information.
-
-11-11-2004 16:44:28.609: The char-server starting...
-11-11-2004 16:44:28.618: mmo_char_init: No character found in save/athena.txt.
-11-11-2004 16:44:28.618: Id for the next created character: 150000.
-11-11-2004 16:44:28.621: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:44:29.630: From login-server: receiving of 1 GM accounts information.
-11-11-2004 16:45:27.935: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:46:40.227: Creation of New Character: (connection #7, account: 2000001) slot 0, character Name: cameri, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-11-11-2004 16:46:40.809: Character Selected, Account ID: 2000001, Character Slot: 0, Character Name: cameri.
-
-11-11-2004 16:47:21.312: The char-server starting...
-11-11-2004 16:47:21.321: mmo_char_init: 1 character read in save/athena.txt.
-11-11-2004 16:47:21.322: Id for the next created character: 150001.
-11-11-2004 16:47:21.325: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:47:22.333: From login-server: receiving of 1 GM accounts information.
-11-11-2004 16:47:34.440: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:47:45.542: Character Selected, Account ID: 2000001, Character Slot: 0, Character Name: cameri.
-11-11-2004 16:47:48.775: Character Selected, Account ID: 2000001, Character Slot: 0, Character Name: cameri.
-11-11-2004 16:48:03.312: ----End of char-server (normal end with closing of all files).
-
-11-11-2004 16:48:23.328: The char-server starting...
-11-11-2004 16:48:23.337: mmo_char_init: 1 character read in save/athena.txt.
-11-11-2004 16:48:23.337: Id for the next created character: 150001.
-11-11-2004 16:48:23.341: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:48:24.349: From login-server: receiving of 0 GM accounts information.
-11-11-2004 16:48:38.235: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:49:22.743: Make new char error (name already exists): (connection #7, account: 2000002) slot 0, name: Cameri (actual name of other char: 168109034), stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-11-11-2004 16:49:26.808: Creation of New Character: (connection #7, account: 2000002) slot 0, character Name: Kameri, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-11-11-2004 16:49:27.541: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: Kameri.
-11-11-2004 16:51:18.640: ----End of char-server (normal end with closing of all files).
-
-11-11-2004 16:51:26.109: The char-server starting...
-11-11-2004 16:51:26.118: mmo_char_init: 2 characters read in save/athena.txt.
-11-11-2004 16:51:26.120: Id for the next created character: 150002.
-11-11-2004 16:51:26.123: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:51:27.135: From login-server: receiving of 0 GM accounts information.
-11-11-2004 16:51:39.916: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:51:49.968: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: Kameri.
-11-11-2004 16:51:59.756: ----End of char-server (normal end with closing of all files).
-
-11-11-2004 16:52:16.546: The char-server starting...
-11-11-2004 16:52:16.560: mmo_char_init: No character found in save/athena.txt.
-11-11-2004 16:52:16.560: Id for the next created character: 150000.
-11-11-2004 16:52:16.563: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:52:17.587: From login-server: receiving of 0 GM accounts information.
-11-11-2004 16:52:30.579: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:53:04.815: Creation of New Character: (connection #7, account: 2000002) slot 0, character Name: cameri, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-11-11-2004 16:53:05.364: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-11-11-2004 16:53:11.582: ----End of char-server (normal end with closing of all files).
-
-12-11-2004 23:32:32.921: The char-server starting...
-12-11-2004 23:32:32.932: mmo_char_init: No character found in save/athena.txt.
-12-11-2004 23:32:32.932: Id for the next created character: 150000.
-12-11-2004 23:32:32.936: The char-server is ready (Server is listening on the port 6121).
-12-11-2004 23:32:33.980: From login-server: receiving of 0 GM accounts information.
-12-11-2004 23:32:52.352: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-12-11-2004 23:33:28.319: Creation of New Character: (connection #7, account: 2000002) slot 0, character Name: cameri, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-12-11-2004 23:33:28.935: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-12-11-2004 23:34:16.888: ----End of char-server (normal end with closing of all files).
-
-12-11-2004 23:37:33.062: The char-server starting...
-12-11-2004 23:37:33.071: mmo_char_init: 1 character read in save/athena.txt.
-12-11-2004 23:37:33.071: Id for the next created character: 150001.
-12-11-2004 23:37:33.077: The char-server is ready (Server is listening on the port 6121).
-12-11-2004 23:37:34.086: From login-server: receiving of 0 GM accounts information.
-12-11-2004 23:37:48.317: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-12-11-2004 23:38:23.732: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-
-12-11-2004 23:56:16.671: The char-server starting...
-12-11-2004 23:56:16.687: mmo_char_init: 1 character read in save/athena.txt.
-12-11-2004 23:56:16.688: Id for the next created character: 150001.
-12-11-2004 23:56:16.692: The char-server is ready (Server is listening on the port 6121).
-12-11-2004 23:56:18.412: From login-server: receiving of 0 GM accounts information.
-12-11-2004 23:56:28.295: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-12-11-2004 23:56:36.927: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-12-11-2004 23:57:08.264: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-12-11-2004 23:57:11.224: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 00:04:29.828: The char-server starting...
-13-11-2004 00:04:29.837: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 00:04:29.837: Id for the next created character: 150001.
-13-11-2004 00:04:29.840: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 00:04:31.409: From login-server: receiving of 0 GM accounts information.
-13-11-2004 00:04:41.267: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:05:08.280: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 00:06:01.415: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 00:06:31.667: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:06:36.139: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 00:06:51.255: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:07:45.437: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 00:08:11.255: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:08:51.253: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:08:58.514: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 00:19:05.781: The char-server starting...
-13-11-2004 00:19:05.790: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 00:19:05.790: Id for the next created character: 150001.
-13-11-2004 00:19:05.793: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 00:19:06.801: From login-server: receiving of 0 GM accounts information.
-13-11-2004 00:19:11.683: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:19:17.226: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 00:20:11.262: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:23:51.262: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:24:21.423: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 00:31:05.656: The char-server starting...
-13-11-2004 00:31:05.665: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 00:31:05.665: Id for the next created character: 150001.
-13-11-2004 00:31:05.668: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 00:31:06.677: From login-server: receiving of 1 GM accounts information.
-
-13-11-2004 00:31:15.500: The char-server starting...
-13-11-2004 00:31:15.554: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 00:31:15.554: Id for the next created character: 150001.
-13-11-2004 00:31:15.557: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 00:31:16.797: From login-server: receiving of 1 GM accounts information.
-13-11-2004 00:31:17.744: ----End of char-server (normal end with closing of all files).
-13-11-2004 00:31:19.585: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-
-13-11-2004 00:32:40.671: The char-server starting...
-13-11-2004 00:32:40.688: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 00:32:40.688: Id for the next created character: 150001.
-13-11-2004 00:32:40.692: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 00:33:20.366: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 00:34:09.571: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:34:10.802: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 00:34:27.312: The char-server starting...
-13-11-2004 00:34:27.331: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 00:34:27.332: Id for the next created character: 150001.
-13-11-2004 00:34:27.341: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 00:34:28.483: From login-server: receiving of 1 GM accounts information.
-13-11-2004 00:34:29.792: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:34:35.055: Map-Server 1 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 1 loading complete.
-13-11-2004 00:34:50.244: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 00:37:09.489: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 00:53:37.218: The char-server starting...
-13-11-2004 00:53:37.244: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 00:53:37.244: Id for the next created character: 150001.
-13-11-2004 00:53:37.278: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 00:53:38.325: From login-server: receiving of 1 GM accounts information.
-13-11-2004 00:53:47.036: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 00:54:08.365: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 00:59:16.497: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 01:04:21.109: The char-server starting...
-13-11-2004 01:04:21.118: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 01:04:21.118: Id for the next created character: 150001.
-13-11-2004 01:04:21.121: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 01:04:22.130: From login-server: receiving of 1 GM accounts information.
-13-11-2004 01:04:35.297: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 01:04:43.484: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 01:05:41.004: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 01:06:01.250: The char-server starting...
-13-11-2004 01:06:01.291: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 01:06:01.291: Id for the next created character: 150001.
-13-11-2004 01:06:01.294: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 01:06:02.422: From login-server: receiving of 1 GM accounts information.
-13-11-2004 01:06:10.437: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 01:06:16.806: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 01:10:00.222: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 07:55:58.343: The char-server starting...
-13-11-2004 07:55:58.367: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 07:55:58.367: Id for the next created character: 150001.
-13-11-2004 07:55:58.382: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 07:56:01.109: From login-server: receiving of 1 GM accounts information.
-13-11-2004 07:56:24.268: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 07:56:29.078: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 07:56:58.185: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 07:59:46.761: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 07:59:49.889: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:01:14.252: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:01:49.796: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:02:05.459: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:02:20.588: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:06:13.678: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 08:06:14.978: Map-Server 1 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 1 loading complete.
-13-11-2004 08:06:16.081: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:07:14.914: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 08:07:26.793: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:08:18.595: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 08:08:22.131: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:08:36.085: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 08:11:29.796: The char-server starting...
-13-11-2004 08:11:29.806: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 08:11:29.806: Id for the next created character: 150001.
-13-11-2004 08:11:29.810: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 08:11:30.820: From login-server: receiving of 1 GM accounts information.
-13-11-2004 08:29:16.938: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 08:30:10.796: The char-server starting...
-13-11-2004 08:30:10.805: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 08:30:10.805: Id for the next created character: 150001.
-13-11-2004 08:30:10.810: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 08:30:11.820: From login-server: receiving of 1 GM accounts information.
-13-11-2004 08:30:24.644: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 08:30:33.699: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:30:51.816: From login-server: receiving of 1 GM accounts information.
-13-11-2004 08:31:13.833: ----End of char-server (normal end with closing of all files).
-
-13-11-2004 08:33:02.559: The char-server starting...
-13-11-2004 08:33:02.593: mmo_char_init: 1 character read in save/athena.txt.
-13-11-2004 08:33:02.593: Id for the next created character: 150001.
-13-11-2004 08:33:02.607: The char-server is ready (Server is listening on the port 6121).
-13-11-2004 08:33:03.743: From login-server: receiving of 1 GM accounts information.
-13-11-2004 08:33:12.097: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-13-11-2004 08:33:27.928: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:33:45.839: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-13-11-2004 08:39:42.915: ----End of char-server (normal end with closing of all files).
-=======
-
-11-11-2004 16:42:58.156: The char-server starting...
-11-11-2004 16:42:58.181: mmo_char_init: No character found in save/athena.txt.
-11-11-2004 16:42:58.181: Id for the next created character: 150000.
-11-11-2004 16:42:58.202: The char-server is ready (Server is listening on the port 6121).
-
-11-11-2004 16:43:41.281: The char-server starting...
-11-11-2004 16:43:41.292: mmo_char_init: No character found in save/athena.txt.
-11-11-2004 16:43:41.293: Id for the next created character: 150000.
-11-11-2004 16:43:41.296: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:43:42.305: From login-server: receiving of 0 GM accounts information.
-
-11-11-2004 16:44:28.609: The char-server starting...
-11-11-2004 16:44:28.618: mmo_char_init: No character found in save/athena.txt.
-11-11-2004 16:44:28.618: Id for the next created character: 150000.
-11-11-2004 16:44:28.621: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:44:29.630: From login-server: receiving of 1 GM accounts information.
-11-11-2004 16:45:27.935: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:46:40.227: Creation of New Character: (connection #7, account: 2000001) slot 0, character Name: cameri, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-11-11-2004 16:46:40.809: Character Selected, Account ID: 2000001, Character Slot: 0, Character Name: cameri.
-
-11-11-2004 16:47:21.312: The char-server starting...
-11-11-2004 16:47:21.321: mmo_char_init: 1 character read in save/athena.txt.
-11-11-2004 16:47:21.322: Id for the next created character: 150001.
-11-11-2004 16:47:21.325: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:47:22.333: From login-server: receiving of 1 GM accounts information.
-11-11-2004 16:47:34.440: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:47:45.542: Character Selected, Account ID: 2000001, Character Slot: 0, Character Name: cameri.
-11-11-2004 16:47:48.775: Character Selected, Account ID: 2000001, Character Slot: 0, Character Name: cameri.
-11-11-2004 16:48:03.312: ----End of char-server (normal end with closing of all files).
-
-11-11-2004 16:48:23.328: The char-server starting...
-11-11-2004 16:48:23.337: mmo_char_init: 1 character read in save/athena.txt.
-11-11-2004 16:48:23.337: Id for the next created character: 150001.
-11-11-2004 16:48:23.341: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:48:24.349: From login-server: receiving of 0 GM accounts information.
-11-11-2004 16:48:38.235: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:49:22.743: Make new char error (name already exists): (connection #7, account: 2000002) slot 0, name: Cameri (actual name of other char: 168109034), stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-11-11-2004 16:49:26.808: Creation of New Character: (connection #7, account: 2000002) slot 0, character Name: Kameri, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-11-11-2004 16:49:27.541: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: Kameri.
-11-11-2004 16:51:18.640: ----End of char-server (normal end with closing of all files).
-
-11-11-2004 16:51:26.109: The char-server starting...
-11-11-2004 16:51:26.118: mmo_char_init: 2 characters read in save/athena.txt.
-11-11-2004 16:51:26.120: Id for the next created character: 150002.
-11-11-2004 16:51:26.123: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:51:27.135: From login-server: receiving of 0 GM accounts information.
-11-11-2004 16:51:39.916: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:51:49.968: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: Kameri.
-11-11-2004 16:51:59.756: ----End of char-server (normal end with closing of all files).
-
-11-11-2004 16:52:16.546: The char-server starting...
-11-11-2004 16:52:16.560: mmo_char_init: No character found in save/athena.txt.
-11-11-2004 16:52:16.560: Id for the next created character: 150000.
-11-11-2004 16:52:16.563: The char-server is ready (Server is listening on the port 6121).
-11-11-2004 16:52:17.587: From login-server: receiving of 0 GM accounts information.
-11-11-2004 16:52:30.579: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-11-11-2004 16:53:04.815: Creation of New Character: (connection #7, account: 2000002) slot 0, character Name: cameri, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-11-11-2004 16:53:05.364: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-11-11-2004 16:53:11.582: ----End of char-server (normal end with closing of all files).
->>>>>>> .r194
-=======
->>>>>>> .r251
-
-18-11-2004 06:56:41.828: The char-server starting...
-18-11-2004 06:56:41.854: mmo_char_init: 1 character read in save/athena.txt.
-18-11-2004 06:56:41.854: Id for the next created character: 150001.
-18-11-2004 06:56:41.881: The char-server is ready (Server is listening on the port 6121).
-18-11-2004 06:59:34.802: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 06:59:43.567: ----End of char-server (normal end with closing of all files).
-
-18-11-2004 15:17:05.828: The char-server starting...
-18-11-2004 15:17:05.849: mmo_char_init: 1 character read in save/athena.txt.
-18-11-2004 15:17:05.850: Id for the next created character: 150001.
-18-11-2004 15:17:05.895: The char-server is ready (Server is listening on the port 6121).
-18-11-2004 15:17:17.343: From login-server: receiving of 1 GM accounts information.
-18-11-2004 15:17:30.111: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 15:18:36.227: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 15:19:19.315: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 15:20:15.590: ----End of char-server (normal end with closing of all files).
-
-18-11-2004 15:28:11.062: The char-server starting...
-18-11-2004 15:28:11.070: mmo_char_init: 1 character read in save/athena.txt.
-18-11-2004 15:28:11.071: Id for the next created character: 150001.
-18-11-2004 15:28:11.073: The char-server is ready (Server is listening on the port 6121).
-18-11-2004 15:28:12.082: From login-server: receiving of 1 GM accounts information.
-18-11-2004 15:28:24.908: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 15:28:36.005: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 15:36:02.953: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 15:36:09.878: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 15:42:52.767: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 15:43:04.353: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 15:43:31.679: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 15:44:11.503: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 15:44:19.183: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 15:56:38.886: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 15:56:41.926: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 16:19:54.830: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 16:19:57.797: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 16:56:34.359: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 16:56:59.561: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-18-11-2004 16:57:16.313: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-18-11-2004 16:58:25.759: ----End of char-server (normal end with closing of all files).
-
-20-11-2002 11:21:00.093: The char-server starting...
-20-11-2002 11:21:00.275: mmo_char_init: 1 character read in save/athena.txt.
-20-11-2002 11:21:00.276: Id for the next created character: 150001.
-20-11-2002 11:21:00.337: The char-server is ready (Server is listening on the port 6121).
-20-11-2002 11:21:11.399: From login-server: receiving of 1 GM accounts information.
-20-11-2002 11:21:28.446: Map-Server 0 connected: 422 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-20-11-2002 11:24:19.590: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2002 11:34:39.775: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-20-11-2002 11:35:10.607: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2002 11:36:01.544: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2002 11:36:14.340: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2002 11:51:01.353: From login-server: receiving of 1 GM accounts information.
-20-11-2002 12:04:43.515: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-20-11-2002 12:05:13.012: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2002 12:08:24.088: ----End of char-server (normal end with closing of all files).
-
-20-11-2002 12:09:52.812: The char-server starting...
-20-11-2002 12:09:52.821: mmo_char_init: 1 character read in save/athena.txt.
-20-11-2002 12:09:52.821: Id for the next created character: 150001.
-20-11-2002 12:09:52.826: The char-server is ready (Server is listening on the port 6121).
-20-11-2002 12:09:53.119: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-20-11-2002 12:09:53.835: From login-server: receiving of 1 GM accounts information.
-20-11-2002 12:10:17.431: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2002 12:10:35.692: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2002 12:11:03.500: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2002 12:19:24.536: ----End of char-server (normal end with closing of all files).
-
-20-11-2004 22:50:48.421: The char-server starting...
-20-11-2004 22:50:48.447: mmo_char_init: 1 character read in save/athena.txt.
-20-11-2004 22:50:48.448: Id for the next created character: 150001.
-20-11-2004 22:50:48.453: The char-server is ready (Server is listening on the port 6121).
-20-11-2004 22:50:50.976: From login-server: receiving of 1 GM accounts information.
-20-11-2004 22:50:57.826: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-20-11-2004 22:51:07.009: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2004 22:52:42.860: ----End of char-server (normal end with closing of all files).
-
-20-11-2004 23:08:33.796: The char-server starting...
-20-11-2004 23:08:33.804: mmo_char_init: 1 character read in save/athena.txt.
-20-11-2004 23:08:33.804: Id for the next created character: 150001.
-20-11-2004 23:08:33.808: The char-server is ready (Server is listening on the port 6121).
-20-11-2004 23:08:34.247: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-20-11-2004 23:08:34.817: From login-server: receiving of 1 GM accounts information.
-20-11-2004 23:09:03.135: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2004 23:12:23.789: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-20-11-2004 23:12:41.877: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2004 23:13:53.628: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2004 23:17:23.771: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-20-11-2004 23:19:04.041: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-20-11-2004 23:28:20.054: ----End of char-server (normal end with closing of all files).
-
-21-11-2004 00:33:38.328: The char-server starting...
-21-11-2004 00:33:38.359: mmo_char_init: 1 character read in save/athena.txt.
-21-11-2004 00:33:38.359: Id for the next created character: 150001.
-21-11-2004 00:33:38.363: The char-server is ready (Server is listening on the port 6121).
-21-11-2004 00:33:38.705: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 00:33:39.371: From login-server: receiving of 1 GM accounts information.
-21-11-2004 00:33:48.345: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 00:42:37.937: ----End of char-server (normal end with closing of all files).
-
-21-11-2004 00:46:37.500: The char-server starting...
-21-11-2004 00:46:37.512: mmo_char_init: 1 character read in save/athena.txt.
-21-11-2004 00:46:37.512: Id for the next created character: 150001.
-21-11-2004 00:46:37.516: The char-server is ready (Server is listening on the port 6121).
-21-11-2004 00:46:37.913: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 00:46:39.002: From login-server: receiving of 1 GM accounts information.
-21-11-2004 00:46:53.218: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 00:59:06.132: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 00:59:15.936: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 00:59:28.498: ----End of char-server (normal end with closing of all files).
-
-21-11-2004 09:22:00.687: The char-server starting...
-21-11-2004 09:22:00.749: mmo_char_init: 1 character read in save/athena.txt.
-21-11-2004 09:22:00.749: Id for the next created character: 150001.
-21-11-2004 09:22:00.756: The char-server is ready (Server is listening on the port 6121).
-21-11-2004 09:22:01.832: From login-server: receiving of 1 GM accounts information.
-21-11-2004 09:22:18.231: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 09:22:38.514: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 09:23:06.480: ----End of char-server (normal end with closing of all files).
-
-21-11-2004 09:35:38.250: The char-server starting...
-21-11-2004 09:35:38.262: mmo_char_init: 1 character read in save/athena.txt.
-21-11-2004 09:35:38.262: Id for the next created character: 150001.
-21-11-2004 09:35:38.267: The char-server is ready (Server is listening on the port 6121).
-21-11-2004 09:35:39.283: From login-server: receiving of 1 GM accounts information.
-21-11-2004 09:35:41.965: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 09:35:42.583: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 09:58:57.150: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 09:59:21.878: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 10:07:20.816: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 10:07:41.427: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 10:10:29.782: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 10:10:41.248: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 10:15:33.735: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 10:16:00.295: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 10:16:06.129: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 10:16:30.438: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 10:16:42.933: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 10:18:01.628: Creation of New Character: (connection #7, account: 2000003) slot 0, character Name: MC Cameri, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-21-11-2004 10:18:02.096: Character Selected, Account ID: 2000003, Character Slot: 0, Character Name: MC Cameri.
-21-11-2004 10:18:20.543: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 10:18:37.052: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 10:50:44.901: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 10:50:53.984: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 11:02:15.043: ----End of char-server (normal end with closing of all files).
-
-21-11-2004 11:09:39.562: The char-server starting...
-21-11-2004 11:09:39.576: mmo_char_init: 2 characters read in save/athena.txt.
-21-11-2004 11:09:39.576: Id for the next created character: 150002.
-21-11-2004 11:09:39.580: The char-server is ready (Server is listening on the port 6121).
-21-11-2004 11:09:40.649: From login-server: receiving of 1 GM accounts information.
-21-11-2004 11:09:43.270: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 11:12:19.861: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 11:15:17.544: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 11:15:19.278: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 11:24:14.202: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 11:36:32.167: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 11:36:44.667: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 11:39:04.045: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 11:39:25.307: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 11:53:34.198: ----End of char-server (normal end with closing of all files).
-
-21-11-2004 12:44:34.859: The char-server starting...
-21-11-2004 12:44:34.873: mmo_char_init: 2 characters read in save/athena.txt.
-21-11-2004 12:44:34.873: Id for the next created character: 150002.
-21-11-2004 12:44:34.879: The char-server is ready (Server is listening on the port 6121).
-21-11-2004 12:44:35.888: From login-server: receiving of 1 GM accounts information.
-21-11-2004 12:44:44.124: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-21-11-2004 12:44:46.698: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-21-11-2004 12:45:37.451: Character Selected, Account ID: 2000003, Character Slot: 0, Character Name: MC Cameri.
-21-11-2004 12:47:15.351: ----End of char-server (normal end with closing of all files).
-
-22-11-2004 06:42:28.734: The char-server starting...
-22-11-2004 06:42:28.750: mmo_char_init: 2 characters read in save/athena.txt.
-22-11-2004 06:42:28.750: Id for the next created character: 150002.
-22-11-2004 06:42:28.771: The char-server is ready (Server is listening on the port 6121).
-22-11-2004 06:42:29.931: From login-server: receiving of 1 GM accounts information.
-22-11-2004 06:42:38.250: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-
-22-11-2004 16:00:20.453: The char-server starting...
-22-11-2004 16:00:20.465: mmo_char_init: 2 characters read in save/athena.txt.
-22-11-2004 16:00:20.466: Id for the next created character: 150002.
-22-11-2004 16:00:20.469: The char-server is ready (Server is listening on the port 6121).
-22-11-2004 16:00:21.480: From login-server: receiving of 4 GM accounts information.
-22-11-2004 16:00:47.633: Map-Server 0 connected: 424 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 16:01:05.700: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 16:01:24.311: Creation of New Character: (connection #7, account: 2000004) slot 0, character Name: genosonic, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-22-11-2004 16:01:24.778: Character Selected, Account ID: 2000004, Character Slot: 0, Character Name: genosonic.
-22-11-2004 16:01:47.639: Creation of New Character: (connection #7, account: 2000005) slot 0, character Name: metal, stats: 5+5+5+5+5+5=30, hair: 1, hair color: 0.
-22-11-2004 16:01:48.105: Character Selected, Account ID: 2000005, Character Slot: 0, Character Name: metal.
-22-11-2004 16:01:54.996: ----End of char-server (normal end with closing of all files).
-
-22-11-2004 20:36:07.906: The char-server starting...
-22-11-2004 20:36:07.929: mmo_char_init: 4 characters read in save/athena.txt.
-22-11-2004 20:36:07.930: Id for the next created character: 150004.
-22-11-2004 20:36:07.941: The char-server is ready (Server is listening on the port 6121).
-22-11-2004 20:36:09.030: From login-server: receiving of 5 GM accounts information.
-22-11-2004 20:36:15.739: ----End of char-server (normal end with closing of all files).
-
-22-11-2004 20:52:23.171: The char-server starting...
-22-11-2004 20:52:23.181: mmo_char_init: 4 characters read in save/athena.txt.
-22-11-2004 20:52:23.181: Id for the next created character: 150004.
-22-11-2004 20:52:23.195: The char-server is ready (Server is listening on the port 6121).
-22-11-2004 20:52:23.379: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 20:52:24.205: From login-server: receiving of 5 GM accounts information.
-22-11-2004 20:53:17.434: Character Selected, Account ID: 2000003, Character Slot: 0, Character Name: MC Cameri.
-22-11-2004 20:54:25.061: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 20:55:46.891: Character Selected, Account ID: 2000003, Character Slot: 0, Character Name: MC Cameri.
-
-22-11-2004 22:01:41.890: The char-server starting...
-22-11-2004 22:01:41.967: mmo_char_init: 4 characters read in save/athena.txt.
-22-11-2004 22:01:41.967: Id for the next created character: 150004.
-22-11-2004 22:01:42.082: The char-server is ready (Server is listening on the port 6121).
-22-11-2004 22:01:43.195: From login-server: receiving of 5 GM accounts information.
-22-11-2004 22:01:44.237: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:02:53.017: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:03:01.927: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:06:55.785: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:07:15.235: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:09:01.840: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-
-22-11-2004 22:27:30.593: The char-server starting...
-22-11-2004 22:27:30.604: mmo_char_init: 4 characters read in save/athena.txt.
-22-11-2004 22:27:30.604: Id for the next created character: 150004.
-22-11-2004 22:27:30.614: The char-server is ready (Server is listening on the port 6121).
-22-11-2004 22:27:31.688: From login-server: receiving of 5 GM accounts information.
-22-11-2004 22:28:02.187: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:30:00.034: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:30:08.700: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:31:47.261: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:32:02.942: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:33:02.191: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:33:13.404: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:36:33.876: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:36:44.379: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:38:15.209: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:39:53.470: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:40:01.071: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:41:22.312: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:41:39.147: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:45:04.520: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:45:08.051: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:46:04.773: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:46:32.820: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:48:52.910: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:48:59.876: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-22-11-2004 22:54:35.819: Map-Server 0 connected: 413 maps, from IP 127.0.0.1 port 5121. Map-server 0 loading complete.
-22-11-2004 22:55:02.552: Character Selected, Account ID: 2000002, Character Slot: 0, Character Name: cameri.
-
-24-11-2004 18:55:48.531: The char-server starting...
-24-11-2004 18:55:48.542: mmo_char_init: 4 characters read in save/athena.txt.
-24-11-2004 18:55:48.542: Id for the next created character: 150004.
-24-11-2004 18:55:48.580: The char-server is ready (Server is listening on the port 6121).
-24-11-2004 18:55:49.631: From login-server: receiving of 5 GM accounts information.
diff --git a/log/char.txt b/log/char.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/log/char.txt
+++ /dev/null
diff --git a/log/droplog.log b/log/droplog.log
deleted file mode 100644
index e69de29bb..000000000
--- a/log/droplog.log
+++ /dev/null
diff --git a/log/gm.txt b/log/gm.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/log/gm.txt
+++ /dev/null
diff --git a/log/inter.txt b/log/inter.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/log/inter.txt
+++ /dev/null
diff --git a/log/login.log b/log/login.log
deleted file mode 100644
index 7163dc4d5..000000000
--- a/log/login.log
+++ /dev/null
@@ -1,2908 +0,0 @@
-<<<<<<< .mine
-<<<<<<< .mine
-
-2004-11-11 16:42:57.500: The login-server starting...
-2004-11-11 16:42:57.574: The configuration of the server is set:
-2004-11-11 16:42:57.574: - with no remote administration.
-2004-11-11 16:42:57.574: - to accept any IP for remote administration
-2004-11-11 16:42:57.574: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:42:57.574: - to create GM with level '60' when @gm is used.
-2004-11-11 16:42:57.574: - to ALLOW new users (with _F/_M).
-2004-11-11 16:42:57.575: - with port: 6900.
-2004-11-11 16:42:57.575: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:42:57.575: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:42:57.575: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:42:57.575: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:42:57.576: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:42:57.576: - to NOT display normal parse packets on console.
-2004-11-11 16:42:57.576: - to NOT display administration parse packets on console.
-2004-11-11 16:42:57.576: - to NOT display char-server parse packets on console.
-2004-11-11 16:42:57.576: - with no minimum level for connection.
-2004-11-11 16:42:57.576: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:42:57.576: - to create new accounts with an unlimited time.
-2004-11-11 16:42:57.576: - with control of players IP between login-server and char-server.
-2004-11-11 16:42:57.576: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:42:57.594: The LAN configuration of the server is set:
-2004-11-11 16:42:57.595: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:42:57.595: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:42:57.596: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-11 16:42:57.600: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:42:57.600: The login-server is ready (Server is listening on the port 6900).
-
-2004-11-11 16:43:39.859: The login-server starting...
-2004-11-11 16:43:39.859: The configuration of the server is set:
-2004-11-11 16:43:39.859: - with no remote administration.
-2004-11-11 16:43:39.859: - to accept any IP for remote administration
-2004-11-11 16:43:39.859: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:43:39.859: - to create GM with level '60' when @gm is used.
-2004-11-11 16:43:39.859: - to ALLOW new users (with _F/_M).
-2004-11-11 16:43:39.859: - with port: 6900.
-2004-11-11 16:43:39.860: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:43:39.860: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:43:39.860: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:43:39.860: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:43:39.860: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:43:39.860: - to NOT display normal parse packets on console.
-2004-11-11 16:43:39.860: - to NOT display administration parse packets on console.
-2004-11-11 16:43:39.860: - to NOT display char-server parse packets on console.
-2004-11-11 16:43:39.860: - with no minimum level for connection.
-2004-11-11 16:43:39.861: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:43:39.861: - to create new accounts with an unlimited time.
-2004-11-11 16:43:39.861: - with control of players IP between login-server and char-server.
-2004-11-11 16:43:39.861: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:43:39.862: The LAN configuration of the server is set:
-2004-11-11 16:43:39.862: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:43:39.862: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:43:39.864: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-11 16:43:39.865: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:43:39.866: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:43:42.308: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:43:42.309: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:43:42.310: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:43:44.791: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-
-2004-11-11 16:44:26.468: The login-server starting...
-2004-11-11 16:44:26.468: The configuration of the server is set:
-2004-11-11 16:44:26.468: - with no remote administration.
-2004-11-11 16:44:26.468: - to accept any IP for remote administration
-2004-11-11 16:44:26.468: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:44:26.468: - to create GM with level '60' when @gm is used.
-2004-11-11 16:44:26.468: - to ALLOW new users (with _F/_M).
-2004-11-11 16:44:26.468: - with port: 6900.
-2004-11-11 16:44:26.469: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:44:26.469: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:44:26.469: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:44:26.469: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:44:26.469: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:44:26.469: - to NOT display normal parse packets on console.
-2004-11-11 16:44:26.469: - to NOT display administration parse packets on console.
-2004-11-11 16:44:26.469: - to NOT display char-server parse packets on console.
-2004-11-11 16:44:26.469: - with no minimum level for connection.
-2004-11-11 16:44:26.470: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:44:26.470: - to create new accounts with an unlimited time.
-2004-11-11 16:44:26.470: - with control of players IP between login-server and char-server.
-2004-11-11 16:44:26.470: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:44:26.471: The LAN configuration of the server is set:
-2004-11-11 16:44:26.471: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:44:26.471: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:44:26.472: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-11 16:44:26.474: 6 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-11 16:44:26.474: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:44:29.635: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:44:29.635: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:44:29.637: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:46:36.685: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:46:36.685: Authentification accepted (account: cameri (id: 2000001), ip: 127.0.0.1)
-2004-11-11 16:46:37.308: Char-server 'eAthena': authentification of the account 2000001 accepted (ip: 127.0.0.1).
-2004-11-11 16:46:52.378: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-
-2004-11-11 16:47:20.578: The login-server starting...
-2004-11-11 16:47:20.578: The configuration of the server is set:
-2004-11-11 16:47:20.578: - with no remote administration.
-2004-11-11 16:47:20.578: - to accept any IP for remote administration
-2004-11-11 16:47:20.578: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:47:20.578: - to create GM with level '60' when @gm is used.
-2004-11-11 16:47:20.578: - to ALLOW new users (with _F/_M).
-2004-11-11 16:47:20.578: - with port: 6900.
-2004-11-11 16:47:20.578: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:47:20.578: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:47:20.578: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:47:20.579: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:47:20.579: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:47:20.579: - to NOT display normal parse packets on console.
-2004-11-11 16:47:20.579: - to NOT display administration parse packets on console.
-2004-11-11 16:47:20.579: - to NOT display char-server parse packets on console.
-2004-11-11 16:47:20.579: - with no minimum level for connection.
-2004-11-11 16:47:20.579: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:47:20.579: - to create new accounts with an unlimited time.
-2004-11-11 16:47:20.580: - with control of players IP between login-server and char-server.
-2004-11-11 16:47:20.580: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:47:20.580: The LAN configuration of the server is set:
-2004-11-11 16:47:20.582: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:47:20.582: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:47:20.584: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-11 16:47:20.586: 6 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-11 16:47:20.587: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:47:22.331: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:47:22.331: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:47:22.332: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:47:44.744: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:47:44.744: Authentification accepted (account: cameri (id: 2000001), ip: 127.0.0.1)
-2004-11-11 16:47:45.135: Char-server 'eAthena': authentification of the account 2000001 accepted (ip: 127.0.0.1).
-2004-11-11 16:47:47.911: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:47:47.912: Authentification accepted (account: cameri (id: 2000001), ip: 127.0.0.1)
-2004-11-11 16:47:48.300: Char-server 'eAthena': authentification of the account 2000001 accepted (ip: 127.0.0.1).
-2004-11-11 16:48:03.321: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-11 16:48:03.825: ----End of login-server (normal end with closing of all files).
-
-2004-11-11 16:48:22.000: The login-server starting...
-2004-11-11 16:48:22.000: The configuration of the server is set:
-2004-11-11 16:48:22.000: - with no remote administration.
-2004-11-11 16:48:22.000: - to accept any IP for remote administration
-2004-11-11 16:48:22.000: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:48:22.000: - to create GM with level '60' when @gm is used.
-2004-11-11 16:48:22.000: - to ALLOW new users (with _F/_M).
-2004-11-11 16:48:22.000: - with port: 6900.
-2004-11-11 16:48:22.001: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:48:22.001: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:48:22.001: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:48:22.001: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:48:22.001: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:48:22.001: - to NOT display normal parse packets on console.
-2004-11-11 16:48:22.001: - to NOT display administration parse packets on console.
-2004-11-11 16:48:22.001: - to NOT display char-server parse packets on console.
-2004-11-11 16:48:22.002: - with no minimum level for connection.
-2004-11-11 16:48:22.002: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:48:22.002: - to create new accounts with an unlimited time.
-2004-11-11 16:48:22.002: - with control of players IP between login-server and char-server.
-2004-11-11 16:48:22.002: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:48:22.003: The LAN configuration of the server is set:
-2004-11-11 16:48:22.003: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:48:22.003: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:48:22.004: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-11 16:48:22.006: 5 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:48:22.009: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:48:24.342: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:48:24.342: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:48:24.344: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:49:09.967: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:49:09.967: Unknown account (account: cameri, received pass: juan16, ip: 127.0.0.1)
-2004-11-11 16:49:15.570: Request for connection (non encryption mode) of cameri_M (ip: 127.0.0.1).
-2004-11-11 16:49:15.570: Account creation and authentification accepted (account cameri (id: 2000002), pass: juan16, sex: M, connection with _F/_M, ip: 127.0.0.1)
-2004-11-11 16:49:16.398: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-11 16:51:17.974: ----End of login-server (normal end with closing of all files).
-
-2004-11-11 16:51:25.234: The login-server starting...
-2004-11-11 16:51:25.234: The configuration of the server is set:
-2004-11-11 16:51:25.234: - with no remote administration.
-2004-11-11 16:51:25.234: - to accept any IP for remote administration
-2004-11-11 16:51:25.234: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:51:25.234: - to create GM with level '60' when @gm is used.
-2004-11-11 16:51:25.234: - to ALLOW new users (with _F/_M).
-2004-11-11 16:51:25.235: - with port: 6900.
-2004-11-11 16:51:25.235: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:51:25.235: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:51:25.235: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:51:25.235: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:51:25.235: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:51:25.235: - to NOT display normal parse packets on console.
-2004-11-11 16:51:25.235: - to NOT display administration parse packets on console.
-2004-11-11 16:51:25.235: - to NOT display char-server parse packets on console.
-2004-11-11 16:51:25.236: - with no minimum level for connection.
-2004-11-11 16:51:25.236: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:51:25.236: - to create new accounts with an unlimited time.
-2004-11-11 16:51:25.236: - with control of players IP between login-server and char-server.
-2004-11-11 16:51:25.236: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:51:25.237: The LAN configuration of the server is set:
-2004-11-11 16:51:25.237: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:51:25.237: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:51:25.238: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-11 16:51:25.240: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:51:25.241: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:51:27.129: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:51:27.130: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:51:27.133: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:51:48.970: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:51:48.970: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-11 16:51:49.440: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-11 16:51:59.769: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-11 16:52:00.665: ----End of login-server (normal end with closing of all files).
-
-2004-11-11 16:52:15.890: The login-server starting...
-2004-11-11 16:52:15.890: The configuration of the server is set:
-2004-11-11 16:52:15.890: - with no remote administration.
-2004-11-11 16:52:15.890: - to accept any IP for remote administration
-2004-11-11 16:52:15.890: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:52:15.890: - to create GM with level '60' when @gm is used.
-2004-11-11 16:52:15.890: - to ALLOW new users (with _F/_M).
-2004-11-11 16:52:15.890: - with port: 6900.
-2004-11-11 16:52:15.891: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:52:15.891: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:52:15.891: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:52:15.891: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:52:15.891: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:52:15.891: - to NOT display normal parse packets on console.
-2004-11-11 16:52:15.891: - to NOT display administration parse packets on console.
-2004-11-11 16:52:15.891: - to NOT display char-server parse packets on console.
-2004-11-11 16:52:15.892: - with no minimum level for connection.
-2004-11-11 16:52:15.892: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:52:15.892: - to create new accounts with an unlimited time.
-2004-11-11 16:52:15.892: - with control of players IP between login-server and char-server.
-2004-11-11 16:52:15.892: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:52:15.893: The LAN configuration of the server is set:
-2004-11-11 16:52:15.893: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:52:15.893: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:52:15.896: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-11 16:52:15.898: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:52:15.898: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:52:17.567: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:52:17.567: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:52:17.572: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:52:56.354: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:52:56.355: Unknown account (account: cameri, received pass: juan16, ip: 127.0.0.1)
-2004-11-11 16:53:01.776: Request for connection (non encryption mode) of cameri_M (ip: 127.0.0.1).
-2004-11-11 16:53:01.776: Account creation and authentification accepted (account cameri (id: 2000002), pass: juan16, sex: M, connection with _F/_M, ip: 127.0.0.1)
-2004-11-11 16:53:02.316: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-11 16:53:11.597: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-11 16:53:12.191: ----End of login-server (normal end with closing of all files).
-
-2004-11-12 23:28:26.843: The login-server starting...
-2004-11-12 23:28:26.904: The configuration of the server is set:
-2004-11-12 23:28:26.904: - with no remote administration.
-2004-11-12 23:28:26.904: - to accept any IP for remote administration
-2004-11-12 23:28:26.904: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-12 23:28:26.904: - to create GM with level '60' when @gm is used.
-2004-11-12 23:28:26.904: - to ALLOW new users (with _F/_M).
-2004-11-12 23:28:26.905: - with port: 6900.
-2004-11-12 23:28:26.905: - with the accounts file name: 'save/account.txt'.
-2004-11-12 23:28:26.905: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-12 23:28:26.905: - to check GM accounts file modifications every 15 seconds.
-2004-11-12 23:28:26.905: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-12 23:28:26.905: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-12 23:28:26.905: - to NOT display normal parse packets on console.
-2004-11-12 23:28:26.905: - to NOT display administration parse packets on console.
-2004-11-12 23:28:26.905: - to NOT display char-server parse packets on console.
-2004-11-12 23:28:26.906: - with no minimum level for connection.
-2004-11-12 23:28:26.906: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-12 23:28:26.906: - to create new accounts with an unlimited time.
-2004-11-12 23:28:26.906: - with control of players IP between login-server and char-server.
-2004-11-12 23:28:26.906: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-12 23:28:26.907: The LAN configuration of the server is set:
-2004-11-12 23:28:26.907: - with LAN IP of char-server: 127.0.0.1.
-2004-11-12 23:28:26.907: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-12 23:28:26.909: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-12 23:28:26.911: The login-server is ready (Server is listening on the port 6900).
-2004-11-12 23:28:38.177: ----End of login-server (normal end with closing of all files).
-
-2004-11-12 23:32:31.937: The login-server starting...
-2004-11-12 23:32:31.937: The configuration of the server is set:
-2004-11-12 23:32:31.937: - with no remote administration.
-2004-11-12 23:32:31.937: - to accept any IP for remote administration
-2004-11-12 23:32:31.937: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-12 23:32:31.937: - to create GM with level '60' when @gm is used.
-2004-11-12 23:32:31.937: - to ALLOW new users (with _F/_M).
-2004-11-12 23:32:31.937: - with port: 6900.
-2004-11-12 23:32:31.938: - with the accounts file name: 'save/account.txt'.
-2004-11-12 23:32:31.938: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-12 23:32:31.938: - to check GM accounts file modifications every 15 seconds.
-2004-11-12 23:32:31.938: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-12 23:32:31.938: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-12 23:32:31.938: - to NOT display normal parse packets on console.
-2004-11-12 23:32:31.938: - to NOT display administration parse packets on console.
-2004-11-12 23:32:31.938: - to NOT display char-server parse packets on console.
-2004-11-12 23:32:31.938: - with no minimum level for connection.
-2004-11-12 23:32:31.939: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-12 23:32:31.939: - to create new accounts with an unlimited time.
-2004-11-12 23:32:31.939: - with control of players IP between login-server and char-server.
-2004-11-12 23:32:31.939: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-12 23:32:31.940: The LAN configuration of the server is set:
-2004-11-12 23:32:31.940: - with LAN IP of char-server: 127.0.0.1.
-2004-11-12 23:32:31.940: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-12 23:32:31.943: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-12 23:32:31.945: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-12 23:32:31.945: The login-server is ready (Server is listening on the port 6900).
-2004-11-12 23:32:33.967: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-12 23:32:33.968: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-12 23:32:33.969: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-12 23:33:24.566: Request for connection (non encryption mode) of cameri_M (ip: 127.0.0.1).
-2004-11-12 23:33:24.567: Account creation and authentification accepted (account cameri (id: 2000002), pass: juan16, sex: M, connection with _F/_M, ip: 127.0.0.1)
-2004-11-12 23:33:25.808: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-12 23:34:14.724: ----End of login-server (normal end with closing of all files).
-
-2004-11-12 23:37:12.437: The login-server starting...
-2004-11-12 23:37:12.437: The configuration of the server is set:
-2004-11-12 23:37:12.437: - with no remote administration.
-2004-11-12 23:37:12.437: - to accept any IP for remote administration
-2004-11-12 23:37:12.437: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-12 23:37:12.437: - to create GM with level '60' when @gm is used.
-2004-11-12 23:37:12.438: - to ALLOW new users (with _F/_M).
-2004-11-12 23:37:12.438: - with port: 6900.
-2004-11-12 23:37:12.438: - with the accounts file name: 'save/account.txt'.
-2004-11-12 23:37:12.438: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-12 23:37:12.438: - to check GM accounts file modifications every 15 seconds.
-2004-11-12 23:37:12.438: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-12 23:37:12.438: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-12 23:37:12.439: - to NOT display normal parse packets on console.
-2004-11-12 23:37:12.439: - to NOT display administration parse packets on console.
-2004-11-12 23:37:12.439: - to NOT display char-server parse packets on console.
-2004-11-12 23:37:12.439: - with no minimum level for connection.
-2004-11-12 23:37:12.439: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-12 23:37:12.439: - to create new accounts with an unlimited time.
-2004-11-12 23:37:12.439: - with control of players IP between login-server and char-server.
-2004-11-12 23:37:12.439: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-12 23:37:12.441: The LAN configuration of the server is set:
-2004-11-12 23:37:12.441: - with LAN IP of char-server: 127.0.0.1.
-2004-11-12 23:37:12.442: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-12 23:37:12.443: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-12 23:37:12.444: 7 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-12 23:37:12.445: The login-server is ready (Server is listening on the port 6900).
-2004-11-12 23:37:34.077: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-12 23:37:34.077: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-12 23:37:34.079: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-12 23:38:07.480: 'ladmin': Sending request of the coding key (ip: 127.0.0.1)
-2004-11-12 23:38:07.484: 'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (encrypted password, ip: 127.0.0.1)
-2004-11-12 23:38:09.862: 'ladmin': Sending request of the coding key (ip: 127.0.0.1)
-2004-11-12 23:38:09.881: 'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (encrypted password, ip: 127.0.0.1)
-2004-11-12 23:38:11.485: 'ladmin': Sending request of the coding key (ip: 127.0.0.1)
-2004-11-12 23:38:11.497: 'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (encrypted password, ip: 127.0.0.1)
-2004-11-12 23:38:22.658: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-12 23:38:22.658: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-12 23:38:23.234: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-12 23:38:28.152: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-
-2004-11-12 23:56:15.812: The login-server starting...
-2004-11-12 23:56:15.812: The configuration of the server is set:
-2004-11-12 23:56:15.812: - with no remote administration.
-2004-11-12 23:56:15.812: - to accept any IP for remote administration
-2004-11-12 23:56:15.812: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-12 23:56:15.812: - to create GM with level '60' when @gm is used.
-2004-11-12 23:56:15.812: - to ALLOW new users (with _F/_M).
-2004-11-12 23:56:15.812: - with port: 6900.
-2004-11-12 23:56:15.812: - with the accounts file name: 'save/account.txt'.
-2004-11-12 23:56:15.812: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-12 23:56:15.812: - to check GM accounts file modifications every 15 seconds.
-2004-11-12 23:56:15.812: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-12 23:56:15.812: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-12 23:56:15.813: - to NOT display normal parse packets on console.
-2004-11-12 23:56:15.813: - to NOT display administration parse packets on console.
-2004-11-12 23:56:15.813: - to NOT display char-server parse packets on console.
-2004-11-12 23:56:15.813: - with no minimum level for connection.
-2004-11-12 23:56:15.813: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-12 23:56:15.813: - to create new accounts with an unlimited time.
-2004-11-12 23:56:15.813: - with control of players IP between login-server and char-server.
-2004-11-12 23:56:15.813: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-12 23:56:15.814: The LAN configuration of the server is set:
-2004-11-12 23:56:15.814: - with LAN IP of char-server: 127.0.0.1.
-2004-11-12 23:56:15.814: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-12 23:56:15.816: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-12 23:56:15.818: 7 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-12 23:56:15.818: The login-server is ready (Server is listening on the port 6900).
-2004-11-12 23:56:17.869: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-12 23:56:17.869: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-12 23:56:17.963: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-12 23:56:35.389: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-12 23:56:35.389: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-12 23:56:36.205: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-12 23:56:59.407: Char-server 'eAthena': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: -2071855095, ip: 127.0.0.1)
-2004-11-12 23:57:10.469: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 00:04:29.140: The login-server starting...
-2004-11-13 00:04:29.140: The configuration of the server is set:
-2004-11-13 00:04:29.140: - with no remote administration.
-2004-11-13 00:04:29.140: - to accept any IP for remote administration
-2004-11-13 00:04:29.140: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 00:04:29.140: - to create GM with level '60' when @gm is used.
-2004-11-13 00:04:29.141: - to ALLOW new users (with _F/_M).
-2004-11-13 00:04:29.141: - with port: 6900.
-2004-11-13 00:04:29.141: - with the accounts file name: 'save/account.txt'.
-2004-11-13 00:04:29.141: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 00:04:29.141: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 00:04:29.141: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 00:04:29.141: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 00:04:29.141: - to NOT display normal parse packets on console.
-2004-11-13 00:04:29.142: - to NOT display administration parse packets on console.
-2004-11-13 00:04:29.142: - to NOT display char-server parse packets on console.
-2004-11-13 00:04:29.142: - with no minimum level for connection.
-2004-11-13 00:04:29.142: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 00:04:29.142: - to create new accounts with an unlimited time.
-2004-11-13 00:04:29.142: - with control of players IP between login-server and char-server.
-2004-11-13 00:04:29.142: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 00:04:29.143: The LAN configuration of the server is set:
-2004-11-13 00:04:29.144: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 00:04:29.144: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 00:04:29.145: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-13 00:04:29.148: 7 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-13 00:04:29.149: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 00:04:31.007: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 00:04:31.007: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 00:04:31.100: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 00:05:06.976: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 00:05:06.977: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 00:05:07.788: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 00:06:00.287: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 00:06:00.287: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 00:06:00.835: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 00:06:22.209: Char-server 'eAthena': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: -2071855095, ip: 127.0.0.1)
-2004-11-13 00:06:35.288: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 00:06:35.288: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 00:06:35.650: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 00:07:44.771: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 00:07:44.771: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 00:07:45.104: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 00:08:11.086: Char-server 'eAthena': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: -2071855095, ip: 127.0.0.1)
-2004-11-13 00:08:58.530: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-13 00:08:59.206: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 00:19:04.984: The login-server starting...
-2004-11-13 00:19:04.984: The configuration of the server is set:
-2004-11-13 00:19:04.984: - with no remote administration.
-2004-11-13 00:19:04.984: - to accept any IP for remote administration
-2004-11-13 00:19:04.984: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 00:19:04.984: - to create GM with level '60' when @gm is used.
-2004-11-13 00:19:04.985: - to ALLOW new users (with _F/_M).
-2004-11-13 00:19:04.985: - with port: 6900.
-2004-11-13 00:19:04.985: - with the accounts file name: 'save/account.txt'.
-2004-11-13 00:19:04.985: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 00:19:04.985: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 00:19:04.985: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 00:19:04.985: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 00:19:04.985: - to NOT display normal parse packets on console.
-2004-11-13 00:19:04.985: - to NOT display administration parse packets on console.
-2004-11-13 00:19:04.986: - to NOT display char-server parse packets on console.
-2004-11-13 00:19:04.986: - with no minimum level for connection.
-2004-11-13 00:19:04.986: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 00:19:04.986: - to create new accounts with an unlimited time.
-2004-11-13 00:19:04.986: - with control of players IP between login-server and char-server.
-2004-11-13 00:19:04.986: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 00:19:04.987: The LAN configuration of the server is set:
-2004-11-13 00:19:04.987: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 00:19:04.987: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 00:19:04.988: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-13 00:19:04.990: 7 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-13 00:19:04.991: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 00:19:06.793: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 00:19:06.793: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 00:19:06.794: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 00:19:14.895: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 00:19:14.896: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 00:19:15.931: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 00:20:01.251: Char-server 'eAthena': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: -2071855095, ip: 127.0.0.1)
-2004-11-13 00:23:42.000: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-13 00:24:21.429: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-13 00:24:22.080: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 00:31:04.468: The login-server starting...
-2004-11-13 00:31:04.468: The configuration of the server is set:
-2004-11-13 00:31:04.468: - with no remote administration.
-2004-11-13 00:31:04.468: - to accept any IP for remote administration
-2004-11-13 00:31:04.468: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 00:31:04.468: - to create GM with level '60' when @gm is used.
-2004-11-13 00:31:04.468: - to ALLOW new users (with _F/_M).
-2004-11-13 00:31:04.468: - with port: 6900.
-2004-11-13 00:31:04.468: - with the accounts file name: 'save/account.txt'.
-2004-11-13 00:31:04.468: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 00:31:04.469: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 00:31:04.469: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 00:31:04.469: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 00:31:04.469: - to NOT display normal parse packets on console.
-2004-11-13 00:31:04.470: - to NOT display administration parse packets on console.
-2004-11-13 00:31:04.470: - to NOT display char-server parse packets on console.
-2004-11-13 00:31:04.470: - with no minimum level for connection.
-2004-11-13 00:31:04.470: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 00:31:04.470: - to create new accounts with an unlimited time.
-2004-11-13 00:31:04.470: - with control of players IP between login-server and char-server.
-2004-11-13 00:31:04.470: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 00:31:04.472: The LAN configuration of the server is set:
-2004-11-13 00:31:04.473: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 00:31:04.473: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 00:31:04.474: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 00:31:04.475: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 00:31:04.476: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 00:31:06.674: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 00:31:06.674: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 00:31:06.676: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-
-2004-11-13 00:31:15.453: The login-server starting...
-2004-11-13 00:31:15.453: The configuration of the server is set:
-2004-11-13 00:31:15.453: - with no remote administration.
-2004-11-13 00:31:15.453: - to accept any IP for remote administration
-2004-11-13 00:31:15.453: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 00:31:15.454: - to create GM with level '60' when @gm is used.
-2004-11-13 00:31:15.454: - to ALLOW new users (with _F/_M).
-2004-11-13 00:31:15.454: - with port: 6900.
-2004-11-13 00:31:15.454: - with the accounts file name: 'save/account.txt'.
-2004-11-13 00:31:15.454: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 00:31:15.454: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 00:31:15.454: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 00:31:15.454: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 00:31:15.455: - to NOT display normal parse packets on console.
-2004-11-13 00:31:15.455: - to NOT display administration parse packets on console.
-2004-11-13 00:31:15.455: - to NOT display char-server parse packets on console.
-2004-11-13 00:31:15.455: - with no minimum level for connection.
-2004-11-13 00:31:15.455: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 00:31:15.455: - to create new accounts with an unlimited time.
-2004-11-13 00:31:15.455: - with control of players IP between login-server and char-server.
-2004-11-13 00:31:15.455: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 00:31:15.456: The LAN configuration of the server is set:
-2004-11-13 00:31:15.456: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 00:31:15.456: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 00:31:15.481: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 00:31:15.498: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 00:31:15.499: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 00:31:16.683: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 00:31:16.683: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 00:31:16.685: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 00:31:17.695: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 00:32:40.671: The login-server starting...
-2004-11-13 00:32:40.671: The configuration of the server is set:
-2004-11-13 00:32:40.671: - with no remote administration.
-2004-11-13 00:32:40.671: - to accept any IP for remote administration
-2004-11-13 00:32:40.671: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 00:32:40.672: - to create GM with level '60' when @gm is used.
-2004-11-13 00:32:40.672: - to ALLOW new users (with _F/_M).
-2004-11-13 00:32:40.672: - with port: 6900.
-2004-11-13 00:32:40.672: - with the accounts file name: 'save/account.txt'.
-2004-11-13 00:32:40.672: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 00:32:40.672: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 00:32:40.672: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 00:32:40.672: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 00:32:40.672: - to NOT display normal parse packets on console.
-2004-11-13 00:32:40.673: - to NOT display administration parse packets on console.
-2004-11-13 00:32:40.673: - to NOT display char-server parse packets on console.
-2004-11-13 00:32:40.673: - with no minimum level for connection.
-2004-11-13 00:32:40.673: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 00:32:40.673: - to create new accounts with an unlimited time.
-2004-11-13 00:32:40.673: - with control of players IP between login-server and char-server.
-2004-11-13 00:32:40.673: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 00:32:40.674: The LAN configuration of the server is set:
-2004-11-13 00:32:40.674: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 00:32:40.674: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 00:32:40.679: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 00:32:40.686: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 00:32:40.687: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 00:32:41.952: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 00:32:41.952: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 00:32:41.952: Connexion of the char-server 'eAthena' REFUSED (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 00:32:42.062: End of connection, unknown packet (ip: 127.0.0.1)
-2004-11-13 00:32:54.427: ----End of login-server (normal end with closing of all files).
-2004-11-13 00:33:19.274: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 00:33:19.274: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 00:33:19.797: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 00:34:08.202: Char-server 'eAthena': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: -2071855095, ip: 127.0.0.1)
-2004-11-13 00:34:10.104: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 00:34:26.671: The login-server starting...
-2004-11-13 00:34:26.671: The configuration of the server is set:
-2004-11-13 00:34:26.671: - with no remote administration.
-2004-11-13 00:34:26.671: - to accept any IP for remote administration
-2004-11-13 00:34:26.671: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 00:34:26.671: - to create GM with level '60' when @gm is used.
-2004-11-13 00:34:26.671: - to ALLOW new users (with _F/_M).
-2004-11-13 00:34:26.671: - with port: 6900.
-2004-11-13 00:34:26.671: - with the accounts file name: 'save/account.txt'.
-2004-11-13 00:34:26.671: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 00:34:26.671: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 00:34:26.671: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 00:34:26.672: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 00:34:26.672: - to NOT display normal parse packets on console.
-2004-11-13 00:34:26.672: - to NOT display administration parse packets on console.
-2004-11-13 00:34:26.672: - to NOT display char-server parse packets on console.
-2004-11-13 00:34:26.672: - with no minimum level for connection.
-2004-11-13 00:34:26.672: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 00:34:26.672: - to create new accounts with an unlimited time.
-2004-11-13 00:34:26.672: - with control of players IP between login-server and char-server.
-2004-11-13 00:34:26.672: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 00:34:26.699: The LAN configuration of the server is set:
-2004-11-13 00:34:26.699: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 00:34:26.699: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 00:34:26.714: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 00:34:26.740: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 00:34:26.741: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 00:34:28.403: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 00:34:28.403: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 00:34:28.418: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 00:34:48.931: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 00:34:48.932: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 00:34:49.638: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 00:37:07.992: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 00:53:33.140: The login-server starting...
-2004-11-13 00:53:33.140: The configuration of the server is set:
-2004-11-13 00:53:33.140: - with no remote administration.
-2004-11-13 00:53:33.140: - to accept any IP for remote administration
-2004-11-13 00:53:33.140: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 00:53:33.141: - to create GM with level '60' when @gm is used.
-2004-11-13 00:53:33.141: - to ALLOW new users (with _F/_M).
-2004-11-13 00:53:33.141: - with port: 6900.
-2004-11-13 00:53:33.141: - with the accounts file name: 'save/account.txt'.
-2004-11-13 00:53:33.141: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 00:53:33.141: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 00:53:33.141: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 00:53:33.141: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 00:53:33.142: - to NOT display normal parse packets on console.
-2004-11-13 00:53:33.142: - to NOT display administration parse packets on console.
-2004-11-13 00:53:33.142: - to NOT display char-server parse packets on console.
-2004-11-13 00:53:33.142: - with no minimum level for connection.
-2004-11-13 00:53:33.142: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 00:53:33.142: - to create new accounts with an unlimited time.
-2004-11-13 00:53:33.142: - with control of players IP between login-server and char-server.
-2004-11-13 00:53:33.142: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 00:53:33.143: The LAN configuration of the server is set:
-2004-11-13 00:53:33.143: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 00:53:33.144: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 00:53:33.145: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 00:53:33.146: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 00:53:33.147: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 00:53:38.310: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 00:53:38.310: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 00:53:38.322: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 00:54:07.382: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 00:54:07.382: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 00:54:07.904: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 00:59:16.540: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-13 00:59:17.153: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 01:04:21.890: The login-server starting...
-2004-11-13 01:04:21.890: The configuration of the server is set:
-2004-11-13 01:04:21.890: - with no remote administration.
-2004-11-13 01:04:21.890: - to accept any IP for remote administration
-2004-11-13 01:04:21.890: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 01:04:21.890: - to create GM with level '60' when @gm is used.
-2004-11-13 01:04:21.891: - to ALLOW new users (with _F/_M).
-2004-11-13 01:04:21.891: - with port: 6900.
-2004-11-13 01:04:21.891: - with the accounts file name: 'save/account.txt'.
-2004-11-13 01:04:21.891: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 01:04:21.891: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 01:04:21.891: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 01:04:21.891: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 01:04:21.891: - to NOT display normal parse packets on console.
-2004-11-13 01:04:21.892: - to NOT display administration parse packets on console.
-2004-11-13 01:04:21.892: - to NOT display char-server parse packets on console.
-2004-11-13 01:04:21.892: - with no minimum level for connection.
-2004-11-13 01:04:21.892: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 01:04:21.892: - to create new accounts with an unlimited time.
-2004-11-13 01:04:21.892: - with control of players IP between login-server and char-server.
-2004-11-13 01:04:21.892: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 01:04:21.893: The LAN configuration of the server is set:
-2004-11-13 01:04:21.893: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 01:04:21.893: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 01:04:21.895: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 01:04:21.896: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 01:04:21.897: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 01:04:22.123: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 01:04:22.124: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 01:04:22.127: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 01:04:42.420: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 01:04:42.420: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 01:04:42.881: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 01:05:20.357: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-13 01:05:40.515: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 01:05:59.796: The login-server starting...
-2004-11-13 01:05:59.796: The configuration of the server is set:
-2004-11-13 01:05:59.797: - with no remote administration.
-2004-11-13 01:05:59.797: - to accept any IP for remote administration
-2004-11-13 01:05:59.797: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 01:05:59.797: - to create GM with level '60' when @gm is used.
-2004-11-13 01:05:59.797: - to ALLOW new users (with _F/_M).
-2004-11-13 01:05:59.797: - with port: 6900.
-2004-11-13 01:05:59.797: - with the accounts file name: 'save/account.txt'.
-2004-11-13 01:05:59.797: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 01:05:59.798: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 01:05:59.798: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 01:05:59.798: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 01:05:59.798: - to NOT display normal parse packets on console.
-2004-11-13 01:05:59.798: - to NOT display administration parse packets on console.
-2004-11-13 01:05:59.798: - to NOT display char-server parse packets on console.
-2004-11-13 01:05:59.798: - with no minimum level for connection.
-2004-11-13 01:05:59.799: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 01:05:59.799: - to create new accounts with an unlimited time.
-2004-11-13 01:05:59.799: - with control of players IP between login-server and char-server.
-2004-11-13 01:05:59.799: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 01:05:59.805: The LAN configuration of the server is set:
-2004-11-13 01:05:59.805: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 01:05:59.805: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 01:05:59.807: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 01:05:59.813: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 01:05:59.814: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 01:06:02.333: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 01:06:02.333: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 01:06:02.335: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 01:06:15.941: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 01:06:15.942: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 01:06:16.571: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 01:09:59.936: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 07:55:58.781: The login-server starting...
-2004-11-13 07:55:58.781: The configuration of the server is set:
-2004-11-13 07:55:58.781: - with no remote administration.
-2004-11-13 07:55:58.782: - to accept any IP for remote administration
-2004-11-13 07:55:58.782: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 07:55:58.782: - to create GM with level '60' when @gm is used.
-2004-11-13 07:55:58.782: - to ALLOW new users (with _F/_M).
-2004-11-13 07:55:58.782: - with port: 6900.
-2004-11-13 07:55:58.782: - with the accounts file name: 'save/account.txt'.
-2004-11-13 07:55:58.782: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 07:55:58.783: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 07:55:58.783: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 07:55:58.784: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 07:55:58.784: - to NOT display normal parse packets on console.
-2004-11-13 07:55:58.784: - to NOT display administration parse packets on console.
-2004-11-13 07:55:58.784: - to NOT display char-server parse packets on console.
-2004-11-13 07:55:58.784: - with no minimum level for connection.
-2004-11-13 07:55:58.784: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 07:55:58.784: - to create new accounts with an unlimited time.
-2004-11-13 07:55:58.784: - with control of players IP between login-server and char-server.
-2004-11-13 07:55:58.785: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 07:55:58.800: The LAN configuration of the server is set:
-2004-11-13 07:55:58.801: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 07:55:58.801: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 07:55:58.802: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 07:55:58.804: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 07:55:58.805: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 07:56:00.317: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 07:56:00.318: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 07:56:00.320: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 07:56:28.071: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 07:56:28.072: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 07:56:28.633: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 07:56:57.364: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 07:56:57.364: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 07:56:57.785: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 07:57:34.588: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-13 08:01:13.227: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 08:01:13.227: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 08:01:13.721: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 08:01:48.996: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 08:01:48.996: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 08:01:49.376: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 08:02:04.918: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 08:02:04.919: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 08:02:05.245: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 08:02:19.998: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 08:02:19.999: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 08:02:20.325: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 08:05:39.776: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-13 08:07:25.737: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 08:07:25.768: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 08:07:26.299: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 08:07:46.174: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-13 08:08:35.439: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 08:11:26.609: The login-server starting...
-2004-11-13 08:11:26.609: The configuration of the server is set:
-2004-11-13 08:11:26.609: - with no remote administration.
-2004-11-13 08:11:26.609: - to accept any IP for remote administration
-2004-11-13 08:11:26.609: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 08:11:26.609: - to create GM with level '60' when @gm is used.
-2004-11-13 08:11:26.609: - to ALLOW new users (with _F/_M).
-2004-11-13 08:11:26.609: - with port: 6900.
-2004-11-13 08:11:26.610: - with the accounts file name: 'save/account.txt'.
-2004-11-13 08:11:26.610: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 08:11:26.610: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 08:11:26.610: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 08:11:26.610: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 08:11:26.610: - to NOT display normal parse packets on console.
-2004-11-13 08:11:26.610: - to NOT display administration parse packets on console.
-2004-11-13 08:11:26.611: - to NOT display char-server parse packets on console.
-2004-11-13 08:11:26.611: - with no minimum level for connection.
-2004-11-13 08:11:26.611: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 08:11:26.611: - to create new accounts with an unlimited time.
-2004-11-13 08:11:26.611: - with control of players IP between login-server and char-server.
-2004-11-13 08:11:26.612: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 08:11:26.612: The LAN configuration of the server is set:
-2004-11-13 08:11:26.613: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 08:11:26.613: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 08:11:26.614: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 08:11:26.616: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 08:11:26.616: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 08:11:30.822: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 08:11:30.822: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 08:11:30.824: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 08:29:17.045: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-13 08:29:17.581: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 08:30:11.390: The login-server starting...
-2004-11-13 08:30:11.390: The configuration of the server is set:
-2004-11-13 08:30:11.390: - with no remote administration.
-2004-11-13 08:30:11.390: - to accept any IP for remote administration
-2004-11-13 08:30:11.390: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 08:30:11.390: - to create GM with level '60' when @gm is used.
-2004-11-13 08:30:11.390: - to ALLOW new users (with _F/_M).
-2004-11-13 08:30:11.390: - with port: 6900.
-2004-11-13 08:30:11.390: - with the accounts file name: 'save/account.txt'.
-2004-11-13 08:30:11.390: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 08:30:11.391: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 08:30:11.391: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 08:30:11.391: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 08:30:11.391: - to NOT display normal parse packets on console.
-2004-11-13 08:30:11.391: - to NOT display administration parse packets on console.
-2004-11-13 08:30:11.391: - to NOT display char-server parse packets on console.
-2004-11-13 08:30:11.391: - with no minimum level for connection.
-2004-11-13 08:30:11.391: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 08:30:11.392: - to create new accounts with an unlimited time.
-2004-11-13 08:30:11.392: - with control of players IP between login-server and char-server.
-2004-11-13 08:30:11.392: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 08:30:11.393: The LAN configuration of the server is set:
-2004-11-13 08:30:11.393: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 08:30:11.393: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 08:30:11.394: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 08:30:11.396: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 08:30:11.396: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 08:30:11.822: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 08:30:11.822: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 08:30:11.825: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 08:30:32.743: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 08:30:32.743: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 08:30:33.228: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 08:30:41.448: Char-server 'eAthena': Error of sex change (account: -2071855095 not found, sex would be reversed, ip: 127.0.0.1).
-2004-11-13 08:30:46.818: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-13 08:30:51.821: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 08:30:51.821: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 08:30:51.822: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 08:31:11.695: ----End of login-server (normal end with closing of all files).
-
-2004-11-13 08:33:01.625: The login-server starting...
-2004-11-13 08:33:01.625: The configuration of the server is set:
-2004-11-13 08:33:01.625: - with no remote administration.
-2004-11-13 08:33:01.625: - to accept any IP for remote administration
-2004-11-13 08:33:01.625: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-13 08:33:01.625: - to create GM with level '60' when @gm is used.
-2004-11-13 08:33:01.625: - to ALLOW new users (with _F/_M).
-2004-11-13 08:33:01.625: - with port: 6900.
-2004-11-13 08:33:01.626: - with the accounts file name: 'save/account.txt'.
-2004-11-13 08:33:01.626: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-13 08:33:01.626: - to check GM accounts file modifications every 15 seconds.
-2004-11-13 08:33:01.626: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-13 08:33:01.626: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-13 08:33:01.626: - to NOT display normal parse packets on console.
-2004-11-13 08:33:01.626: - to NOT display administration parse packets on console.
-2004-11-13 08:33:01.626: - to NOT display char-server parse packets on console.
-2004-11-13 08:33:01.627: - with no minimum level for connection.
-2004-11-13 08:33:01.627: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-13 08:33:01.627: - to create new accounts with an unlimited time.
-2004-11-13 08:33:01.627: - with control of players IP between login-server and char-server.
-2004-11-13 08:33:01.627: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-13 08:33:01.632: The LAN configuration of the server is set:
-2004-11-13 08:33:01.632: - with LAN IP of char-server: 127.0.0.1.
-2004-11-13 08:33:01.632: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-13 08:33:01.644: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-13 08:33:01.648: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-13 08:33:01.649: The login-server is ready (Server is listening on the port 6900).
-2004-11-13 08:33:03.651: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-13 08:33:03.652: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-13 08:33:03.664: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-13 08:33:27.313: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 08:33:27.314: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 08:33:27.653: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 08:33:34.196: Char-server 'eAthena': Sex change (account: 2000002, new sex F, ip: 127.0.0.1).
-2004-11-13 08:33:44.437: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-13 08:33:44.437: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-13 08:33:44.916: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-13 08:36:13.540: Char-server 'eAthena': Sex change (account: 2000002, new sex M, ip: 127.0.0.1).
-2004-11-13 08:39:42.926: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-13 08:39:43.613: ----End of login-server (normal end with closing of all files).
-=======
-
-2004-11-11 16:42:57.500: The login-server starting...
-2004-11-11 16:42:57.574: The configuration of the server is set:
-2004-11-11 16:42:57.574: - with no remote administration.
-2004-11-11 16:42:57.574: - to accept any IP for remote administration
-2004-11-11 16:42:57.574: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:42:57.574: - to create GM with level '60' when @gm is used.
-2004-11-11 16:42:57.574: - to ALLOW new users (with _F/_M).
-2004-11-11 16:42:57.575: - with port: 6900.
-2004-11-11 16:42:57.575: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:42:57.575: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:42:57.575: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:42:57.575: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:42:57.576: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:42:57.576: - to NOT display normal parse packets on console.
-2004-11-11 16:42:57.576: - to NOT display administration parse packets on console.
-2004-11-11 16:42:57.576: - to NOT display char-server parse packets on console.
-2004-11-11 16:42:57.576: - with no minimum level for connection.
-2004-11-11 16:42:57.576: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:42:57.576: - to create new accounts with an unlimited time.
-2004-11-11 16:42:57.576: - with control of players IP between login-server and char-server.
-2004-11-11 16:42:57.576: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:42:57.594: The LAN configuration of the server is set:
-2004-11-11 16:42:57.595: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:42:57.595: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:42:57.596: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-11 16:42:57.600: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:42:57.600: The login-server is ready (Server is listening on the port 6900).
-
-2004-11-11 16:43:39.859: The login-server starting...
-2004-11-11 16:43:39.859: The configuration of the server is set:
-2004-11-11 16:43:39.859: - with no remote administration.
-2004-11-11 16:43:39.859: - to accept any IP for remote administration
-2004-11-11 16:43:39.859: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:43:39.859: - to create GM with level '60' when @gm is used.
-2004-11-11 16:43:39.859: - to ALLOW new users (with _F/_M).
-2004-11-11 16:43:39.859: - with port: 6900.
-2004-11-11 16:43:39.860: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:43:39.860: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:43:39.860: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:43:39.860: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:43:39.860: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:43:39.860: - to NOT display normal parse packets on console.
-2004-11-11 16:43:39.860: - to NOT display administration parse packets on console.
-2004-11-11 16:43:39.860: - to NOT display char-server parse packets on console.
-2004-11-11 16:43:39.860: - with no minimum level for connection.
-2004-11-11 16:43:39.861: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:43:39.861: - to create new accounts with an unlimited time.
-2004-11-11 16:43:39.861: - with control of players IP between login-server and char-server.
-2004-11-11 16:43:39.861: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:43:39.862: The LAN configuration of the server is set:
-2004-11-11 16:43:39.862: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:43:39.862: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:43:39.864: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-11 16:43:39.865: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:43:39.866: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:43:42.308: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:43:42.309: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:43:42.310: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:43:44.791: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-
-2004-11-11 16:44:26.468: The login-server starting...
-2004-11-11 16:44:26.468: The configuration of the server is set:
-2004-11-11 16:44:26.468: - with no remote administration.
-2004-11-11 16:44:26.468: - to accept any IP for remote administration
-2004-11-11 16:44:26.468: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:44:26.468: - to create GM with level '60' when @gm is used.
-2004-11-11 16:44:26.468: - to ALLOW new users (with _F/_M).
-2004-11-11 16:44:26.468: - with port: 6900.
-2004-11-11 16:44:26.469: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:44:26.469: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:44:26.469: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:44:26.469: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:44:26.469: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:44:26.469: - to NOT display normal parse packets on console.
-2004-11-11 16:44:26.469: - to NOT display administration parse packets on console.
-2004-11-11 16:44:26.469: - to NOT display char-server parse packets on console.
-2004-11-11 16:44:26.469: - with no minimum level for connection.
-2004-11-11 16:44:26.470: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:44:26.470: - to create new accounts with an unlimited time.
-2004-11-11 16:44:26.470: - with control of players IP between login-server and char-server.
-2004-11-11 16:44:26.470: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:44:26.471: The LAN configuration of the server is set:
-2004-11-11 16:44:26.471: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:44:26.471: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:44:26.472: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-11 16:44:26.474: 6 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-11 16:44:26.474: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:44:29.635: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:44:29.635: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:44:29.637: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:46:36.685: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:46:36.685: Authentification accepted (account: cameri (id: 2000001), ip: 127.0.0.1)
-2004-11-11 16:46:37.308: Char-server 'eAthena': authentification of the account 2000001 accepted (ip: 127.0.0.1).
-2004-11-11 16:46:52.378: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-
-2004-11-11 16:47:20.578: The login-server starting...
-2004-11-11 16:47:20.578: The configuration of the server is set:
-2004-11-11 16:47:20.578: - with no remote administration.
-2004-11-11 16:47:20.578: - to accept any IP for remote administration
-2004-11-11 16:47:20.578: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:47:20.578: - to create GM with level '60' when @gm is used.
-2004-11-11 16:47:20.578: - to ALLOW new users (with _F/_M).
-2004-11-11 16:47:20.578: - with port: 6900.
-2004-11-11 16:47:20.578: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:47:20.578: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:47:20.578: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:47:20.579: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:47:20.579: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:47:20.579: - to NOT display normal parse packets on console.
-2004-11-11 16:47:20.579: - to NOT display administration parse packets on console.
-2004-11-11 16:47:20.579: - to NOT display char-server parse packets on console.
-2004-11-11 16:47:20.579: - with no minimum level for connection.
-2004-11-11 16:47:20.579: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:47:20.579: - to create new accounts with an unlimited time.
-2004-11-11 16:47:20.580: - with control of players IP between login-server and char-server.
-2004-11-11 16:47:20.580: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:47:20.580: The LAN configuration of the server is set:
-2004-11-11 16:47:20.582: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:47:20.582: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:47:20.584: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-11 16:47:20.586: 6 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-11 16:47:20.587: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:47:22.331: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:47:22.331: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:47:22.332: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:47:44.744: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:47:44.744: Authentification accepted (account: cameri (id: 2000001), ip: 127.0.0.1)
-2004-11-11 16:47:45.135: Char-server 'eAthena': authentification of the account 2000001 accepted (ip: 127.0.0.1).
-2004-11-11 16:47:47.911: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:47:47.912: Authentification accepted (account: cameri (id: 2000001), ip: 127.0.0.1)
-2004-11-11 16:47:48.300: Char-server 'eAthena': authentification of the account 2000001 accepted (ip: 127.0.0.1).
-2004-11-11 16:48:03.321: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-11 16:48:03.825: ----End of login-server (normal end with closing of all files).
-
-2004-11-11 16:48:22.000: The login-server starting...
-2004-11-11 16:48:22.000: The configuration of the server is set:
-2004-11-11 16:48:22.000: - with no remote administration.
-2004-11-11 16:48:22.000: - to accept any IP for remote administration
-2004-11-11 16:48:22.000: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:48:22.000: - to create GM with level '60' when @gm is used.
-2004-11-11 16:48:22.000: - to ALLOW new users (with _F/_M).
-2004-11-11 16:48:22.000: - with port: 6900.
-2004-11-11 16:48:22.001: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:48:22.001: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:48:22.001: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:48:22.001: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:48:22.001: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:48:22.001: - to NOT display normal parse packets on console.
-2004-11-11 16:48:22.001: - to NOT display administration parse packets on console.
-2004-11-11 16:48:22.001: - to NOT display char-server parse packets on console.
-2004-11-11 16:48:22.002: - with no minimum level for connection.
-2004-11-11 16:48:22.002: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:48:22.002: - to create new accounts with an unlimited time.
-2004-11-11 16:48:22.002: - with control of players IP between login-server and char-server.
-2004-11-11 16:48:22.002: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:48:22.003: The LAN configuration of the server is set:
-2004-11-11 16:48:22.003: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:48:22.003: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:48:22.004: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-11 16:48:22.006: 5 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:48:22.009: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:48:24.342: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:48:24.342: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:48:24.344: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:49:09.967: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:49:09.967: Unknown account (account: cameri, received pass: juan16, ip: 127.0.0.1)
-2004-11-11 16:49:15.570: Request for connection (non encryption mode) of cameri_M (ip: 127.0.0.1).
-2004-11-11 16:49:15.570: Account creation and authentification accepted (account cameri (id: 2000002), pass: juan16, sex: M, connection with _F/_M, ip: 127.0.0.1)
-2004-11-11 16:49:16.398: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-11 16:51:17.974: ----End of login-server (normal end with closing of all files).
-
-2004-11-11 16:51:25.234: The login-server starting...
-2004-11-11 16:51:25.234: The configuration of the server is set:
-2004-11-11 16:51:25.234: - with no remote administration.
-2004-11-11 16:51:25.234: - to accept any IP for remote administration
-2004-11-11 16:51:25.234: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:51:25.234: - to create GM with level '60' when @gm is used.
-2004-11-11 16:51:25.234: - to ALLOW new users (with _F/_M).
-2004-11-11 16:51:25.235: - with port: 6900.
-2004-11-11 16:51:25.235: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:51:25.235: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:51:25.235: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:51:25.235: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:51:25.235: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:51:25.235: - to NOT display normal parse packets on console.
-2004-11-11 16:51:25.235: - to NOT display administration parse packets on console.
-2004-11-11 16:51:25.235: - to NOT display char-server parse packets on console.
-2004-11-11 16:51:25.236: - with no minimum level for connection.
-2004-11-11 16:51:25.236: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:51:25.236: - to create new accounts with an unlimited time.
-2004-11-11 16:51:25.236: - with control of players IP between login-server and char-server.
-2004-11-11 16:51:25.236: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:51:25.237: The LAN configuration of the server is set:
-2004-11-11 16:51:25.237: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:51:25.237: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:51:25.238: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-11 16:51:25.240: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:51:25.241: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:51:27.129: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:51:27.130: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:51:27.133: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:51:48.970: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:51:48.970: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-11 16:51:49.440: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-11 16:51:59.769: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-11 16:52:00.665: ----End of login-server (normal end with closing of all files).
-
-2004-11-11 16:52:15.890: The login-server starting...
-2004-11-11 16:52:15.890: The configuration of the server is set:
-2004-11-11 16:52:15.890: - with no remote administration.
-2004-11-11 16:52:15.890: - to accept any IP for remote administration
-2004-11-11 16:52:15.890: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-11 16:52:15.890: - to create GM with level '60' when @gm is used.
-2004-11-11 16:52:15.890: - to ALLOW new users (with _F/_M).
-2004-11-11 16:52:15.890: - with port: 6900.
-2004-11-11 16:52:15.891: - with the accounts file name: 'save/account.txt'.
-2004-11-11 16:52:15.891: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-11 16:52:15.891: - to check GM accounts file modifications every 15 seconds.
-2004-11-11 16:52:15.891: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-11 16:52:15.891: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-11 16:52:15.891: - to NOT display normal parse packets on console.
-2004-11-11 16:52:15.891: - to NOT display administration parse packets on console.
-2004-11-11 16:52:15.891: - to NOT display char-server parse packets on console.
-2004-11-11 16:52:15.892: - with no minimum level for connection.
-2004-11-11 16:52:15.892: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-11 16:52:15.892: - to create new accounts with an unlimited time.
-2004-11-11 16:52:15.892: - with control of players IP between login-server and char-server.
-2004-11-11 16:52:15.892: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-11 16:52:15.893: The LAN configuration of the server is set:
-2004-11-11 16:52:15.893: - with LAN IP of char-server: 127.0.0.1.
-2004-11-11 16:52:15.893: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-11 16:52:15.896: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-11 16:52:15.898: 6 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-11 16:52:15.898: The login-server is ready (Server is listening on the port 6900).
-2004-11-11 16:52:17.567: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-11 16:52:17.567: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-11 16:52:17.572: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-11 16:52:56.354: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-11 16:52:56.355: Unknown account (account: cameri, received pass: juan16, ip: 127.0.0.1)
-2004-11-11 16:53:01.776: Request for connection (non encryption mode) of cameri_M (ip: 127.0.0.1).
-2004-11-11 16:53:01.776: Account creation and authentification accepted (account cameri (id: 2000002), pass: juan16, sex: M, connection with _F/_M, ip: 127.0.0.1)
-2004-11-11 16:53:02.316: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-11 16:53:11.597: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-11 16:53:12.191: ----End of login-server (normal end with closing of all files).
->>>>>>> .r194
-=======
->>>>>>> .r251
-
-2004-11-18 06:56:39.281: The login-server starting...
-2004-11-18 06:56:39.348: The configuration of the server is set:
-2004-11-18 06:56:39.348: - with no remote administration.
-2004-11-18 06:56:39.348: - to accept any IP for remote administration
-2004-11-18 06:56:39.348: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-18 06:56:39.349: - to create GM with level '60' when @gm is used.
-2004-11-18 06:56:39.349: - to ALLOW new users (with _F/_M).
-2004-11-18 06:56:39.349: - with port: 6900.
-2004-11-18 06:56:39.349: - with the accounts file name: 'save/account.txt'.
-2004-11-18 06:56:39.349: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-18 06:56:39.349: - to check GM accounts file modifications every 15 seconds.
-2004-11-18 06:56:39.349: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-18 06:56:39.350: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-18 06:56:39.350: - to NOT display normal parse packets on console.
-2004-11-18 06:56:39.350: - to NOT display administration parse packets on console.
-2004-11-18 06:56:39.350: - to NOT display char-server parse packets on console.
-2004-11-18 06:56:39.350: - with no minimum level for connection.
-2004-11-18 06:56:39.350: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-18 06:56:39.350: - to create new accounts with an unlimited time.
-2004-11-18 06:56:39.350: - with control of players IP between login-server and char-server.
-2004-11-18 06:56:39.351: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-18 06:56:39.362: The LAN configuration of the server is set:
-2004-11-18 06:56:39.362: - with LAN IP of char-server: 127.0.0.1.
-2004-11-18 06:56:39.362: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-18 06:56:39.363: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-18 06:56:39.371: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-18 06:56:39.372: The login-server is ready (Server is listening on the port 6900).
-2004-11-18 06:59:43.131: ----End of login-server (normal end with closing of all files).
-
-2004-11-18 15:17:07.984: The login-server starting...
-2004-11-18 15:17:07.984: The configuration of the server is set:
-2004-11-18 15:17:07.984: - with no remote administration.
-2004-11-18 15:17:07.984: - to accept any IP for remote administration
-2004-11-18 15:17:07.984: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-18 15:17:07.984: - to create GM with level '60' when @gm is used.
-2004-11-18 15:17:07.984: - to ALLOW new users (with _F/_M).
-2004-11-18 15:17:07.985: - with port: 6900.
-2004-11-18 15:17:07.985: - with the accounts file name: 'save/account.txt'.
-2004-11-18 15:17:07.985: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-18 15:17:07.985: - to check GM accounts file modifications every 15 seconds.
-2004-11-18 15:17:07.985: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-18 15:17:07.985: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-18 15:17:07.985: - to NOT display normal parse packets on console.
-2004-11-18 15:17:07.985: - to NOT display administration parse packets on console.
-2004-11-18 15:17:07.985: - to NOT display char-server parse packets on console.
-2004-11-18 15:17:07.986: - with no minimum level for connection.
-2004-11-18 15:17:07.986: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-18 15:17:07.986: - to create new accounts with an unlimited time.
-2004-11-18 15:17:07.986: - with control of players IP between login-server and char-server.
-2004-11-18 15:17:07.986: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-18 15:17:07.987: The LAN configuration of the server is set:
-2004-11-18 15:17:07.987: - with LAN IP of char-server: 127.0.0.1.
-2004-11-18 15:17:07.987: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-18 15:17:07.988: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-18 15:17:07.990: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-18 15:17:07.991: The login-server is ready (Server is listening on the port 6900).
-2004-11-18 15:17:16.982: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-18 15:17:16.982: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-18 15:17:17.048: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-18 15:18:29.492: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 15:18:29.493: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 15:18:34.522: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 15:19:18.396: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 15:19:18.396: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 15:19:18.833: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 15:20:11.507: ----End of login-server (normal end with closing of all files).
-
-2004-11-18 15:28:11.859: The login-server starting...
-2004-11-18 15:28:11.859: The configuration of the server is set:
-2004-11-18 15:28:11.859: - with no remote administration.
-2004-11-18 15:28:11.859: - to accept any IP for remote administration
-2004-11-18 15:28:11.859: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-18 15:28:11.859: - to create GM with level '60' when @gm is used.
-2004-11-18 15:28:11.859: - to ALLOW new users (with _F/_M).
-2004-11-18 15:28:11.860: - with port: 6900.
-2004-11-18 15:28:11.860: - with the accounts file name: 'save/account.txt'.
-2004-11-18 15:28:11.860: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-18 15:28:11.860: - to check GM accounts file modifications every 15 seconds.
-2004-11-18 15:28:11.860: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-18 15:28:11.860: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-18 15:28:11.860: - to NOT display normal parse packets on console.
-2004-11-18 15:28:11.860: - to NOT display administration parse packets on console.
-2004-11-18 15:28:11.860: - to NOT display char-server parse packets on console.
-2004-11-18 15:28:11.861: - with no minimum level for connection.
-2004-11-18 15:28:11.861: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-18 15:28:11.861: - to create new accounts with an unlimited time.
-2004-11-18 15:28:11.861: - with control of players IP between login-server and char-server.
-2004-11-18 15:28:11.861: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-18 15:28:11.862: The LAN configuration of the server is set:
-2004-11-18 15:28:11.862: - with LAN IP of char-server: 127.0.0.1.
-2004-11-18 15:28:11.862: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-18 15:28:11.863: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-18 15:28:11.865: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-18 15:28:11.865: The login-server is ready (Server is listening on the port 6900).
-2004-11-18 15:28:12.075: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-18 15:28:12.075: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-18 15:28:12.077: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-18 15:28:35.002: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 15:28:35.002: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 15:28:35.485: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 15:36:09.235: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 15:36:09.235: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 15:36:09.564: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 15:43:03.314: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 15:43:03.314: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 15:43:03.847: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 15:43:30.946: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 15:43:30.946: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 15:43:31.314: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 15:44:18.482: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 15:44:18.482: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 15:44:18.817: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 15:56:01.204: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-18 16:19:15.251: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-18 16:56:33.637: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 16:56:33.637: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 16:56:33.952: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 16:57:15.314: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-18 16:57:15.314: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-18 16:57:15.615: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-18 16:58:16.268: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-18 16:58:25.767: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-18 16:58:38.167: ----End of login-server (normal end with closing of all files).
-
-2002-11-20 11:21:03.062: The login-server starting...
-2002-11-20 11:21:03.062: The configuration of the server is set:
-2002-11-20 11:21:03.063: - with no remote administration.
-2002-11-20 11:21:03.063: - to accept any IP for remote administration
-2002-11-20 11:21:03.063: - with the DEFAULT 'To GM become' password (gm_pass).
-2002-11-20 11:21:03.063: - to create GM with level '60' when @gm is used.
-2002-11-20 11:21:03.063: - to ALLOW new users (with _F/_M).
-2002-11-20 11:21:03.063: - with port: 6900.
-2002-11-20 11:21:03.063: - with the accounts file name: 'save/account.txt'.
-2002-11-20 11:21:03.064: - with the GM accounts file name: 'conf/GM_account.txt'.
-2002-11-20 11:21:03.064: - to check GM accounts file modifications every 15 seconds.
-2002-11-20 11:21:03.064: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2002-11-20 11:21:03.064: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2002-11-20 11:21:03.064: - to NOT display normal parse packets on console.
-2002-11-20 11:21:03.064: - to NOT display administration parse packets on console.
-2002-11-20 11:21:03.064: - to NOT display char-server parse packets on console.
-2002-11-20 11:21:03.064: - with no minimum level for connection.
-2002-11-20 11:21:03.065: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2002-11-20 11:21:03.065: - to create new accounts with an unlimited time.
-2002-11-20 11:21:03.065: - with control of players IP between login-server and char-server.
-2002-11-20 11:21:03.065: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2002-11-20 11:21:03.072: The LAN configuration of the server is set:
-2002-11-20 11:21:03.073: - with LAN IP of char-server: 127.0.0.1.
-2002-11-20 11:21:03.073: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2002-11-20 11:21:03.074: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2002-11-20 11:21:03.086: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2002-11-20 11:21:03.087: The login-server is ready (Server is listening on the port 6900).
-2002-11-20 11:21:11.389: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2002-11-20 11:21:11.390: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2002-11-20 11:21:11.392: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2002-11-20 11:24:15.796: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2002-11-20 11:24:15.796: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2002-11-20 11:24:16.332: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2002-11-20 11:32:59.714: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2002-11-20 11:36:00.217: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2002-11-20 11:36:13.755: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2002-11-20 11:39:57.379: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2002-11-20 11:50:02.794: 'ladmin': Sending request of the coding key (ip: 127.0.0.1)
-2002-11-20 11:50:02.813: 'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (encrypted password, ip: 127.0.0.1)
-2002-11-20 11:50:49.226: ----End of login-server (normal end with closing of all files).
-
-2002-11-20 11:50:53.203: The login-server starting...
-2002-11-20 11:50:53.203: The configuration of the server is set:
-2002-11-20 11:50:53.203: - with a remote administration with the DEFAULT password.
-2002-11-20 11:50:53.204: - to accept any IP for remote administration
-2002-11-20 11:50:53.204: - with the DEFAULT 'To GM become' password (gm_pass).
-2002-11-20 11:50:53.204: - to create GM with level '60' when @gm is used.
-2002-11-20 11:50:53.204: - to ALLOW new users (with _F/_M).
-2002-11-20 11:50:53.204: - with port: 6900.
-2002-11-20 11:50:53.204: - with the accounts file name: 'save/account.txt'.
-2002-11-20 11:50:53.204: - with the GM accounts file name: 'conf/GM_account.txt'.
-2002-11-20 11:50:53.204: - to check GM accounts file modifications every 15 seconds.
-2002-11-20 11:50:53.205: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2002-11-20 11:50:53.205: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2002-11-20 11:50:53.205: - to NOT display normal parse packets on console.
-2002-11-20 11:50:53.205: - to NOT display administration parse packets on console.
-2002-11-20 11:50:53.205: - to NOT display char-server parse packets on console.
-2002-11-20 11:50:53.205: - with no minimum level for connection.
-2002-11-20 11:50:53.205: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2002-11-20 11:50:53.205: - to create new accounts with an unlimited time.
-2002-11-20 11:50:53.206: - with control of players IP between login-server and char-server.
-2002-11-20 11:50:53.206: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2002-11-20 11:50:53.207: The LAN configuration of the server is set:
-2002-11-20 11:50:53.207: - with LAN IP of char-server: 127.0.0.1.
-2002-11-20 11:50:53.207: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2002-11-20 11:50:53.208: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2002-11-20 11:50:53.212: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2002-11-20 11:50:53.213: The login-server is ready (Server is listening on the port 6900).
-2002-11-20 11:50:54.687: 'ladmin': Sending request of the coding key (ip: 127.0.0.1)
-2002-11-20 11:50:54.691: 'ladmin'-login: Connection in administration mode accepted (encrypted password, ip: 127.0.0.1)
-2002-11-20 11:50:54.747: 'ladmin': Sending of the server version (ip: 127.0.0.1)
-2002-11-20 11:51:01.347: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2002-11-20 11:51:01.348: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2002-11-20 11:51:01.350: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2002-11-20 11:51:04.933: 'ladmin': Sending of the server version (ip: 127.0.0.1)
-2002-11-20 11:51:24.216: 'ladmin': Sending an accounts list (ask: from 0 to 100000000, ip: 127.0.0.1)
-2002-11-20 11:51:24.219: 'ladmin': Sending an accounts list (ask: from 2000003 to 100000000, ip: 127.0.0.1)
-2002-11-20 11:51:30.457: 'ladmin': Sending an accounts list (ask: from 0 to 100000000, ip: 127.0.0.1)
-2002-11-20 11:51:30.461: 'ladmin': Sending an accounts list (ask: from 2000003 to 100000000, ip: 127.0.0.1)
-2002-11-20 11:51:37.055: 'ladmin': Sending an accounts list (ask: from 0 to 100000000, ip: 127.0.0.1)
-2002-11-20 11:51:37.057: 'ladmin': Sending an accounts list (ask: from 2000003 to 100000000, ip: 127.0.0.1)
-2002-11-20 11:52:38.538: 'ladmin': Sending information of an account (request by the name; account: cameri, id: 2000002, ip: 127.0.0.1)
-2002-11-20 11:54:13.334: 'ladmin': Sending request of the coding key (ip: 127.0.0.1)
-2002-11-20 11:54:13.338: 'ladmin'-login: Connection in administration mode accepted (encrypted password, ip: 127.0.0.1)
-2002-11-20 11:54:13.341: 'ladmin': Sending of the server version (ip: 127.0.0.1)
-2002-11-20 11:54:15.794: 'ladmin': Sending request of the coding key (ip: 127.0.0.1)
-2002-11-20 11:54:15.798: 'ladmin'-login: Connection in administration mode accepted (encrypted password, ip: 127.0.0.1)
-2002-11-20 11:54:15.803: 'ladmin': Sending of the server version (ip: 127.0.0.1)
-2002-11-20 12:05:11.981: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2002-11-20 12:05:11.981: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2002-11-20 12:05:12.591: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2002-11-20 12:08:24.119: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2002-11-20 12:08:25.493: ----End of login-server (normal end with closing of all files).
-
-2002-11-20 12:09:47.562: The login-server starting...
-2002-11-20 12:09:47.562: The configuration of the server is set:
-2002-11-20 12:09:47.562: - with a remote administration with the DEFAULT password.
-2002-11-20 12:09:47.562: - to accept any IP for remote administration
-2002-11-20 12:09:47.562: - with the DEFAULT 'To GM become' password (gm_pass).
-2002-11-20 12:09:47.562: - to create GM with level '60' when @gm is used.
-2002-11-20 12:09:47.562: - to ALLOW new users (with _F/_M).
-2002-11-20 12:09:47.562: - with port: 6900.
-2002-11-20 12:09:47.562: - with the accounts file name: 'save/account.txt'.
-2002-11-20 12:09:47.562: - with the GM accounts file name: 'conf/GM_account.txt'.
-2002-11-20 12:09:47.562: - to check GM accounts file modifications every 15 seconds.
-2002-11-20 12:09:47.562: - to save password in plain text.
-2002-11-20 12:09:47.562: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2002-11-20 12:09:47.562: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2002-11-20 12:09:47.562: - to NOT display normal parse packets on console.
-2002-11-20 12:09:47.562: - to NOT display administration parse packets on console.
-2002-11-20 12:09:47.563: - to NOT display char-server parse packets on console.
-2002-11-20 12:09:47.563: - with no minimum level for connection.
-2002-11-20 12:09:47.563: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2002-11-20 12:09:47.563: - to create new accounts with an unlimited time.
-2002-11-20 12:09:47.563: - with control of players IP between login-server and char-server.
-2002-11-20 12:09:47.563: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2002-11-20 12:09:47.584: The LAN configuration of the server is set:
-2002-11-20 12:09:47.584: - with LAN IP of char-server: 127.0.0.1.
-2002-11-20 12:09:47.584: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2002-11-20 12:09:47.597: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2002-11-20 12:09:47.608: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2002-11-20 12:09:47.608: The login-server is ready (Server is listening on the port 6900).
-2002-11-20 12:09:53.833: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2002-11-20 12:09:53.833: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2002-11-20 12:09:53.835: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2002-11-20 12:10:16.114: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2002-11-20 12:10:16.115: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2002-11-20 12:10:16.922: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2002-11-20 12:10:25.844: Char-server 'eAthena': Sex change (account: 2000002, new sex F, ip: 127.0.0.1).
-2002-11-20 12:10:34.645: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2002-11-20 12:10:34.645: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2002-11-20 12:10:35.024: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2002-11-20 12:10:52.147: Char-server 'eAthena': Sex change (account: 2000002, new sex M, ip: 127.0.0.1).
-2002-11-20 12:11:01.656: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2002-11-20 12:11:01.656: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2002-11-20 12:11:02.795: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2002-11-20 12:19:23.951: ----End of login-server (normal end with closing of all files).
-
-2004-11-20 22:50:49.812: The login-server starting...
-2004-11-20 22:50:49.812: The configuration of the server is set:
-2004-11-20 22:50:49.812: - with a remote administration with the DEFAULT password.
-2004-11-20 22:50:49.812: - to accept any IP for remote administration
-2004-11-20 22:50:49.812: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-20 22:50:49.812: - to create GM with level '60' when @gm is used.
-2004-11-20 22:50:49.812: - to ALLOW new users (with _F/_M).
-2004-11-20 22:50:49.812: - with port: 6900.
-2004-11-20 22:50:49.812: - with the accounts file name: 'save/account.txt'.
-2004-11-20 22:50:49.812: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-20 22:50:49.812: - to check GM accounts file modifications every 15 seconds.
-2004-11-20 22:50:49.812: - to save password in plain text.
-2004-11-20 22:50:49.812: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-20 22:50:49.812: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-20 22:50:49.813: - to NOT display normal parse packets on console.
-2004-11-20 22:50:49.813: - to NOT display administration parse packets on console.
-2004-11-20 22:50:49.813: - to NOT display char-server parse packets on console.
-2004-11-20 22:50:49.813: - with no minimum level for connection.
-2004-11-20 22:50:49.813: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-20 22:50:49.813: - to create new accounts with an unlimited time.
-2004-11-20 22:50:49.813: - with control of players IP between login-server and char-server.
-2004-11-20 22:50:49.813: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-20 22:50:49.814: The LAN configuration of the server is set:
-2004-11-20 22:50:49.814: - with LAN IP of char-server: 127.0.0.1.
-2004-11-20 22:50:49.814: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-20 22:50:49.816: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-20 22:50:49.818: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-20 22:50:49.818: The login-server is ready (Server is listening on the port 6900).
-2004-11-20 22:50:49.921: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-20 22:50:49.921: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-20 22:50:49.936: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-20 22:51:05.727: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-20 22:51:05.728: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-20 22:51:06.303: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-20 22:52:42.891: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-20 22:52:43.904: ----End of login-server (normal end with closing of all files).
-
-2004-11-20 23:08:29.718: The login-server starting...
-2004-11-20 23:08:29.718: The configuration of the server is set:
-2004-11-20 23:08:29.718: - with a remote administration with the DEFAULT password.
-2004-11-20 23:08:29.718: - to accept any IP for remote administration
-2004-11-20 23:08:29.718: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-20 23:08:29.718: - to create GM with level '60' when @gm is used.
-2004-11-20 23:08:29.718: - to ALLOW new users (with _F/_M).
-2004-11-20 23:08:29.718: - with port: 6900.
-2004-11-20 23:08:29.718: - with the accounts file name: 'save/account.txt'.
-2004-11-20 23:08:29.718: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-20 23:08:29.719: - to check GM accounts file modifications every 15 seconds.
-2004-11-20 23:08:29.719: - to save password in plain text.
-2004-11-20 23:08:29.719: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-20 23:08:29.719: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-20 23:08:29.719: - to NOT display normal parse packets on console.
-2004-11-20 23:08:29.719: - to NOT display administration parse packets on console.
-2004-11-20 23:08:29.719: - to NOT display char-server parse packets on console.
-2004-11-20 23:08:29.719: - with no minimum level for connection.
-2004-11-20 23:08:29.719: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-20 23:08:29.719: - to create new accounts with an unlimited time.
-2004-11-20 23:08:29.719: - with control of players IP between login-server and char-server.
-2004-11-20 23:08:29.719: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-20 23:08:29.721: The LAN configuration of the server is set:
-2004-11-20 23:08:29.721: - with LAN IP of char-server: 127.0.0.1.
-2004-11-20 23:08:29.721: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-20 23:08:29.723: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-20 23:08:29.728: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-20 23:08:29.729: The login-server is ready (Server is listening on the port 6900).
-2004-11-20 23:08:34.807: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-20 23:08:34.807: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-20 23:08:34.809: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-20 23:09:02.121: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-20 23:09:02.121: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-20 23:09:02.589: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-20 23:12:40.881: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-20 23:12:40.882: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-20 23:12:41.361: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-20 23:13:52.892: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-20 23:13:52.892: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-20 23:13:53.333: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-20 23:19:03.374: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-20 23:19:03.374: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-20 23:19:03.723: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-20 23:28:20.065: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-20 23:28:20.700: ----End of login-server (normal end with closing of all files).
-
-2004-11-21 00:33:39.265: The login-server starting...
-2004-11-21 00:33:39.265: The configuration of the server is set:
-2004-11-21 00:33:39.265: - with a remote administration with the DEFAULT password.
-2004-11-21 00:33:39.265: - to accept any IP for remote administration
-2004-11-21 00:33:39.265: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-21 00:33:39.265: - to create GM with level '60' when @gm is used.
-2004-11-21 00:33:39.265: - to ALLOW new users (with _F/_M).
-2004-11-21 00:33:39.265: - with port: 6900.
-2004-11-21 00:33:39.265: - with the accounts file name: 'save/account.txt'.
-2004-11-21 00:33:39.265: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-21 00:33:39.265: - to check GM accounts file modifications every 15 seconds.
-2004-11-21 00:33:39.265: - to save password in plain text.
-2004-11-21 00:33:39.265: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-21 00:33:39.265: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-21 00:33:39.265: - to NOT display normal parse packets on console.
-2004-11-21 00:33:39.266: - to NOT display administration parse packets on console.
-2004-11-21 00:33:39.266: - to NOT display char-server parse packets on console.
-2004-11-21 00:33:39.266: - with no minimum level for connection.
-2004-11-21 00:33:39.266: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-21 00:33:39.266: - to create new accounts with an unlimited time.
-2004-11-21 00:33:39.266: - with control of players IP between login-server and char-server.
-2004-11-21 00:33:39.266: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-21 00:33:39.267: The LAN configuration of the server is set:
-2004-11-21 00:33:39.267: - with LAN IP of char-server: 127.0.0.1.
-2004-11-21 00:33:39.267: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-21 00:33:39.269: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-21 00:33:39.270: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-21 00:33:39.271: The login-server is ready (Server is listening on the port 6900).
-2004-11-21 00:33:39.361: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-21 00:33:39.362: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-21 00:33:39.363: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-21 00:33:47.630: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 00:33:47.631: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 00:33:47.994: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 00:42:37.394: ----End of login-server (normal end with closing of all files).
-
-2004-11-21 00:46:38.578: The login-server starting...
-2004-11-21 00:46:38.578: The configuration of the server is set:
-2004-11-21 00:46:38.578: - with a remote administration with the DEFAULT password.
-2004-11-21 00:46:38.578: - to accept any IP for remote administration
-2004-11-21 00:46:38.578: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-21 00:46:38.578: - to create GM with level '60' when @gm is used.
-2004-11-21 00:46:38.578: - to ALLOW new users (with _F/_M).
-2004-11-21 00:46:38.578: - with port: 6900.
-2004-11-21 00:46:38.578: - with the accounts file name: 'save/account.txt'.
-2004-11-21 00:46:38.578: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-21 00:46:38.578: - to check GM accounts file modifications every 15 seconds.
-2004-11-21 00:46:38.578: - to save password in plain text.
-2004-11-21 00:46:38.579: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-21 00:46:38.579: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-21 00:46:38.579: - to NOT display normal parse packets on console.
-2004-11-21 00:46:38.579: - to NOT display administration parse packets on console.
-2004-11-21 00:46:38.579: - to NOT display char-server parse packets on console.
-2004-11-21 00:46:38.579: - with no minimum level for connection.
-2004-11-21 00:46:38.579: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-21 00:46:38.579: - to create new accounts with an unlimited time.
-2004-11-21 00:46:38.579: - with control of players IP between login-server and char-server.
-2004-11-21 00:46:38.580: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-21 00:46:38.581: The LAN configuration of the server is set:
-2004-11-21 00:46:38.581: - with LAN IP of char-server: 127.0.0.1.
-2004-11-21 00:46:38.581: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-21 00:46:38.583: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-21 00:46:38.585: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-21 00:46:38.586: The login-server is ready (Server is listening on the port 6900).
-2004-11-21 00:46:39.009: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-21 00:46:39.009: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-21 00:46:39.011: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-21 00:46:52.234: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 00:46:52.235: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 00:46:52.770: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 00:59:14.916: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 00:59:14.916: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 00:59:15.679: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 00:59:28.523: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-21 00:59:29.075: ----End of login-server (normal end with closing of all files).
-
-2004-11-21 09:21:59.296: The login-server starting...
-2004-11-21 09:21:59.296: The configuration of the server is set:
-2004-11-21 09:21:59.296: - with a remote administration with the DEFAULT password.
-2004-11-21 09:21:59.296: - to accept any IP for remote administration
-2004-11-21 09:21:59.296: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-21 09:21:59.296: - to create GM with level '60' when @gm is used.
-2004-11-21 09:21:59.296: - to ALLOW new users (with _F/_M).
-2004-11-21 09:21:59.296: - with port: 6900.
-2004-11-21 09:21:59.296: - with the accounts file name: 'save/account.txt'.
-2004-11-21 09:21:59.297: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-21 09:21:59.297: - to check GM accounts file modifications every 15 seconds.
-2004-11-21 09:21:59.297: - to save password in plain text.
-2004-11-21 09:21:59.297: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-21 09:21:59.297: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-21 09:21:59.297: - to NOT display normal parse packets on console.
-2004-11-21 09:21:59.297: - to NOT display administration parse packets on console.
-2004-11-21 09:21:59.297: - to NOT display char-server parse packets on console.
-2004-11-21 09:21:59.297: - with no minimum level for connection.
-2004-11-21 09:21:59.297: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-21 09:21:59.297: - to create new accounts with an unlimited time.
-2004-11-21 09:21:59.298: - with control of players IP between login-server and char-server.
-2004-11-21 09:21:59.298: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-21 09:21:59.316: The LAN configuration of the server is set:
-2004-11-21 09:21:59.316: - with LAN IP of char-server: 127.0.0.1.
-2004-11-21 09:21:59.316: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-21 09:21:59.330: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-21 09:21:59.346: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-21 09:21:59.346: The login-server is ready (Server is listening on the port 6900).
-2004-11-21 09:22:01.800: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-21 09:22:01.800: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-21 09:22:01.819: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-21 09:22:37.143: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 09:22:37.143: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 09:22:37.642: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 09:23:06.489: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-21 09:23:08.809: ----End of login-server (normal end with closing of all files).
-
-2004-11-21 09:35:36.234: The login-server starting...
-2004-11-21 09:35:36.234: The configuration of the server is set:
-2004-11-21 09:35:36.234: - with a remote administration with the DEFAULT password.
-2004-11-21 09:35:36.234: - to accept any IP for remote administration
-2004-11-21 09:35:36.234: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-21 09:35:36.234: - to create GM with level '60' when @gm is used.
-2004-11-21 09:35:36.234: - to ALLOW new users (with _F/_M).
-2004-11-21 09:35:36.234: - with port: 6900.
-2004-11-21 09:35:36.234: - with the accounts file name: 'save/account.txt'.
-2004-11-21 09:35:36.234: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-21 09:35:36.234: - to check GM accounts file modifications every 15 seconds.
-2004-11-21 09:35:36.234: - to save password in plain text.
-2004-11-21 09:35:36.234: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-21 09:35:36.234: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-21 09:35:36.234: - to NOT display normal parse packets on console.
-2004-11-21 09:35:36.234: - to NOT display administration parse packets on console.
-2004-11-21 09:35:36.235: - to NOT display char-server parse packets on console.
-2004-11-21 09:35:36.235: - with no minimum level for connection.
-2004-11-21 09:35:36.235: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-21 09:35:36.235: - to create new accounts with an unlimited time.
-2004-11-21 09:35:36.235: - with control of players IP between login-server and char-server.
-2004-11-21 09:35:36.235: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-21 09:35:36.238: The LAN configuration of the server is set:
-2004-11-21 09:35:36.238: - with LAN IP of char-server: 127.0.0.1.
-2004-11-21 09:35:36.238: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-21 09:35:36.240: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-21 09:35:36.242: 7 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-21 09:35:36.243: The login-server is ready (Server is listening on the port 6900).
-2004-11-21 09:35:39.279: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-21 09:35:39.279: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-21 09:35:39.281: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-21 09:35:41.848: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 09:35:41.848: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 09:35:42.277: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 09:59:21.405: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 09:59:21.405: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 09:59:21.671: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 10:07:41.116: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 10:07:41.117: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 10:07:41.311: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 10:10:40.734: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 10:10:40.734: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 10:10:41.030: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 10:10:52.490: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-21 10:15:32.693: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 10:15:32.693: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 10:15:33.189: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 10:16:05.133: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 10:16:05.133: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 10:16:05.765: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 10:16:21.704: Char-server 'eAthena': Sex change (account: 2000002, new sex F, ip: 127.0.0.1).
-2004-11-21 10:16:29.625: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 10:16:29.625: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 10:16:30.031: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 10:16:34.094: Char-server 'eAthena': Sex change (account: 2000002, new sex M, ip: 127.0.0.1).
-2004-11-21 10:16:41.959: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 10:16:41.959: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 10:16:42.437: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 10:17:53.246: Request for connection (non encryption mode) of mc_cameri (ip: 127.0.0.1).
-2004-11-21 10:17:53.246: Unknown account (account: mc_cameri, received pass: juan16, ip: 127.0.0.1)
-2004-11-21 10:17:57.765: Request for connection (non encryption mode) of mc_cameri_M (ip: 127.0.0.1).
-2004-11-21 10:17:57.765: Account creation and authentification accepted (account mc_cameri (id: 2000003), pass: juan16, sex: M, connection with _F/_M, ip: 127.0.0.1)
-2004-11-21 10:17:58.154: Char-server 'eAthena': authentification of the account 2000003 accepted (ip: 127.0.0.1).
-2004-11-21 10:18:32.050: Char-server 'eAthena': e-mail of the account 2000003 found (ip: 127.0.0.1).
-2004-11-21 10:18:36.306: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 10:18:36.307: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 10:18:36.750: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 10:50:52.758: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 10:50:52.758: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 10:50:53.599: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 11:02:14.116: ----End of login-server (normal end with closing of all files).
-
-2004-11-21 11:09:37.515: The login-server starting...
-2004-11-21 11:09:37.515: The configuration of the server is set:
-2004-11-21 11:09:37.515: - with a remote administration with the DEFAULT password.
-2004-11-21 11:09:37.515: - to accept any IP for remote administration
-2004-11-21 11:09:37.515: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-21 11:09:37.515: - to create GM with level '60' when @gm is used.
-2004-11-21 11:09:37.515: - to ALLOW new users (with _F/_M).
-2004-11-21 11:09:37.515: - with port: 6900.
-2004-11-21 11:09:37.517: - with the accounts file name: 'save/account.txt'.
-2004-11-21 11:09:37.517: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-21 11:09:37.518: - to check GM accounts file modifications every 15 seconds.
-2004-11-21 11:09:37.518: - to save password in plain text.
-2004-11-21 11:09:37.518: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-21 11:09:37.518: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-21 11:09:37.518: - to NOT display normal parse packets on console.
-2004-11-21 11:09:37.518: - to NOT display administration parse packets on console.
-2004-11-21 11:09:37.518: - to NOT display char-server parse packets on console.
-2004-11-21 11:09:37.518: - with no minimum level for connection.
-2004-11-21 11:09:37.518: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-21 11:09:37.518: - to create new accounts with an unlimited time.
-2004-11-21 11:09:37.518: - with control of players IP between login-server and char-server.
-2004-11-21 11:09:37.519: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-21 11:09:37.522: The LAN configuration of the server is set:
-2004-11-21 11:09:37.522: - with LAN IP of char-server: 127.0.0.1.
-2004-11-21 11:09:37.522: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-21 11:09:37.523: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-21 11:09:37.525: 8 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-21 11:09:37.526: The login-server is ready (Server is listening on the port 6900).
-2004-11-21 11:09:40.652: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-21 11:09:40.652: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-21 11:09:40.654: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-21 11:12:19.193: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 11:12:19.193: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 11:12:19.561: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 11:12:59.874: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-21 11:36:43.737: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 11:36:43.737: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 11:36:44.313: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 11:39:24.440: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 11:39:24.440: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 11:39:25.093: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 11:53:34.248: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-21 11:53:34.766: ----End of login-server (normal end with closing of all files).
-
-2004-11-21 12:44:33.625: The login-server starting...
-2004-11-21 12:44:33.625: The configuration of the server is set:
-2004-11-21 12:44:33.625: - with a remote administration with the DEFAULT password.
-2004-11-21 12:44:33.625: - to accept any IP for remote administration
-2004-11-21 12:44:33.625: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-21 12:44:33.625: - to create GM with level '60' when @gm is used.
-2004-11-21 12:44:33.625: - to ALLOW new users (with _F/_M).
-2004-11-21 12:44:33.625: - with port: 6900.
-2004-11-21 12:44:33.625: - with the accounts file name: 'save/account.txt'.
-2004-11-21 12:44:33.625: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-21 12:44:33.625: - to check GM accounts file modifications every 15 seconds.
-2004-11-21 12:44:33.625: - to save password in plain text.
-2004-11-21 12:44:33.625: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-21 12:44:33.625: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-21 12:44:33.626: - to NOT display normal parse packets on console.
-2004-11-21 12:44:33.626: - to NOT display administration parse packets on console.
-2004-11-21 12:44:33.626: - to NOT display char-server parse packets on console.
-2004-11-21 12:44:33.626: - with no minimum level for connection.
-2004-11-21 12:44:33.626: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-21 12:44:33.626: - to create new accounts with an unlimited time.
-2004-11-21 12:44:33.626: - with control of players IP between login-server and char-server.
-2004-11-21 12:44:33.626: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-21 12:44:33.627: The LAN configuration of the server is set:
-2004-11-21 12:44:33.627: - with LAN IP of char-server: 127.0.0.1.
-2004-11-21 12:44:33.628: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-21 12:44:33.629: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-21 12:44:33.631: 8 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-21 12:44:33.632: The login-server is ready (Server is listening on the port 6900).
-2004-11-21 12:44:35.883: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-21 12:44:35.883: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-21 12:44:35.885: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-21 12:44:45.854: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-21 12:44:45.854: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-21 12:44:46.309: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-21 12:45:36.139: Request for connection (non encryption mode) of mc_cameri (ip: 127.0.0.1).
-2004-11-21 12:45:36.141: Authentification accepted (account: mc_cameri (id: 2000003), ip: 127.0.0.1)
-2004-11-21 12:45:36.765: Char-server 'eAthena': authentification of the account 2000003 accepted (ip: 127.0.0.1).
-2004-11-21 12:47:14.681: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 06:42:27.250: The login-server starting...
-2004-11-22 06:42:27.250: The configuration of the server is set:
-2004-11-22 06:42:27.250: - with a remote administration with the DEFAULT password.
-2004-11-22 06:42:27.250: - to accept any IP for remote administration
-2004-11-22 06:42:27.250: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 06:42:27.250: - to create GM with level '60' when @gm is used.
-2004-11-22 06:42:27.252: - to ALLOW new users (with _F/_M).
-2004-11-22 06:42:27.253: - with port: 6900.
-2004-11-22 06:42:27.253: - with the accounts file name: 'save/account.txt'.
-2004-11-22 06:42:27.253: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 06:42:27.253: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 06:42:27.253: - to save password in plain text.
-2004-11-22 06:42:27.253: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 06:42:27.253: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 06:42:27.253: - to NOT display normal parse packets on console.
-2004-11-22 06:42:27.253: - to NOT display administration parse packets on console.
-2004-11-22 06:42:27.253: - to NOT display char-server parse packets on console.
-2004-11-22 06:42:27.253: - with no minimum level for connection.
-2004-11-22 06:42:27.254: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 06:42:27.254: - to create new accounts with an unlimited time.
-2004-11-22 06:42:27.254: - with control of players IP between login-server and char-server.
-2004-11-22 06:42:27.254: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 06:42:27.255: The LAN configuration of the server is set:
-2004-11-22 06:42:27.255: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 06:42:27.255: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 06:42:27.258: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-22 06:42:27.260: 8 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-22 06:42:27.260: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 06:42:29.906: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-22 06:42:29.906: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-22 06:42:29.941: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-22 06:55:43.864: Request for connection (non encryption mode) of genosonic (ip: 127.0.0.1).
-2004-11-22 06:55:43.865: Unknown account (account: genosonic, received pass: juan16, ip: 127.0.0.1)
-2004-11-22 06:55:48.272: Request for connection (non encryption mode) of genosonic (ip: 127.0.0.1).
-2004-11-22 06:55:48.273: Unknown account (account: genosonic, received pass: juan16, ip: 127.0.0.1)
-2004-11-22 06:56:38.898: Request for connection (non encryption mode) of genosonic (ip: 127.0.0.1).
-2004-11-22 06:56:38.898: Unknown account (account: genosonic, received pass: juan16, ip: 127.0.0.1)
-2004-11-22 06:58:13.590: Request for connection (non encryption mode) of genosonic (ip: 127.0.0.1).
-2004-11-22 06:58:13.590: Unknown account (account: genosonic, received pass: juan16, ip: 127.0.0.1)
-2004-11-22 06:58:35.344: Request for connection (non encryption mode) of genosonic (ip: 127.0.0.1).
-2004-11-22 06:58:35.345: Unknown account (account: genosonic, received pass: juan16, ip: 127.0.0.1)
-2004-11-22 06:58:58.020: Request for connection (non encryption mode) of genosonic (ip: 127.0.0.1).
-2004-11-22 06:58:58.021: Unknown account (account: genosonic, received pass: juan16, ip: 127.0.0.1)
-
-2004-11-22 15:52:36.640: The login-server starting...
-2004-11-22 15:52:36.640: The configuration of the server is set:
-2004-11-22 15:52:36.640: - with a remote administration with the DEFAULT password.
-2004-11-22 15:52:36.640: - to accept any IP for remote administration
-2004-11-22 15:52:36.640: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 15:52:36.640: - to create GM with level '60' when @gm is used.
-2004-11-22 15:52:36.640: - to ALLOW new users (with _F/_M).
-2004-11-22 15:52:36.640: - with port: 6900.
-2004-11-22 15:52:36.640: - with the accounts file name: 'save/account.txt'.
-2004-11-22 15:52:36.640: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 15:52:36.641: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 15:52:36.641: - to save password in plain text.
-2004-11-22 15:52:36.641: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 15:52:36.641: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 15:52:36.641: - to NOT display normal parse packets on console.
-2004-11-22 15:52:36.641: - to NOT display administration parse packets on console.
-2004-11-22 15:52:36.641: - to NOT display char-server parse packets on console.
-2004-11-22 15:52:36.641: - with no minimum level for connection.
-2004-11-22 15:52:36.641: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 15:52:36.642: - to create new accounts with an unlimited time.
-2004-11-22 15:52:36.642: - with control of players IP between login-server and char-server.
-2004-11-22 15:52:36.642: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 15:52:36.643: The LAN configuration of the server is set:
-2004-11-22 15:52:36.643: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 15:52:36.643: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 15:52:36.644: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-22 15:52:36.646: 8 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-22 15:52:36.647: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 15:53:35.798: Request for connection (non encryption mode) of genosonic_M (ip: 127.0.0.1).
-2004-11-22 15:53:35.798: Account creation and authentification accepted (account genosonic (id: 2000004), pass: juan16, sex: M, connection with _F/_M, ip: 127.0.0.1)
-2004-11-22 15:53:35.896: Connection refused: there is no char-server online (account: genosonic, ip: 127.0.0.1).
-2004-11-22 15:53:44.516: Request for connection (non encryption mode) of genosonic (ip: 127.0.0.1).
-2004-11-22 15:53:44.517: Authentification accepted (account: genosonic (id: 2000004), ip: 127.0.0.1)
-2004-11-22 15:53:44.527: Connection refused: there is no char-server online (account: genosonic, ip: 127.0.0.1).
-2004-11-22 15:53:53.263: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 15:53:53.263: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 15:53:53.265: Connection refused: there is no char-server online (account: cameri, ip: 127.0.0.1).
-2004-11-22 15:54:01.858: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 15:54:36.453: The login-server starting...
-2004-11-22 15:54:36.453: The configuration of the server is set:
-2004-11-22 15:54:36.453: - with a remote administration with the DEFAULT password.
-2004-11-22 15:54:36.453: - to accept any IP for remote administration
-2004-11-22 15:54:36.453: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 15:54:36.453: - to create GM with level '60' when @gm is used.
-2004-11-22 15:54:36.453: - to ALLOW new users (with _F/_M).
-2004-11-22 15:54:36.453: - with port: 6900.
-2004-11-22 15:54:36.453: - with the accounts file name: 'save/account.txt'.
-2004-11-22 15:54:36.453: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 15:54:36.453: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 15:54:36.453: - to save password in plain text.
-2004-11-22 15:54:36.453: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 15:54:36.453: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 15:54:36.454: - to NOT display normal parse packets on console.
-2004-11-22 15:54:36.454: - to NOT display administration parse packets on console.
-2004-11-22 15:54:36.454: - to NOT display char-server parse packets on console.
-2004-11-22 15:54:36.454: - with no minimum level for connection.
-2004-11-22 15:54:36.454: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 15:54:36.454: - to create new accounts with an unlimited time.
-2004-11-22 15:54:36.454: - with control of players IP between login-server and char-server.
-2004-11-22 15:54:36.454: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 15:54:36.455: The LAN configuration of the server is set:
-2004-11-22 15:54:36.456: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 15:54:36.456: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 15:54:36.460: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-22 15:54:36.461: 9 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-22 15:54:36.462: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 15:55:00.552: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 15:55:01.484: The login-server starting...
-2004-11-22 15:55:01.484: The configuration of the server is set:
-2004-11-22 15:55:01.484: - with a remote administration with the DEFAULT password.
-2004-11-22 15:55:01.484: - to accept any IP for remote administration
-2004-11-22 15:55:01.484: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 15:55:01.484: - to create GM with level '60' when @gm is used.
-2004-11-22 15:55:01.484: - to ALLOW new users (with _F/_M).
-2004-11-22 15:55:01.484: - with port: 6900.
-2004-11-22 15:55:01.484: - with the accounts file name: 'save/account.txt'.
-2004-11-22 15:55:01.484: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 15:55:01.484: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 15:55:01.485: - to save password in plain text.
-2004-11-22 15:55:01.485: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 15:55:01.485: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 15:55:01.485: - to NOT display normal parse packets on console.
-2004-11-22 15:55:01.485: - to NOT display administration parse packets on console.
-2004-11-22 15:55:01.485: - to NOT display char-server parse packets on console.
-2004-11-22 15:55:01.485: - with no minimum level for connection.
-2004-11-22 15:55:01.485: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 15:55:01.485: - to create new accounts with an unlimited time.
-2004-11-22 15:55:01.485: - with control of players IP between login-server and char-server.
-2004-11-22 15:55:01.485: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 15:55:01.486: The LAN configuration of the server is set:
-2004-11-22 15:55:01.487: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 15:55:01.487: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 15:55:01.488: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-22 15:55:01.490: 9 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-22 15:55:01.490: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 15:55:28.968: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 15:55:59.937: The login-server starting...
-2004-11-22 15:55:59.937: The configuration of the server is set:
-2004-11-22 15:55:59.937: - with a remote administration with the DEFAULT password.
-2004-11-22 15:55:59.937: - to accept any IP for remote administration
-2004-11-22 15:55:59.937: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 15:55:59.937: - to create GM with level '60' when @gm is used.
-2004-11-22 15:55:59.937: - to ALLOW new users (with _F/_M).
-2004-11-22 15:55:59.938: - with port: 6900.
-2004-11-22 15:55:59.938: - with the accounts file name: 'save/account.txt'.
-2004-11-22 15:55:59.938: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 15:55:59.938: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 15:55:59.938: - to save password in plain text.
-2004-11-22 15:55:59.938: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 15:55:59.938: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 15:55:59.938: - to NOT display normal parse packets on console.
-2004-11-22 15:55:59.938: - to NOT display administration parse packets on console.
-2004-11-22 15:55:59.938: - to NOT display char-server parse packets on console.
-2004-11-22 15:55:59.938: - with no minimum level for connection.
-2004-11-22 15:55:59.939: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 15:55:59.939: - to create new accounts with an unlimited time.
-2004-11-22 15:55:59.939: - with control of players IP between login-server and char-server.
-2004-11-22 15:55:59.939: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 15:55:59.940: The LAN configuration of the server is set:
-2004-11-22 15:55:59.940: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 15:55:59.940: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 15:55:59.942: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-22 15:55:59.943: 9 accounts read in save/account.txt, of which is 1 GM account and 5 server accounts ('S').
-2004-11-22 15:55:59.944: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 15:59:35.699: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 15:59:49.875: The login-server starting...
-2004-11-22 15:59:49.875: The configuration of the server is set:
-2004-11-22 15:59:49.875: - with a remote administration with the DEFAULT password.
-2004-11-22 15:59:49.875: - to accept any IP for remote administration
-2004-11-22 15:59:49.875: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 15:59:49.875: - to create GM with level '60' when @gm is used.
-2004-11-22 15:59:49.875: - to ALLOW new users (with _F/_M).
-2004-11-22 15:59:49.875: - with port: 6900.
-2004-11-22 15:59:49.876: - with the accounts file name: 'save/account.txt'.
-2004-11-22 15:59:49.876: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 15:59:49.876: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 15:59:49.876: - to save password in plain text.
-2004-11-22 15:59:49.876: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 15:59:49.876: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 15:59:49.876: - to NOT display normal parse packets on console.
-2004-11-22 15:59:49.876: - to NOT display administration parse packets on console.
-2004-11-22 15:59:49.876: - to NOT display char-server parse packets on console.
-2004-11-22 15:59:49.876: - with no minimum level for connection.
-2004-11-22 15:59:49.876: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 15:59:49.877: - to create new accounts with an unlimited time.
-2004-11-22 15:59:49.877: - with control of players IP between login-server and char-server.
-2004-11-22 15:59:49.877: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 15:59:49.878: The LAN configuration of the server is set:
-2004-11-22 15:59:49.878: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 15:59:49.878: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 15:59:49.879: read_gm_account: file 'conf/GM_account.txt' readed (34 GM accounts found).
-2004-11-22 15:59:49.884: 9 accounts read in save/account.txt, of which is 3 GM accounts and 5 server accounts ('S').
-2004-11-22 15:59:49.885: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:00:08.227: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:00:09.359: The login-server starting...
-2004-11-22 16:00:09.359: The configuration of the server is set:
-2004-11-22 16:00:09.359: - with a remote administration with the DEFAULT password.
-2004-11-22 16:00:09.359: - to accept any IP for remote administration
-2004-11-22 16:00:09.359: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:00:09.359: - to create GM with level '60' when @gm is used.
-2004-11-22 16:00:09.359: - to ALLOW new users (with _F/_M).
-2004-11-22 16:00:09.359: - with port: 6900.
-2004-11-22 16:00:09.359: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:00:09.359: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:00:09.359: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:00:09.359: - to save password in plain text.
-2004-11-22 16:00:09.360: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:00:09.360: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:00:09.360: - to NOT display normal parse packets on console.
-2004-11-22 16:00:09.360: - to NOT display administration parse packets on console.
-2004-11-22 16:00:09.360: - to NOT display char-server parse packets on console.
-2004-11-22 16:00:09.360: - with no minimum level for connection.
-2004-11-22 16:00:09.360: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:00:09.360: - to create new accounts with an unlimited time.
-2004-11-22 16:00:09.360: - with control of players IP between login-server and char-server.
-2004-11-22 16:00:09.360: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:00:09.361: The LAN configuration of the server is set:
-2004-11-22 16:00:09.362: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:00:09.362: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:00:09.363: read_gm_account: file 'conf/GM_account.txt' readed (35 GM accounts found).
-2004-11-22 16:00:09.364: 9 accounts read in save/account.txt, of which is 4 GM accounts and 5 server accounts ('S').
-2004-11-22 16:00:09.365: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:00:21.477: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-22 16:00:21.477: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-22 16:00:21.482: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-22 16:01:03.482: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 16:01:03.482: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 16:01:03.811: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 16:01:16.510: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-22 16:01:21.320: Request for connection (non encryption mode) of genosonic (ip: 127.0.0.1).
-2004-11-22 16:01:21.320: Authentification accepted (account: genosonic (id: 2000004), ip: 127.0.0.1)
-2004-11-22 16:01:21.806: Char-server 'eAthena': authentification of the account 2000004 accepted (ip: 127.0.0.1).
-2004-11-22 16:01:35.696: Char-server 'eAthena': e-mail of the account 2000004 found (ip: 127.0.0.1).
-2004-11-22 16:01:45.244: Request for connection (non encryption mode) of metal_M (ip: 127.0.0.1).
-2004-11-22 16:01:45.244: Account creation and authentification accepted (account metal (id: 2000005), pass: metal, sex: M, connection with _F/_M, ip: 127.0.0.1)
-2004-11-22 16:01:45.884: Char-server 'eAthena': authentification of the account 2000005 accepted (ip: 127.0.0.1).
-2004-11-22 16:01:55.027: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-2004-11-22 16:01:56.433: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:07:11.109: The login-server starting...
-2004-11-22 16:07:11.109: The configuration of the server is set:
-2004-11-22 16:07:11.109: - with a remote administration with the DEFAULT password.
-2004-11-22 16:07:11.109: - to accept any IP for remote administration
-2004-11-22 16:07:11.109: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:07:11.109: - to create GM with level '60' when @gm is used.
-2004-11-22 16:07:11.109: - to ALLOW new users (with _F/_M).
-2004-11-22 16:07:11.109: - with port: 6900.
-2004-11-22 16:07:11.109: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:07:11.109: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:07:11.109: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:07:11.109: - to save password in plain text.
-2004-11-22 16:07:11.109: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:07:11.109: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:07:11.110: - to NOT display normal parse packets on console.
-2004-11-22 16:07:11.110: - to NOT display administration parse packets on console.
-2004-11-22 16:07:11.110: - to NOT display char-server parse packets on console.
-2004-11-22 16:07:11.110: - with no minimum level for connection.
-2004-11-22 16:07:11.110: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:07:11.110: - to create new accounts with an unlimited time.
-2004-11-22 16:07:11.110: - with control of players IP between login-server and char-server.
-2004-11-22 16:07:11.110: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:07:11.111: The LAN configuration of the server is set:
-2004-11-22 16:07:11.111: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:07:11.111: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:07:11.112: read_gm_account: file 'conf/GM_account.txt' readed (35 GM accounts found).
-2004-11-22 16:07:11.114: 10 accounts read in save/account.txt, of which is 4 GM accounts and 5 server accounts ('S').
-2004-11-22 16:07:11.115: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:09:26.116: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:10:56.117: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:11:26.116: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:11:41.117: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:12:11.116: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:12:26.117: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:12:41.117: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:12:56.117: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:13:11.117: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:13:26.117: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:13:41.117: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:14:56.116: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:15:11.117: read_gm_account: file 'conf/GM_account.txt' readed (1 GM accounts found).
-2004-11-22 16:15:11.220: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:15:32.765: The login-server starting...
-2004-11-22 16:15:32.765: The configuration of the server is set:
-2004-11-22 16:15:32.765: - with a remote administration with the DEFAULT password.
-2004-11-22 16:15:32.765: - to accept any IP for remote administration
-2004-11-22 16:15:32.765: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:15:32.765: - to create GM with level '60' when @gm is used.
-2004-11-22 16:15:32.765: - to ALLOW new users (with _F/_M).
-2004-11-22 16:15:32.765: - with port: 6900.
-2004-11-22 16:15:32.765: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:15:32.765: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:15:32.765: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:15:32.765: - to save password in plain text.
-2004-11-22 16:15:32.765: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:15:32.768: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:15:32.768: - to NOT display normal parse packets on console.
-2004-11-22 16:15:32.768: - to NOT display administration parse packets on console.
-2004-11-22 16:15:32.768: - to NOT display char-server parse packets on console.
-2004-11-22 16:15:32.768: - with no minimum level for connection.
-2004-11-22 16:15:32.768: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:15:32.768: - to create new accounts with an unlimited time.
-2004-11-22 16:15:32.769: - with control of players IP between login-server and char-server.
-2004-11-22 16:15:32.769: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:15:32.770: The LAN configuration of the server is set:
-2004-11-22 16:15:32.770: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:15:32.770: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:15:32.771: read_gm_account: file 'conf/GM_account.txt' readed (1 GM accounts found).
-2004-11-22 16:15:32.773: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:15:32.773: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:16:15.139: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:16:50.468: The login-server starting...
-2004-11-22 16:16:50.468: The configuration of the server is set:
-2004-11-22 16:16:50.468: - with a remote administration with the DEFAULT password.
-2004-11-22 16:16:50.468: - to accept any IP for remote administration
-2004-11-22 16:16:50.468: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:16:50.468: - to create GM with level '60' when @gm is used.
-2004-11-22 16:16:50.468: - to ALLOW new users (with _F/_M).
-2004-11-22 16:16:50.468: - with port: 6900.
-2004-11-22 16:16:50.468: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:16:50.468: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:16:50.469: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:16:50.469: - to save password in plain text.
-2004-11-22 16:16:50.469: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:16:50.469: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:16:50.469: - to NOT display normal parse packets on console.
-2004-11-22 16:16:50.469: - to NOT display administration parse packets on console.
-2004-11-22 16:16:50.469: - to NOT display char-server parse packets on console.
-2004-11-22 16:16:50.469: - with no minimum level for connection.
-2004-11-22 16:16:50.469: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:16:50.469: - to create new accounts with an unlimited time.
-2004-11-22 16:16:50.469: - with control of players IP between login-server and char-server.
-2004-11-22 16:16:50.469: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:16:50.470: The LAN configuration of the server is set:
-2004-11-22 16:16:50.470: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:16:50.471: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:16:50.472: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:16:50.473: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:16:50.474: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:17:05.476: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:17:50.476: read_gm_account: file 'conf/GM_account.txt' readed (2 GM accounts found).
-2004-11-22 16:18:05.478: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:18:35.482: read_gm_account: file 'conf/GM_account.txt' readed (32 GM accounts found).
-2004-11-22 16:18:50.476: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:24:46.551: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:24:49.687: The login-server starting...
-2004-11-22 16:24:49.687: The configuration of the server is set:
-2004-11-22 16:24:49.687: - with a remote administration with the DEFAULT password.
-2004-11-22 16:24:49.687: - to accept any IP for remote administration
-2004-11-22 16:24:49.687: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:24:49.687: - to create GM with level '60' when @gm is used.
-2004-11-22 16:24:49.687: - to ALLOW new users (with _F/_M).
-2004-11-22 16:24:49.687: - with port: 6900.
-2004-11-22 16:24:49.687: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:24:49.687: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:24:49.687: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:24:49.688: - to save password in plain text.
-2004-11-22 16:24:49.688: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:24:49.688: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:24:49.688: - to NOT display normal parse packets on console.
-2004-11-22 16:24:49.688: - to NOT display administration parse packets on console.
-2004-11-22 16:24:49.688: - to NOT display char-server parse packets on console.
-2004-11-22 16:24:49.688: - with no minimum level for connection.
-2004-11-22 16:24:49.688: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:24:49.688: - to create new accounts with an unlimited time.
-2004-11-22 16:24:49.688: - with control of players IP between login-server and char-server.
-2004-11-22 16:24:49.688: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:24:49.690: The LAN configuration of the server is set:
-2004-11-22 16:24:49.690: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:24:49.690: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:24:49.693: read_gm_account: file 'conf/GM_account.txt' readed (31 GM accounts found).
-2004-11-22 16:24:49.695: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:24:49.696: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:25:16.442: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:25:31.937: The login-server starting...
-2004-11-22 16:25:31.937: The configuration of the server is set:
-2004-11-22 16:25:31.937: - with a remote administration with the DEFAULT password.
-2004-11-22 16:25:31.937: - to accept any IP for remote administration
-2004-11-22 16:25:31.937: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:25:31.937: - to create GM with level '60' when @gm is used.
-2004-11-22 16:25:31.937: - to ALLOW new users (with _F/_M).
-2004-11-22 16:25:31.937: - with port: 6900.
-2004-11-22 16:25:31.937: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:25:31.937: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:25:31.938: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:25:31.938: - to save password in plain text.
-2004-11-22 16:25:31.938: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:25:31.938: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:25:31.938: - to NOT display normal parse packets on console.
-2004-11-22 16:25:31.938: - to NOT display administration parse packets on console.
-2004-11-22 16:25:31.938: - to NOT display char-server parse packets on console.
-2004-11-22 16:25:31.938: - with no minimum level for connection.
-2004-11-22 16:25:31.938: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:25:31.938: - to create new accounts with an unlimited time.
-2004-11-22 16:25:31.938: - with control of players IP between login-server and char-server.
-2004-11-22 16:25:31.939: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:25:31.940: The LAN configuration of the server is set:
-2004-11-22 16:25:31.940: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:25:31.940: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:25:31.941: read_gm_account: file 'conf/GM_account.txt' readed (1 GM accounts found).
-2004-11-22 16:25:31.943: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:25:31.944: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:26:01.966: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:26:41.090: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:28:11.125: The login-server starting...
-2004-11-22 16:28:11.125: The configuration of the server is set:
-2004-11-22 16:28:11.125: - with a remote administration with the DEFAULT password.
-2004-11-22 16:28:11.125: - to accept any IP for remote administration
-2004-11-22 16:28:11.125: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:28:11.125: - to create GM with level '60' when @gm is used.
-2004-11-22 16:28:11.125: - to ALLOW new users (with _F/_M).
-2004-11-22 16:28:11.125: - with port: 6900.
-2004-11-22 16:28:11.125: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:28:11.125: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:28:11.125: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:28:11.126: - to save password in plain text.
-2004-11-22 16:28:11.126: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:28:11.126: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:28:11.126: - to NOT display normal parse packets on console.
-2004-11-22 16:28:11.126: - to NOT display administration parse packets on console.
-2004-11-22 16:28:11.126: - to NOT display char-server parse packets on console.
-2004-11-22 16:28:11.126: - with no minimum level for connection.
-2004-11-22 16:28:11.126: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:28:11.126: - to create new accounts with an unlimited time.
-2004-11-22 16:28:11.127: - with control of players IP between login-server and char-server.
-2004-11-22 16:28:11.127: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:28:11.128: The LAN configuration of the server is set:
-2004-11-22 16:28:11.128: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:28:11.128: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:28:11.129: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:28:11.130: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:28:11.132: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:28:15.496: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:28:30.796: The login-server starting...
-2004-11-22 16:28:30.796: The configuration of the server is set:
-2004-11-22 16:28:30.796: - with a remote administration with the DEFAULT password.
-2004-11-22 16:28:30.796: - to accept any IP for remote administration
-2004-11-22 16:28:30.796: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:28:30.796: - to create GM with level '60' when @gm is used.
-2004-11-22 16:28:30.796: - to ALLOW new users (with _F/_M).
-2004-11-22 16:28:30.797: - with port: 6900.
-2004-11-22 16:28:30.797: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:28:30.797: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:28:30.797: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:28:30.797: - to save password in plain text.
-2004-11-22 16:28:30.797: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:28:30.797: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:28:30.797: - to NOT display normal parse packets on console.
-2004-11-22 16:28:30.797: - to NOT display administration parse packets on console.
-2004-11-22 16:28:30.797: - to NOT display char-server parse packets on console.
-2004-11-22 16:28:30.798: - with no minimum level for connection.
-2004-11-22 16:28:30.798: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:28:30.798: - to create new accounts with an unlimited time.
-2004-11-22 16:28:30.798: - with control of players IP between login-server and char-server.
-2004-11-22 16:28:30.798: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:28:30.799: The LAN configuration of the server is set:
-2004-11-22 16:28:30.799: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:28:30.799: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:28:30.800: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:28:30.802: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:28:30.802: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:28:43.187: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:28:44.203: The login-server starting...
-2004-11-22 16:28:44.203: The configuration of the server is set:
-2004-11-22 16:28:44.203: - with a remote administration with the DEFAULT password.
-2004-11-22 16:28:44.203: - to accept any IP for remote administration
-2004-11-22 16:28:44.203: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:28:44.203: - to create GM with level '60' when @gm is used.
-2004-11-22 16:28:44.203: - to ALLOW new users (with _F/_M).
-2004-11-22 16:28:44.203: - with port: 6900.
-2004-11-22 16:28:44.203: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:28:44.203: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:28:44.203: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:28:44.203: - to save password in plain text.
-2004-11-22 16:28:44.203: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:28:44.203: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:28:44.203: - to NOT display normal parse packets on console.
-2004-11-22 16:28:44.203: - to NOT display administration parse packets on console.
-2004-11-22 16:28:44.203: - to NOT display char-server parse packets on console.
-2004-11-22 16:28:44.204: - with no minimum level for connection.
-2004-11-22 16:28:44.204: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:28:44.204: - to create new accounts with an unlimited time.
-2004-11-22 16:28:44.204: - with control of players IP between login-server and char-server.
-2004-11-22 16:28:44.204: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:28:44.205: The LAN configuration of the server is set:
-2004-11-22 16:28:44.205: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:28:44.205: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:28:44.206: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:28:44.207: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:28:44.208: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:29:04.225: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:29:14.937: The login-server starting...
-2004-11-22 16:29:14.937: The configuration of the server is set:
-2004-11-22 16:29:14.937: - with a remote administration with the DEFAULT password.
-2004-11-22 16:29:14.937: - to accept any IP for remote administration
-2004-11-22 16:29:14.937: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:29:14.938: - to create GM with level '60' when @gm is used.
-2004-11-22 16:29:14.938: - to ALLOW new users (with _F/_M).
-2004-11-22 16:29:14.938: - with port: 6900.
-2004-11-22 16:29:14.938: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:29:14.938: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:29:14.938: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:29:14.938: - to save password in plain text.
-2004-11-22 16:29:14.938: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:29:14.938: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:29:14.938: - to NOT display normal parse packets on console.
-2004-11-22 16:29:14.938: - to NOT display administration parse packets on console.
-2004-11-22 16:29:14.939: - to NOT display char-server parse packets on console.
-2004-11-22 16:29:14.939: - with no minimum level for connection.
-2004-11-22 16:29:14.939: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:29:14.939: - to create new accounts with an unlimited time.
-2004-11-22 16:29:14.939: - with control of players IP between login-server and char-server.
-2004-11-22 16:29:14.939: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:29:14.940: The LAN configuration of the server is set:
-2004-11-22 16:29:14.940: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:29:14.940: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:29:14.941: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:29:14.943: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:29:14.943: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:29:29.945: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:30:59.120: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:31:14.921: The login-server starting...
-2004-11-22 16:31:14.921: The configuration of the server is set:
-2004-11-22 16:31:14.921: - with a remote administration with the DEFAULT password.
-2004-11-22 16:31:14.921: - to accept any IP for remote administration
-2004-11-22 16:31:14.921: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:31:14.921: - to create GM with level '60' when @gm is used.
-2004-11-22 16:31:14.921: - to ALLOW new users (with _F/_M).
-2004-11-22 16:31:14.921: - with port: 6900.
-2004-11-22 16:31:14.921: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:31:14.921: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:31:14.921: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:31:14.921: - to save password in plain text.
-2004-11-22 16:31:14.921: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:31:14.921: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:31:14.921: - to NOT display normal parse packets on console.
-2004-11-22 16:31:14.921: - to NOT display administration parse packets on console.
-2004-11-22 16:31:14.924: - to NOT display char-server parse packets on console.
-2004-11-22 16:31:14.924: - with no minimum level for connection.
-2004-11-22 16:31:14.924: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:31:14.924: - to create new accounts with an unlimited time.
-2004-11-22 16:31:14.924: - with control of players IP between login-server and char-server.
-2004-11-22 16:31:14.925: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:31:14.925: The LAN configuration of the server is set:
-2004-11-22 16:31:14.926: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:31:14.926: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:31:14.927: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:31:14.928: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:31:14.929: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:32:18.610: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:32:28.296: The login-server starting...
-2004-11-22 16:32:28.296: The configuration of the server is set:
-2004-11-22 16:32:28.296: - with a remote administration with the DEFAULT password.
-2004-11-22 16:32:28.296: - to accept any IP for remote administration
-2004-11-22 16:32:28.296: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:32:28.296: - to create GM with level '60' when @gm is used.
-2004-11-22 16:32:28.296: - to ALLOW new users (with _F/_M).
-2004-11-22 16:32:28.296: - with port: 6900.
-2004-11-22 16:32:28.296: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:32:28.296: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:32:28.296: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:32:28.296: - to save password in plain text.
-2004-11-22 16:32:28.296: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:32:28.297: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:32:28.297: - to NOT display normal parse packets on console.
-2004-11-22 16:32:28.297: - to NOT display administration parse packets on console.
-2004-11-22 16:32:28.297: - to NOT display char-server parse packets on console.
-2004-11-22 16:32:28.297: - with no minimum level for connection.
-2004-11-22 16:32:28.297: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:32:28.297: - to create new accounts with an unlimited time.
-2004-11-22 16:32:28.297: - with control of players IP between login-server and char-server.
-2004-11-22 16:32:28.297: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:32:28.298: The LAN configuration of the server is set:
-2004-11-22 16:32:28.298: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:32:28.298: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:32:28.300: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:32:28.326: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:32:28.327: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:33:10.263: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:33:24.218: The login-server starting...
-2004-11-22 16:33:24.219: The configuration of the server is set:
-2004-11-22 16:33:24.219: - with a remote administration with the DEFAULT password.
-2004-11-22 16:33:24.219: - to accept any IP for remote administration
-2004-11-22 16:33:24.219: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:33:24.219: - to create GM with level '60' when @gm is used.
-2004-11-22 16:33:24.219: - to ALLOW new users (with _F/_M).
-2004-11-22 16:33:24.219: - with port: 6900.
-2004-11-22 16:33:24.219: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:33:24.219: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:33:24.219: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:33:24.219: - to save password in plain text.
-2004-11-22 16:33:24.220: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:33:24.220: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:33:24.220: - to NOT display normal parse packets on console.
-2004-11-22 16:33:24.220: - to NOT display administration parse packets on console.
-2004-11-22 16:33:24.220: - to NOT display char-server parse packets on console.
-2004-11-22 16:33:24.220: - with no minimum level for connection.
-2004-11-22 16:33:24.220: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:33:24.221: - to create new accounts with an unlimited time.
-2004-11-22 16:33:24.221: - with control of players IP between login-server and char-server.
-2004-11-22 16:33:24.221: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:33:24.222: The LAN configuration of the server is set:
-2004-11-22 16:33:24.222: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:33:24.222: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:33:24.224: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:33:24.225: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:33:24.225: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:33:50.146: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:33:59.656: The login-server starting...
-2004-11-22 16:33:59.656: The configuration of the server is set:
-2004-11-22 16:33:59.656: - with a remote administration with the DEFAULT password.
-2004-11-22 16:33:59.656: - to accept any IP for remote administration
-2004-11-22 16:33:59.656: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:33:59.656: - to create GM with level '60' when @gm is used.
-2004-11-22 16:33:59.656: - to ALLOW new users (with _F/_M).
-2004-11-22 16:33:59.656: - with port: 6900.
-2004-11-22 16:33:59.656: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:33:59.657: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:33:59.657: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:33:59.657: - to save password in plain text.
-2004-11-22 16:33:59.657: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:33:59.657: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:33:59.658: - to NOT display normal parse packets on console.
-2004-11-22 16:33:59.658: - to NOT display administration parse packets on console.
-2004-11-22 16:33:59.658: - to NOT display char-server parse packets on console.
-2004-11-22 16:33:59.658: - with no minimum level for connection.
-2004-11-22 16:33:59.658: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:33:59.658: - to create new accounts with an unlimited time.
-2004-11-22 16:33:59.658: - with control of players IP between login-server and char-server.
-2004-11-22 16:33:59.658: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:33:59.659: The LAN configuration of the server is set:
-2004-11-22 16:33:59.659: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:33:59.659: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:33:59.661: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:33:59.664: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:33:59.665: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:35:28.708: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:35:40.015: The login-server starting...
-2004-11-22 16:35:40.015: The configuration of the server is set:
-2004-11-22 16:35:40.015: - with a remote administration with the DEFAULT password.
-2004-11-22 16:35:40.015: - to accept any IP for remote administration
-2004-11-22 16:35:40.015: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:35:40.015: - to create GM with level '60' when @gm is used.
-2004-11-22 16:35:40.015: - to ALLOW new users (with _F/_M).
-2004-11-22 16:35:40.016: - with port: 6900.
-2004-11-22 16:35:40.016: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:35:40.016: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:35:40.016: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:35:40.016: - to save password in plain text.
-2004-11-22 16:35:40.016: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:35:40.016: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:35:40.016: - to NOT display normal parse packets on console.
-2004-11-22 16:35:40.016: - to NOT display administration parse packets on console.
-2004-11-22 16:35:40.016: - to NOT display char-server parse packets on console.
-2004-11-22 16:35:40.016: - with no minimum level for connection.
-2004-11-22 16:35:40.016: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:35:40.017: - to create new accounts with an unlimited time.
-2004-11-22 16:35:40.017: - with control of players IP between login-server and char-server.
-2004-11-22 16:35:40.017: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:35:40.018: The LAN configuration of the server is set:
-2004-11-22 16:35:40.018: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:35:40.018: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:35:40.020: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:35:40.023: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:35:40.023: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:35:47.223: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:35:58.687: The login-server starting...
-2004-11-22 16:35:58.687: The configuration of the server is set:
-2004-11-22 16:35:58.687: - with a remote administration with the DEFAULT password.
-2004-11-22 16:35:58.687: - to accept any IP for remote administration
-2004-11-22 16:35:58.687: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:35:58.687: - to create GM with level '60' when @gm is used.
-2004-11-22 16:35:58.687: - to ALLOW new users (with _F/_M).
-2004-11-22 16:35:58.687: - with port: 6900.
-2004-11-22 16:35:58.687: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:35:58.687: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:35:58.687: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:35:58.687: - to save password in plain text.
-2004-11-22 16:35:58.687: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:35:58.687: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:35:58.687: - to NOT display normal parse packets on console.
-2004-11-22 16:35:58.687: - to NOT display administration parse packets on console.
-2004-11-22 16:35:58.688: - to NOT display char-server parse packets on console.
-2004-11-22 16:35:58.688: - with no minimum level for connection.
-2004-11-22 16:35:58.688: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:35:58.688: - to create new accounts with an unlimited time.
-2004-11-22 16:35:58.688: - with control of players IP between login-server and char-server.
-2004-11-22 16:35:58.688: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:35:58.689: The LAN configuration of the server is set:
-2004-11-22 16:35:58.689: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:35:58.689: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:35:58.691: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:35:58.692: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:35:58.692: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:38:44.359: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:39:28.375: The login-server starting...
-2004-11-22 16:39:28.375: The configuration of the server is set:
-2004-11-22 16:39:28.375: - with a remote administration with the DEFAULT password.
-2004-11-22 16:39:28.375: - to accept any IP for remote administration
-2004-11-22 16:39:28.375: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:39:28.375: - to create GM with level '60' when @gm is used.
-2004-11-22 16:39:28.375: - to ALLOW new users (with _F/_M).
-2004-11-22 16:39:28.375: - with port: 6900.
-2004-11-22 16:39:28.375: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:39:28.375: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:39:28.375: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:39:28.375: - to save password in plain text.
-2004-11-22 16:39:28.375: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:39:28.375: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:39:28.375: - to NOT display normal parse packets on console.
-2004-11-22 16:39:28.375: - to NOT display administration parse packets on console.
-2004-11-22 16:39:28.376: - to NOT display char-server parse packets on console.
-2004-11-22 16:39:28.376: - with no minimum level for connection.
-2004-11-22 16:39:28.376: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:39:28.376: - to create new accounts with an unlimited time.
-2004-11-22 16:39:28.376: - with control of players IP between login-server and char-server.
-2004-11-22 16:39:28.376: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:39:28.377: The LAN configuration of the server is set:
-2004-11-22 16:39:28.377: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:39:28.377: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:39:28.379: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:39:28.380: read_gm_account: file 'conf/GM_account.txt' readed (0 GM accounts found).
-2004-11-22 16:39:28.380: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:39:56.330: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:40:08.875: The login-server starting...
-2004-11-22 16:40:08.875: The configuration of the server is set:
-2004-11-22 16:40:08.875: - with a remote administration with the DEFAULT password.
-2004-11-22 16:40:08.875: - to accept any IP for remote administration
-2004-11-22 16:40:08.875: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:40:08.875: - to create GM with level '60' when @gm is used.
-2004-11-22 16:40:08.875: - to ALLOW new users (with _F/_M).
-2004-11-22 16:40:08.875: - with port: 6900.
-2004-11-22 16:40:08.875: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:40:08.876: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:40:08.876: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:40:08.876: - to save password in plain text.
-2004-11-22 16:40:08.876: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:40:08.876: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:40:08.876: - to NOT display normal parse packets on console.
-2004-11-22 16:40:08.876: - to NOT display administration parse packets on console.
-2004-11-22 16:40:08.876: - to NOT display char-server parse packets on console.
-2004-11-22 16:40:08.876: - with no minimum level for connection.
-2004-11-22 16:40:08.876: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:40:08.880: - to create new accounts with an unlimited time.
-2004-11-22 16:40:08.880: - with control of players IP between login-server and char-server.
-2004-11-22 16:40:08.880: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:40:08.881: The LAN configuration of the server is set:
-2004-11-22 16:40:08.881: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:40:08.881: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:40:08.883: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:40:08.883: read_gm_account: file 'conf/GM_account.txt' readed (4 GM accounts found).
-2004-11-22 16:40:08.884: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:40:38.885: read_gm_account: file 'conf/GM_account.txt' readed (5 GM accounts found).
-2004-11-22 16:40:53.886: read_gm_account: file 'conf/GM_account.txt' readed (5 GM accounts found).
-2004-11-22 16:41:04.862: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:46:56.640: The login-server starting...
-2004-11-22 16:46:56.640: The configuration of the server is set:
-2004-11-22 16:46:56.640: - with a remote administration with the DEFAULT password.
-2004-11-22 16:46:56.640: - to accept any IP for remote administration
-2004-11-22 16:46:56.640: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:46:56.640: - to create GM with level '60' when @gm is used.
-2004-11-22 16:46:56.640: - to ALLOW new users (with _F/_M).
-2004-11-22 16:46:56.640: - with port: 6900.
-2004-11-22 16:46:56.640: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:46:56.640: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:46:56.641: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:46:56.641: - to save password in plain text.
-2004-11-22 16:46:56.641: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:46:56.641: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:46:56.641: - to NOT display normal parse packets on console.
-2004-11-22 16:46:56.641: - to NOT display administration parse packets on console.
-2004-11-22 16:46:56.641: - to NOT display char-server parse packets on console.
-2004-11-22 16:46:56.641: - with no minimum level for connection.
-2004-11-22 16:46:56.641: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:46:56.641: - to create new accounts with an unlimited time.
-2004-11-22 16:46:56.641: - with control of players IP between login-server and char-server.
-2004-11-22 16:46:56.641: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:46:56.642: The LAN configuration of the server is set:
-2004-11-22 16:46:56.642: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:46:56.644: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:46:56.646: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:46:56.646: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 16:46:56.647: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:47:35.910: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:49:45.093: The login-server starting...
-2004-11-22 16:49:45.093: The configuration of the server is set:
-2004-11-22 16:49:45.093: - with a remote administration with the DEFAULT password.
-2004-11-22 16:49:45.093: - to accept any IP for remote administration
-2004-11-22 16:49:45.093: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:49:45.093: - to create GM with level '60' when @gm is used.
-2004-11-22 16:49:45.093: - to ALLOW new users (with _F/_M).
-2004-11-22 16:49:45.094: - with port: 6900.
-2004-11-22 16:49:45.094: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:49:45.094: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:49:45.094: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:49:45.094: - to save password in plain text.
-2004-11-22 16:49:45.094: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:49:45.094: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:49:45.094: - to NOT display normal parse packets on console.
-2004-11-22 16:49:45.094: - to NOT display administration parse packets on console.
-2004-11-22 16:49:45.094: - to NOT display char-server parse packets on console.
-2004-11-22 16:49:45.094: - with no minimum level for connection.
-2004-11-22 16:49:45.095: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:49:45.095: - to create new accounts with an unlimited time.
-2004-11-22 16:49:45.095: - with control of players IP between login-server and char-server.
-2004-11-22 16:49:45.095: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:49:45.096: The LAN configuration of the server is set:
-2004-11-22 16:49:45.096: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:49:45.096: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:49:45.098: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:49:45.099: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 16:49:45.099: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:49:53.290: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:59:30.671: The login-server starting...
-2004-11-22 16:59:30.671: The configuration of the server is set:
-2004-11-22 16:59:30.671: - with a remote administration with the DEFAULT password.
-2004-11-22 16:59:30.671: - to accept any IP for remote administration
-2004-11-22 16:59:30.671: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:59:30.671: - to create GM with level '60' when @gm is used.
-2004-11-22 16:59:30.672: - to ALLOW new users (with _F/_M).
-2004-11-22 16:59:30.672: - with port: 6900.
-2004-11-22 16:59:30.672: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:59:30.672: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:59:30.672: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:59:30.672: - to save password in plain text.
-2004-11-22 16:59:30.672: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:59:30.672: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:59:30.672: - to NOT display normal parse packets on console.
-2004-11-22 16:59:30.672: - to NOT display administration parse packets on console.
-2004-11-22 16:59:30.672: - to NOT display char-server parse packets on console.
-2004-11-22 16:59:30.673: - with no minimum level for connection.
-2004-11-22 16:59:30.673: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:59:30.673: - to create new accounts with an unlimited time.
-2004-11-22 16:59:30.673: - with control of players IP between login-server and char-server.
-2004-11-22 16:59:30.673: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:59:30.674: The LAN configuration of the server is set:
-2004-11-22 16:59:30.674: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:59:30.674: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:59:30.676: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:59:30.677: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 16:59:30.677: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 16:59:57.602: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 16:59:58.406: The login-server starting...
-2004-11-22 16:59:58.406: The configuration of the server is set:
-2004-11-22 16:59:58.406: - with a remote administration with the DEFAULT password.
-2004-11-22 16:59:58.406: - to accept any IP for remote administration
-2004-11-22 16:59:58.406: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 16:59:58.406: - to create GM with level '60' when @gm is used.
-2004-11-22 16:59:58.406: - to ALLOW new users (with _F/_M).
-2004-11-22 16:59:58.406: - with port: 6900.
-2004-11-22 16:59:58.406: - with the accounts file name: 'save/account.txt'.
-2004-11-22 16:59:58.406: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 16:59:58.406: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 16:59:58.406: - to save password in plain text.
-2004-11-22 16:59:58.406: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 16:59:58.407: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 16:59:58.407: - to NOT display normal parse packets on console.
-2004-11-22 16:59:58.407: - to NOT display administration parse packets on console.
-2004-11-22 16:59:58.407: - to NOT display char-server parse packets on console.
-2004-11-22 16:59:58.407: - with no minimum level for connection.
-2004-11-22 16:59:58.407: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 16:59:58.407: - to create new accounts with an unlimited time.
-2004-11-22 16:59:58.407: - with control of players IP between login-server and char-server.
-2004-11-22 16:59:58.407: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 16:59:58.408: The LAN configuration of the server is set:
-2004-11-22 16:59:58.408: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 16:59:58.408: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 16:59:58.410: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 16:59:58.411: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 16:59:58.411: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 17:00:08.573: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 17:00:15.828: The login-server starting...
-2004-11-22 17:00:15.828: The configuration of the server is set:
-2004-11-22 17:00:15.828: - with a remote administration with the DEFAULT password.
-2004-11-22 17:00:15.828: - to accept any IP for remote administration
-2004-11-22 17:00:15.828: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 17:00:15.828: - to create GM with level '60' when @gm is used.
-2004-11-22 17:00:15.828: - to ALLOW new users (with _F/_M).
-2004-11-22 17:00:15.828: - with port: 6900.
-2004-11-22 17:00:15.829: - with the accounts file name: 'save/account.txt'.
-2004-11-22 17:00:15.829: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 17:00:15.829: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 17:00:15.829: - to save password in plain text.
-2004-11-22 17:00:15.829: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 17:00:15.829: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 17:00:15.829: - to NOT display normal parse packets on console.
-2004-11-22 17:00:15.829: - to NOT display administration parse packets on console.
-2004-11-22 17:00:15.829: - to NOT display char-server parse packets on console.
-2004-11-22 17:00:15.829: - with no minimum level for connection.
-2004-11-22 17:00:15.829: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 17:00:15.830: - to create new accounts with an unlimited time.
-2004-11-22 17:00:15.830: - with control of players IP between login-server and char-server.
-2004-11-22 17:00:15.830: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 17:00:15.831: The LAN configuration of the server is set:
-2004-11-22 17:00:15.831: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 17:00:15.831: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 17:00:15.833: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 17:00:15.833: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 17:00:15.836: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 17:01:00.838: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 17:01:15.839: read_gm_account: file 'conf/GM_account.txt' read (3 GM accounts found).
-2004-11-22 17:02:19.056: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 17:05:21.062: The login-server starting...
-2004-11-22 17:05:21.062: The configuration of the server is set:
-2004-11-22 17:05:21.062: - with a remote administration with the DEFAULT password.
-2004-11-22 17:05:21.062: - to accept any IP for remote administration
-2004-11-22 17:05:21.062: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 17:05:21.062: - to create GM with level '60' when @gm is used.
-2004-11-22 17:05:21.062: - to ALLOW new users (with _F/_M).
-2004-11-22 17:05:21.062: - with port: 6900.
-2004-11-22 17:05:21.062: - with the accounts file name: 'save/account.txt'.
-2004-11-22 17:05:21.062: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 17:05:21.062: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 17:05:21.062: - to save password in plain text.
-2004-11-22 17:05:21.062: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 17:05:21.062: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 17:05:21.063: - to NOT display normal parse packets on console.
-2004-11-22 17:05:21.063: - to NOT display administration parse packets on console.
-2004-11-22 17:05:21.063: - to NOT display char-server parse packets on console.
-2004-11-22 17:05:21.063: - with no minimum level for connection.
-2004-11-22 17:05:21.063: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 17:05:21.063: - to create new accounts with an unlimited time.
-2004-11-22 17:05:21.063: - with control of players IP between login-server and char-server.
-2004-11-22 17:05:21.063: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 17:05:21.066: The LAN configuration of the server is set:
-2004-11-22 17:05:21.066: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 17:05:21.066: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 17:05:21.069: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 17:05:21.070: read_gm_account: file 'conf/GM_account.txt' read (3 GM accounts found).
-2004-11-22 17:05:21.071: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 17:05:36.072: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 17:06:37.114: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 20:36:06.421: The login-server starting...
-2004-11-22 20:36:06.610: The configuration of the server is set:
-2004-11-22 20:36:06.611: - with a remote administration with the DEFAULT password.
-2004-11-22 20:36:06.611: - to accept any IP for remote administration
-2004-11-22 20:36:06.611: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 20:36:06.612: - to create GM with level '60' when @gm is used.
-2004-11-22 20:36:06.612: - to ALLOW new users (with _F/_M).
-2004-11-22 20:36:06.612: - with port: 6900.
-2004-11-22 20:36:06.613: - with the accounts file name: 'save/account.txt'.
-2004-11-22 20:36:06.613: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 20:36:06.613: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 20:36:06.614: - to save password in plain text.
-2004-11-22 20:36:06.614: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 20:36:06.614: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 20:36:06.615: - to NOT display normal parse packets on console.
-2004-11-22 20:36:06.615: - to NOT display administration parse packets on console.
-2004-11-22 20:36:06.615: - to NOT display char-server parse packets on console.
-2004-11-22 20:36:06.616: - with no minimum level for connection.
-2004-11-22 20:36:06.616: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 20:36:06.616: - to create new accounts with an unlimited time.
-2004-11-22 20:36:06.617: - with control of players IP between login-server and char-server.
-2004-11-22 20:36:06.617: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 20:36:06.619: The LAN configuration of the server is set:
-2004-11-22 20:36:06.619: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 20:36:06.619: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 20:36:06.621: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 20:36:06.623: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 20:36:06.629: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 20:36:08.997: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-22 20:36:08.997: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-22 20:36:09.029: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-22 20:36:15.153: ----End of login-server (normal end with closing of all files).
-
-2004-11-22 20:52:21.984: The login-server starting...
-2004-11-22 20:52:21.984: The configuration of the server is set:
-2004-11-22 20:52:21.984: - with a remote administration with the DEFAULT password.
-2004-11-22 20:52:21.984: - to accept any IP for remote administration
-2004-11-22 20:52:21.985: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 20:52:21.985: - to create GM with level '60' when @gm is used.
-2004-11-22 20:52:21.985: - to ALLOW new users (with _F/_M).
-2004-11-22 20:52:21.986: - with port: 6900.
-2004-11-22 20:52:21.986: - with the accounts file name: 'save/account.txt'.
-2004-11-22 20:52:21.986: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 20:52:21.987: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 20:52:21.987: - to save password in plain text.
-2004-11-22 20:52:21.987: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 20:52:21.988: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 20:52:21.988: - to NOT display normal parse packets on console.
-2004-11-22 20:52:21.988: - to NOT display administration parse packets on console.
-2004-11-22 20:52:21.989: - to NOT display char-server parse packets on console.
-2004-11-22 20:52:21.990: - with no minimum level for connection.
-2004-11-22 20:52:21.990: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 20:52:21.990: - to create new accounts with an unlimited time.
-2004-11-22 20:52:21.991: - with control of players IP between login-server and char-server.
-2004-11-22 20:52:21.991: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 20:52:21.992: The LAN configuration of the server is set:
-2004-11-22 20:52:21.993: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 20:52:21.993: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 20:52:21.995: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 20:52:21.996: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 20:52:22.001: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 20:52:24.192: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-22 20:52:24.192: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-22 20:52:24.195: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-22 20:53:16.333: Request for connection (non encryption mode) of mc_cameri (ip: 127.0.0.1).
-2004-11-22 20:53:16.334: Authentification accepted (account: mc_cameri (id: 2000003), ip: 127.0.0.1)
-2004-11-22 20:53:16.789: Char-server 'eAthena': authentification of the account 2000003 accepted (ip: 127.0.0.1).
-2004-11-22 20:54:23.395: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 20:54:23.395: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 20:54:23.817: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 20:55:45.446: Request for connection (non encryption mode) of mc_cameri (ip: 127.0.0.1).
-2004-11-22 20:55:45.446: Authentification accepted (account: mc_cameri (id: 2000003), ip: 127.0.0.1)
-2004-11-22 20:55:46.254: Char-server 'eAthena': authentification of the account 2000003 accepted (ip: 127.0.0.1).
-
-2004-11-22 22:01:42.625: The login-server starting...
-2004-11-22 22:01:42.625: The configuration of the server is set:
-2004-11-22 22:01:42.626: - with a remote administration with the DEFAULT password.
-2004-11-22 22:01:42.626: - to accept any IP for remote administration
-2004-11-22 22:01:42.626: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 22:01:42.627: - to create GM with level '60' when @gm is used.
-2004-11-22 22:01:42.627: - to ALLOW new users (with _F/_M).
-2004-11-22 22:01:42.628: - with port: 6900.
-2004-11-22 22:01:42.628: - with the accounts file name: 'save/account.txt'.
-2004-11-22 22:01:42.628: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 22:01:42.629: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 22:01:42.629: - to save password in plain text.
-2004-11-22 22:01:42.630: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 22:01:42.630: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 22:01:42.631: - to NOT display normal parse packets on console.
-2004-11-22 22:01:42.631: - to NOT display administration parse packets on console.
-2004-11-22 22:01:42.632: - to NOT display char-server parse packets on console.
-2004-11-22 22:01:42.632: - with no minimum level for connection.
-2004-11-22 22:01:42.633: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 22:01:42.633: - to create new accounts with an unlimited time.
-2004-11-22 22:01:42.634: - with control of players IP between login-server and char-server.
-2004-11-22 22:01:42.634: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 22:01:42.657: The LAN configuration of the server is set:
-2004-11-22 22:01:42.658: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 22:01:42.660: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 22:01:42.673: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 22:01:42.676: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 22:01:42.693: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 22:01:43.166: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-22 22:01:43.166: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-22 22:01:43.197: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-22 22:03:00.896: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 22:03:00.897: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 22:03:01.296: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 22:03:26.445: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-
-2004-11-22 22:27:29.125: The login-server starting...
-2004-11-22 22:27:29.125: The configuration of the server is set:
-2004-11-22 22:27:29.125: - with a remote administration with the DEFAULT password.
-2004-11-22 22:27:29.125: - to accept any IP for remote administration
-2004-11-22 22:27:29.125: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-22 22:27:29.125: - to create GM with level '60' when @gm is used.
-2004-11-22 22:27:29.125: - to ALLOW new users (with _F/_M).
-2004-11-22 22:27:29.125: - with port: 6900.
-2004-11-22 22:27:29.125: - with the accounts file name: 'save/account.txt'.
-2004-11-22 22:27:29.125: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-22 22:27:29.125: - to check GM accounts file modifications every 15 seconds.
-2004-11-22 22:27:29.125: - to save password in plain text.
-2004-11-22 22:27:29.125: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-22 22:27:29.125: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-22 22:27:29.125: - to NOT display normal parse packets on console.
-2004-11-22 22:27:29.125: - to NOT display administration parse packets on console.
-2004-11-22 22:27:29.125: - to NOT display char-server parse packets on console.
-2004-11-22 22:27:29.125: - with no minimum level for connection.
-2004-11-22 22:27:29.140: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-22 22:27:29.156: - to create new accounts with an unlimited time.
-2004-11-22 22:27:29.156: - with control of players IP between login-server and char-server.
-2004-11-22 22:27:29.156: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-22 22:27:29.158: The LAN configuration of the server is set:
-2004-11-22 22:27:29.158: - with LAN IP of char-server: 127.0.0.1.
-2004-11-22 22:27:29.159: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-22 22:27:29.161: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-22 22:27:29.162: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-22 22:27:29.166: The login-server is ready (Server is listening on the port 6900).
-2004-11-22 22:27:31.643: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-22 22:27:31.643: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-22 22:27:31.681: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-22 22:30:07.826: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 22:30:07.826: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 22:30:08.199: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 22:31:24.025: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-22 22:33:12.795: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 22:33:12.795: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 22:33:13.137: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 22:36:43.335: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 22:36:43.336: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 22:36:43.935: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 22:37:54.649: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-22 22:41:38.501: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 22:41:38.502: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 22:41:38.868: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 22:44:24.741: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-22 22:46:32.210: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 22:46:32.210: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 22:46:32.541: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 22:48:59.253: Request for connection (non encryption mode) of cameri (ip: 127.0.0.1).
-2004-11-22 22:48:59.254: Authentification accepted (account: cameri (id: 2000002), ip: 127.0.0.1)
-2004-11-22 22:48:59.630: Char-server 'eAthena': authentification of the account 2000002 accepted (ip: 127.0.0.1).
-2004-11-22 22:50:24.467: Char-server 'eAthena': e-mail of the account 2000002 found (ip: 127.0.0.1).
-2004-11-22 22:55:38.701: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
-
-2004-11-24 18:55:47.578: The login-server starting...
-2004-11-24 18:55:47.578: The configuration of the server is set:
-2004-11-24 18:55:47.579: - with a remote administration with the DEFAULT password.
-2004-11-24 18:55:47.579: - to accept any IP for remote administration
-2004-11-24 18:55:47.579: - with the DEFAULT 'To GM become' password (gm_pass).
-2004-11-24 18:55:47.580: - to create GM with level '60' when @gm is used.
-2004-11-24 18:55:47.580: - to ALLOW new users (with _F/_M).
-2004-11-24 18:55:47.581: - with port: 6900.
-2004-11-24 18:55:47.581: - with the accounts file name: 'save/account.txt'.
-2004-11-24 18:55:47.581: - with the GM accounts file name: 'conf/GM_account.txt'.
-2004-11-24 18:55:47.582: - to check GM accounts file modifications every 15 seconds.
-2004-11-24 18:55:47.582: - to save password in plain text.
-2004-11-24 18:55:47.582: - with the unknown packets file name: 'log/login_unknown_packets.log'.
-2004-11-24 18:55:47.583: - to SAVE only unkown packets sending by a char-server or a remote administration.
-2004-11-24 18:55:47.583: - to NOT display normal parse packets on console.
-2004-11-24 18:55:47.583: - to NOT display administration parse packets on console.
-2004-11-24 18:55:47.584: - to NOT display char-server parse packets on console.
-2004-11-24 18:55:47.584: - with no minimum level for connection.
-2004-11-24 18:55:47.584: - to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.
-2004-11-24 18:55:47.585: - to create new accounts with an unlimited time.
-2004-11-24 18:55:47.585: - with control of players IP between login-server and char-server.
-2004-11-24 18:55:47.585: - with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.
-2004-11-24 18:55:47.587: The LAN configuration of the server is set:
-2004-11-24 18:55:47.587: - with LAN IP of char-server: 127.0.0.1.
-2004-11-24 18:55:47.588: - with the sub-network of the char-server: 127.0.0.1/255.255.255.255.
-2004-11-24 18:55:47.590: 10 accounts read in save/account.txt, of which is no GM account and 5 server accounts ('S').
-2004-11-24 18:55:47.591: read_gm_account: file 'conf/GM_account.txt' read (5 GM accounts found).
-2004-11-24 18:55:47.596: The login-server is ready (Server is listening on the port 6900).
-2004-11-24 18:55:49.624: Connection request of the char-server 'eAthena' @ 127.0.0.1:6121 (ip: 127.0.0.1)
-2004-11-24 18:55:49.625: Authentification accepted (account: s1 (id: 0), ip: 127.0.0.1)
-2004-11-24 18:55:49.631: Connection of the char-server 'eAthena' accepted (account: s1, pass: p1, ip: 127.0.0.1)
-2004-11-24 18:58:04.449: Char-server 'eAthena' has disconnected (ip: 127.0.0.1).
diff --git a/log/mvplog.log b/log/mvplog.log
deleted file mode 100644
index e69de29bb..000000000
--- a/log/mvplog.log
+++ /dev/null
diff --git a/log/presentlog.log b/log/presentlog.log
deleted file mode 100644
index e69de29bb..000000000
--- a/log/presentlog.log
+++ /dev/null
diff --git a/log/producelog.log b/log/producelog.log
deleted file mode 100644
index e69de29bb..000000000
--- a/log/producelog.log
+++ /dev/null
diff --git a/log/refinelog.log b/log/refinelog.log
deleted file mode 100644
index e69de29bb..000000000
--- a/log/refinelog.log
+++ /dev/null
diff --git a/log/tradelog.log b/log/tradelog.log
deleted file mode 100644
index e69de29bb..000000000
--- a/log/tradelog.log
+++ /dev/null
diff --git a/log/vendlog.log b/log/vendlog.log
deleted file mode 100644
index e69de29bb..000000000
--- a/log/vendlog.log
+++ /dev/null
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index 0e066706a..14fa153e7 100644
--- a/npc/Changelog.txt
+++ b/npc/Changelog.txt
@@ -9,23 +9,21 @@ Darkchild
* Monk Quest - Botting An Acolyte Atm
Lupus
* looking for exploits, optimization, bugs hunt
-
+ * Adding new cards, checking/adding mobs/items
kobra_k88
* Optimize WoE
-Aria
- * Debugging/Overlooking NPCs.
- * Making misc npcs
- * Making the "Dev edition" npcs =D - 80% - Final layout finished, need more devs to put their quotes in.
Shinigami
* Organizing/Optmizing/Checking for Typo in all NPCs.
Mass Zero
* Novice Training Ground.
* (Probably unofficial) Lou Yang NPC's, mobs, etc...
-Shadowlady
- * Marriage (Fix, optimization) ?%
-
MC Cameri
* Bank NPC - Now 100% done for new payon
+ * Warper NPC - 100%, fixed memory consumption problem
+ * Heal NPC - 100%
+DracoRPG
+ * New Novice Training Grounds - In progress with Riotblade's help
+ * Towns Message Boards - Recruited Riotblade to work on them ^^
Other Ppl
* Their Work?
@@ -34,15 +32,194 @@ Other Ppl
Date Added
======
-12/18
- * Readded my own npc [Aria]
-11/27
- * Added some Lou Yang NPC's [Mass Zero]
+
+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.
+
+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
diff --git a/npc/cities/alberta.txt b/npc/cities/alberta.txt
index bc1ac9be5..4d2be5730 100644
--- a/npc/cities/alberta.txt
+++ b/npc/cities/alberta.txt
@@ -202,8 +202,7 @@ alberta.gat,131,139,4 script Drunken old man 709,{
}
// Soda Man ----------------------------------------------------
-alberta.gat,90,71,3 script Soda Man 89,
-{
+alberta.gat,90,71,3 script Soda Man 89,{
mes "[Soda Man]";
mes "Ummm.... delicious....";
emotion 33;
@@ -362,8 +361,7 @@ alb2trea.gat,39,50,5 script Sailor 100,{
//<====================================================== Turtle Island ========================================================>\\
// Gotanblue --------------------------------------------------------------------------
-alberta.gat,247,123,5 script Gotanblue 709,
-{
+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....";
@@ -533,8 +531,7 @@ M_Menu:
}
// Turtle Grandpa -------------------------------------------------------------------
-alberta_in.gat,23,104,2 script Turtle Grandpa 120,
-{
+alberta_in.gat,23,104,2 script Turtle Grandpa 120,{
mes "[Turtle Grandpa]";
mes "~Buuurrrpp!!!~ Oops...";
emotion 4;
@@ -646,8 +643,7 @@ alberta_in.gat,23,104,2 script Turtle Grandpa 120,
}
// Letter of an explorer (on Turtle Grandpa's desk)------------------------------------------------------------------
-alberta_in.gat,17,101,1 script Letter of an explorer 111,
-{
+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 expidition to Turtle Island has failed. Please inform the others...";
@@ -670,8 +666,7 @@ alberta_in.gat,17,101,1 script Letter of an explorer 111,
}
// Jornadan Niliria ------------------------------------------------------------------------
-alberta.gat,248,90,1 script Jornadan Niliria 121,
-{
+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....";
@@ -729,8 +724,7 @@ alberta.gat,248,90,1 script Jornadan Niliria 121,
}
// Jornadan's Voyage Log -------------------------------------------------
-alberta.gat,247,93,1 script A Voyage Log 111,
-{
+alberta.gat,247,93,1 script A Voyage Log 111,{
if(JORNADAN == 1) goto L_Treasure;
mes "[A Voyage Log]";
mes "= 03:20 am =";
@@ -852,8 +846,7 @@ L_Treasure:
}
// Burried treasure --------------------------------------------------------------------
-turn_dun01,160,80,1 script Skull Stone 111,
-{
+turn_dun01,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;
diff --git a/npc/cities/aldebaran.txt b/npc/cities/aldebaran.txt
index 450e99ed3..18200e2b5 100644
--- a/npc/cities/aldebaran.txt
+++ b/npc/cities/aldebaran.txt
@@ -670,8 +670,7 @@ aldeba_in.gat,156,179,4 script Master 61,{
}
// RS125 ------------------------------------------------------------------------
-aldeba_in.gat,234,241,4 script RS125 48,
-{
+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.";
@@ -834,8 +833,7 @@ aldeba_in.gat,24,245,4 script Kafra Jasmine 115,{
}
// Special Reserve ----------------------------------------------
-aldeba_in.gat,79,161,6 script Kafra 115,
-{
+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 usefull items and cool prizes.";
@@ -1022,8 +1020,7 @@ M_Menu:
}
// Special Reserve 2 ----------------------------------------------
-aldeba_in.gat,88,161,3 script Kafra 115,
-{
+aldeba_in.gat,88,161,3 script Kafra 115,{
cutin "kafra_03",2;
mes "[Kafra]";
mes "Hello and welcome to the Kafra Corp. Main office.";
diff --git a/npc/cities/comodo.txt b/npc/cities/comodo.txt
index ed7dd3700..2c14e3e48 100644
--- a/npc/cities/comodo.txt
+++ b/npc/cities/comodo.txt
@@ -255,8 +255,7 @@ cmd_in02.gat,48,55,4 script Scoursege 51,{
// Chief Quest (Doomed Swords Part 1)
//============================================================================//
//=======================================================
-comodo.gat,206,310,4 script Rochito 48,
-{
+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;
@@ -385,8 +384,7 @@ L_3:
}
//=======================================================
-comodo.gat,204,310,4 script Rockha 98,
-{
+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:
@@ -439,8 +437,7 @@ L_2:
}
//=======================================================
-comodo.gat,209,314,4 script Rotute 82,
-{
+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;
@@ -556,8 +553,7 @@ comodo.gat,209,305,4 script Emralhandas 70,{
// Chief's House =========================================================//
-cmd_in02.gat,32,140,4 script Chief Tausupa 49,
-{
+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;
@@ -671,8 +667,7 @@ L_2:
//============================================================================//
//=======================================================
-comodo.gat,88,97,4 script Cheese Expert TORUNA 109,
-{
+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. Everytime I come here to visit, I ask for some of that popular cheese.";
@@ -761,8 +756,7 @@ M_Menu:
}
//=======================================================
-comodo.gat,164,291,2 script Rakusa 73,
-{
+comodo.gat,164,291,2 script Rakusa 73,{
if(dmdswrd_Q == 7) goto L_1;
if(dmdswrd_Q == 8) goto L_2;
@@ -794,8 +788,7 @@ L_2:
}
//=======================================================
-comodo.gat,169,284,4 script Kichiri 99,
-{
+comodo.gat,169,284,4 script Kichiri 99,{
mes "[Kichiri]";
if(dmdswrd_Q == 8) goto L_1;
if(dmdswrd_Q == 9) goto L_2;
@@ -823,8 +816,7 @@ L_2:
}
//=======================================================
-comodo.gat,163,280,4 script Magatu 55,
-{
+comodo.gat,163,280,4 script Magatu 55,{
mes "[Magatu]";
if(dmdswrd_Q == 9) goto L_1;
if(dmdswrd_Q == 10) goto L_2;
@@ -918,8 +910,7 @@ L_2:
}
//=======================================================
-comodo.gat,187,153,4 script Hullaris 701,
-{
+comodo.gat,187,153,4 script Hullaris 701,{
mes "[Hullaris]";
if(dmdswrd_Q == 11) goto L_1;
if(dmdswrd_Q == 12) goto L_2;
diff --git a/npc/cities/geffen.txt b/npc/cities/geffen.txt
index 4f8c32f3b..615f6a806 100644
--- a/npc/cities/geffen.txt
+++ b/npc/cities/geffen.txt
@@ -109,8 +109,7 @@ geffen_in.gat,34,170,0 script "Young man" 47,{
//<============================================ Inn =====================================================>\\
// Waitress ---------------------------------------------------------------------------
-geffen_in.gat,70,67,5 script Waitress 80,
-{
+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!... everytime he drinks... he gets like that! Ugh!!";
@@ -160,8 +159,7 @@ M_Menu:
}
// Merhcant Daven -------------------------------------------------------------------
-geffen_in.gat,79,75,2 script Merchant Daven 61,
-{
+geffen_in.gat,79,75,2 script Merchant Daven 61,{
mes "[Merchant Daven]";
mes "Back in the day when I frist came to Geffen, the town was a very boring place to live in.";
next;
@@ -223,8 +221,7 @@ M_Menu:
}
// Drunkard -------------------------------------------------------------------
-geffen_in.gat,59,62,2 script Drunkard 120,
-{
+geffen_in.gat,59,62,2 script Drunkard 120,{
mes "[Drunkard]";
mes "Hmm... You're Joshua's friend too??";
next;
@@ -258,8 +255,7 @@ geffen_in.gat,59,62,2 script Drunkard 120,
}
// Schubaltzwald Merchant ----------------------------------------------------------------------
-geffen_in.gat,113,73,4 script Schubaltzwald Merchant 709,
-{
+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;
@@ -286,8 +282,7 @@ geffen_in.gat,113,73,4 script Schubaltzwald Merchant 709,
//<============================================== Pub ==================================================>\\
// Waitress -----------------------------------------------------------------
-geffen_in.gat,28,134,4 script Waitress 69,
-{
+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;
@@ -327,8 +322,7 @@ M_Menu:
}
// Drunkard ----------------------------------------------------------------------------
-geffen_in.gat,21,125,5 script Drunkard 52,
-{
+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;
@@ -336,8 +330,7 @@ geffen_in.gat,21,125,5 script Drunkard 52,
}
// Friend of Youth -----------------------------------------------------------------
-geffen_in.gat,37,124,5 script Friend of Youth 704,
-{
+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!";
diff --git a/npc/cities/morocc.txt b/npc/cities/morocc.txt
index 409ed7330..33f3eca14 100644
--- a/npc/cities/morocc.txt
+++ b/npc/cities/morocc.txt
@@ -388,8 +388,7 @@ moc_fild16.gat,199,212,4 script Hashisid 48,{
// Assassin Guild Guards
//===================================================
-moc_fild16.gat,195,281,4 script Assassin Guardian#1::SinGuard 707,
-{
+moc_fild16.gat,195,281,4 script Assassin Guardian#1::SinGuard 707,{
mes "[Assassin Guardian]";
if(Class == Job_Assassin) mes "Welcome.";
if(Class == Job_Assassin) close;
diff --git a/npc/cities/payon.txt b/npc/cities/payon.txt
index 6e0008ed5..526f1239b 100644
--- a/npc/cities/payon.txt
+++ b/npc/cities/payon.txt
@@ -1,18 +1,20 @@
//===== eAthena Script =======================================
//= Payon City
//===== By: ==================================================
-//= Muad Dib (1.0)
-//= Darkchild (1.1)
-//= Muad Dib (1.2)
-//= Darkchild (1.3)
+//= Muad Dib (1.0) Darkchild (1.1) Muad Dib (1.2)
+//= Darkchild (1.3) DracoRPG (1.5)
//===== Current Version: =====================================
-//= 1.3
+//= 1.5b
//===== 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]
//============================================================
payon.gat,190,115,0 script Lady 90,{
@@ -51,7 +53,7 @@ payon_in01.gat,177,91,5 script Young Man 88,{
close;
}
-payon.gat,104,62,5 script Young Man 88,{
+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;
@@ -70,7 +72,7 @@ payon.gat,104,62,5 script Young Man 88,{
close;
}
-payon_in01.gat,180,7,0 script Waitress 90,{
+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 feell so melancholy and bored.";
@@ -82,23 +84,25 @@ payon_in01.gat,180,7,0 script Waitress 90,{
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?";
- check Gender = 1,-,LStartF;
- mes "[Waitress]";
- mes "Hello, mister?";
+ 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 managable life everyday!!";
mes "Oh..boy. What a dumb wishy-washy person I am.";
- emotion 6;
+ 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 misbehaviour.";
- emotion 4;
+ emotion 4;
next;
mes "[Waitress]";
mes "So, how may I help you? ";
@@ -124,7 +128,7 @@ L_Menu2:
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 "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:
@@ -147,7 +151,7 @@ L_Menu4:
close;
}
-payon.gat,193,116,1 script Woman 66,{
+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;
@@ -165,16 +169,18 @@ payon.gat,193,116,1 script Woman 66,{
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;
+ 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~";
@@ -214,12 +220,14 @@ payon.gat,190,119,5 script Woman 66,{
mes "Anyway, you look like a new face. Are you new in town?";
next;
mes "[Jim's Mother]";
- if(Sex == 0) goto LStartF;
+ 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;
+ 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:
@@ -336,7 +344,7 @@ L_Menu3:
close;
}
-payon_in01.gat,66,64,5 script Archer Wolt 88,{
+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!";
@@ -401,7 +409,7 @@ L_case:
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 "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;
@@ -546,7 +554,7 @@ L_Menu3:
close;
}
-payon_in01.gat,144,9,2 script Monster Scholar 98,{
+payon.gat,132,235,2 script Monster Scholar 98,{
mes "[Monster Scholar Vuicokk]";
mes "Nice to meet you. I am Vuicokk the cholar in the monster research organization of Rune Midgard.";
mes "Do you have any questions about monsters of Rune Midgard?";
@@ -608,20 +616,53 @@ L_End:
close;
}
-payon_in03.gat,100,186,4 script Chief 120,{
- if(BaseLevel > 30) goto L_Menu1;
- set @R_SEL_NUM,rand(2);
- if(@R_SEL_NUM != 0) goto T_TALK0;
- mes "[Palace Guardsman]";
- mes "Hey hey! Show your respect to the chief!";
- close;
-T_TALK0:
- if(@R_SEL_NUM != 1) goto T_TALK2;
- mes "[Palace Guardsman]";
- mes "Hey! I said...";
+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]";
- mes "That's fine, I am ok. It's been a long time since I talked to such young people.";
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:
@@ -681,136 +722,292 @@ L_Menu5:
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 challange on the class.";
+ mes "People who have enough responsibility on themselves can challenge on the class.";
close;
next;
-T_TALK2:
- if(@R_SEL_NUM != 3) goto T_TALK3;
- mes "[Chief]";
- mes "Tired... I'd better take a rest then. Take care of yourself.";
- close;
-T_TALK3:
- mes "[Palace Guardsman]";
- mes "The Chief is taking a rest. Would you mind if I ask you to come back later?";
- close;
}
-payon.gat,160,246,4 script Palace Guardsman 708,{
- mes "[Place Guardsman]";
- mes "Halt!";
- next;
- mes "[Palace Guardsman]";
- mes "You are about to enter the Royal Palace, home of the Payon Royal Family. You must be at your best behavior at all times while in the palace.";
- next;
- mes "[Palace Guardsman]";
- mes "I will need to disarm you for the time being. If you do not cooperate you will not be able to enter the Palace";
- nude;
-//nude; will disarm you
- next;
- warp "payon_in03.gat",98,118;
- close;
+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,151,246,4 script Palace Guardsman 708,{
- mes "[Palace Guardsman]";
- mes ".............";
- 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;
-payon_in03.gat,102,116,4 script Palace Guardsman 708,{
- mes "[Place Guardsman]";
- mes "What brings you here?";
- emotion 1;
- next;
- mes "[Palace Guardsman]";
- mes "I can see that you are not from around here. I suggest that you behave yourself while you are here.";
- mes "We will not tolerate any direspectfull or abberant behavior.";
- close;
-}
+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;
-payon_in03.gat,95,116,4 script Palace Guardsman 708,{
- mes "[Palace Guardsman]";
- mes ".............";
- close;
-}
+L_BlueToRed:
+ set @SourceGemstones$,"Blue";
+ set @SourceGemstonesID,717;
+ set @TargetGemstones$,"Red";
+ set @TargetGemstonesID,716;
+ goto L_BeginExchange;
-payon_in03.gat,92,157,4 script Palace Guardsman 708,{
- mes "[Palace Guardsman]";
- mes ".............";
- close;
-}
+L_RedToYellow:
+ set @SourceGemstones$,"Red";
+ set @SourceGemstonesID,716;
+ set @TargetGemstones$,"Yellow";
+ set @TargetGemstonesID,715;
+ goto L_BeginExchange;
-payon_in03.gat,107,157,4 script Palace Guard Chief 708,{
- if(BaseLevel < 30) goto L_Less;
- mes "[Palace Guard Chief]";
- mes "I see that you are a well trained warrior. You may have the privalege of speaking with the Elder Chief. But remember to be respectfull to him at all times!!!";
- next;
- mes "[Palace Guard Chief]";
- mes "If NOT......(cracks his nuckles)....!!!";
- emotion 29;
- close;
-L_Less:
- mes "[Palace Guard Chief]";
- mes "Halt. Only mighty warriors are worthy to speak face to face with the Elder Chief. You still need to train more";
- next;
- mes "[Palace Guard Chief]";
- mes "Please leave";
- next;
- warp "payon_in03.gat",99,129;
- close;
-}
+L_YellowToBlue:
+ set @SourceGemstones$,"Yellow";
+ set @SourceGemstonesID,715;
+ set @TargetGemstones$,"Blue";
+ set @TargetGemstonesID,717;
+ goto L_BeginExchange;
-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;
-}
+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;
-// New kRO Npc's
+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;
-payon.gat,173,238,4 script Unknown 740,{
- mes "[Unknown]";
- mes "This is an new kRO Npc";
- mes "This Npc hasn't been translated yet";
- mes "If by accident you know what this npc is and could translate it";
- mes "Please contact Darkchild (eAthena Dev)";
- close;
-}
+L_ExchangeAll:
+ if(countitem(@SourceGemstonesID) < 2) goto L_ExchangeNo;
+ delitem @SourceGemstonesID,@ExchangeCount*2;
+ getitem @TargetGemstonesID,@ExchangeCount;
+ goto L_ExchangeDone;
-payon_in03.gat,75,129,4 script Unknown 704,{
- mes "[Unknown]";
- mes "This is an new kRO Npc";
- mes "This Npc hasn't been translated yet";
- mes "I by excident you know what this npc is and could translate it";
- mes "Please contact Darkchild (eAthena Dev)";
- close;
-}
+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;
+ delitem @SourceGemstonesID,@number*2;
+ getitem @TargetGemstonesID,@number;
+ goto L_ExchangeDone;
-payon_in03.gat,117,128,4 script Unknown 704,{
- mes "[Unknown]";
- mes "This is an new kRO Npc";
- mes "This Npc hasn't been translated yet";
- mes "I by excident you know what this npc is and could translate it";
- mes "Please contact Darkchild (eAthena Dev)";
- close;
-}
+L_ExchangeNo:
+ mes "[Jade]";
+ mes "Hmmm... Very funny...";
+ close;
-payon_in03.gat,118,119,8 script Unknown 101,{
- mes "[Unknown]";
- mes "This is an new kRO Npc";
- mes "This Npc hasn't been translated yet";
- mes "I by excident you know what this npc is and could translate it";
- mes "Please contact Darkchild (eAthena Dev)";
- 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;
}
-payon_in03.gat,131,7,4 script Unknown 59,{
- mes "[Unknown]";
- mes "This is an new kRO Npc";
- mes "This Npc hasn't been translated yet";
- mes "I by excident you know what this npc is and could translate it";
- mes "Please contact Darkchild (eAthena Dev)";
+//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 resposiblity.";
+ 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 seeked 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 aparence, 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;
+} \ No newline at end of file
diff --git a/npc/cities/prontera.txt b/npc/cities/prontera.txt
index 8dc1227eb..52a571ccd 100644
--- a/npc/cities/prontera.txt
+++ b/npc/cities/prontera.txt
@@ -60,8 +60,7 @@ prontera.gat,78,150,3 script Dairenne 90,{
}
// Merideth --------------------------------------------------------------
-prontera.gat,106,117,6 script Merideth 91,
-{
+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.";
@@ -112,8 +111,7 @@ prontera.gat,160,133,2 script YuPi 102,{
}
// Shuger -------------------------------------------------------------
-prontera.gat,102,287,5 script Shuger 98,
-{
+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.";
@@ -388,8 +386,7 @@ prt_church.gat,103,76,2 script Garnet 67,{
// ----------------------------------------------------------------------------------------------- PUB -----------------------------------------------------------------------------------------------------\\
// Sir Michael (West End Pub)
-prt_in.gat,26,30,1 script Sir Michael 54,
-{
+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.";
diff --git a/npc/cities/umbala.txt b/npc/cities/umbala.txt
index 27b8e12a0..847a92557 100644
--- a/npc/cities/umbala.txt
+++ b/npc/cities/umbala.txt
@@ -6,7 +6,7 @@
//= Muad Dib (1.2)
//= Darkchild (1.3)
//===== Current Version: =====================================
-//= 1.3
+//= 1.4
//===== Compatible With: =====================================
//= Any eAthena Version; RO Episode XX
//===== Description: =========================================
@@ -26,7 +26,8 @@
//= 1.0 - Done By jAthena (dunno Who)
//= 1.1 - Translated by Fusion Dev Team
//= 1.2 - Fixed Something by Muad Dib
-//= 1.2 - Fixed up For eA by Darkchild
+//= 1.3 - Fixed up For eA by Darkchild
+//= 1.4 fixed some wrong item names [Lupus]
//============================================================
@@ -723,10 +724,10 @@ LStart2:
mes "I intend to teach.";
next;
mes "[Karukatan]";
- mes "I need ^3377FF10x Oily Paper^000000, and ^3377FF5x Smooth Paper^000000.";
+ mes "I need ^3377FF10x Oiled Paper^000000, and ^3377FF5x String Paper^000000.";
mes "I also need something to write with.";
mes "of course.";
- mes "For that, ^3377FF1x India Ink^000000 and ^3377FF1x Bird Feather^000000";
+ mes "For that, ^3377FF1x Squid Ink^000000 and ^3377FF1x Feather of Birds^000000";
mes "will do nicely.";
next;
mes "[Karukatan]";
@@ -773,10 +774,10 @@ LStart3:
mes "teach you the language? You need to gather";
next;
mes "[Karukatan]";
- mes "^3377FF10x Oily Paper^000000,";
- mes "^3377FF5x Smooth Paper^000000,";
- mes "^3377FF1x India Ink^000000, and";
- mes "^3377FF1x Bird Feather^000000.";
+ mes "^3377FF10x Oiled Paper^000000,";
+ mes "^3377FF5x String 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;
@@ -1008,7 +1009,7 @@ L1:
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 skin 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";
@@ -1056,7 +1057,7 @@ L1_2e:
mes "Water...You need that which is";
mes "saturated with water. Explore";
mes "the area around here and find";
- mes "^3377FF20x Katashimuri Skin^000000 for the ritual.";
+ mes "^3377FF20x Snails Shell^000000 for the ritual.";
goto L1_empty;
L1_3e:
mes "[Putsuchiritan]";
@@ -1071,7 +1072,7 @@ L1_4e:
mes "Wind...You need that which";
mes "has an easy camaraderie with";
mes "the sky itself.";
- mes "You need ^3377FF25x Radiant Pelt^000000";
+ mes "You need ^3377FF25x Rainbow Shell^000000";
mes "to complete the ritual.";
L1_empty:
next;
diff --git a/npc/cities/valkyrie.txt b/npc/cities/valkyrie.txt
index 6c0c4a67c..8b2602307 100644
--- a/npc/cities/valkyrie.txt
+++ b/npc/cities/valkyrie.txt
@@ -1,7 +1,19 @@
-// Valkyrie Replacement after kRO.
-// The Jobquest from kRO on how to advance to a Reborn class.
-// Made by: Nana
-// 1.01 bugfixex by Lupus
+//===== eAthena Script =======================================
+//= Valkyrie Realm
+//===== By: ==================================================
+//= Nana, fixes by Poki
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== 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]
+//============================================================
// -== Warp's needed! ==-
@@ -10,13 +22,13 @@ 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,{
- if(valkyrie_Q == 1) goto L_Faded;
- if(valkyrie_Q == 2) goto L_Start;
mes "[Book of Ymir]";
+ if(valkyrie_Q == 1) goto L_FADED;
+ if(valkyrie_Q == 2) goto L_START;
mes ". . . . .";
close;
-L_Faded:
+L_FADED:
mes "[Book of Ymir]";
mes "*The book opens as you aproach it*";
next;
@@ -27,7 +39,7 @@ L_Faded:
mes "*After reading the two first pages you turn the other page, and watches the words fade away as you try to read them...";
close;
-L_Start:
+L_START:
mes "[Book of Ymir]";
mes "*The book opens as you aproach it*";
next;
@@ -44,68 +56,63 @@ L_Start:
mes "[Book of Ymir]";
mes "And only after then, the decended ones will aprove you to the highest obedience.. Into the warmth of Valkyrie, you will be welcomed by the gods themself.";
next;
- mes "[Book og Ymir]";
+ mes "[Book of Ymir]";
mes "*As you close the book a strange ray of light sourounds you and you suddently feel light. Everything around you fades away and all you can see left is white before you pass out.*";
warp "valkyrie",48,9;
- set valkyrie_Q,0;
close;
}
// -== The Librarian that watches the "Book of Ymir" ==-
yuno_in02.gat,91,176,5 script Librarian 754,{
- if(readparam(19) >= 7) goto L_Pay;
mes "[Librarian]";
+ if(valkyrie_Q>0) goto L_DONE;
+ if(Class >= 7) goto L_PAY;
mes "Have a look around, but dont touch the book. Only a few chosen one can read its wise words.";
close;
-L_Pay:
- mes "[Librarian]";
+L_PAY:
mes "You seem like a worthy human.";
mes "I, the 78th Librarian of the secret order sworn to protect this book wont 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 "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",pay_now,"Close",-;
- close;
+ menu "Pay now",-,"Close",M_EXIT;
-pay_now:
- if(readparam(20) < 1285000) goto accurate_z;
- if(readparam(20) > 1285000) goto accurate_z;
+ if(Zeny != 1285000) goto L_WRONGZ;
mes "[Librarian]";
mes "Go now, into Heart of Ymir";
mes "There, you'll find the last pice of information before you can open the book.";
set valkyrie_Q,1;
- set zeny,zeny-1285000;
+ set Zeny,0;
close;
-accurate_z:
+L_WRONGZ:
mes "[Librarian]";
- mes "You didnt bring me the accurate number of zeny i wanted. Bring me back only 1,285,000 zeny!";
+ mes "You didnt 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,80,44,0 script Heart of Ymir 803,{
- if(valkyrie_Q < 1) goto not_applicable;
- if(valkyrie_Q == 1) goto L_Listen;
- if(valkyrie_Q == 2) goto L_Done;
- mes "[Heart of Ymir]";
- mes "The book wont open.";
- close;
-
-not_applicable:
mes "[Heart of Ymir]";
+ if(valkyrie_Q == 1) goto L_LISTEN;
+ if(valkyrie_Q == 2) goto L_DONE;
mes "The book wont open.";
mes "It seems like you have to pay the Librarian to open this book first!";
close;
-L_Listen:
- mes "[Heart of Ymir]";
+L_LISTEN:
mes "Thus upon hard times and our self esteem is at it's lowest, then is when our faith have to be the strongest.";
mes "For aeon's the secret guardians of the path to heaven has protected the sacret gate from evil spirits entering it.";
mes "Thus, the bonds became to weaken over time.. Thats when the Legion of Sages started recruiting and making young, brave, quick minded mages, sages, teaching them the laws and propositions of our world.";
@@ -117,8 +124,7 @@ L_Listen:
set valkyrie_Q,2;
close;
-L_Done:
- mes "[Heart of Ymir]";
+L_DONE:
mes "I have nothing more to teach you, nor to tell you.";
close;
}
@@ -128,22 +134,317 @@ 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..";
+ 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,{
- if(readparam(19) < 7) goto L_cannot;
+ if(Class == 23) goto L_SN;
+ if(Class >= 24) goto L_ALREADY;
+ if(BaseLevel >= 99 && JobLevel >= 50 && Class >= 7) goto L_CHANGE;
+ if(Class < 7) goto L_NOTHING;
+
+ mes "[Valhallana]";
+ 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_SN:
+ mes "[Valhallana]";
+ mes "Welcome to Valkyrie "+strcharinfo(0)+".";
+ mes "I see, you have followed a hard way of Super Novice.";
+ next;
+ mes "[Valhallana]";
+ mes "I am sorry, but I can't help you.";
+ emotion 17;
+ next;
+ goto L_NOTHING;
+
+L_ALREADY:
+ mes "[Valhallana]";
+ mes "You have been reborn already. I can't help you more.";
+ next;
+// goto L_NOTHING;
+
+L_NOTHING:
+ mes "[Valhallana]";
+ mes "Do you wish to go back in Your world?";
+ next;
+ menu "Yes",L_Y,"No",-;
+
+ mes "[Valhallana]";
+ mes "As you wish...";
+ close;
+
+L_Y:
+ mes "[Valhallana]";
+ mes "As you wish...";
+ next;
+ warp "yuno_in02.gat",93,204;
+ close;
+
+L_CHANGE:
mes "[Valhallana]";
mes "Welcome to Valkyrie "+strcharinfo(0)+", from this point of, there is no returning back.";
- mes "Please go over there, to the person representing your class.";
- mes "Good Luck.";
+ next;
+ 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 "[Valhallana]";
+ 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,"Theif 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,"Theif 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);
+ 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;
+ goto L_Pro;
+
+L_ZENYITEMS:
+ mes "[Valhallana]";
+ mes "Your money and items do rope you to your routine life.";
+ mes "You should get rid of them.";
close;
-L_cannot:
+L_CART:
mes "[Valhallana]";
- mes "You don't belong here yet.";
- warp "prontera",100,100;
+ mes "Please, drop your cart. And we'll continue.";
+ close;
+
+L_FALCON:
+ mes "[Valhallana]";
+ mes "Please, free your Falcon. And we'll continue.";
+ close;
+
+L_PECO:
+ mes "[Valhallana]";
+ mes "Please, free your Pecopeco. And we'll continue.";
close;
-} \ No newline at end of file
+
+L_SKILLPNTS:
+ mes "[Valhallana]";
+ mes "You will need to use up all of your skill points if you want me to continue.";
+ 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_Pro:
+ savepoint "prontera.gat",273,354;
+ warp "prontera.gat",273,354;
+ close;
+
+L_Gef:
+ savepoint "geffen.gat",120,100;
+ warp "geffen.gat",120,100;
+ 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(Class == 3977+getarg(0) ) goto L_WELCOME; //3rd Job
+ if(Class >= 4008) goto L_ALREADY; //already advanced class
+ if(Class == 4001 && ADVJOB == (3977+getarg(2))) goto L_GETHIGH; //High Novice -> High XXXX
+ 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 always glad to see here a "+getarg(1)+"!";
+ 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(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 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;
+}
diff --git a/npc/cities/yuno.txt b/npc/cities/yuno.txt
index e6199a54d..b44ce4a43 100644
--- a/npc/cities/yuno.txt
+++ b/npc/cities/yuno.txt
@@ -100,8 +100,7 @@ yuno.gat,158,205,4 script Artisan 54,{
}
//======================================================================================
-yuno.gat,336,227,4 script Yuno Granny 103,
-{
+yuno.gat,336,227,4 script Yuno Granny 103,{
mes "[Granny]";
mes "Here you are......... I am an elderly Sage who can forsee everything before it happens.";
next;
@@ -119,8 +118,7 @@ yuno.gat,336,227,4 script Yuno Granny 103,
}
//========================================================================================
-yuno.gat,329,239,4 script Yuno Fighter 732,
-{
+yuno.gat,329,239,4 script Yuno Fighter 732,{
mes "[Sergiof]";
mes "My name is Sergiof and I am Granny's protector.";
next;
@@ -137,8 +135,7 @@ yuno.gat,329,239,4 script Yuno Fighter 732,
}
//========================================================================================
-yuno.gat,344,68,4 script Yuno Tyrant 730,
-{
+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";
@@ -173,8 +170,7 @@ yuno.gat,261,98,4 script Ykla 735,{
}
//=========================================================================================
-yuno.gat,306,207,6 script Sage Sykla 735,
-{
+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.";
@@ -196,8 +192,7 @@ yuno.gat,306,207,6 script Sage Sykla 735,
}
//==========================================================================================
-yuno.gat,162,328,4 script Sage Eskla 735,
-{
+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?'.";
@@ -288,8 +283,7 @@ yuno.gat,80,150,4 script Young Woman 746,{
//===================================================================================================//
//========================================================================
-yuno_in03.gat,25,39,3 script Metto 709,
-{
+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;
@@ -387,8 +381,7 @@ L_Done:
}
//=====================================================================
-yuno_in01.gat,18,95,5 script Stangckle 99,
-{
+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;
@@ -439,8 +432,7 @@ L_Done:
}
//===================================================================
-yuno_in01.gat,19,182,3 script Kato 55,
-{
+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;
@@ -482,8 +474,7 @@ L_Done:
}
//===================================================================
-yuno_in03.gat,179,43,5 script CiCi 121,
-{
+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.";
@@ -529,8 +520,7 @@ L_Done:
}
//===================================================================
-yuno_in01.gat,18,30,3 script Wagan 85,
-{
+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.";
diff --git a/npc/events/custom/draculax.txt b/npc/events/custom/draculax.txt
index 907580554..b47e29972 100644
--- a/npc/events/custom/draculax.txt
+++ b/npc/events/custom/draculax.txt
@@ -127,4 +127,4 @@ OnTimer11000:
stopnpctimer;
disablenpc "Dracula_Event";
Break;
-} \ No newline at end of file
+}
diff --git a/npc/events/custom/uneasy_cemetery.txt b/npc/events/custom/uneasy_cemetery.txt
index 13300b828..39bd9d762 100644
--- a/npc/events/custom/uneasy_cemetery.txt
+++ b/npc/events/custom/uneasy_cemetery.txt
@@ -19,8 +19,7 @@
//============================================================
-prontera.gat,3,3,3 script Uneasy_Check -1,
-{
+prontera.gat,3,3,3 script Uneasy_Check -1,{
end;
OnHour00:
@@ -67,8 +66,7 @@ L_Start_Undead:
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,
-{
+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...";
@@ -132,4 +130,4 @@ M_DONT_HAVE:
mes "The old cemetery is going out of control soon...";
mes "Please, in the name of Odin, help Prontera city.";
close;
-} \ No newline at end of file
+}
diff --git a/npc/events/easter.txt b/npc/events/easter.txt
index 867565005..ab24c2c9b 100644
--- a/npc/events/easter.txt
+++ b/npc/events/easter.txt
@@ -15,8 +15,7 @@
//============================================================
-geffen.gat,95,201,3 script Shilo 50,
-{
+geffen.gat,95,201,3 script Shilo 50,{
mes "[Shilo]";
if(easter_Q == 1) goto L_Check;
mes "*Sigh*...... Where is my sister!?";
diff --git a/npc/events/twintowers.txt b/npc/events/twintowers.txt
index 5b7db213a..6e79add1c 100644
--- a/npc/events/twintowers.txt
+++ b/npc/events/twintowers.txt
@@ -90,4 +90,4 @@ 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,145,118,4 duplicate(Twin-Towers) Twin Towers#tt7 812
-comodo.gat,194,158,4 duplicate(Twin-Towers) Twin Towers#tt7 812 \ No newline at end of file
+comodo.gat,194,158,4 duplicate(Twin-Towers) Twin Towers#tt7 812
diff --git a/npc/events/valentinesday.txt b/npc/events/valentinesday.txt
index d9669ca94..a44f2ddca 100644
--- a/npc/events/valentinesday.txt
+++ b/npc/events/valentinesday.txt
@@ -269,4 +269,4 @@ LStartMan:
mes "‚±‚̃Vƒƒƒ‹ƒ‹=ƒIƒ‹ƒŒƒAƒ“‚ð”ς킹‚é";
mes "‚È‚ñ‚ÄBƒIƒD`Aƒmƒ“ƒmƒ“ƒmƒ“B";
close;
-} \ No newline at end of file
+}
diff --git a/npc/events/xmas.txt b/npc/events/xmas.txt
index bf7aec27d..fb445dac8 100644
--- a/npc/events/xmas.txt
+++ b/npc/events/xmas.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= eAthena Dev Team
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any version of eAthena
//===== Description: =========================================
@@ -13,15 +13,18 @@
//= 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]
//============================================================
xmas_in.gat,100,96,4 script Father Christmas::Santa2 718,{
mes "[Santa Claus]";
- if(event_xmas == 1) goto L_Start;
- mes "Merry Christmas! I have a gift for you! Ho Ho Ho!";
- getitem 664,1;
- set event_xmas,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:
@@ -72,12 +75,13 @@ L_Start:
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;
- delitem 7034,3;
- getitem 664,1;
+ 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.";
@@ -87,8 +91,7 @@ L_Start:
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";
- mes "reward you.";
+ mes "and get more for me and I'll reward you.";
close;
M_End:
mes "[Santa Claus]";
@@ -256,3 +259,6 @@ 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
+
+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
diff --git a/npc/guides/guides_yun.txt b/npc/guides/guides_yun.txt
index 0a73f9457..f8fe74082 100644
--- a/npc/guides/guides_yun.txt
+++ b/npc/guides/guides_yun.txt
@@ -26,8 +26,7 @@ yuno.gat,153,47,4 script Yuno Guide 700,{
}
//=====================================================================
-yuno.gat,333,182,2 script Yuno Soldier 105,
-{
+yuno.gat,333,182,2 script Yuno Soldier 105,{
cutin "prt_soldier",2;
set @name$, "[Yuno Soldier]";
set @menu1$, "^5533FF'Dagger of Counter'^000000.....";
@@ -42,8 +41,7 @@ yuno.gat,333,182,2 script Yuno Soldier 105,
}
//=====================================================================
-yuno.gat,264,320,2 script Yuno Soldier 105,
-{
+yuno.gat,264,320,2 script Yuno Soldier 105,{
cutin "prt_soldier",2;
set @name$, "[Yuno Soldier]";
set @menu1$, "Holy shield, ^5533FF'Sacred Mission'^000000.....";
@@ -58,8 +56,7 @@ yuno.gat,264,320,2 script Yuno Soldier 105,
}
//=====================================================================
-yuno.gat,228,292,2 script Yuno Soldier 105,
-{
+yuno.gat,228,292,2 script Yuno Soldier 105,{
cutin "prt_soldier",2;
set @name$, "[Yuno Soldier]";
set @menu1$, "^FF3355'False Angel'^000000.....";
@@ -74,8 +71,7 @@ yuno.gat,228,292,2 script Yuno Soldier 105,
}
//=====================================================================
-yuno.gat,164,283,4 script Yuno Soldier 105,
-{
+yuno.gat,164,283,4 script Yuno Soldier 105,{
cutin "prt_soldier",2;
set @name$, "[Yuno Soldier]";
set @menu1$, "^FF3355'Geographer'^000000.....";
@@ -91,8 +87,7 @@ yuno.gat,164,283,4 script Yuno Soldier 105,
}
//=====================================================================
-yuno.gat,151,283,4 script Yuno Soldier 105,
-{
+yuno.gat,151,283,4 script Yuno Soldier 105,{
cutin "prt_soldier",2;
set @name$, "[Yuno Soldier]";
set @menu1$, "^FF3355'Lava Golem'^000000.....";
@@ -111,8 +106,7 @@ yuno.gat,151,283,4 script Yuno Soldier 105,
}
//=====================================================================
-yuno.gat,164,228,4 script Yuno Soldier 105,
-{
+yuno.gat,164,228,4 script Yuno Soldier 105,{
cutin "prt_soldier",2;
set @name$, "[Yuno Soldier]";
set @menu1$, "Killer ^FF3355'Goats'^000000.....";
@@ -127,8 +121,7 @@ yuno.gat,164,228,4 script Yuno Soldier 105,
}
//=====================================================================
-yuno.gat,151,228,4 script Yuno Soldier 105,
-{
+yuno.gat,151,228,4 script Yuno Soldier 105,{
cutin "prt_soldier",2;
set @name$, "[Yuno Soldier]";
set @menu1$, "Large Jellopy.....";
diff --git a/npc/guild/aldeg/aldeg_ev_agit.txt b/npc/guild/aldeg/aldeg_ev_agit.txt
index 8287ad417..942e479b7 100644
--- a/npc/guild/aldeg/aldeg_ev_agit.txt
+++ b/npc/guild/aldeg/aldeg_ev_agit.txt
@@ -16,7 +16,7 @@
// Castle 1 ================================================================
aldeg_cas01.gat,216,24,0 script Agit_A01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas01.gat",0,"::OnRecvCastleA01";
end;
OnRecvCastleA01:
@@ -39,7 +39,7 @@ OnAgitEnd:
// Castle 2 ================================================================
aldeg_cas02.gat,214,24,0 script Agit_A02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas02.gat",0,"::OnRecvCastleA02";
end;
OnRecvCastleA02:
@@ -62,7 +62,7 @@ OnAgitEnd:
// Castle 3 ================================================================
aldeg_cas03.gat,206,32,0 script Agit_A03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas03.gat",0,"::OnRecvCastleA03";
end;
OnRecvCastleA03:
@@ -85,7 +85,7 @@ OnAgitEnd:
// Castle 4 ================================================================
aldeg_cas04.gat,36,218,0 script Agit_A04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas04.gat",0,"::OnRecvCastleA04";
end;
OnRecvCastleA04:
@@ -108,7 +108,7 @@ OnAgitEnd:
// Castle 5 ================================================================
aldeg_cas05.gat,28,102,0 script Agit_A05 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas05.gat",0,"::OnRecvCastleA05";
end;
OnRecvCastleA05:
diff --git a/npc/guild/ev_agit_event.txt b/npc/guild/ev_agit_event.txt
index cf31057a3..2696d5864 100644
--- a/npc/guild/ev_agit_event.txt
+++ b/npc/guild/ev_agit_event.txt
@@ -4,7 +4,7 @@
//= kalen (1.0)
//= 1.1 by Akaru and ho|yAnge|
//===== Current Version: =====================================
-//= 1.3
+//= 1.4
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
@@ -19,6 +19,8 @@
//= 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]
//============================================================
// WoE Start/Stop times
@@ -34,7 +36,7 @@ OnAgitInit:
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;
- if(gettime(4)!=2 || gettime(4)!=4 || gettime(4)!=6) end; //stops script on non woe day
+ if(gettime(4)!=2 && gettime(4)!=4 && gettime(4)!=6) end; //stops script on non woe day
Announce "The War Of Emperium is over!",8;
AgitEnd;
@@ -51,34 +53,76 @@ L_Start:
- script TreasSpawn -1,{
end;
-OnClock0000:
+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;
-}
+} \ No newline at end of file
diff --git a/npc/guild/gefg/gefg_ev_agit.txt b/npc/guild/gefg/gefg_ev_agit.txt
index 5be223f03..3ac4c7432 100644
--- a/npc/guild/gefg/gefg_ev_agit.txt
+++ b/npc/guild/gefg/gefg_ev_agit.txt
@@ -16,7 +16,7 @@
// Castle 1 ================================================================
gefg_cas01.gat,198,182,0 script Agit_G01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas01.gat",0,"::OnRecvCastleG01";
end;
OnRecvCastleG01:
@@ -39,7 +39,7 @@ OnAgitEnd:
// Castle 2 ================================================================
gefg_cas02.gat,176,178,0 script Agit_G02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas02.gat",0,"::OnRecvCastleG02";
end;
OnRecvCastleG02:
@@ -62,7 +62,7 @@ OnAgitEnd:
// Castle 3 ================================================================
gefg_cas03.gat,245,167,0 script Agit_G03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas03.gat",0,"::OnRecvCastleG03";
end;
OnRecvCastleG03:
@@ -85,7 +85,7 @@ OnAgitEnd:
// Castle 4 ================================================================
gefg_cas04.gat,174,178,0 script Agit_G04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas04.gat",0,"::OnRecvCastleG04";
end;
OnRecvCastleG04:
@@ -108,7 +108,7 @@ OnAgitEnd:
// Castle 5 ================================================================
gefg_cas05.gat,194,184,0 script Agit_G05 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas05.gat",0,"::OnRecvCastleG05";
end;
OnRecvCastleG05:
diff --git a/npc/guild/gefg/gefg_flags.txt b/npc/guild/gefg/gefg_flags.txt
index 8f1e30d0c..bad3a95a8 100644
--- a/npc/guild/gefg/gefg_flags.txt
+++ b/npc/guild/gefg/gefg_flags.txt
@@ -17,8 +17,7 @@
//================================================================================//
// Castle 1
//================================================================================//
-geffen.gat,109,123,2 script Reprion#g1-1::Reprion 722,
-{
+geffen.gat,109,123,2 script Reprion#g1-1::Reprion 722,{
callfunc "F_Flags","Geffen","gefg_cas01",83,47;
close;
@@ -45,8 +44,7 @@ gefg_cas01.gat,64,16,4 duplicate(Reprion) Reprion#g1-12 722
//===================================================================================//
// Castle 2
//===================================================================================//
-geffen.gat,112,129,1 script Yolbriger#g2-1::Yolbriger 722,
-{
+geffen.gat,112,129,1 script Yolbriger#g2-1::Yolbriger 722,{
callfunc "F_Flags","Geffen","gefg_cas02",23,66;
close;
@@ -73,8 +71,7 @@ gefg_cas02.gat,68,36,2 duplicate(Yolbriger) Yolbriger#g2-12 722
//================================================================================//
// Castle 3
//================================================================================//
-geffen.gat,120,132,8 script Isinlife#g3-1::Isinlife 722,
-{
+geffen.gat,120,132,8 script Isinlife#g3-1::Isinlife 722,{
callfunc "F_Flags","Geffen","gefg_cas03",116,89;
close;
@@ -104,8 +101,7 @@ gefg_cas03.gat,34,208,1 duplicate(Isinlife) Isinlife#g3-15 722
//================================================================================//
// Castle 4
//================================================================================//
-geffen.gat,127,130,7 script Berigel#g4-1::Berigel 722,
-{
+geffen.gat,127,130,7 script Berigel#g4-1::Berigel 722,{
callfunc "F_Flags","Geffen","gefg_cas04",59,70;
close;
@@ -131,8 +127,7 @@ gefg_cas04.gat,35,73,4 duplicate(Berigel) Berigel#g4-11 722
//================================================================================//
// Castle 5
//================================================================================//
-geffen.gat,131,123,6 script Melsedetsu#g5-1::Melsedetsu 722,
-{
+geffen.gat,131,123,6 script Melsedetsu#g5-1::Melsedetsu 722,{
callfunc "F_Flags","Geffen","gefg_cas05",61,52;
close;
diff --git a/npc/guild/gefg/gefg_kafras.txt b/npc/guild/gefg/gefg_kafras.txt
index 94eaa093a..82daa84cb 100644
--- a/npc/guild/gefg/gefg_kafras.txt
+++ b/npc/guild/gefg/gefg_kafras.txt
@@ -17,8 +17,7 @@
// Castle 1 ===============================================
//gefg_cas01.gat,96,173,0 script Kafra Service#G01 117,{
-gefg_cas01.gat,35,37,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:
@@ -28,8 +27,7 @@ OnRecvCastleG01:
// Castle 2 ===============================================
-gefg_cas02.gat,23,66,3 script Kafra Service#G02 117,
-{
+gefg_cas02.gat,23,66,3 script Kafra Service#G02 117,{
callfunc "F_GKafra", "gefg_cas02", "Geffen";
end;
OnRecvCastleG02:
@@ -39,8 +37,7 @@ OnRecvCastleG02:
// Castle 3 ===============================================
-gefg_cas03.gat,116,89,5 script Kafra Service#G03 117,
-{
+gefg_cas03.gat,116,89,5 script Kafra Service#G03 117,{
callfunc "F_GKafra", "gefg_cas03", "Geffen";
end;
OnRecvCastleG03:
@@ -50,8 +47,7 @@ OnRecvCastleG03:
// Castle 4 ===============================================
-gefg_cas04.gat,59,70,3 script Kafra Service#G04 117,
-{
+gefg_cas04.gat,59,70,3 script Kafra Service#G04 117,{
callfunc "F_GKafra", "gefg_cas04", "Geffen";
end;
OnRecvCastleG04:
@@ -61,8 +57,7 @@ OnRecvCastleG04:
// Castle 5 ===============================================
-gefg_cas05.gat,61,52,5 script Kafra Service#G05 117,
-{
+gefg_cas05.gat,61,52,5 script Kafra Service#G05 117,{
callfunc "F_GKafra", "gefg_cas05", "Geffen";
end;
OnRecvCastleG05:
diff --git a/npc/guild/gldfunc_dunsw.txt b/npc/guild/gldfunc_dunsw.txt
index 6d954c639..a23978515 100644
--- a/npc/guild/gldfunc_dunsw.txt
+++ b/npc/guild/gldfunc_dunsw.txt
@@ -4,7 +4,7 @@
//= jAthena - kalen (1.0)
//= 1.1 by Akaru, ho|yAnge|X, and Valaris
//===== Current Version: =====================================
-//= 1.2
+//= 1.3
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
@@ -16,7 +16,12 @@
//= arg(2): x1 coordinate for warp
//= arg(3): y1 coordinate for warp
//===== Additional Comments: =================================
-//= v1.2: All guild Dungeon Switch npcs use this function.[kobra_k88]
+//= 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]
//============================================================
//==================================================
@@ -30,7 +35,7 @@ function script F_GldDunSw {
menu "Yes",-,"No",M_No;
set @GID, GetCastleData(getarg(0)+".gat",1);
- if (getcharid(2) != @GID) goto L_NotGLead;
+ if (@GID == 0 || getcharid(2) != @GID) goto L_NotGLead;
warp "gld_dun"+getarg(1)+".gat",getarg(2),getarg(3);
end;
diff --git a/npc/guild/gldfunc_manager.txt b/npc/guild/gldfunc_manager.txt
index de47fbeab..29ce59054 100644
--- a/npc/guild/gldfunc_manager.txt
+++ b/npc/guild/gldfunc_manager.txt
@@ -4,7 +4,7 @@
//= jAthena - kalen (1.0)
//= 1.1 by Akaru, ho|yAnge|X, and Valaris
//===== Current Version: =====================================
-//= 1.2b
+//= 1.31
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
@@ -19,6 +19,7 @@
//= 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.
@@ -27,6 +28,7 @@
//= 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]
+//= 1.3 Now you can't install Guardians during WOE [Lupus]
//============================================================
@@ -115,6 +117,8 @@ L_Start:
set Zeny,Zeny-@eco_invest;
SetCastleData getarg(1)+".gat",4,@TriggerE+1;
SetCastleData getarg(1)+".gat",2,@Economy+1;
+ // if we learnt Emsolute Develop there's a chance to get +1 investment again
+ if (getgdskilllv(@GID,10014) > 0 && rand(100)>50) set @Economy, @Economy + 1;
mes "[ "+getarg(0)+" ]";
mes "You have invested successfully.";
return 0;
@@ -171,6 +175,8 @@ L_Start:
SetCastleData getarg(1)+".gat",3,@Defence+1;
// set new hp values for guardians
set @Defence, @Defence + 1;
+ // if we learnt Emsolute Develop there's a chance to get +1 investment again
+ if (getgdskilllv(@GID,10014) > 0 && rand(100)>50) set @Defence, @Defence + 1;
set @AGuardian, 28634 + (@Defence*2000);
set @KGuardian, 30214 + (@Defence*2000);
set @SGuardian, 15670 + (@Defence*2000);
@@ -222,6 +228,7 @@ L_Start:
//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;
@@ -308,6 +315,10 @@ L_Start:
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:
diff --git a/npc/guild/gldfunc_treasure.txt b/npc/guild/gldfunc_treasure.txt
index 8f4235556..c1d0f62bd 100644
--- a/npc/guild/gldfunc_treasure.txt
+++ b/npc/guild/gldfunc_treasure.txt
@@ -4,7 +4,7 @@
//= holyAngelX (1.0)
//= 1.1 by Akaru and ho|yAnge|X
//===== Current Version: =====================================
-//= 1.2b
+//= 1.3
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
@@ -32,6 +32,7 @@
//= 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]
//============================================================
@@ -51,6 +52,35 @@ function script F_GldTreas {
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;
diff --git a/npc/guild/nguild/nguild_ev_agit.txt b/npc/guild/nguild/nguild_ev_agit.txt
index d690fb348..84074a72b 100644
--- a/npc/guild/nguild/nguild_ev_agit.txt
+++ b/npc/guild/nguild/nguild_ev_agit.txt
@@ -15,7 +15,7 @@
// Castle 1 ================================================================
nguild_alde.gat,0,0,0 script Agit_N01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "nguild_alde.gat",0,"::OnRecvCastleN01";
end;
OnRecvCastleN01:
@@ -38,7 +38,7 @@ OnAgitEnd:
// Castle 2 ================================================================
nguild_gef.gat,0,0,0 script Agit_N02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "nguild_gef.gat",0,"::OnRecvCastleN02";
end;
OnRecvCastleN02:
@@ -61,7 +61,7 @@ OnAgitEnd:
// Castle 3 ================================================================
nguild_pay.gat,0,0,0 script Agit_N03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "nguild_pay.gat",0,"::OnRecvCastleN03";
end;
OnRecvCastleN03:
@@ -84,7 +84,7 @@ OnAgitEnd:
// Castle 4 ================================================================
nguild_prt.gat,0,0,0 script Agit_N04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "nguild_prt.gat",0,"::OnRecvCastleN04";
end;
OnRecvCastleN04:
diff --git a/npc/guild/payg/payg_ev_agit.txt b/npc/guild/payg/payg_ev_agit.txt
index a873f9bea..95b735ed9 100644
--- a/npc/guild/payg/payg_ev_agit.txt
+++ b/npc/guild/payg/payg_ev_agit.txt
@@ -16,7 +16,7 @@
// Castle 1 ================================================================
payg_cas01.gat,139,139,0 script Agit_Py01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas01.gat",0,"::OnRecvCastlePy01";
end;
OnRecvCastlePy01:
@@ -39,7 +39,7 @@ OnAgitEnd:
// Castle 2 ================================================================
payg_cas02.gat,39,25,0 script Agit_Py02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas02.gat",0,"::OnRecvCastlePy02";
end;
OnRecvCastlePy02:
@@ -62,7 +62,7 @@ OnAgitEnd:
// Castle 3 ================================================================
payg_cas03.gat,269,265,0 script Agit_Py03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas03.gat",0,"::OnRecvCastlePy03";
end;
OnRecvCastlePy03:
@@ -85,7 +85,7 @@ OnAgitEnd:
// Castle 4 ================================================================
payg_cas04.gat,271,29,0 script Agit_Py04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas04.gat",0,"::OnRecvCastlePy04";
end;
OnRecvCastlePy04:
@@ -108,7 +108,7 @@ OnAgitEnd:
// Castle 5 ================================================================
payg_cas05.gat,30,30,0 script Agit_Py05 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas05.gat",0,"::OnRecvCastlePy05";
end;
OnRecvCastlePy05:
diff --git a/npc/guild/payg/payg_flags.txt b/npc/guild/payg/payg_flags.txt
index 619cddaf7..2d553a45b 100644
--- a/npc/guild/payg/payg_flags.txt
+++ b/npc/guild/payg/payg_flags.txt
@@ -17,8 +17,7 @@
//============================================================================//
// Castle 1
//============================================================================//
-payon.gat,165,177,3 script Mingting#f1-1::Mingting 722,
-{
+payon.gat,165,177,3 script Mingting#f1-1::Mingting 722,{
callfunc "F_Flags","Payon","payg_cas01",87,29;
close;
@@ -44,8 +43,7 @@ payg_cas01.gat,212,108,4 duplicate(Mingting) Mingting#f1-11 722
//===========================================================================//
// Castle 2
//============================================================================//
-payon.gat,165,173,3 script Tiantan#f2-1::Tiantan 722,
-{
+payon.gat,165,173,3 script Tiantan#f2-1::Tiantan 722,{
callfunc "F_Flags","Payon","payg_cas02",25,266;
close;
@@ -71,8 +69,7 @@ payg_cas02.gat,70,282,4 duplicate(Tiantan) Tiantan#f2-11 722
//============================================================================//
// Castle 3
//============================================================================//
-payon.gat,165,169,3 script Fuying#f3-1::Fuying 722,
-{
+payon.gat,165,169,3 script Fuying#f3-1::Fuying 722,{
callfunc "F_Flags","Payon","payg_cas03",9,263;
close;
@@ -98,8 +95,7 @@ payg_cas03.gat,43,31,4 duplicate(Fuying) Fuying#f3-11 722
//============================================================================//
// Castle 4
//============================================================================//
-payon.gat,165,165,3 script Honglou#f4-1::Honglou 722,
-{
+payon.gat,165,165,3 script Honglou#f4-1::Honglou 722,{
callfunc "F_Flags","Payon","payg_cas04",40,235;
close;
@@ -125,8 +121,7 @@ payg_cas04.gat,239,181,4 duplicate(Honglou) Honglou#f4-11 722
//============================================================================//
// Castle 5
//============================================================================//
-payon.gat,165,161,3 script Zhulinxian#f5-1::Zhulinxian 722,
-{
+payon.gat,165,161,3 script Zhulinxian#f5-1::Zhulinxian 722,{
callfunc "F_Flags","Payon","payg_cas05",276,227;
close;
diff --git a/npc/guild/payg/payg_guardians.txt b/npc/guild/payg/payg_guardians.txt
index 02243dfad..45bcd926d 100644
--- a/npc/guild/payg/payg_guardians.txt
+++ b/npc/guild/payg/payg_guardians.txt
@@ -94,7 +94,7 @@ 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",46,273,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",3;
+ 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;
diff --git a/npc/guild/payg/payg_managers.txt b/npc/guild/payg/payg_managers.txt
index cc888975f..73d383ba4 100644
--- a/npc/guild/payg/payg_managers.txt
+++ b/npc/guild/payg/payg_managers.txt
@@ -93,7 +93,7 @@ payg_cas05.gat,277,249,3 script Najarf 55,{
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",46,273,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",3;
+ 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;
diff --git a/npc/guild/prtg/prtg_ev_agit.txt b/npc/guild/prtg/prtg_ev_agit.txt
index 6c83ad390..b654aa037 100644
--- a/npc/guild/prtg/prtg_ev_agit.txt
+++ b/npc/guild/prtg/prtg_ev_agit.txt
@@ -16,7 +16,7 @@
// Castle 1 ================================================================
prtg_cas01.gat,197,197,0 script Agit_Pt01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas01.gat",0,"::OnRecvCastlePt01";
end;
OnRecvCastlePt01:
@@ -39,7 +39,7 @@ OnAgitEnd:
// Castle 2 ================================================================
prtg_cas02.gat,158,174,0 script Agit_Pt02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas02.gat",0,"::OnRecvCastlePt02";
end;
OnRecvCastlePt02:
@@ -62,7 +62,7 @@ OnAgitEnd:
// Castle 3 ================================================================
prtg_cas03.gat,17,221,0 script Agit_Pt03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas03.gat",0,"::OnRecvCastlePt03";
end;
OnRecvCastlePt03:
@@ -85,7 +85,7 @@ OnAgitEnd:
// Castle 4 ================================================================
prtg_cas04.gat,292,14,0 script Agit_Pt04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas04.gat",0,"::OnRecvCastlePt04";
end;
OnRecvCastlePt04:
@@ -108,7 +108,7 @@ OnAgitEnd:
// Castle 5 ================================================================
prtg_cas05.gat,266,266,0 script Agit_Pt05 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas05.gat",0,"::OnRecvCastlePt05";
end;
OnRecvCastlePt05:
diff --git a/npc/guild/prtg/prtg_flags.txt b/npc/guild/prtg/prtg_flags.txt
index c43d2b2ec..c277d1907 100644
--- a/npc/guild/prtg/prtg_flags.txt
+++ b/npc/guild/prtg/prtg_flags.txt
@@ -17,8 +17,7 @@
//================================================================================//
// Castle 1
//================================================================================//
-prontera.gat,155,190,4 script Creamhilt#p1-1::Creamhilt 722,
-{
+prontera.gat,155,190,4 script Creamhilt#p1-1::Creamhilt 722,{
callfunc "F_Flags","Prontera","prtg_cas01",97,174;
close;
@@ -49,8 +48,7 @@ prtg_cas01.gat,45,46,4 duplicate(Creamhilt) Creamhilt#p1-16 722
//================================================================================//
// Castle 2
//================================================================================//
-prontera.gat,146,194,3 script Sbanhealt#p2-1::Sbanhealt 722,
-{
+prontera.gat,146,194,3 script Sbanhealt#p2-1::Sbanhealt 722,{
callfunc "F_Flags","Prontera","prtg_cas02",71,36;
close;
@@ -84,8 +82,7 @@ prtg_cas02.gat,162,161,4 duplicate(Sbanhealt) Sbanhealt#p2-18 722
//================================================================================//
// Castle 3
//================================================================================//
-prontera.gat,143,203,2 script Lazrigees#p3-1::Lazrigees 722,
-{
+prontera.gat,143,203,2 script Lazrigees#p3-1::Lazrigees 722,{
callfunc "F_Flags","Prontera","prtg_cas03",45,99;
close;
@@ -116,8 +113,7 @@ prtg_cas03.gat,165,201,4 duplicate(Lazrigees) Lazrigees#p3-16 722
//================================================================================//
// Castle 4
//================================================================================//
-prontera.gat,167,203,6 script Squagul#p4-1::Squagul 722,
-{
+prontera.gat,167,203,6 script Squagul#p4-1::Squagul 722,{
callfunc "F_Flags","Prontera","prtg_cas04",259,265;
close;
@@ -149,8 +145,7 @@ prtg_cas04.gat,263,27,4 duplicate(Squagul) Squagul#p4-16 722
//================================================================================//
// Castle 5
//================================================================================//
-prontera.gat,165,194,5 script Guindull#p5-1::Guindull 722,
-{
+prontera.gat,165,194,5 script Guindull#p5-1::Guindull 722,{
callfunc "F_Flags","Prontera","prtg_cas05",34,30;
close;
diff --git a/npc/guild/prtg/prtg_kafras.txt b/npc/guild/prtg/prtg_kafras.txt
index b14db6b9e..ace8cb1c3 100644
--- a/npc/guild/prtg/prtg_kafras.txt
+++ b/npc/guild/prtg/prtg_kafras.txt
@@ -36,7 +36,7 @@ OnRecvCastlePt02:
// Castle 3 ========================
-//prtg_cas03.gat,181,215,4 script Kafra Service#Pt03 117,
+//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;
diff --git a/npc/jobs/1-1/acolyte.txt b/npc/jobs/1-1/acolyte.txt
index df02e4310..61edb7e44 100644
--- a/npc/jobs/1-1/acolyte.txt
+++ b/npc/jobs/1-1/acolyte.txt
@@ -3,21 +3,22 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.2
+//= 1.3
//===== Compatible With: =====================================
-//= eAthena 0.5.2 +, dev mod 1009 +
+//= 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.3 Added instant job change for High Novice [Lupus]
//============================================================
// -- Father Mareusis --
-prt_church.gat,184,41,4 script "Father Mareusis" 60,
-{
+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(Class==Job_Novice && job_acolyte_q > 0) goto L_Check;
mes "What is it you are looking for?";
diff --git a/npc/jobs/1-1/archer.txt b/npc/jobs/1-1/archer.txt
index 0d2d0c6e2..86291415b 100644
--- a/npc/jobs/1-1/archer.txt
+++ b/npc/jobs/1-1/archer.txt
@@ -3,19 +3,20 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
-//= eAthena 7.15 +
+//= eAthena 1.0 +
//===== Description: =========================================
//= <Description>
//===== Additional Comments: =================================
//= Fully working
+//= v1.1 Added instant job change for High Novice [Lupus]
//============================================================
// -- Archer Guildsman --
-payon_in02.gat,64,71,4 script Archer Guildsman 59,
-{
+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(Class==Job_Novice && job_archer_q == 1) goto L_Check;
mes "Good Day. How may I help you?";
diff --git a/npc/jobs/1-1/mage.txt b/npc/jobs/1-1/mage.txt
index 05e74513a..1a8b267db 100644
--- a/npc/jobs/1-1/mage.txt
+++ b/npc/jobs/1-1/mage.txt
@@ -3,20 +3,21 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Compatible With: =====================================
-//= eAthena 7.15 +
+//= 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]
//============================================================
// -- Expert Mage --
-geffen_in.gat,164,124,4 script Expert Mage 123,
-{
+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(Class==Job_Novice && job_magician_q >= 1) goto L_BeMage;
mes "[Expert Mage]";
@@ -148,8 +149,7 @@ L_BeMage:
}
// -- Solutions Guide Book --
-geffen_in.gat,177,112,1 script Solutions Guide Book 111,
-{
+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;
@@ -249,8 +249,7 @@ geffen_in.gat,177,112,1 script Solutions Guide Book 111,
}
// -- Mixing Machine --
-geffen_in.gat,164,112,1 script Mixing Machine 111,
-{
+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;
diff --git a/npc/jobs/1-1/merchant.txt b/npc/jobs/1-1/merchant.txt
index 8204df6a9..afd58ac42 100644
--- a/npc/jobs/1-1/merchant.txt
+++ b/npc/jobs/1-1/merchant.txt
@@ -3,20 +3,21 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
-//= eAthena 7.15 +
+//= eAthena 1.0 +
//===== Description: =========================================
//= <Description>
//===== Additional Comments: =================================
//= Fully working
+//= v1.1 Added instant job change for High Novice [Lupus]
//============================================================
// == Guild NPCs ==
// -- Mahnsoo --
-alberta_in.gat,53,43,6 script Chief Mahnsoo 86,
-{
+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(Class==Job_Novice && job_merchant_q3 == 4) goto L_MakeMerc;
if(Class==Job_Novice && job_merchant_q3 == 3) goto L_GiveRecpt;
@@ -396,8 +397,7 @@ L_Failed:
// -- Wharehouse Manager Kay --
-alberta_in.gat,28,29,2 script Merchant Guildsman 83,
-{
+alberta_in.gat,28,29,2 script Merchant Guildsman 83,{
if(Class==Job_Novice && job_merchant_q3 > 0) goto L_Check;
mes "[Wharehouse Manager Kay]";
@@ -716,8 +716,7 @@ L_WrongDest:
}
// -- Kafra(Prontera) --
-prontera.gat,248,42,8 script Kafra 115,
-{
+prontera.gat,248,42,8 script Kafra 115,{
cutin "kafra_03",2;
if(Class==Job_Novice && job_merchant_q3>0) goto L_Start;
L_Other:
@@ -824,8 +823,7 @@ L_WrongDest:
// == Other Npcs ==
// -- Guild Staff --
-geffen_in.gat,155,122,4 script Guild Staff 47,
-{
+geffen_in.gat,155,122,4 script Guild Staff 47,{
if(Class==Job_Novice && job_merchant_q3>0) goto L_Start;
L_Other:
@@ -896,8 +894,7 @@ L_WrongProd:
// -- Dyer's Student --
-morocc_in.gat,140,102,4 script Dyer's Student 86,
-{
+morocc_in.gat,140,102,4 script Dyer's Student 86,{
if(Class==Job_Novice && job_merchant_q3>0) goto L_Start;
L_Other:
diff --git a/npc/jobs/1-1/swordsman.txt b/npc/jobs/1-1/swordsman.txt
index 68447a583..636e12a7e 100644
--- a/npc/jobs/1-1/swordsman.txt
+++ b/npc/jobs/1-1/swordsman.txt
@@ -3,14 +3,15 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
-//= eAthena 7.15 +
+//= 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]
//============================================================
@@ -39,8 +40,7 @@ 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,
-{
+izlude_in.gat,62,170,0 script w1039 45,1,1,{
if(Class==Job_Novice && job_sword_q > 0) warp "izlude_in.gat",40,170;
if(job_sword_q == 0) doevent "Swordsman::OnStart";
end;
@@ -49,8 +49,8 @@ izlude_in.gat,62,170,0 script w1039 45,1,1,
// == Npcs ==
// -- Master Swordsman --
-izlude_in.gat,74,172,5 script Master Swordsman 119,
-{
+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(Class==Job_Novice && job_sword_q == 2) goto L_Done;
mes "Welcome to the Swordsman Association! So.. What business brings you to us?";
diff --git a/npc/jobs/1-1/thief.txt b/npc/jobs/1-1/thief.txt
index 1acc28314..6f45409e9 100644
--- a/npc/jobs/1-1/thief.txt
+++ b/npc/jobs/1-1/thief.txt
@@ -3,13 +3,14 @@
//===== By: ==================================================
//= eAthena dev team
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
-//= eAthena 7.15 +
+//= eAthena 1.0 +
//===== Description: =========================================
//= <Description>
//===== Additional Comments: =================================
//= Fully working
+//= v1.1 Added instant job change for High Novice [Lupus]
//============================================================
@@ -23,8 +24,7 @@ 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,
-{
+moc_prydb1.gat,39,129,5 script Thief Guide 69,{
if(Class== Job_Thief) goto L_JobThief;
if(Class == Job_Novice) goto L_Start;
@@ -232,8 +232,8 @@ M_Menu:
// -- Test Grader --
-moc_prydb1.gat,42,133,2 script Comrade Brad 118,
-{
+moc_prydb1.gat,42,133,2 script Comrade Brad 118,{
+ callfunc "F_ToHigh",30,"Theif High",36,"Assassin Cross",149,150,151,152,"Brad";
if(Class == 0) goto L_Novice;
if(Class == 6) goto L_Thief;
@@ -326,8 +326,7 @@ L_4:
// -- Irrelevant Man --
-moc_ruins.gat,141,125,3 script Irrelevant Man 118,
-{
+moc_ruins.gat,141,125,3 script Irrelevant Man 118,{
if(Class == 6) goto L_Thief;
if(Class == 0) goto L_Novice;
diff --git a/npc/jobs/2-1-1/AssassinCross.txt b/npc/jobs/2-1-1/AssassinCross.txt
index adf202371..9167411b6 100644
--- a/npc/jobs/2-1-1/AssassinCross.txt
+++ b/npc/jobs/2-1-1/AssassinCross.txt
@@ -1,118 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(149) > 0) set @qsk,1;
- if(getskilllv(150) > 0) set @qsk1,1;
- if(getskilllv(151) > 0) set @qsk2,1;
- if(getskilllv(152) > 0) set @qsk3,1;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4007) && (readparam(55) >= 45)) goto L_HTHF;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4007) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Assassin Cross]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Assassin Cross]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Assassin Cross,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Assassin Cross]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Assassin Cross]";
- mes "You're not ready to become an High thief yet.";
- close;
-
-L_Class:
- mes "[Assassin Cross]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Assassin Cross yet.";
- close;
-
-L_Levels:
- mes "[Assassin Cross]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Assassin Cross";
- close;
-
-L_HNov:
- mes "[Assassin Cross]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 30;
- next;
- mes "[Assassin Cross]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- next;
-qsk:
- skill 149,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- goto L_HNov_2;
-qsk1:
- skill 150,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- goto L_HNov_2;
-qsk2:
- skill 151,1,0;
- set @qsk2,0;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk3 > 0) goto qsk3;
- goto L_HNov_2;
-qsk3:
- skill 152,1,0;
- set @qsk3,0;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Assassin Cross]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Thief";
- close;
-L_HTHF:
- mes "[Assassin Cross]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Assassin Cross!";
- jobchange 36;
- close;
-
-Skill_Points:
- mes "[Assassin Cross]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Assassin Cross]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",30,"Theif High",36,"Assassin Cross",149,150,151,152;
+}
diff --git a/npc/jobs/2-1-1/HighPriest.txt b/npc/jobs/2-1-1/HighPriest.txt
index db0c4c21b..b026ce79d 100644
--- a/npc/jobs/2-1-1/HighPriest.txt
+++ b/npc/jobs/2-1-1/HighPriest.txt
@@ -1,88 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(156) > 0) set @qsk;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4005) && (readparam(55) >= 45)) goto L_HACO;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4005) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[High Priest]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[High Priest]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of High Priest,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[High Priest]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[High Priest]";
- mes "You're not ready to become an Acolyte High yet...";
- close;
-
-L_Class:
- mes "[High Priest]";
- mes "You've come far to get here. unfortunately, you're not ready to become an High Priest yet.";
- close;
-
-L_Levels:
- mes "[High Priest]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an High Priest";
- close;
-
-L_HNov:
- mes "[High Priest]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 28;
- next;
- mes "[High Priest]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- next;
-qsk:
- skill 156,1,0;
- set @qsk,0;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[High Priest]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to Acolyte High";
- close;
-L_HACO:
- mes "[High Priest]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an High Priest!";
- jobchange 32;
- close;
-
-Skill_Points:
- mes "[High Priest]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[High Priest]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",28,"Acolyte High",32,"High Priest",156,0,0,0;
+}
diff --git a/npc/jobs/2-1-1/HighWizard.txt b/npc/jobs/2-1-1/HighWizard.txt
index acf51c225..87833c2f4 100644
--- a/npc/jobs/2-1-1/HighWizard.txt
+++ b/npc/jobs/2-1-1/HighWizard.txt
@@ -1,88 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(157) > 0) set @qsk,1;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4003) && (readparam(55) >= 45)) goto L_HMAG;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4003) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[High Wizard]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[High Wizard]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of High Wizard,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[High Wizard]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[High Wizard]";
- mes "You're not ready to become an High Mage yet.";
- close;
-
-L_Class:
- mes "[High Wizard]";
- mes "You've come far to get here. unfortunately, you're not ready to become an High Wizard yet.";
- close;
-
-L_Levels:
- mes "[High Wizard]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an High Wizard";
- close;
-
-L_HNov:
- mes "[High Wizard]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 26;
- next;
- mes "[High Wizard]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- next;
-qsk:
- skill 157,1,0;
- set @qsk,0;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[High Wizard]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Mage";
- close;
-L_HMAG:
- mes "[High Wizard]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an High Wizard!";
- jobchange 33;
- close;
-
-Skill_Points:
- mes "[High Wizard]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[High Wizard]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",26,"High Mage",33,"High Wizard",157,0,0,0;
+}
diff --git a/npc/jobs/2-1-1/LordKnight.txt b/npc/jobs/2-1-1/LordKnight.txt
index 9dbeaa345..6cd7ec155 100644
--- a/npc/jobs/2-1-1/LordKnight.txt
+++ b/npc/jobs/2-1-1/LordKnight.txt
@@ -1,107 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(144) > 0) set @qsk,1;
- if(getskilllv(145) > 0) set @qsk1,1;
- if(getskilllv(146) > 0) set @qsk2,1;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4002) && (readparam(55) >= 45)) goto L_HSWM;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4002) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Lord Knight]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Lord Knight]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Lord Knight,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Lord Knight]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Lord Knight]";
- mes "You're not ready to become an High Swordsman yet.";
- close;
-
-L_Class:
- mes "[Lord Knight]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Lord Knight yet.";
- close;
-
-L_Levels:
- mes "[Lord Knight]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Lord Knight";
- close;
-
-L_HNov:
- mes "[Lord Knight]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 25;
- next;
- mes "[Lord Knight]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- next;
-qsk:
- skill 144,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-qsk1:
- skill 145,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-qsk2:
- skill 146,1,0;
- set @qsk2,0;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Lord Knight]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Swordsman";
- close;
-L_HSWM:
- mes "[Lord Knight]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Lord Knight!";
- jobchange 31;
- close;
-
-Skill_Points:
- mes "[Lord Knight]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Lord Knight]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",25,"Swordman High",31,"Lord Knight",144,145,146,0;
+}
diff --git a/npc/jobs/2-1-1/Sniper.txt b/npc/jobs/2-1-1/Sniper.txt
index 3b39fb628..1bbf6e75f 100644
--- a/npc/jobs/2-1-1/Sniper.txt
+++ b/npc/jobs/2-1-1/Sniper.txt
@@ -1,104 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(147) > 0) set @qsk,1;
- if(getskilllv(148) > 0) set @qsk1,1;
- if(checkfalcon(0) > 0) goto L_Falcon;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4004) && (readparam(55) >= 45)) goto L_HARC;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4004) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Sniper]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Sniper]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Sniper,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Sniper]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Sniper]";
- mes "You're not ready to become an High Archer yet.";
- close;
-
-L_Class:
- mes "[Sniper]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Sniper yet.";
- close;
-
-L_Levels:
- mes "[Sniper]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Sniper";
- close;
-
-L_HNov:
- mes "[Sniper]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 27;
- next;
- mes "[Sniper]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- next;
-qsk:
- skill 147,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- goto L_HNov_2;
-qsk1:
- skill 148,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Sniper]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Archer";
- close;
-L_HARC:
- mes "[Sniper]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Sniper!";
- jobchange 35;
- close;
-
-Skill_Points:
- mes "[Sniper]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Sniper]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-
-L_Falcon:
- mes "[Sniper]";
- mes "Please take your Falcon off before proceeding "+strcharinfo(0)+".";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",27,"High Archer",35,"Sniper",147,148,0,0;
+}
diff --git a/npc/jobs/2-1-1/WhiteSmith.txt b/npc/jobs/2-1-1/WhiteSmith.txt
index 29b483eda..103cd65b5 100644
--- a/npc/jobs/2-1-1/WhiteSmith.txt
+++ b/npc/jobs/2-1-1/WhiteSmith.txt
@@ -1,106 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,58,6 script White Smith 725,{
- if(getskilllv(153) > 0) set @qsk,1;
- if(getskilllv(154) > 0) set @qsk1,1;
- if(getskilllv(155) > 0) set @qsk2,1;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4007) && (readparam(55) >= 45)) goto L_HMERC;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4007) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[White Smith]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[White Smith]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of White Smith,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[White Smith]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[White Smith]";
- mes "You're not ready to become an High Merchant yet.";
- close;
-
-L_Class:
- mes "[White Smith]";
- mes "You've come far to get here. unfortunately, you're not ready to become an White Smith yet.";
- close;
-
-L_Levels:
- mes "[White Smith]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an White Smith";
- close;
-
-L_HNov:
- mes "[White Smith]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 29;
- next;
- mes "[White Smith]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- next;
-qsk:
- skill 153,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-qsk1:
- skill 154,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-qsk2:
- skill 155,1,0;
- set @qsk2,0;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[White Smith]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Merchant";
- close;
-L_HMERC:
- mes "[White Smith]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an White Smith!";
- jobchange 34;
- close;
-
-Skill_Points:
- mes "[White Smith]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[White Smith]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+valkyrie.gat,44,51,6 script White Smith 725,{
+ callfunc "F_Rebirth",29,"Merchant High",34,"White Smith",153,154,155,0;
+}
diff --git a/npc/jobs/2-1/assassin.txt b/npc/jobs/2-1/assassin.txt
index 7986cd91e..f9b7a730a 100644
--- a/npc/jobs/2-1/assassin.txt
+++ b/npc/jobs/2-1/assassin.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Compatible With: =====================================
//= eAthena RC4
//===== Description: =========================================
@@ -12,12 +12,13 @@
//===== 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.
+//= 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]
//============================================================
@@ -147,7 +148,7 @@ L_Failed2:
end;
L_Change:
- if (skpoint > 0) goto L_SkPoints;
+ 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;
@@ -1169,16 +1170,14 @@ OnFailed:
}
// Observer ===========================>\\
-in_moc_16.gat,62,153,1 script Observer 55,
-{
+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,
-{
+in_moc_16.gat,87,137,0 script sinWarp1 45,2,1,{
OnTimer30000:
killmonsterall "in_moc_16.gat";
enablenpc "Thomas";
@@ -1187,8 +1186,7 @@ OnTimer30000:
}
// Booby Traps ========================>\\
-in_moc_16.gat,68,158,0 script 01_1::SinTrap 139,0,0,
-{
+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";
@@ -1434,8 +1432,7 @@ OnTimer188000:
//=============================================//
// Warp
//=============================================//
-in_moc_16.gat,182,169,1 script sinWarp3 45,1,1,
-{
+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";
@@ -1457,8 +1454,7 @@ in_moc_16.gat,182,169,1 script sinWarp3 45,1,1,
//==============================================//
// Start Trigger ------------------------------------------------------------------
-in_moc_16.gat,167,114,3 script guildmaster_Trig#0 139,4,0,
-{
+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;
@@ -1476,8 +1472,7 @@ in_moc_16.gat,167,114,3 script guildmaster_Trig#0 139,4,0,
}
// Guild Master -----------------------------------------------------------------------------
-in_moc_16.gat,149,80,4 script Guild Master 106,1,1,
-{
+in_moc_16.gat,149,80,4 script Guild Master 106,1,1,{
end;
OnTouch:
@@ -1834,20 +1829,17 @@ sF_Questions2:
//=============================================//
// Maze Triggers
//=============================================//
-in_moc_16.gat,170,90,0 script maze_trig#1 139,0,0,
-{
+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,
-{
+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,
-{
+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.";
@@ -1855,39 +1847,33 @@ in_moc_16.gat,153,85,0 script maze_trig#3 139,0,0,
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,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+in_moc_16.gat,186,107,0 script maze_trig#9 139,0,0,{
mes "[Guild Master]";
mes "...Not that way either...";
close;
@@ -1897,8 +1883,7 @@ in_moc_16.gat,186,107,0 script maze_trig#9 139,0,0,
//================================================//
// Decoy Chief
//================================================//
-in_moc_16.gat,186,81,0 script Guild Master#2 55,
-{
+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.";
diff --git a/npc/jobs/2-1/blacksmith.txt b/npc/jobs/2-1/blacksmith.txt
index 0f1b71eb4..100bbc4da 100644
--- a/npc/jobs/2-1/blacksmith.txt
+++ b/npc/jobs/2-1/blacksmith.txt
@@ -7,7 +7,7 @@
//= Optimized and further edited by kobra_k88.
//= Further bugfixed and tested by Lupus
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= eAthena 0.5.2 +
//===== Description: =========================================
@@ -17,6 +17,7 @@
//= 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]
==============================================================
@@ -461,7 +462,7 @@ L_result:
mes "Good!";
next;
mes "[Geshupenschte]";
- mes "Lets see....your score is ^5533FF"+@score+"."^000000;
+ mes "Lets see....your score is ^5533FF"+@score+".^000000";
if (@score == 100) goto L_perfect;
mes ".............";
next;
@@ -485,7 +486,7 @@ L_result2:
mes "Great!";
next;
mes "[Geshupenschte]";
- mes "Lets see....your score is ^5533FF"+@score+"."^000000;
+ mes "Lets see....your score is ^5533FF"+@score+".^000000";
if (@score > 80) goto L_pass;
mes ".............";
next;
@@ -1160,7 +1161,7 @@ comodo.gat,158,342,4 script Bismarck 118,{
if (BSMITH_Q == 3) goto L_Start;
mes "[Bismarck]";
- mes "......Ughï....";
+ mes "......Ugh?...";
mes ".....When's that delivery coming......";
next;
mes "[Bismarck]";
diff --git a/npc/jobs/2-1/hunter.txt b/npc/jobs/2-1/hunter.txt
index b49b98d3f..bd8f830a5 100644
--- a/npc/jobs/2-1/hunter.txt
+++ b/npc/jobs/2-1/hunter.txt
@@ -6,7 +6,7 @@
//= Converted by kobra_k88
//= Further bugfixed and tested by Lupus
//===== Current Version: =====================================
-//= 1.7
+//= 1.8
//===== Compatible With: =====================================
//= eAthena 1.0
//===== Description: =========================================
@@ -19,6 +19,7 @@
//= v1.5 Fixed items quest fork bug [Lupus]
//= v1.6 Fixed items quest bug: added extra condition [Lupus]
//= v1.7 Fixed skillpoints check bug [Lupus]
+//= v1.8 Fixed an exploit, thanks to nonox [celest]
//============================================================
@@ -35,8 +36,7 @@ pay_fild10.gat,148,251,4 script Hunter Guildsman 98,{
//<====================================== Job Changer ========================================>\\
-in_hunter.gat,99,99,4 script Hunter Sharon 727,
-{
+in_hunter.gat,99,99,4 script Hunter Sharon 727,{
if(Class==Job_Archer) goto L_Start;
if(Class==Job_Hunter) goto L_Hunt;
if(callfunc("Is_Bow_Class")) goto L_Other;
@@ -373,8 +373,7 @@ L_Change:
//<=========================== Demon Hunter: Second Test ===============================>\\
-in_hunter.gat,55,99,7 script Demon Hunter 732,
-{
+in_hunter.gat,55,99,7 script Demon Hunter 732,{
if(Class == Job_Archer) goto L_Arc;
if(Class == Job_Hunter) goto L_Hnt;
@@ -538,8 +537,7 @@ L_Done:
//<=============================== Guild Master: Last Test =================================>\\
-payon_in02.gat,21,31,1 script Guild Master 59,
-{
+payon_in02.gat,21,31,1 script Guild Master 59,{
if(Class == Job_Archer) goto L_Archer;
if(Class == Job_Hunter) goto L_Hnt;
@@ -724,8 +722,7 @@ OnMyMobDead1:
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;
- set HNTR_Q2, 2;
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: Great job! Go use the switch now!",8;
end;
}
@@ -835,8 +832,7 @@ OnTimer196000:
}
// SwitchHnt ------------------------------------------------------
-job_hunte.gat,93,101,1 script SwitchHnt 723,
-{
+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";
@@ -847,6 +843,7 @@ job_hunte.gat,93,101,1 script SwitchHnt 723,
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";
diff --git a/npc/jobs/2-1/knight.txt b/npc/jobs/2-1/knight.txt
index 8335316a7..3171535b1 100644
--- a/npc/jobs/2-1/knight.txt
+++ b/npc/jobs/2-1/knight.txt
@@ -25,8 +25,7 @@
//<------------------------------------------------------------------------------------ Chivalry Captain Herman------------------------------------------------------------------------------------------>\\
-prt_in.gat,88,101,3 script Chivalry Captain Herman 56,
-{
+prt_in.gat,88,101,3 script Chivalry Captain Herman 56,{
if (Class == Job_Swordman && KNIGHT_Q > 0) goto L_Check;
mes "[Chivalry Captain Herman]";
@@ -225,8 +224,7 @@ L_Check:
//<--------------------------------------------------------------------------------- Sir Andrew Syloc (1st test) ------------------------------------------------------------------------------------------>\\
-prt_in.gat,75,107,4 script SIr Andrew Syloc 65,
-{
+prt_in.gat,75,107,4 script Sir Andrew Syloc 65,{
mes "[Sir Andrew Syloc]";
if (Class == Job_Knight) goto L_Knight;
if (Class == Job_Novice) goto L_Novice;
@@ -384,8 +382,7 @@ L_Check:
//<------------------------------------------------------------------------------ Sir James Syracuse (2nd Test) ----------------------------------------------------------------------------------------->\\
-prt_in.gat,71,91,6 script Sir James Syracuse 65,
-{
+prt_in.gat,71,91,6 script Sir James Syracuse 65,{
mes "[Sir James Syracuse]";
if (class == Job_Knight) goto L_Knight;
if (class == Job_Novice) goto L_Novice;
@@ -724,8 +721,7 @@ L_Test:
//<--------------------------------------------------------------------------------- Sir Windsor (3rd Test) -------------------------------------------------------------------------------------------------->\\
// Sir Windsor ---------------------------------------------------------
-prt_in.gat,79,94,3 script Sir Windsor#1 733,
-{
+prt_in.gat,79,94,3 script Sir Windsor#1 733,{
mes "[Sir Windsor]";
if(Class == Job_Knight) goto L_Knight;
if(Class == Job_Novice) goto L_Novice;
@@ -793,8 +789,7 @@ L_Done:
// Waiting Room ---------------------------------------------------------------------------
-job_knt.gat,89,110,4, script Sir Windsor#2::SW2 733,
-{
+job_knt.gat,89,110,4, script Sir Windsor#2::SW2 733,{
mes "[Sir Windsor]";
mes "..........";
next;
@@ -885,8 +880,7 @@ OnStart:
}
// First Level ---------------------------------------------------------
-job_knt.gat,1,1,1 script KntLvl1 -1,
-{
+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";
@@ -917,8 +911,7 @@ OnMyMobDead:
// Second Level ---------------------------------------------------------
-job_knt.gat,1,1,1 script KntLvl2 -1,
-{
+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";
@@ -950,8 +943,7 @@ OnMyMobDead:
}
// Third Level ---------------------------------------------------------------
-job_knt.gat,1,1,1 script KntLvl3 -1,
-{
+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";
@@ -979,8 +971,7 @@ OnMyMobDead:
}
// Timer --------------------------------------------------------------------------------
-job_knt.gat,1,1,1 script TimerKnt -1,
-{
+job_knt.gat,1,1,1 script TimerKnt -1,{
OnTimer2000:
set $@KntTime$, "You have 3 minutes...";
@@ -1032,8 +1023,7 @@ AnnounceKnt:
//<------------------------------------------------------------------------------------ Lady Amy Beatris (4th Test) ---------------------------------------------------------------------------------------------->\\
-prt_in.gat,69,107,5 script Lady Amy Beatris 728,
-{
+prt_in.gat,69,107,5 script Lady Amy Beatris 728,{
mes "[Lady Amy Beatris]";
if (class == Job_Knight) goto L_Knight;
if (class == Job_Novice) goto L_Novice;
@@ -1348,8 +1338,7 @@ M_Menu:
//<------------------------------------------------------------------------------------------- Sir Edmund (5th Test) --------------------------------------------------------------------------------------------->\\
-prt_in.gat,70,99,5 script Sir Edmund 734,
-{
+prt_in.gat,70,99,5 script Sir Edmund 734,{
mes "[Sir Edmund]";
if (class == Job_Knight) goto L_Knight;
if (class == Job_Swordman) goto L_Sword;
@@ -1456,8 +1445,7 @@ L_Test:
}
// Test -----------------------------
-job_knt.gat,1,1,1 script ev_Test -1,
-{
+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";
@@ -1504,8 +1492,7 @@ OnTimerWarp:
//<------------------------------------------------------------------------------------------ Sir Grey (Final Test) ------------------------------------------------------------------------------------------------------>\\
-prt_in.gat,87,90,3 script Sir Grey 119,
-{
+prt_in.gat,87,90,3 script Sir Grey 119,{
mes "[Sir Grey]";
if (class == Job_Knight) goto L_Knight;
if (class == Job_Novice) goto L_Novice;
@@ -1854,5 +1841,4 @@ M_Menu:
M_End:
close;
-
-} \ No newline at end of file
+}
diff --git a/npc/jobs/2-1/priest.txt b/npc/jobs/2-1/priest.txt
index cb9bbe68b..dcbf8fdb6 100644
--- a/npc/jobs/2-1/priest.txt
+++ b/npc/jobs/2-1/priest.txt
@@ -23,8 +23,7 @@
//*********************************************************************************************************************************************************************************\\
//============================================ Father Thomas: Job changer, Test 1 =============================================\\
//*********************************************************************************************************************************************************************************\\
-prt_church.gat,16,41,4 script Father Thomas 60,
-{
+prt_church.gat,16,41,4 script Father Thomas 60,{
mes "[Father Thomas]";
if (class == Job_Novice) goto L_Novice;
if (class == Job_Priest) goto L_Priest;
@@ -37,21 +36,21 @@ L_Other:
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.";
+ mes "I hope God will bless you.";
close;
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 acolyote.",M_0a, "I want to become a ^5533FFPriest^000000.",M_0b, "Iam just walking around.",M_0End;
+ 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 Acolyote eh? To apply to become an Acolyote, please go to the room opposite of here.";
+ 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 Acolyote. To become an Acolyote, go to the room opposite of here.";
+ 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]";
@@ -62,7 +61,7 @@ L_Novice:
close;
L_Priest:
- mes "God bless you, child. You are here again because you listened to god's orders.";
+ 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.";
@@ -70,11 +69,11 @@ L_Priest:
mes "[Father Thomas]";
mes "So why are you here today?";
next;
- menu "I just wanted to see how you were.",M_1a, "I am here to help the Acolytes.",M_1b, "Life is really hard... I was wondering if you could help.",M_1End;
+ 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 am fine thank you. Please send my regards to all of the other Priests, and Priestess.";
+ 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.";
@@ -157,7 +156,7 @@ L_Start:
mes "Oh... so you want to become a priest? God bless you for your determination.";
next;
mes "[Father Thomas]";
- mes "I am Father Thomas. I am in charge of protecting Prontera from the evil spirits that plague the lands of Rune Midgard.";
+ 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.";
@@ -184,7 +183,7 @@ L_Start:
goto L_Test1;
sL_LowLvl:
- mes "I am sorry but you cannot become a Priest at this moment. You need to have a job level of at least 40.";
+ 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.";
@@ -192,7 +191,7 @@ L_Start:
close;
sL_HighLvl:
- mes "Wow, your already at job lvl 50. I am amazed at your dedication and hard work!";
+ mes "Wow, your already at job lvl 50. I'm amazed at your dedication and hard work!";
emotion 0;
next;
mes "[Father Thomas]";
@@ -224,11 +223,11 @@ L_Start:
close;
M_2End:
mes "[Father Thomas]";
- mes "Oh is that the case?... Well I am fine thank you.";
+ 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...";
+ 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;
@@ -369,7 +368,7 @@ L_Change:
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.";
+ 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.";
@@ -490,7 +489,7 @@ L_Start:
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 quiet know it..?",M_1b;
+ 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.";
@@ -509,7 +508,7 @@ L_Start:
next;
mes "[Father Peter]";
mes "There's a lot of evil in this world.";
- mes "The evil usually tease people that prey to god.";
+ 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!";
@@ -709,7 +708,7 @@ L_Priest:
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, iam gonna take to you down.";
+ 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:
@@ -717,7 +716,7 @@ L_Aco:
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.";
+ 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?";
@@ -728,7 +727,7 @@ L_Aco:
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, Iam going to give up.",-, "Devil, Be gone NOW!.",M_1a;
+ 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.";
@@ -740,7 +739,7 @@ L_Aco:
end;
M_1a:
mes "[Deviruchi]";
- mes "Oh.. Iam so scared..hahaha. Don't be like this, listen to what i have to say.";
+ 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.";
@@ -841,7 +840,7 @@ L_Aco:
mes "okay fine, i'll spare you today.";
next;
mes "[Doppelganger]";
- mes "If i see you next time, iam gonna make you die painfully.";
+ mes "If i see you next time, I'm gonna make you die painfully.";
disablenpc "Doppel_Trig";
disablenpc "Doppel";
donpcevent "PrstTest2_2::OnCheck";
@@ -875,7 +874,7 @@ L_Aco:
mes "[Dark Lord]";
mes "Even more annoying than ants you humans, leave and stop bothering me!";
next;
- menu "Iam sorry, please spare me.",-, "Devil, Be GONE!.",M_1c;
+ menu "I'm sorry, please spare me.",-, "Devil, Be GONE!.",M_1c;
mes "[Dark Lord]";
mes "Don't come here again!";
@@ -902,7 +901,7 @@ L_Aco:
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, iam gonna kill you.";
+ mes "If i see you again, I'm gonna kill you.";
disablenpc "Dark_Trig";
disablenpc "Dark Lord";
donpcevent "PrstTest2_2::OnCheck";
@@ -1134,8 +1133,7 @@ AnnouncePrst:
//**********************************************************************************************************************************************************************************\\
//================================================= Sister Cecile: Test 3 =====================================================\\
//**********************************************************************************************************************************************************************************\\
-prt_church.gat,27,24,4 script Sister Cecile 79,
-{
+prt_church.gat,27,24,4 script Sister Cecile 79,{
mes "[Sister Cecile]";
if(Class == Job_Priest) goto L_Prst;
if(Class == Job_Acolyte) goto L_Aco;
@@ -1144,7 +1142,7 @@ prt_church.gat,27,24,4 script Sister Cecile 79,
L_Other:
mes "This is the Prontera Church, what can I help you with?";
next;
- menu "Please tell me about priests.",-, "Iam just walking around.",M_End0;
+ 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.";
@@ -1167,7 +1165,7 @@ 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 "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]";
@@ -1195,14 +1193,14 @@ L_Aco:
if(sex == 0) mes "God bless you, sister.";
mes "Why are you here?";
next;
- menu "I want to become a priest.",-, "Iam just wondering around.",M_End1;
+ 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, Iam responsible for helping acolytes become priests.";
+ 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.";
@@ -1235,7 +1233,7 @@ L_Start:
next;
L_Test3:
mes "[Sister Cecile]";
- mes "From today on, do you wish to help the god for all eternity?";
+ mes "From today on, do you wish to help the God for all eternity?";
next;
menu "Yes.",M_2a, "No.",-;
@@ -1251,12 +1249,12 @@ L_Test3:
M_2a:
mes "[Sister Cecile]";
- mes "Will you use god's power for your own profit?";
+ 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 theif.";
+ mes "No, that doesn't work, if you use God's power to do what you wish, you're just like a theif.";
mes "How can you become a good priest if you think like that?";
next;
mes "[Sister Cecile]";
@@ -1288,7 +1286,7 @@ L_Test3:
menu "Yes.",M_2d, "No.",-;
mes "[Sister Cecile]";
- mes "No, thats not what god thinks.";
+ 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]";
@@ -1307,7 +1305,7 @@ L_Test3:
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 "even if your God's best servant.";
mes "You don't have the right to bad-talk.";
close;
diff --git a/npc/jobs/2-1/wizard.txt b/npc/jobs/2-1/wizard.txt
index d899a8ba4..6b0cbab49 100644
--- a/npc/jobs/2-1/wizard.txt
+++ b/npc/jobs/2-1/wizard.txt
@@ -6,7 +6,7 @@
//= converted by kobra_k88
//= Further bugfixed and tested by Lupus
//===== Current Version: =====================================
-//= 1.3a
+//= 1.3c
//===== Compatible With: =====================================
//= eAthena 1.0
//===== Description: =========================================
@@ -18,13 +18,14 @@
//= v1.2 Changed global variable names to unique ones.
//= v1.3 Rollback from the wrong Kashy's fix
//= v1.3a Fixed issue with duplicating monsters thx to Bison.[kobra_k88]
+//= v1.3b changed one Horong to Frilldora (now 3rd room contains 1 agressive mob.)
+//= v1.3c more simplified fire room - removed agressive Desert Wolf. Got it from Freya [Lupus]
//============================================================
//<=================== Some dog =========================>
-gef_tower.gat,107,35,5 script Some Dog 81,
-{
+gef_tower.gat,107,35,5 script Some Dog 81,{
if(Class == Job_Mage) goto L_JobMage;
if(callfunc("Is_Magic_Class")) goto L_Magic;
if(callfunc("Is_Holy_Class")) goto L_Holy;
@@ -153,8 +154,7 @@ L_JobMage:
//<=========================================== Registrar and Examiner Catherine Medichi ==============================================>\\
-gef_tower.gat,111,37,4 script Catherine Medichi 68,
-{
+gef_tower.gat,111,37,4 script Catherine Medichi 68,{
mes "[Catherine Medichi]";
if(Class == Job_Wizard) goto L_Wizard;
if(Class == Job_Novice) goto L_Novice;
@@ -495,8 +495,7 @@ L_Mage:
//<================================================ Examiner: Raul Expagarus ==================================================>\\
-gef_tower.gat,102,24,3 script Raul Expagarus 735,
-{
+gef_tower.gat,102,24,3 script Raul Expagarus 735,{
mes "[Raul Expagarus]";
if(Class == Job_Mage) goto L_Mage;
if(Class == Job_Wizard) goto L_Wizard;
@@ -1130,8 +1129,7 @@ L_Mage:
<====================================================== Test Arena ========================================================>\\
// Test Guide ---------------------------------------------------------------------------------
-job_wiz.gat,50,165,4 script Wizard Test Guide::WzTG 123,
-{
+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;
@@ -1186,8 +1184,7 @@ OnStart:
}
// Room of Water -----------------------------------------------------------------------------
-job_wiz.gat,1,1,1 script WaterRm -1,
-{
+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";
@@ -1239,8 +1236,7 @@ OnMyMobDead2:
}
// Room of Earth -----------------------------------------------------------------------------------------------
-job_wiz.gat,1,1,1 script EarthRm -1,
-{
+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";
@@ -1296,10 +1292,9 @@ OnMyMobDead2:
}
// Room of Fire ------------------------------------------------------------------------------------------------------------
-job_wiz.gat,1,1,1 script FireRm -1,
-{
+job_wiz.gat,1,1,1 script FireRm -1,{
set $@WzRm, 3;
- set $@WzMOB, 8;
+ 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";
@@ -1307,7 +1302,6 @@ job_wiz.gat,1,1,1 script FireRm -1,
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";
- monster "job_wiz.gat",54,89,"Desert Wolf",1106,1,"FireRm::OnMyMobDead1";
initnpctimer "TimerWz";
end;
@@ -1324,8 +1318,8 @@ 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";
+ monster "job_wiz.gat",43,99,"Hode",1127,1,"FireRm::OnMyMobDead2";
+ monster "job_wiz.gat",45,99,"Hode",1127,1,"FireRm::OnMyMobDead2";
setnpctimer 120000, "TimerWz";
startnpctimer "TimerWz";
end;
@@ -1349,8 +1343,7 @@ OnMyMobDead2:
// Timer -----------------------------------------------------------------------------------------------
-job_wiz.gat,1,1,1 script TimerWz -1,
-{
+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;
diff --git a/npc/jobs/2-2-1/Champion.txt b/npc/jobs/2-2-1/Champion.txt
index a86818498..d86a3f749 100644
--- a/npc/jobs/2-2-1/Champion.txt
+++ b/npc/jobs/2-2-1/Champion.txt
@@ -1,89 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(156) > 0) set @qsk;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4005) && (readparam(55) >= 45)) goto L_HACO;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4005) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Champion]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Champion]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Champion,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Champion]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Champion]";
- mes "You're not ready to become an Acolyte High yet...";
- close;
-
-L_Class:
- mes "[Champion]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Champion yet.";
- close;
-
-L_Levels:
- mes "[Champion]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Champion";
- close;
-
-L_HNov:
- mes "[Champion]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 28;
- next;
- mes "[Champion]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- next;
-qsk:
- skill 156,1,0;
- set @qsk,0;
- goto L_HNov_2;
- close;
-
-L_HNov_2:
- mes "[Champion]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to Acolyte High";
- close;
-L_HACO:
- mes "[Champion]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Champion!";
- jobchange 39;
- close;
-
-Skill_Points:
- mes "[Champion]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Champion]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",28,"Acolyte High",39,"Champion",156,0,0,0;
+}
diff --git a/npc/jobs/2-2-1/Clown.txt b/npc/jobs/2-2-1/Clown.txt
index 9a7fe8e9e..a7e303ac5 100644
--- a/npc/jobs/2-2-1/Clown.txt
+++ b/npc/jobs/2-2-1/Clown.txt
@@ -1,110 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(readparam(21) > 0) goto L_Female;
- if(getskilllv(147) > 0) set @qsk,1;
- if(getskilllv(148) > 0) set @qsk1,1;
- if(checkfalcon(0) > 0) goto L_Falcon;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4004) && (readparam(55) >= 45)) goto L_HARC;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4004) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Clown]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Clown]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Clown,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Clown]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Clown]";
- mes "You're not ready to become an High Archer yet.";
- close;
-
-L_Class:
- mes "[Clown]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Clown yet.";
- close;
-
-L_Levels:
- mes "[Clown]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Clown";
- close;
-
-L_HNov:
- mes "[Clown]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 27;
- next;
- mes "[Clown]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- next;
-qsk:
- skill 147,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- goto L_HNov_2;
-qsk1:
- skill 148,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Clown]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Archer";
- close;
-L_HARC:
- mes "[Clown]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Clown!";
- jobchange 43;
- close;
-
-Skill_Points:
- mes "[Clown]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Clown]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-
-L_Falcon:
- mes "[Clown]";
- mes "Please take your Falcon off before proceeding "+strcharinfo(0)+".";
- close;
-
-L_Female:
- mes "[Clown]";
- mes "Only males can become a Clown.";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",27,"High Archer",43,"Clown",147,148,0,0;
+}
diff --git a/npc/jobs/2-2-1/Creator.txt b/npc/jobs/2-2-1/Creator.txt
index a48dd7871..219091856 100644
--- a/npc/jobs/2-2-1/Creator.txt
+++ b/npc/jobs/2-2-1/Creator.txt
@@ -1,106 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(153) > 0) set @qsk,1;
- if(getskilllv(154) > 0) set @qsk1,1;
- if(getskilllv(155) > 0) set @qsk2,1;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4007) && (readparam(55) >= 45)) goto L_HMERC;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4007) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Creator]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Creator]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Creator,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Creator]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Creator]";
- mes "You're not ready to become an High Merchant yet.";
- close;
-
-L_Class:
- mes "[Creator]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Creator yet.";
- close;
-
-L_Levels:
- mes "[Creator]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Creator";
- close;
-
-L_HNov:
- mes "[Creator]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 29;
- next;
- mes "[Creator]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- next;
-qsk:
- skill 153,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-qsk1:
- skill 154,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-qsk2:
- skill 155,1,0;
- set @qsk2,0;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Creator]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Merchant";
- close;
-L_HMERC:
- mes "[Creator]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Creator!";
- jobchange 42;
- close;
-
-Skill_Points:
- mes "[Creator]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Creator]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",29,"Merchant High",42,"Creator",153,154,155,0;
+}
diff --git a/npc/jobs/2-2-1/Gypsy.txt b/npc/jobs/2-2-1/Gypsy.txt
index bc3914af9..9f05d1970 100644
--- a/npc/jobs/2-2-1/Gypsy.txt
+++ b/npc/jobs/2-2-1/Gypsy.txt
@@ -1,110 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(readparam(21) < 1) goto L_Male;
- if(getskilllv(147) > 0) set @qsk,1;
- if(getskilllv(148) > 0) set @qsk1,1;
- if(checkfalcon(0) > 0) goto L_Falcon;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4004) && (readparam(55) >= 45)) goto L_HARC;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4004) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Gypsy]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Gypsy]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Gypsy,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Gypsy]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Gypsy]";
- mes "You're not ready to become an High Archer yet.";
- close;
-
-L_Class:
- mes "[Gypsy]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Gypsy yet.";
- close;
-
-L_Levels:
- mes "[Gypsy]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Gypsy";
- close;
-
-L_HNov:
- mes "[Gypsy]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 27;
- next;
- mes "[Gypsy]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- next;
-qsk:
- skill 147,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- goto L_HNov_2;
-qsk1:
- skill 148,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Gypsy]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Archer";
- close;
-L_HARC:
- mes "[Gypsy]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Gypsy!";
- jobchange 44;
- close;
-
-Skill_Points:
- mes "[Gypsy]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Gypsy]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-
-L_Falcon:
- mes "[Gypsy]";
- mes "Please take your Falcon off before proceeding "+strcharinfo(0)+".";
- close;
-
-L_Male:
- mes "[Gypsy]";
- mes "Only females can become a Gypsy.";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",27,"High Archer",44,"Gypsy",147,148,0,0;
+}
diff --git a/npc/jobs/2-2-1/Paladin.txt b/npc/jobs/2-2-1/Paladin.txt
index 6694c973a..207c8674a 100644
--- a/npc/jobs/2-2-1/Paladin.txt
+++ b/npc/jobs/2-2-1/Paladin.txt
@@ -1,107 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(144) > 0) set @qsk,1;
- if(getskilllv(145) > 0) set @qsk1,1;
- if(getskilllv(146) > 0) set @qsk2,1;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4002) && (readparam(55) >= 45)) goto L_HSWM;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4002) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Paladin]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Paladin]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Paladin,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Paladin]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Paladin]";
- mes "You're not ready to become an High Swordsman yet.";
- close;
-
-L_Class:
- mes "[Paladin]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Paladin yet.";
- close;
-
-L_Levels:
- mes "[Paladin]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Paladin";
- close;
-
-L_HNov:
- mes "[Paladin]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 25;
- next;
- mes "[Paladin]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- next;
-qsk:
- skill 144,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-qsk1:
- skill 145,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-qsk2:
- skill 146,1,0;
- set @qsk2,0;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Paladin]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Swordsman";
- close;
-L_HSWM:
- mes "[Paladin]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Paladin!";
- jobchange 38;
- close;
-
-Skill_Points:
- mes "[Paladin]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Paladin]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",25,"Swordman High",38,"Paladin",144,145,146,0;
+}
diff --git a/npc/jobs/2-2-1/Professor.txt b/npc/jobs/2-2-1/Professor.txt
index e7d94d9ac..9582345a3 100644
--- a/npc/jobs/2-2-1/Professor.txt
+++ b/npc/jobs/2-2-1/Professor.txt
@@ -1,88 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(157) > 0) set @qsk,1;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4003) && (readparam(55) >= 45)) goto L_HMAG;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4003) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Professor]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Professor]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Professor,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Professor]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Professor]";
- mes "You're not ready to become an High Mage yet.";
- close;
-
-L_Class:
- mes "[Professor]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Professor yet.";
- close;
-
-L_Levels:
- mes "[Professor]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Professor";
- close;
-
-L_HNov:
- mes "[Professor]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 26;
- next;
- mes "[Professor]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- next;
-qsk:
- skill 157,1,0;
- set @qsk,0;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Professor]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Mage";
- close;
-L_HMAG:
- mes "[Professor]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Professor!";
- jobchange 40;
- close;
-
-Skill_Points:
- mes "[Professor]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Professor]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",26,"High Mage",40,"Professor",157,0,0,0;
+}
diff --git a/npc/jobs/2-2-1/Stalker.txt b/npc/jobs/2-2-1/Stalker.txt
index fa23b6ac5..b2cf2781f 100644
--- a/npc/jobs/2-2-1/Stalker.txt
+++ b/npc/jobs/2-2-1/Stalker.txt
@@ -1,118 +1,19 @@
-// Advance Class jobchanger after kRO Normals.
-// Checks if the player have any questskills, cart\falcon, level and such.
-// Made by Nana.
+//===== 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,{
- if(getskilllv(149) > 0) set @qsk,1;
- if(getskilllv(150) > 0) set @qsk1,1;
- if(getskilllv(151) > 0) set @qsk2,1;
- if(getskilllv(152) > 0) set @qsk3,1;
- if(checkcart(0) > 0) goto L_Cart;
- if(readparam(12) > 0) goto Skill_Points;
- if(readparam(19) >= 4008) goto L_Advance;
- if((readparam(19) == 4001) && (readparam(55) >= 10)) goto L_HNov;
- if((readparam(19) == 4007) && (readparam(55) >= 45)) goto L_HTHF;
- if(readparam(19) < 7) goto L_Class;
- if(readparam(19) == 4001) goto L_Class1;
- if(readparam(19) == 4007) goto L_Class;
- if((readparam(11) >= 99) && (readparam(55) >= 50) && (readparam(19) >= 7)) goto L_Change;
- if((readparam(11) < 99) && (readparam(55) < 50)) goto L_Levels;
- mes "[Stalker]";
- mes "Hi there...";
- close;
-
-L_Change:
- mes "[Stalker]";
- mes "Hello there "+strcharinfo(0)+"!";
- mes "You've made a brave choice in coming here to be reborn and stepping forth into the ranks of Stalker,";
- mes "I wish you good fortune in the near future!";
- jobchange 24;
- resetlvl(1);
- close;
-
-L_Cart:
- mes "[Stalker]";
- mes "Please un-equip that cart before continuing.";
- close;
-
-L_Class1:
- mes "[Stalker]";
- mes "You're not ready to become an High thief yet.";
- close;
-
-L_Class:
- mes "[Stalker]";
- mes "You've come far to get here. unfortunately, you're not ready to become an Stalker yet.";
- close;
-
-L_Levels:
- mes "[Stalker]";
- mes "You're doing great! keep up the good work. You'll eventually get to the point where you can be an Stalker";
- close;
-
-L_HNov:
- mes "[Stalker]";
- mes "Tread lightly ahead as you're about to enter the distinguished world of Ragnarok.";
- mes "Must great fortune follow you!";
- jobchange 30;
- next;
- mes "[Stalker]";
- mes "Let me just add in the missing Quest Skills you lost under the Reborn process if you had any, "+strcharinfo(0)+".";
- next;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- next;
-qsk:
- skill 149,1,0;
- set @qsk,0;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- goto L_HNov_2;
-qsk1:
- skill 150,1,0;
- set @qsk1,0;
- if(@qsk > 0) goto qsk;
- if(@qsk2 > 0) goto qsk2;
- if(@qsk3 > 0) goto qsk3;
- goto L_HNov_2;
-qsk2:
- skill 151,1,0;
- set @qsk2,0;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk3 > 0) goto qsk3;
- goto L_HNov_2;
-qsk3:
- skill 152,1,0;
- set @qsk3,0;
- if(@qsk > 0) goto qsk;
- if(@qsk1 > 0) goto qsk1;
- if(@qsk2 > 0) goto qsk2;
- goto L_HNov_2;
-
-L_HNov_2:
- mes "[Stalker]";
- mes "Now when the formalities are fixed, I congratulate you on your Advancement to High Thief";
- close;
-L_HTHF:
- mes "[Stalker]";
- mes "Congratulations!";
- mes "You're not finally after alot of hard work, able to enter the halls of Valkyrie as an Stalker!";
- jobchange 41;
- close;
-
-Skill_Points:
- mes "[Stalker]";
- mes "Please use all of your skillpoints before proceeding.";
- close;
-
-L_Advance:
- mes "[Stalker]";
- mes "Hey there! You are already an Reborn. You cannot reach any higher";
- mes "*whistles*";
- close;
-} \ No newline at end of file
+ callfunc "F_Rebirth",30,"Theif High",41,"Stalker",149,150,151,152;
+}
diff --git a/npc/jobs/2-2/alchemist.txt b/npc/jobs/2-2/alchemist.txt
index 45f1ae5a2..f73b60029 100644
--- a/npc/jobs/2-2/alchemist.txt
+++ b/npc/jobs/2-2/alchemist.txt
@@ -1,29 +1,28 @@
-//===== eAthena Script =======================================
-//= Alchemist Job Quest
+//===== eAthena Script =======================================
+//= Alchemist Job Quest
//===== By: ==================================================
-//= nestor_zulueta (Fusion)
-//= converted by Darkchild
-//===== Current Version: =====================================
-//= 1.1
-//===== Compatible With: =====================================
-//= eAthena 1.0 +
-//===== Description: =========================================
-//= Alchemist job quest based off of official iRO quest.
-//===== Additional Comments: =================================
+//= nestor_zulueta (Fusion)
+//= converted by Darkchild
+//===== Current Version: =====================================
+//= 1.1
+//===== 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 Raspuchin's test. (based of mRO website) [kobra_k88]
-//============================================================
+//= Having a joblvl of 50 allows you to skip Raspuchin's test. (based of mRO website) [kobra_k88]
+//============================================================
//==================================================================================================//
// Registration and First Test
//==================================================================================================//
-alde_alche.gat,27,185,4 script Parmry Gianino 744,
-{
+alde_alche.gat,27,185,4 script Parmry Gianino 744,{
mes "[Parmry Gianino]";
if(Class == 5) goto L_Merc;
if(Class == Job_Alchem) goto L_Alch;
@@ -196,8 +195,7 @@ L_GoChange:
//==================================================================================================//
// 2nd Test: Math test :(
//==================================================================================================//
-alde_alche.gat,175,107,4 script Raspuchin Gregory 749,
-{
+alde_alche.gat,175,107,4 script Raspuchin Gregory 749,{
mes "[Raspuchin Gregory]";
if(class == 5) goto L_Merc;
L_Other:
@@ -461,8 +459,7 @@ L_Skip:
//==================================================================================================//
// 3rd Test: Mix some medicine
//==================================================================================================//
-alde_alche.gat,13,15,8 script Darwin 750,
-{
+alde_alche.gat,13,15,8 script Darwin 750,{
mes "[Darwin]";
if(class == 5) goto L_Merc;
L_Other:
@@ -686,8 +683,7 @@ L_NotEnuf:
//==================================================================================================//
// 4th Test: Learn from Morgenstein
//==================================================================================================//
-alde_alche.gat,79,19,4 script Van Helmont 748,
-{
+alde_alche.gat,79,19,4 script Van Helmont 748,{
mes "[Van Helmont]";
if(class == 5) goto L_Merc;
L_Other:
@@ -853,8 +849,7 @@ L_Done:
//==================================================================================================//
// Test 5 & 6: Word Scramble, Help the Baijin Bros.
//==================================================================================================//
-alde_alche.gat,145,19,4 script Nicholas Flamel 57,
-{
+alde_alche.gat,145,19,4 script Nicholas Flamel 57,{
mes "[Nicholas Flamel]";
if(class == 5) goto L_Merc;
L_Other:
@@ -1015,8 +1010,7 @@ L_Done:
//==================================================================================================//
// Job Changer
//==================================================================================================//
-alde_alche.gat,101,184,4 script Vincent Carsciallo 122,
-{
+alde_alche.gat,101,184,4 script Vincent Carsciallo 122,{
mes "[Vincent Carsciallo]";
if(Class == 5) goto L_Merc;
if(Class == Job_Alchem) goto L_Alch;
@@ -1075,4 +1069,4 @@ L_Change:
L_Skpoint:
mes "Please use all your skill point before talking to me.";
close;
-} \ No newline at end of file
+}
diff --git a/npc/jobs/2-2/crusader.txt b/npc/jobs/2-2/crusader.txt
index d76ee26b6..a74ef2850 100644
--- a/npc/jobs/2-2/crusader.txt
+++ b/npc/jobs/2-2/crusader.txt
@@ -54,8 +54,7 @@ NEXT_0:
JOB:
mes "[^000080Lothar^000000]";
mes "All right, let me take a look at you first.";
- next;
- mes "[^000080Lothar^000000]";
+ next;
if (readparam(55) != 50) goto SKIP;
set JLCC,1;
set Job_CR,5;
@@ -103,10 +102,10 @@ NEXT_0:
mes "- 10 ^FF0000Mementos^000000";
close;
IT:
- mes "- 10 ^FF0000Decayed Nail^000000";
- mes "- 10 ^FF0000Danggies^000000";
- mes "- 10 ^FF0000Stinky Scales^000000";
- mes "- 10 ^FF0000Mementos^000000";
+ mes "- 10 ^FF0000Skel-Bones^000000";
+ mes "- 10 ^FF0000Orc Claws^000000";
+ mes "- 1 ^FF0000Ball 'n Chain^000000";
+ mes "- 10 ^FF0000Danggie^000000";
close;
ASK:
@@ -1015,7 +1014,7 @@ job_cru.gat,23,42,0 script Test_2 139,8,8,{
if (Job_CR != 6) goto EXIT;
set @CR_etmp,1;
- areaannounce "job_cru.gat",0,0,23,42 "Please endure here and go to exit",8;
+ areaannounce "job_cru.gat",0,0,23,42,"Please endure here and go to exit",8;
monster "job_cru.gat",10,43,"Ghoul",1423,1,"dead";
monster "job_cru.gat",14,47,"Khalitzburg",1438,1,"dead";
diff --git a/npc/jobs/2-2/monk.txt b/npc/jobs/2-2/monk.txt
new file mode 100644
index 000000000..9c7410e07
--- /dev/null
+++ b/npc/jobs/2-2/monk.txt
@@ -0,0 +1,1920 @@
+//===== eAthena Script =======================================
+//= Monk Job Quest
+//===== By: ==================================================
+//= Dino9021, Edited / Translated by Celest
+//===== Current Version: =====================================
+//= 1.2
+//===== 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, and Fixed Marathon Part 8))) [Lupus]
+//============================================================
+
+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,{
+ if(MONK_Q == 1 ) goto Part1;
+ if(MONK_Q == 2 ) goto Part2;
+ if(Class == 15 || Class == 4016) goto IsMonk;
+ goto L_START;
+
+IsMonk:
+ mes "[Tohobu]";
+ mes "Your presence is not really welcomed at the ^00FF00St. Capitolina Abbey^000000.";
+ mes "However, welcome traveler, 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 would like to see how Monks train themselves.",L_MENU_1_0,"I want to be a Monk.",L_MENU_1_1,"I would 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(Class != 4 && Class != 4005) 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 higher then 40.";
+ next;
+ mes "[Tohobu]";
+ mes "No need to be hasty, there is so much to learn on 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 skill needed you have yet to learn.";
+ mes "Come back when you have learnt all the skills.";
+ close;
+
+ IsNot4:
+ mes "[Tohobu]";
+ mes "Oh! Are you kidding?";
+ close;
+
+ HighMonk:
+ mes "[Tohobu]";
+ mes "Wow! You are a High Acolyte, aren't you?";
+ mes "I am sorry, but I can't let you become a Monk!";
+ mes "Please seek out the Champion, that is what you should be!";
+ set MONK_Q, 0;
+ close;
+
+ L_GO:
+ if (Class == 4005) goto HighMonk;
+ 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.";
+ 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
+ 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";
+ mes "Is the way of life of the Monks.";
+ mes "I hope that seeing our practises will";
+ mes "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;
+}
+
+monk_in.gat,99,58,4 script Elder Wuhai 60,{
+ if(MONK_Q == 2 ) goto L_START;
+ if(MONK_Q == 3 ) goto Part1;
+ if(MONK_Q == 4 ) goto Part2;
+ if(MONK_Q >= 5 && JOB_MONK < 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(Class == 15 || Class == 4016) goto Part6;
+ if(Class == 4 || Class == 4005) goto Part7;
+ goto IsOther;
+IsOther:
+ 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 if so.";
+ mes "Very well then... You may go, young man.";
+ close;
+L_MENU_1:
+ mes "[Elder Wuhai]";
+ mes "Oh! So young men 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, control our emotions,";
+ mes "More importantly, never be too proud of yourself,";
+ mes "And be blinded by success,";
+ next;
+ mes "[Elder Wuhai]";
+ mes "It coukd be tough, even painful,";
+ mes "While undergoing this process.";
+ mes "Let's see if you're enduring enough,";
+ mes "You cannot 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;
+ mes "[Elder Wuhai]";
+ mes "Firstly, here's a small exam to test your will to become one of us.";
+ next;
+ if(JBLVL == 50) goto IsJOB50;
+
+ 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 "Tooth of Bat - 10";
+ mes "Bears Footskin - 5";
+ mes "Poison Spore - 20";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect2:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "Porcupine Quill - 5";
+ mes "Cobweb - 20";
+ mes "Grasshopper's Leg - 10";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect3:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "Stem - 30";
+ mes "Jellopy - 5";
+ mes "Worm Peeling -10";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect4:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "Sticky Mucus - 5";
+ mes "Earthworm Peeling - 10";
+ mes "Green Herb - 20";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect5:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "Yoyo Tail - 20";
+ mes "Iron Ore - 5";
+ mes "Blue Herb - 3";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect6:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "Solid Shell - 5";
+ mes "Shell - 20";
+ mes "Zargon - 5";
+ 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 "However, 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 "The next step, there is a Monk named Wutao want to see you.";
+ mes "He is in the Monk Grave North from here.";
+ set MONK_Q, 4;
+ close;
+
+Part1:
+//~ if(joblevel == 50) goto IsJOB50;
+ 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 in becoming in Monk is witnessable!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Let's see... there is a Monk named";
+ mes "Ah... Wutao who wants to see you.";
+ mes "He will be in the Ancestral Graveyard North from 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 from here.";
+ close;
+Part3:
+ mes "[Elder Wuhai]";
+ mes "Hmm? You're still taking the test...?";
+ mes "Try to do your best in it then!";
+ close;
+Part4:
+ mes "[Elder Wuhai]";
+ mes "What? You haven't drunk that Magic Potion?";
+ mes "Then... Hurry up and finish the Green-ish potion!";
+ mes "Otherwise, you will never be able to achieve";
+ mes "The spiritual energy level of Monks!";
+ set MONK_Q, 11;
+ close;
+Part5:
+ mes "[Elder Wuhai]";
+ mes "We have done all steps... Your blood, your mind, your soul,";
+ mes "Is enough 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 will now be sworn in by oath";
+ mes "In which 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";
+ mes "To become more prepared?";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Consider carefully before coming back!";
+ mes "I do not want to make 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";
+ mes "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've learnt how to hate.";
+ 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 that more enemies can be rid of,";
+ mes "That would be a great and worthy thing to do!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "What does Sacrifice means? 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]";
+ mes "That is not right! Training mobs around";
+ mes "Doesn't only apply to all others";
+ mes "...";
+ // he's not making any sense =P
+ mes "Instead it is an act that violates the rights of other Monks";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Even when you've learnt 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 that 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 words towards others repeatedly?";
+ next;
+ menu "Yes",-,"No",L_MONK_Q_7;
+
+ mes "[Elder Wuhai]";
+ mes "No! If you do so, not just Monks, even the common people,";
+ mes "No matter how loudly you've yelled no one will bother about 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?";
+ mes "Although I would rather test you again, but I'll let you go this time.";
+ 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 its said, Death is only temporary, Ever 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,";
+ mes "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 answered.";
+ 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";
+ mes "Gather closer now, you are already my brother!";
+//---- Progress bar ----//
+ next;
+ mes "[Elder Wuhai]";
+ mes "Your promise has transmited to all Monks throught ypur heart and my heart.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Now, let's begin the ceremony!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "I'll acupuncture your 365 acupuncture points and open up your 1129 arteries and veins";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Ahhhhhhhhh......";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Wuuu... Huuuuuu";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "- He take a deeply breath -";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "- And begining to acupuncture -";
+ 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... Okay, you are now a Monk!";
+ setoption 0;
+ jobchange 15;// Job: Job_Monk
+ next;
+ mes "[Elder Wuhai]";
+ mes "(Caught!) (Caught!)";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Am I old...? I feel so tired... (-sigh-)";
+ mes "I could clamb mountains after this before.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Very well... You are now a Monk...";
+ mes "Welcome to be one of us.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Bou 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 dear! What can I do for you?";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Is everything alright?";
+ mes "How the training?";
+ next;
+ mes "[Elder Wuhai]";
+ mes "If you don't have a strong body, you may not be able to help people when they needs you.";
+ mes "If you are weak, the Evil will come to you and leads you go into the dark side.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Never forget it! You are the one protect weakers and world peace!";
+ mes "You should always mind the Evil. Don't let them leads you go into the dark side.";
+ close;
+
+Part7:
+ mes "[Elder Wuhai]";
+ mes "May you find God in Mother Nature!";
+ mes "Welcome dear! What can I do for you?";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Oh! You are an Acolyte....";
+ mes "If you want to pray, go to Prontera Sanctuary!";
+ mes "This is the Monk training area, not 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;
+ goto IsOther;
+
+IsOther:
+ mes "[Wutao]";
+ mes "We are Monks!";
+ mes "We have unlimited power!";
+ mes "We have unlimited wise!";
+ mes "We use our power and wise to protect the world peace!";
+ next;
+ mes "[Wutao]";
+ mes "So...";
+ mes "Are you my enemy?";
+ mes "You block my way!!!!";
+ next;
+ mes "[Wutao]";
+ mes "If someone block me!! I'll fight!!";
+ mes "TaAhhhhhh!!!";
+ next;
+ mes "[Wutao]";
+ mes "HuHaaaaaaaa!!!";
+ next;
+ mes "[Wutao]";
+ mes "don;t be afraid, go yourway!";
+ 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 the Monk Quest!";
+ mes "The spirits you have is like a Monk.";
+ next;
+ mes "[Wutao]";
+ mes "Seems your arteries and veins has been open.";
+ mes "You must be the one coming from Elder Wuhai, right?";
+ mes "Very well...";
+ next;
+ mes "[Wutao]";
+ mes "Let me introduce you something about the spirits of Monks and some simple rules that Monks should obey.";
+ mes "Then I'll help modifing your mental status, make your body ready for the next test.";
+ next;
+ mes "[Wutao]";
+ mes "Now, remember what I say and repeat again.";
+ mes "Clear your mind... Are you ready?";
+ next;
+ menu "Yes",L_MENU_1,"No",-;
+ mes "[Wutao]";
+ mes "Come back when you ready!";
+ close;
+L_MENU_1:
+ mes "[Wutao]";
+ mes "All right, 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;
+
+ L_ROOT_1:
+ 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 @monk_q, 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 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 @monk_q, @monk_q + 1;
+L_MONK_QUEST_END:
+
+ if(@monk_q < 9) goto L_C2_FAIL;
+
+L_C2_DONE:
+ set @monk_q, 0;
+ next;
+ mes "[Wutao]";
+ mes "Hmmm...";
+ next;
+ mes "[Wutao]";
+ mes "...Well Done!! It's perfect!";
+ next;
+ mes "[Wutao]";
+ mes "However, don't be happy too early. There is much long way to go before you 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 status is now running like a Monk do.";
+ 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...? How was that? ";
+ next;
+ mes "[Wutao]";
+ mes "Hmmm... ";
+ next;
+ mes "[Wutao]";
+ mes "HeNmmm...";
+ next;
+ mes "[Wutao]";
+ mes "How was that? It's bad! You didn't memorize it all!";
+ next;
+ mes "[Wutao]";
+ mes "You should doult yourself. Are you really have the ability to be a Monk?";
+ mes "...It's really....";
+ next;
+ mes "[Wutao]";
+ mes "Well...That's fine, do you want to try it again?";
+ next;
+ mes "[Wutao]";
+ mes "Of course! 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;
+ goto IsOther;
+IsOther:
+ 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 tell...if you can see the son tomorrow...";
+ next;
+ mes "[Fuhai]";
+ mes "Why are you here?";
+ mes "Explain!";
+ next;
+ menu "Some one named [Wutao] send me here.",L_MENU_1,"Well...Nothing...",-;
+
+ mes "[Fuhai]";
+ mes "......";
+ mes "...How about dig a grave for yourself?";
+ close;
+ L_MENU_1:
+ mes "[Fuhai]";
+ mes "Hmmm...It's that so?";
+ mes "That's...";
+ next;
+ mes "[Fuhai]";
+ mes "Oh...Your mental status...";
+ mes "Ha! Very well...";
+ next;
+ mes "[Fuhai]";
+ mes "However, what did you learn from [Wutao] ?";
+ next;
+ menu "Hmmm...Well...It's...",-,
+ "I repeat what he said, and he send me here.",L_MENU_1_1,
+ "He test my mental status and send 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...",-,
+ "Check my body",L_MENU_1_1_1,
+ "Tell me some rules to obey",L_MENU_1_1_1,
+ "modify my mental status",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 had been change in your body";
+ mes "Now, let's 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 choise.";
+ next;
+ menu "Mushroom Collecting",L_ROOT_1,"Marathon",L_ROOT_2;
+
+ L_ROOT_1:
+ mes "[Fuhai]";
+ mes "Mushroom Collecting? Good choice!";
+ mes "That would make you appreciate the extremity of patient, realize the meaning God give you the great willpower.";
+ mes "Now go, do some prepares. Come back when you ready.";
+ set @Choice_mission, 1;
+ close;
+ L_ROOT_2:
+ mes "[Fuhai]";
+ mes "Marathon? Good choice!";
+ mes "That would make you appreciate the extremity of willpower, realize the meaning God give you the great patient.";
+ mes "Now go, do some prepares. Come back when you ready.";
+ set @Choice_mission, 2;
+ close;
+Part1:
+ mes "[Fuhai]";
+ mes "Are you ready?";
+ mes "Acturily, you don't need to prepare anything if you believe in yourself";
+ next;
+ mes "[Fuhai]";
+ mes "Mushroom Collecting is your choice.";
+ mes "It's a test for yourself.";
+ next;
+ mes "[Fuhai]";
+ mes "Now, go to the building located in the center of this training area.";
+ next;
+ mes "[Fuhai]";
+ mes "You will pass the test when you collect enough mushrooms we think.";
+ mes "Now, what are waitting for? Go ahead!";
+ close;
+Part2:
+ mes "[Fuhai]";
+ mes "Are you ready?";
+ mes "Acturily, you don't need to prepare anything if you believe in yourself";
+ next;
+ mes "[Fuhai]";
+ mes "Marathon is your choice.";
+ mes "It's a test for yourself.";
+ next;
+ mes "[Fuhai]";
+ mes "Now, go to the building located in the center of this training area.";
+ next;
+ mes "[Fuhai]";
+ mes "You will pass the test when you run enough circles we think.";
+ mes "Now, what are waitting for? Go ahead!";
+ close;
+
+}
+
+prt_monk.gat,199,169,4 script Guard 746,{
+ if(MONK_Q == 7) goto L_START;
+ if(MONK_Q > 6) goto Part1;
+ goto IsOther;
+IsOther:
+ 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 waitting 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;
+ if(MONK_Q == 8) goto IsOther;
+ goto IsOther;
+IsOther:
+ 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 who judge the grades of Monk training when you go inside";
+ next;
+ mes "[Bashu]";
+ mes "Never the less, don't touch anything inside and be quiet in front of Monk Daowen.";
+ next;
+ mes "[Bashu]";
+ mes "Then, may you have a happy conversation time with God.";
+ close;
+L_START:
+ mes "[Bashu]";
+ mes "Please select a test.";
+ next;
+ if(@Choice_mission == 0) goto L_MISSC;
+ if(@Choice_mission == 2) goto L_MISS2;
+ mes "[Bashu]";
+ mes "As I know, you choose the Mushroom Collecting as your 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 "Monk's patient - Mushroom Collecting",-,
+ "Monk's willpower - Marathon",L_MENU_1;
+
+ mes "[Bashu]";
+ mes "The test you choose is Monk's patient - 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 testing the pa...patient of whom want to be a Monk.";
+ next;
+ mes "[Musha]";
+ mes "You should just...just run!";
+ mes "Before we told 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......giveup? or...con...continue?";
+ mes "Giveup?";
+ next;
+ menu "I want to giveup!",-,"I want to run!!",L_MENU_1;
+
+ mapannounce "monk_test.gat","Musha: " + strcharinfo(0) + " has give...giveup the test...! Giveup the Marathon test... No...No patient.....HaHaHaHa!!!...",8;
+ mes "[Musha]";
+ mes strcharinfo(0) + "...give...giveup the test...";
+ mes "Giveup the Marathon test...";
+ mes "No...No patient.....HaHaHaHa!!!...";
+ next;
+ warp "prt_monk.gat",196,168;
+ end;
+L_MENU_1:
+ next;
+ mes "[Musha]";
+ mes "Before 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 circle 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)+ " Pass!! Please go to [Daowen], he is in the deep of 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 fall into a trap! Now we warp you to the start place.",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 crop, I deeply appreciate from the grace of God.";
+ next;
+ mes "[XuanWu]";
+ mes "Never the less, see those crop grown by the strong Monks.";
+ mes "I think it's the most beautiful picture!";
+ next;
+ mes "[XuanWu]";
+ mes "Frankly speeking, grower is the greatest people in the world.";
+ mes "The Blue Potion you drink must be made of God's will and by the grower.";
+ next;
+ mes "[XuanWu]";
+ mes "We chould always be grateful.";
+ next;
+ mes "[XuanWu]";
+ mes "God give you everything, even the grower.";
+ next;
+ mes "[XuanWu]";
+ mes "The grower is the root of world. That's 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 Monks lives, we should always offer our efforts as a tribute";
+ mes "Grow crop 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 had started growing some kind of mushrooms that smell foul";
+ next;
+ mes "[XuanWu]";
+ mes "All you have to do is destory those mushrooms and bring some thing to prove.";
+ mes "What's the thing I mean? The ^ff0000Orange GooeyMushroom and Orange Net Mushroom^000000";
+ next;
+ mes "[XuanWu]";
+ mes "If you want to increase your internal organs and become a Monk, go and destory it.";
+ mes "Bring as many as you can, I won't tell you the amount I need.";
+ mes "Now go!";
+ next;
+ mes "[XuanWu]";
+ mes "Or...You want to giveup?";
+ next;
+ menu "Start Mushroom Collecting",L_MENU_1,"I'll giveup",L_MENU_2;
+
+L_MENU_2:
+ mapannounce "monk_test.gat","XuanWu: ......Another one without willpower...",8;
+ mes "[XuanWu]";
+ mes "Another one without willpower...";
+ set @mission_start, 0;
+ getitem 1069, 1;//Items: Orange_Net_Mushroom,
+ delitem 1069, 1;//Items: Orange_Net_Mushroom,
+ next;
+ warp "prt_monk.gat",196,168;
+ end;
+L_MENU_1:
+ mes "[XuanWu]";
+ mes "Then what are you waitting 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...You want to giveup?";
+ next;
+ menu "Continue Mushroom Collecting",-,"I'll giveup",L_MENU_2;
+ close;
+L_DONE:
+ set MONK_Q, 8;
+ mes "[XuanWu]";
+ mes "Well... I think you can do it better...";
+ mes "However, I should 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 in the deep of the building.";
+ close;
+Part2:
+ mes "[XuanWu]";
+ mes "Are you testing my patient??";
+ mes "Now go to [Daowen], he is in the deep of 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;
+ goto IsOther;
+IsOther:
+ mes "[Daowen]";
+ mes "Go throught 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 I'm in charge here";
+ mes "My name is 'Daowen'";
+ next;
+ mes "[Daowen]";
+ mes "Well... What should I say?";
+ mes "Who block the way? Fight him/her!";
+ next;
+ mes "[Daowen]";
+ mes "Fight! Slash! When you lost and some enemy block your way!";
+ mes "Tell them the will of God!";
+ next;
+ mes "[Daowen]";
+ mes "Don't compare with the weak priest!";
+ mes "We are always strong Monks";
+ next;
+ mes "[Daowen]";
+ mes "We are different from the weak priest that always run away!";
+ next;
+ mes "[Daowen]";
+ mes "Now! Grasp 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 can do it!";
+ mes "I'll give you a special potion that can increase your power";
+ next;
+ getitem 506, 1;//Items: Green_Potion,
+ mes "[Daowen]";
+ mes "Drink it, and your internal organs will increase enough to be a Monk.";
+ mes "Okay...Then, Go to Wuhai - the first one you meet here.";
+ set MONK_Q, 10;
+ close;
+Part2:
+ mes "[Daowen]";
+ mes "Go to Wuhai - the first one you meet here.";
+ close;
+}
+
+monk_test.gat,88,91,4 script Test Assistant 52,{
+ mes "[Test Assistant]";
+ mes "Are you ready for training of evil disperse?";
+ next;
+ mes "[Test Assistant]";
+ mes "The test area is a maze with walls invisable.";
+ mes "The exiting point is on the opposite side of the starting point.";
+ next;
+ mes "[Test Assistant]";
+ mes "Of course, there will be some monster spawn in the maze. You'll have to fight with them.";
+ mes "Good lucy! 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 "There is someone taking the test. Please wait a minute.";
+ 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)+ " Pass!! Please go to [Daowen], he is in the deep of 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 of evil disperse?";
+ next;
+ mes "[Test Assistant]";
+ mes "The test area is a maze with walls invisable.";
+ mes "The exiting point is on the opposite side of the starting point.";
+ next;
+ mes "[Test Assistant]";
+ mes "Of course, there will be some monster spawn in the maze. You'll have to fight with them.";
+ mes "Good lucy! 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 "There is someone taking the test. Please wait a minute.";
+ 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)+ " Pass!! Please go to [Daowen], he is in the deep of 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 of evil disperse?";
+ next;
+ mes "[Test Assistant]";
+ mes "The test area is a maze with walls invisable.";
+ mes "The exiting point is on the opposite side of the starting point.";
+ next;
+ mes "[Test Assistant]";
+ mes "Of course, there will be some monster spawn in the maze. You'll have to fight with them.";
+ mes "Good lucy! 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 "There is someone taking the test. Please wait a minute.";
+ 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)+ " Pass!! Please go to [Daowen], he is in the deep of the building.",8;
+ killmonster "monk_test.gat","monk_mob3";
+ warp "monk_test.gat",317,142;
+ end;
+}
+
+//monk_test.gat,1,1,1 script monk_mob3 -1,{
+// 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,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
+
+//==============================================================================
+// mapflag
+//==============================================================================
+monk_test.gat mapflag nomemo dummy
+monk_test.gat mapflag noteleport dummy
+monk_test.gat mapflag nosave SavePoint
+monk_test.gat mapflag nopenalty dummy
+monk_test.gat mapflag nobranch dummy
diff --git a/npc/jobs/2-2/rogue.txt b/npc/jobs/2-2/rogue.txt
index 7c7dd099e..e93ccb048 100644
--- a/npc/jobs/2-2/rogue.txt
+++ b/npc/jobs/2-2/rogue.txt
@@ -596,8 +596,7 @@ L_Done:
//===========================================================
//------------------------------------------------------------------------------
-in_rogue.gat,272,136,3 script Hermanthorn Jr. 85,
-{
+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;
@@ -739,18 +738,15 @@ sF_Password:
// Guildsman
//===============================================
//---------------------------------------------------------------------------
-in_rogue.gat,244,39,4 script Aragham Junior 99,
-{
+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,
-{
+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,
-{
+in_rogue.gat,183,105,4 script Antonio Junior 88,{
callfunc "F_RogueTest4", "Antonio Junior", 175, 107;
}
@@ -814,8 +810,7 @@ L_Restart:
//================================================
// Monster Spawns
//================================================
-in_rogue.gat,15,185,0 script rogue_mob1 139,8,0,
-{
+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;
@@ -824,8 +819,7 @@ in_rogue.gat,15,185,0 script rogue_mob1 139,8,0,
monster "in_rogue.gat",16,189,"Zombie",1015,1;
end;
}
-in_rogue.gat,15,245,0 script rogue_mob2 139,8,0,
-{
+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;
@@ -834,8 +828,7 @@ in_rogue.gat,15,245,0 script rogue_mob2 139,8,0,
monster "in_rogue.gat",16,248,"Mummy",1041,1;
end;
}
-in_rogue.gat,15,328,0 script rogue_mob3 139,8,0,
-{
+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;
@@ -844,65 +837,55 @@ in_rogue.gat,15,328,0 script rogue_mob3 139,8,0,
monster "in_rogue.gat",16,332,"Zombie",1015,1;
end;
}
-in_rogue.gat,35,342,0 script rogue_mob4 139,0,8,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+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;
@@ -915,8 +898,7 @@ in_rogue.gat,252,320,0 script rogue_mob13 139,0,8,
//================================================
// End Warp
//================================================
-in_rogue.gat,370,320,0 script rogue04 45,1,1,
-{
+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;
@@ -926,8 +908,7 @@ in_rogue.gat,370,320,0 script rogue04 45,1,1,
//================================================
// Timer: Keeps monsters from overspawning
//================================================
-- script RogueTest3 -1,
-{
+- script RogueTest3 -1,{
end;
OnMinute10:
diff --git a/npc/jobs/custom/jobchange.txt b/npc/jobs/custom/jobchange.txt
index 296c367cc..79e4de332 100644
--- a/npc/jobs/custom/jobchange.txt
+++ b/npc/jobs/custom/jobchange.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= eAthena Scripting Team
//===== Current Version: =====================================
-//= 2.0
+//= 2.1
//===== Compatible With: =====================================
//= Athena Version RC1+
//===== Description: =========================================
@@ -12,24 +12,27 @@
//===== Additional Comments: =================================
//Added missing param into resetlevel [Lupus]
//Remade Adv. Classes Menu. [shadowlady]
+//Fixed some bugs, by midas
//============================================================
prontera.gat,160,186,6 script Jobchanger 94,{
+cutin "kafra_01",2;
mes "[ ^0065DFJobra^000000 ]";
-mes "Sup? I'm the insanely cool and supra-l337 jobchanger thingy for Athena! First of all, what class would you like to change into (must meet preliminary requirements for each class..)";
+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",Ladvclasses,"Advance Second Class",Ladvclasses,"Super Novice",LSuperNovice;
+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)) goto Lchange;
+ 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 "You don't MEET the class requirements...";
- mes "Hey! You're not ready! Get away, punk! *rolls eyes*";
- mes "Only 2nd Classes and Alternate 2nd Classes can change into the Novice High... jeeze.";
+ 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)) goto Babynochange;
mes "[ ^0065DFJobra^000000 ]";
mes "We shall start the ceremony....";
next;
@@ -42,6 +45,12 @@ Lchange:
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 ]";
@@ -50,8 +59,9 @@ Llevelcheck:
close;
Ladvclasses:
+ if(SkillPoint != 0) goto Lskillpt;
//Lord Knight & Paladin
- if(oldclass == 7 && readparam(19) == 4001 || oldclass == 14 && readparam(19) == 4001) goto Lswordsmanhigh;
+ 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) goto Llordknight;
if(readparam(19) == 4002 && oldclass == 14) goto Lpaladin;
//Assassin Cross & Stalker
@@ -75,12 +85,83 @@ Ladvclasses:
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.";
+ 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! ^_^";
@@ -103,7 +184,7 @@ Llordknight:
Lpaladin:
mes "[ ^0065DFJobra^000000 ]";
- mes "Mmmmm, I always liked Paladins.. their Broad Shoulders always turned me on....";
+ 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";
@@ -224,12 +305,12 @@ Lwhitesmith:
close;
Lcreator:
mes "[ ^0065DFJobra^000000 ]";
- mes "Create potions for the swordmen of Rune-Midgart";
+ mes "Create potions for the brave heros of Rune-Midgart";
cutin "kafra_01",255;
jobchange 42;
close;
//High Wizard & Professor
-Lmagehigh:
+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;
@@ -262,27 +343,32 @@ LFirstClass:
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! *rolls eyes*";
+ 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;
@@ -354,8 +440,8 @@ LSecondClass:
mes "[ ^0065DFJobra^000000 ]";
mes "Yes! You are ready to become... a Knight! ";
mes "Go save a Damsel in Distress or something..";
- cutin "kafra_01",255;
jobchange 7;// Job: Job_Knight
+ cutin "kafra_01",255;
close;
@@ -492,8 +578,8 @@ LSecondClass2:
close;
LBardDancer:
- if(sex==0) goto LBard;
- if(sex==1) goto LDancer;
+ if(sex==0) goto LDancer;
+ if(sex==1) goto LBard;
LBard:
if(class !=3) goto LNotArch3;
diff --git a/npc/jobs/novice/novice.txt b/npc/jobs/novice/novice.txt
index cd9c6235c..c2d8710c1 100644
--- a/npc/jobs/novice/novice.txt
+++ b/npc/jobs/novice/novice.txt
@@ -294,8 +294,8 @@ new_1-2.gat,81,110,4 script Newbie Instructor 84,{
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.";
+ 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.";
@@ -305,7 +305,7 @@ new_1-2.gat,81,110,4 script Newbie Instructor 84,{
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 "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;
@@ -1257,18 +1257,18 @@ new_1-4.gat,100,29,4 script Helper 54,{
mes "Bye!";
next;
if (@TEMP != 0) goto L0a;
- warp "new_1-4.gat",94,56;
+ warp "new_1-4.gat",94,63;
close;
L0a:
if (@TEMP != 1) goto L0b;
- warp "new_1-4.gat",98,56;
+ warp "new_1-4.gat",99,63;
close;
L0b:
if (@TEMP != 2) goto L0c;
- warp "new_1-4.gat",102,56;
+ warp "new_1-4.gat",100,58;
close;
L0c:
- warp "new_1-4.gat",106,56;
+ warp "new_1-4.gat",98,62;
close;
L1:
diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt
index 0483ebafe..feeec7a35 100644
--- a/npc/kafras/functions_kafras.txt
+++ b/npc/kafras/functions_kafras.txt
@@ -9,7 +9,7 @@
//= Lupus
//= kobra_k88 (2.0)
//===== Current Version: =====================================
-//= 2.2b
+//= 2.3
//===== Compatible With: =====================================
//= eAthena 1.0
//===== Description: ===============================================
@@ -24,7 +24,9 @@
//= 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]
-//= Fixed typo >_< [Aria]
+//= 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]
//============================================================
@@ -44,8 +46,7 @@ function script F_Kafra {
if(getarg(0)==2) menu "-Use Storage",M_Storage, "-Use Guild Storage",M_GStorage, "-Rent a Cart",M_Cart, "-Use Teleport Service",M_Teleport, "-Cancel",M_End;
- if(getarg(1)==1) 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;
+ if(getarg(1)==1) menu "-Use Storage",M_Storage, "-Cancel",M_End;
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;
@@ -166,6 +167,7 @@ function script F_KafTele {
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;
diff --git a/npc/kafras/kafras_alde.txt b/npc/kafras/kafras_alde.txt
index ee2c5f570..ff8a6de6e 100644
--- a/npc/kafras/kafras_alde.txt
+++ b/npc/kafras/kafras_alde.txt
@@ -34,8 +34,8 @@ aldeba_in.gat,96,181,4 script Kafra Leilah 113,{
// South --------------------------------------------------
aldebaran.gat,143,119,4 script Kafra 113,{
cutin "kafra_05",2;
- setarray @wrpP[0], 1600, 2000, 1700, 2200;
- setarray @wrpD$[0], "Geffen", "Payon", "Coal Mine(Dead Pit)", "Comodo";
+ setarray @wrpP[0], 1200, 1200, 1800, 1700;
+ setarray @wrpD$[0], "Geffen", "Yuno" , "Payon", "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];
diff --git a/npc/merchants/alchemist.txt b/npc/merchants/alchemist.txt
index c0999273e..95703574d 100644
--- a/npc/merchants/alchemist.txt
+++ b/npc/merchants/alchemist.txt
@@ -11,8 +11,7 @@
//===== Additional Comments: =================================
//= Working.
//============================================================
-alde_alche.gat,24,188,3 script Gever AI Sharp 740,
-{
+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?";
diff --git a/npc/merchants/clothes_dyer.txt b/npc/merchants/clothes_dyer.txt
index 023a05086..549c474fa 100644
--- a/npc/merchants/clothes_dyer.txt
+++ b/npc/merchants/clothes_dyer.txt
@@ -3,13 +3,15 @@
//===== By: ==================================================
//= Usnul
//===== Current Version: =====================================
-//= 2.0
+//= 2.1
//===== 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]
//============================================================
@@ -70,7 +72,7 @@ Male_dye:
if(Class==7 || Class==14) goto L_Knight_Crus_M;
if(Class==8 || Class==15) goto L_Priest_Monk_M;
if(Class==9 || Class==11 || Class==19 || Class==23) goto L_Wiz_Hunt_Bard_SN_M;
- if(Class==10 || Class==18) goto L_BlackSmith_Alchemist_M;
+ if(Class==10 || Class==18) goto L_Bls_Alch_M;
// if(Class==12) goto L_Assassin_M;
if(Class==17) goto L_Rogue_M;
@@ -119,7 +121,7 @@ Male_dye:
set @green, 3;
set @black, 4;
menu "- Red",L_Dye_Red,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
- L_BlackSmith_Alchemist_M:
+ L_Bls_Alch_M:
set @red, 1;
set @green, 2;
set @white, 3;
@@ -151,9 +153,9 @@ Female_dye:
if(Class==7 || Class==14) goto L_Knight_Crus_F;
if(Class==8) goto L_Priest_F;
if(Class==9 || Class==16) goto L_Wiz_Sage_F;
- if(Class==10 || Class==18) goto L_BlackSmith_Alchemist_F;
+ if(Class==10 || Class==18) goto L_Bls_Alch_F;
if(Class==11 || Class==20) goto L_Hunt_Dancer_F;
- if(Class==12 || Class==17) goto L_Assassin_Rogue_F;
+ if(Class==12 || Class==17) goto L_As_Rog_F;
if(Class==23) goto L_SN_F;
//1 Class
@@ -201,13 +203,13 @@ Female_dye:
set @green, 3;
set @violet, 4;
menu "- Red",L_Dye_Red,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Violet",L_Dye_Violet,"- Cancel",L_End;
- L_BlackSmith_Alchemist_F:
+ L_Bls_Alch_F:
set @red, 1;
set @green, 2;
set @violet, 3;
set @black, 4;
menu "- Red",L_Dye_Red,"- Green",L_Dye_Green,"- Violet",L_Dye_Violet,"- Black",L_Dye_Black,"- Cancel",L_End;
- L_Assassin_Rogue_F:
+ L_As_Rog_F:
set @red, 1;
set @yellow, 2;
set @white, 3;
@@ -320,6 +322,8 @@ L_Dye_Yellow:
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:
diff --git a/npc/merchants/dye_maker.txt b/npc/merchants/dye_maker.txt
index 456499f2f..a253ddcd1 100644
--- a/npc/merchants/dye_maker.txt
+++ b/npc/merchants/dye_maker.txt
@@ -15,8 +15,7 @@
// Dye Maker JavaDullihan =======================
-morocc_in.gat,146,99,2 script Dye Maker JavaDullihan 122,
-{
+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";
diff --git a/npc/merchants/grandpa_pharmacist.txt b/npc/merchants/grandpa_pharmacist.txt
index 055e9e53c..aa866874e 100644
--- a/npc/merchants/grandpa_pharmacist.txt
+++ b/npc/merchants/grandpa_pharmacist.txt
@@ -23,8 +23,7 @@
//============================================================
-alberta_in.gat,16,28,4 script Grampa Pharmacist 61,
-{
+alberta_in.gat,16,28,4 script Grampa Pharmacist 61,{
mes "[Grampa Pharmacist]";
mes "Hmmm... what do you want...?";
next;
diff --git a/npc/merchants/refine.txt b/npc/merchants/refine.txt
index b3e354e68..c6d633350 100644
--- a/npc/merchants/refine.txt
+++ b/npc/merchants/refine.txt
@@ -26,8 +26,7 @@
//=========================================================
// Christopher: Geffen Blacksmith
//=========================================================
-geffen_in.gat,110,172,2 script Christopher 63,
-{
+geffen_in.gat,110,172,2 script Christopher 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:
@@ -746,7 +745,7 @@ function script repairmain {
REPAIR1:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -758,7 +757,7 @@ function script repairmain {
REPAIR2:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -770,7 +769,7 @@ function script repairmain {
REPAIR3:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -782,7 +781,7 @@ function script repairmain {
REPAIR4:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -794,7 +793,7 @@ function script repairmain {
REPAIR5:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -806,7 +805,7 @@ function script repairmain {
REPAIR6:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -818,7 +817,7 @@ function script repairmain {
REPAIR7:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -830,7 +829,7 @@ function script repairmain {
REPAIR8:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -842,7 +841,7 @@ function script repairmain {
REPAIR9:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
@@ -854,7 +853,7 @@ function script repairmain {
REPAIR10:
mes "[" + @name$ + "]";
mes "You're gonna repair " + getitemname(@broken1) + ".";
- mes "To repair this, I need ^ff9999One Steel^000000, and @repairprice Zeny.";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
mes "Continue?";
next;
menu "Yes",-,"No",L_CANCEL_2;
diff --git a/npc/merchants/scrolls_arrows.txt b/npc/merchants/scrolls_arrows.txt
new file mode 100644
index 000000000..88e74a00e
--- /dev/null
+++ b/npc/merchants/scrolls_arrows.txt
@@ -0,0 +1,34 @@
+//===== eAthena Script =======================================
+//= Magic Scrolls & Arrows + Arrow Quivers
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== 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)
+//============================================================
+
+
+//=======================================================
+// 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, 662:3000
+//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, 662:6000
+
+//=======================================================
+// 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
index ac887039e..af4371951 100644
--- a/npc/merchants/shops.txt
+++ b/npc/merchants/shops.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= eAthena Dev Team
//===== Current Version: =====================================
-//= 1.6
+//= 1.8
//===== Compatible With: =====================================
//= eAthena 7.15 +
//===== Description: =========================================
@@ -13,10 +13,10 @@
//= 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]
+//= Moved shops in Umbala.txt here. Commented out the duplicate ones.[kobra_k88]
//= 1.6 Removed GRAPE ID 514 from shops (caused exploits)
-//= Raised selling price of Empty Bottles to 10 (it's a quest item...)
+//= 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]
//============================================================
@@ -43,7 +43,7 @@ aldeba_in.gat,94,56,5 shop Tool Dealer 83,501:-1,502:-1,503:-1,504:-1,506:-1,601
//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,531:-1,532:-1,534:-1,533:-1
+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,2215:-1
amatsu.gat,189,99,7 shop Butcher 49,517:-1,528:-1,540:-1,541:-1
@@ -55,7 +55,7 @@ amatsu.gat,183,127,5 shop Milk Merchant 90,519:-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:-11154:-1,1407:-1,1457:-1,1354:-1,1519:-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
//=======================================================
@@ -103,6 +103,15 @@ lou_in02.gat,121,181,5 shop Armor Dealer 770,2211:-1,2401:-1,2403:-1,2501:-1,250
lou_in02.gat,130,182,5 shop Weapon Dealer 774,1204:-1,1216:-1,1107:-1,1113:-1,1116:-1,1157:-1,1407:-1,1410:-1,1354:-1,1519:-1
//=======================================================
+//LUTIE
+//=======================================================
+xmas_in.gat,39,37,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
+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
@@ -113,7 +122,7 @@ 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,722:-1,726:-1,728:-1,729:-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,909:-1,528:-1,919:-1,925:-1
morocc.gat,206,250,1 shop Tool Dealer 85,909:-1,528:-1,919:-1,925:-1
morocc.gat,244,134,1 shop Trader 93,2612:-1
@@ -125,13 +134,16 @@ morocc.gat,269,167,4 shop Pet Merchant 125,537:-1,643:-1,10013:-1,10014:-1
//=======================================================
//NIFLHEIM
//=======================================================
-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,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,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
+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
@@ -190,9 +202,9 @@ um_in.gat,151,125,4 shop Armor Merchant 49,2103:-1,2105:-1,2403:-1,2405:-1,2503:
//=======================================================
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, 909:-1, 911:-1, 910:-1, 912:-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,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
diff --git a/npc/mobs/dungeons/anthell.txt b/npc/mobs/dungeons/anthell.txt
index fe13e2f26..afab24d23 100644
--- a/npc/mobs/dungeons/anthell.txt
+++ b/npc/mobs/dungeons/anthell.txt
@@ -11,103 +11,103 @@
//============================================================
//(anthell01.gat)*
-anthell01.gat,0,0,0,0 monster Giearth 1121,1,60000,30000,0
+anthell01.gat,0,0,0,0 monster Giearth 1121,1,0,0,0
anthell01.gat,0,0,0,0 monster Vitata 1176,10,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 Andre 1095,25,0,0,0
anthell01.gat,0,0,0,0 monster Familiar 1005,20,0,0,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,102,121,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,104,120,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,123,0,0 monster Ant Egg 1097,1,60000,30000,0
-anthell01.gat,105,124,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,28,263,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,265,0,0 monster Ant Egg 1097,1,60000,30000,0
-anthell01.gat,28,266,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,29,262,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,264,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,266,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,30,190,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,30,198,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,30,262,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,264,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,31,186,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,31,194,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,31,198,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,31,263,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,32,186,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,189,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,32,197,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,263,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,35,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,36,187,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,37,186,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,38,184,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,40,168,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,40,266,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,268,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,270,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,41,168,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,41,266,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,268,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,42,165,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,167,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,43,165,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,44,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,45,165,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,97,124,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,126,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,98,121,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,99,121,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,0,0,0,0 monster Maya Purple 1289,1,7200000,3600000,0
+anthell01.gat,100,121,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,101,121,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,102,121,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,102,121,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,103,120,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,103,121,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,104,120,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,104,122,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,104,123,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,105,124,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,28,262,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,28,263,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,28,264,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,28,265,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,28,266,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,29,186,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,29,262,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,29,263,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,29,264,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,29,265,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,29,266,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,187,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,190,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,195,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,198,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,261,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,262,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,263,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,264,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,30,265,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,31,186,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,31,190,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,31,194,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,31,195,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,31,198,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,31,262,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,31,263,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,31,264,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,32,186,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,32,187,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,32,189,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,32,196,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,32,197,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,32,198,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,32,263,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,33,195,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,33,196,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,35,186,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,36,186,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,36,187,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,37,183,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,37,186,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,38,183,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,38,184,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,38,186,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,40,168,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,40,265,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,40,266,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,40,267,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,40,268,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,40,269,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,40,270,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,41,165,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,41,168,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,41,265,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,41,266,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,41,267,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,41,268,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,41,269,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,42,165,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,42,166,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,42,167,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,42,168,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,43,165,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,43,166,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,44,165,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,44,166,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,45,165,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,97,123,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,97,124,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,97,125,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,97,126,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,97,127,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,98,121,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,98,127,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,99,121,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,99,127,0,0 monster Ant Egg 1097,1,0,0,0
+anthell01.gat,0,0,0,0 monster Maya Purple 1289,1,7200000,7200000,0
//(anthell02.gat)*
-anthell02.gat,0,0,0,0 monster Giearth 1121,3,60000,30000,0
+anthell02.gat,0,0,0,0 monster Giearth 1121,3,0,0,0
anthell02.gat,0,0,0,0 monster Vitata 1176,30,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
diff --git a/npc/mobs/dungeons/geftower.txt b/npc/mobs/dungeons/geftower.txt
index 310b3f672..f5761e7cd 100644
--- a/npc/mobs/dungeons/geftower.txt
+++ b/npc/mobs/dungeons/geftower.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
@@ -46,17 +46,17 @@ gef_dun02.gat,0,0,0,0 monster Shining Plant 1083,2,1800000,900000,1
gef_dun02.gat,0,0,0,0 monster Doppelganger 1046,1,7200000,3600000,1
//(gef_dun03.gat)?
-gef_dun03.gat,0,0,0,0 monster Baphomet 1039,1,7200000,3600000,1
-gef_dun03.gat,0,0,0,0 monster Doppelganger 1046,1,7200000,3600000,1
+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,3600000,1
+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,3600000,1
+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
diff --git a/npc/mobs/dungeons/glastheim.txt b/npc/mobs/dungeons/glastheim.txt
index fd22479ad..fe0e3d747 100644
--- a/npc/mobs/dungeons/glastheim.txt
+++ b/npc/mobs/dungeons/glastheim.txt
@@ -3,11 +3,11 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
-//=
+//= 1.1 [Lupus]
//============================================================
//(glast_01.gat)*
@@ -27,8 +27,8 @@ gl_cas01.gat,0,0,0,0 monster Whisper 1179,20,0,0,0
gl_cas01.gat,0,0,0,0 monster Owl Baron 1295,3,30000,15000,0
gl_cas01.gat,0,0,0,0 monster Tyrfing 1204,1,7200000,3600000,1
-//(gl_cas02.gat)?
-gl_cas02.gat,0,0,0,0 monster Evil Druid 1117,10,0,0,0
+//(gl_cas02.gat)*
+gl_cas02.gat,0,0,0,0 monster Evil Druid 1117,9,0,0,0
gl_cas02.gat,133,83,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
@@ -40,67 +40,67 @@ 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,83,80,2,2 monster Mimic 1191,1,360000,180000,1
gl_cas02.gat,83,84,2,2 monster Mimic 1191,1,360000,180000,1
-gl_cas02.gat,185,11,8,8 monster Rideword 1195,4,120000,60000,1
-gl_cas02.gat,46,124,15,15 monster Rideword 1195,15,360000,180000,1
-gl_cas02.gat,0,0,0,0 monster Mysteltainn 1203,1,7200000,3600000,1
-gl_cas02.gat,104,145,5,5 monster Mysteltainn 1203,1,7200000,3600000,1
-gl_cas02.gat,0,0,0,0 monster Tyrfing 1204,1,7200000,3600000,0
+gl_cas02.gat,185,11,8,8 monster Rideword 1195,7,120000,60000,1
+gl_cas02.gat,46,124,15,15 monster Rideword 1195,22,360000,180000,1
+gl_cas02.gat,104,145,5,5 monster Mysteltainn 1203,1,7200000,7200000,1
+gl_cas02.gat,0,0,0,0 monster Tyrfing 1204,1,7200000,7200000,0
gl_cas02.gat,0,0,0,0 monster Wanderer 1208,20,0,0,0
gl_cas02.gat,190,23,1,1 monster Wanderer 1208,1,360000,180000,0
-gl_cas02.gat,104,38,4,4 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,24,35,4,4 monster Knight of Abyss 1219,1,1800000,900000,1
-gl_cas02.gat,93,177,3,3 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,104,38,4,4 monster Knight of Abyss 1219,1,600000,600000,1
+gl_cas02.gat,115,177,3,3 monster Knight of Abyss 1219,1,600000,600000,1
+gl_cas02.gat,24,35,4,4 monster Knight of Abyss 1219,1,600000,600000,1
+gl_cas02.gat,93,177,3,3 monster Knight of Abyss 1219,1,600000,600000,1
gl_cas02.gat,0,0,0,0 monster Alice 1275,1,0,0,0
gl_cas02.gat,0,0,0,0 monster Raydric Archer 1276,19,0,0,0
gl_cas02.gat,190,38,1,1 monster Raydric Archer 1276,1,360000,180000,0
-gl_cas02.gat,0,0,0,0 monster Chimera 1283,1,7200000,3600000,0
-
-//(gl_church.gat)?
-gl_church.gat,0,0,0,0 monster Ghoul 1036,25,0,0,0
-gl_church.gat,0,0,0,0 monster Evil Druid 1117,15,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 Wraith 1192,10,0,0,0
-gl_church.gat,0,0,0,0 monster Dark Illusion 1302,1,0,0,0
-
-//(gl_chyard.gat)?
-gl_chyard.gat,0,0,0,0 monster Zombie 1015,20,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 Ghoul 1036,25,0,0,0
+gl_cas02.gat,0,0,0,0 monster Chimera 1283,1,7200000,7200000,0
+
+//(gl_church.gat)*
+gl_church.gat,0,0,0,0 monster Ghoul 1036,70,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 Mimic 1191,24,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 Dark Illusion 1302,1,1800000,1800000,0
+
+//(gl_chyard.gat)*
+gl_chyard.gat,0,0,0,0 monster Zombie 1015,30,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 Ghoul 1036,35,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 Mimic 1191,5,0,0,0
-gl_chyard.gat,0,0,0,0 monster Wraith 1192,15,0,0,0
-gl_chyard.gat,0,0,0,0 monster Dark Lord 1272,1,3600000,1800000,0
+gl_chyard.gat,0,0,0,0 monster Mimic 1191,3,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 Dark Lord 1272,1,3600000,3600000,0
-//(gl_dun01.gat)?
-gl_dun01.gat,0,0,0,0 monster Arclouse 1194,100,0,0,0
-gl_dun01.gat,0,0,0,0 monster Sting 1207,20,0,0,0
+//(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,50,0,0,0
-//(gl_dun02.gat)?
-gl_dun02.gat,0,0,0,0 monster Minorous 1149,20,0,0,0
+//(gl_dun02.gat)*
+//gl_dun02.gat,0,0,0,0 monster Minorous 1149,20,0,0,0
gl_dun02.gat,0,0,0,0 monster Gargoyle 1253,20,0,0,0
gl_dun02.gat,0,0,0,0 monster Majoruros 1310,40,0,0,0
-//(gl_in01.gat)?
-gl_in01.gat,0,0,0,0 monster Marionette 1143,10,0,0,0
-gl_in01.gat,0,0,0,0 monster Rideword 1195,10,0,0,0
+//(gl_in01.gat)*
+gl_in01.gat,0,0,0,0 monster Marionette 1143,20,0,0,0
+gl_in01.gat,0,0,0,0 monster Rideword 1195,8,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 Dark Frame 1260,10,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 Sageworm 1281,20,0,0,0
+gl_in01.gat,0,0,0,0 monster Sageworm 1281,14,0,0,0
-//(gl_knt01.gat)?
-gl_knt01.gat,0,0,0,0 monster Khalitzburg 1132,5,0,0,0
-gl_knt01.gat,0,0,0,0 monster Raydric 1163,60,0,0,0
-gl_knt01.gat,21,278,0,0 monster Giant Whisper 1186,1,3600000,1800000,1
+//(gl_knt01.gat)*
+gl_knt01.gat,0,0,0,0 monster Khalitzburg 1132,10,0,0,0
+gl_knt01.gat,0,0,0,0 monster Raydric 1163,65,0,0,0
+gl_knt01.gat,0,0,0,0 monster Black Mushroom 1084,12,360000,180000,1
+gl_knt01.gat,21,278,0,0 monster Giant Whisper 1186,1,1800000,1800000,1
gl_knt01.gat,122,266,0,0 monster Rideword 1195,1,120000,60000,1
gl_knt01.gat,26,223,20,20 monster Rideword 1195,10,120000,60000,1
-gl_knt01.gat,33,120,30,30 monster Rideword 1195,30,120000,60000,1
-gl_knt01.gat,0,0,0,0 monster Knight of Abyss 1219,20,60000,30000,1
+gl_knt01.gat,33,120,30,30 monster Rideword 1195,25,120000,60000,1
+gl_knt01.gat,0,0,0,0 monster Knight of Abyss 1219,10,60000,30000,1
gl_knt01.gat,0,0,0,0 monster Alice 1275,1,0,0,1
gl_knt01.gat,0,0,0,0 monster Raydric Archer 1276,25,0,0,0
-//(gl_knt02.gat)?
+//(gl_knt02.gat)*
gl_knt02.gat,0,0,0,0 monster Joker 1131,20,0,0,0
gl_knt02.gat,114,194,5,5 monster Khalitzburg 1132,1,1800000,900000,1
gl_knt02.gat,118,241,5,5 monster Khalitzburg 1132,2,1800000,900000,1
@@ -109,51 +109,52 @@ gl_knt02.gat,208,45,5,5 monster Khalitzburg 1132,1,1800000,900000,1
gl_knt02.gat,232,132,5,5 monster Khalitzburg 1132,2,1800000,900000,1
gl_knt02.gat,243,74,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,62,80,5,5 monster Khalitzburg 1132,2,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,99,49,5,5 monster Khalitzburg 1132,2,1800000,900000,1
-gl_knt02.gat,0,0,0,0 monster Raydric 1163,50,0,0,0
+gl_knt02.gat,99,49,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,0,0,0,0 monster Khalitzburg 1132,20,1800000,900000,1
+gl_knt02.gat,0,0,0,0 monster Raydric 1163,55,0,0,0
gl_knt02.gat,0,0,0,0 monster Mysteltainn 1203,1,0,0,1
-gl_knt02.gat,149,26,5,5 monster Knight of Abyss 1219,10,60000,30000,1
-gl_knt02.gat,0,0,0,0 monster Blood Knight 1268,1,3600000,1800000,1
+gl_knt02.gat,149,26,5,5 monster Knight of Abyss 1219,6,60000,30000,1
+gl_knt02.gat,0,0,0,0 monster Blood Knight 1268,1,3600000,3600000,1
gl_knt02.gat,0,0,0,0 monster Alice 1275,1,0,0,1
gl_knt02.gat,0,0,0,0 monster Raydric Archer 1276,25,0,0,0
-//(gl_prison.gat)?
+//(gl_prison.gat)*
+gl_prison.gat,0,0,0,0 monster Zombie Prisoner 1197,40,0,0,0
+gl_prison.gat,0,0,0,0 monster Injustice 1257,20,0,0,0
+gl_prison.gat,0,0,0,0 monster Rybio 1201,15,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,20,0,0,0
-gl_prison.gat,0,0,0,0 monster Rybio 1201,10,0,0,0
-gl_prison.gat,0,0,0,0 monster Injustice 1257,10,0,0,0
-//(gl_prison1.gat)?
-gl_prison1.gat,0,0,0,0 monster Hunter Fly 1035,10,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 Zherlthsh 1200,1,3600000,0,0
-gl_prison1.gat,0,0,0,0 monster Rybio 1201,10,0,0,0
+//(gl_prison1.gat)*
+gl_prison1.gat,0,0,0,0 monster Cramp 1209,20,0,0,0
+gl_prison1.gat,0,0,0,0 monster Skeleton Prisoner 1196,30,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 Zherlthsh 1200,1,3600000,3600000,0
gl_prison1.gat,0,0,0,0 monster Phendark 1202,10,0,0,0
-gl_prison1.gat,0,0,0,0 monster Cramp 1209,30,0,0,0
-gl_prison1.gat,0,0,0,0 monster Injustice 1257,50,0,0,0
-
-//(gl_sew01.gat)?
-gl_sew01.gat,0,0,0,0 monster Whisper 1179,30,0,0,0
-gl_sew01.gat,0,0,0,0 monster Arclouse 1194,10,0,0,0
-gl_sew01.gat,0,0,0,0 monster Gargoyle 1253,10,0,0,0
-
-//(gl_sew02.gat)?
-gl_sew02.gat,0,0,0,0 monster Cramp 1209,30,0,0,0
-gl_sew02.gat,0,0,0,0 monster Gargoyle 1253,30,0,0,0
-
-//(gl_sew03.gat)?
-gl_sew03.gat,0,0,0,0 monster Sting 1207,50,0,0,0
-gl_sew03.gat,0,0,0,0 monster Cramp 1209,30,0,0,0
-gl_sew03.gat,0,0,0,0 monster Gargoyle 1253,15,0,0,0
-
-//(gl_sew04.gat)?
-gl_sew04.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
-gl_sew04.gat,0,0,0,0 monster Anolian 1206,10,0,0,0
-gl_sew04.gat,0,0,0,0 monster Gargoyle 1253,10,0,0,0
-
-//(gl_step.gat)?
-gl_step.gat,0,0,0,0 monster Mimic 1191,30,60000,30000,1
-gl_step.gat,0,0,0,0 monster Wind Ghost 1263,30,0,0,0
+gl_prison1.gat,0,0,0,0 monster Rybio 1201,10,0,0,0
+gl_prison1.gat,0,0,0,0 monster Hunter Fly 1035,10,0,0,0
+
+//(gl_sew01.gat)*
+gl_sew01.gat,0,0,0,0 monster Whisper 1179,45,0,0,0
+gl_sew01.gat,0,0,0,0 monster Arclouse 1194,15,0,0,0
+gl_sew01.gat,0,0,0,0 monster Gargoyle 1253,40,0,0,0
+
+//(gl_sew02.gat)*
+gl_sew02.gat,0,0,0,0 monster Cramp 1209,40,0,0,0
+gl_sew02.gat,0,0,0,0 monster Gargoyle 1253,60,0,0,0
+
+//(gl_sew03.gat)*
+gl_sew03.gat,0,0,0,0 monster Cramp 1209,25,0,0,0
+gl_sew03.gat,0,0,0,0 monster Sting 1207,75,0,0,0
+gl_sew03.gat,0,0,0,0 monster Gargoyle 1253,25,0,0,0
+
+//(gl_sew04.gat)*
+gl_sew04.gat,0,0,0,0 monster Anolian 1206,60,0,0,0
+gl_sew04.gat,0,0,0,0 monster Drainliar 1111,30,0,0,0
+gl_sew04.gat,0,0,0,0 monster Gargoyle 1253,20,0,0,0
+
+//(gl_step.gat)*
+gl_step.gat,0,0,0,0 monster Mimic 1191,25,60000,30000,1
+gl_step.gat,0,0,0,0 monster Wind Ghost 1263,60,0,0,0
gl_step.gat,0,0,0,0 monster Raydric Archer 1276,30,0,0,0
diff --git a/npc/mobs/dungeons/guilddun.txt b/npc/mobs/dungeons/guilddun.txt
index 67d8d664b..7322dcf6d 100644
--- a/npc/mobs/dungeons/guilddun.txt
+++ b/npc/mobs/dungeons/guilddun.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
@@ -15,7 +15,7 @@ gld_dun01.gat,0,0,0,0 monster Skeleton General 1290,10,0,0,0
gld_dun01.gat,0,0,0,0 monster Gajomart 1309,10,0,0,0
gld_dun01.gat,0,0,0,0 monster Am Mut 1301,10,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 Vagabond Wolf 1092,1,14400000,7200000,1
+gld_dun01.gat,0,0,0,0 monster Vagabond Wolf 1092,1,14400000,14400000,1
gld_dun01.gat,0,0,0,0 monster Eddga 1115,1,28800000,28800000,1
//(gld_dun02.gat)*
diff --git a/npc/mobs/dungeons/moc_pyramid.txt b/npc/mobs/dungeons/moc_pyramid.txt
index 31fec7b85..96f005cad 100644
--- a/npc/mobs/dungeons/moc_pyramid.txt
+++ b/npc/mobs/dungeons/moc_pyramid.txt
@@ -35,7 +35,7 @@ moc_pryd04.gat,0,0,0,0 monster Mimic 1191,15,600000,300000,1
moc_pryd04.gat,0,0,0,0 monster Isis 1029,50,150000,75000,0
moc_pryd04.gat,0,0,0,0 monster Mummy 1041,40,0,0,0
moc_pryd04.gat,0,0,0,0 monster Matyr 1146,20,0,0,0
-moc_pryd04.gat,0,0,0,0 monster Osiris 1038,1,3600000,7200000,0
+moc_pryd04.gat,0,0,0,0 monster Osiris 1038,1,3600000,3600000,0
//(moc_pryd05.gat)*
moc_pryd05.gat,0,0,0,0 monster Minorous 1149,60,0,0,0
@@ -47,4 +47,4 @@ moc_pryd06.gat,100,90,80,50 monster Ancient Mummy 1297,20,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 Mimic 1191,20,0,0,0
moc_pryd06.gat,0,0,0,0 monster Verit 1032,10,0,0,0
-moc_pryd06.gat,101,119,0,0 monster Amon Ra 1511,1,3600000,7200000,0
+moc_pryd06.gat,101,119,0,0 monster Amon Ra 1511,1,3600000,3600000,0
diff --git a/npc/mobs/dungeons/moc_sphinx.txt b/npc/mobs/dungeons/moc_sphinx.txt
index bb57c4c61..ef6bb5a45 100644
--- a/npc/mobs/dungeons/moc_sphinx.txt
+++ b/npc/mobs/dungeons/moc_sphinx.txt
@@ -41,4 +41,4 @@ in_sphinx5.gat,0,0,0,0 monster Sidewinder 1037,20,0,0,0
in_sphinx5.gat,0,0,0,0 monster Pasana 1154,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 Marduk 1140,30,0,0,0
-in_sphinx5.gat,0,0,0,0 monster Pharaoh 1157,1,3600000,1800000,1
+in_sphinx5.gat,0,0,0,0 monster Pharaoh 1157,1,3600000,3600000,1
diff --git a/npc/mobs/dungeons/orcdun.txt b/npc/mobs/dungeons/orcdun.txt
index 82ec94230..8e1c14251 100644
--- a/npc/mobs/dungeons/orcdun.txt
+++ b/npc/mobs/dungeons/orcdun.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
@@ -11,20 +11,20 @@
//============================================================
//(orcsdun01.gat)*
-orcsdun01.gat,0,0,0,0 monster Orc Skeleton 1152,10,30000,60000,0
-orcsdun01.gat,0,0,0,0 monster Orc Zombie 1153,70,3000,5000,0
+orcsdun01.gat,0,0,0,0 monster Orc Skeleton 1152,10,0,0,0
+orcsdun01.gat,0,0,0,0 monster Orc Zombie 1153,70,0,0,0
orcsdun01.gat,0,0,0,0 monster Drainliar 1111,5,0,0,0
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,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,0,0,0,0 monster White Plant 1082,5,180000,90000,1
+orcsdun01.gat,167,133,5,5 monster Black Mushroom 1084,5,900000,900000,1
+orcsdun01.gat,67,34,5,5 monster Black Mushroom 1084,5,900000,900000,1
+orcsdun01.gat,0,0,0,0 monster White Plant 1082,5,180000,180000,1
//(orcsdun02.gat)*
-orcsdun02.gat,0,0,0,0 monster Zenorc 1177,50,3000,5000,0
-orcsdun02.gat,0,0,0,0 monster Orc Skeleton 1152,50,3000,5000,0
+orcsdun02.gat,0,0,0,0 monster Zenorc 1177,50,0,0,0
+orcsdun02.gat,0,0,0,0 monster Orc Skeleton 1152,50,0,0,0
orcsdun02.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
orcsdun02.gat,0,0,0,0 monster Steel ChonChon 1042,20,0,0,0
-orcsdun02.gat,0,0,0,0 monster White Plant 1082,5,180000,90000,1
-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,900000,450000,1
+orcsdun02.gat,0,0,0,0 monster White Plant 1082,5,180000,180000,1
+orcsdun02.gat,0,0,0,0 monster Orc Archer 1189,5,1800000,1800000,1
+orcsdun02.gat,0,0,0,0 monster Black Mushroom 1084,5,900000,900000,1
diff --git a/npc/mobs/dungeons/payoncave.txt b/npc/mobs/dungeons/payoncave.txt
index 6a7e9d6fc..2f0be1939 100644
--- a/npc/mobs/dungeons/payoncave.txt
+++ b/npc/mobs/dungeons/payoncave.txt
@@ -144,7 +144,7 @@ pay_dun04.gat,136,111,0,0 monster Sohee 1170,2,300000,100000,1
pay_dun04.gat,0,0,0,0 monster Dokebi 1110,40,0,0,0
pay_dun04.gat,0,0,0,0 monster Skeleton Soldier 1028,10,0,0,0
pay_dun04.gat,0,0,0,0 monster Skeleton Archer 1016,20,0,0,0
-pay_dun04.gat,0,0,0,0 monster White Plant 1082,6,600000,300000,1
-pay_dun04.gat,120,120,10,10 monster Shining Plant 1083,2,1800000,900000,1
-pay_dun04.gat,120,115,0,0 monster Moonlight Flower 1150,1,3600000,7200000,1
+pay_dun04.gat,0,0,0,0 monster White Plant 1082,6,180000,180000,1
+pay_dun04.gat,120,120,10,10 monster Shining Plant 1083,2,1800000,1800000,1
+pay_dun04.gat,120,115,0,0 monster Moonlight Flower 1150,1,3600000,3600000,1
pay_dun04.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
diff --git a/npc/mobs/dungeons/pront_maze.txt b/npc/mobs/dungeons/pront_maze.txt
index 58bd00bfd..0a3be6f63 100644
--- a/npc/mobs/dungeons/pront_maze.txt
+++ b/npc/mobs/dungeons/pront_maze.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
@@ -11,48 +11,48 @@
//============================================================
//(prt_maze01.gat)*
-prt_maze01.gat,99,140,21,21 monster Sidewinder 1037,3,120000,40000,1
-prt_maze01.gat,59,140,21,21 monster Choco 1214,2,120000,40000,1
-prt_maze01.gat,19,100,21,21 monster Hunter Fly 1035,4,120000,40000,1
-prt_maze01.gat,179,100,21,21 monster Argiope 1099,3,120000,40000,1
-prt_maze01.gat,179,140,21,21 monster Mantis 1139,3,120000,40000,1
-prt_maze01.gat,19,180,21,21 monster Savage 1166,5,120000,40000,1
-prt_maze01.gat,139,60,21,21 monster Bigfoot 1060,5,120000,40000,1
-prt_maze01.gat,139,100,21,21 monster Argos 1100,3,120000,40000,1
-prt_maze01.gat,139,180,21,21 monster Caramel 1103,5,120000,40000,1
-prt_maze01.gat,59,140,21,21 monster Yoyo 1057,4,120000,40000,1
-prt_maze01.gat,59,180,21,21 monster Martin 1145,5,120000,40000,1
-prt_maze01.gat,179,180,21,21 monster Coco 1104,5,120000,40000,1
-prt_maze01.gat,19,140,21,21 monster Steel ChonChon 1042,5,120000,40000,1
-prt_maze01.gat,99,20,21,21 monster Creamy 1018,1,120000,40000,1
-prt_maze01.gat,139,140,21,21 monster Stainer 1174,5,120000,40000,1
-prt_maze01.gat,59,60,21,21 monster Boa 1025,5,120000,40000,1
-prt_maze01.gat,19,20,21,21 monster Poporing 1031,5,120000,40000,1
-prt_maze01.gat,19,60,21,21 monster Wolf 1013,5,120000,40000,1
-prt_maze01.gat,179,60,21,21 monster Rocker 1052,5,120000,40000,1
-prt_maze01.gat,99,100,21,21 monster ChonChon 1011,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,179,20,21,21 monster Poring 1002,5,120000,40000,1
-prt_maze01.gat,99,60,21,21 monster Smokie 1056,5,120000,40000,1
-prt_maze01.gat,19,180,21,21 monster Savage Babe 1167,3,120000,40000,1
-prt_maze01.gat,99,180,21,21 monster Dustiness 1114,5,120000,40000,1
-prt_maze01.gat,59,20,21,21 monster Pupa 1008,5,120000,40000,1
-prt_maze01.gat,59,100,21,21 monster Horn 1128,5,120000,40000,1
-prt_maze01.gat,0,0,0,0 monster Yellow Plant 1081,2,180000,90000,1
+prt_maze01.gat,99,140,21,21 monster Sidewinder 1037,3,120000,120000,1
+prt_maze01.gat,59,140,21,21 monster Choco 1214,2,120000,120000,1
+prt_maze01.gat,19,100,21,21 monster Hunter Fly 1035,4,120000,120000,1
+prt_maze01.gat,179,100,21,21 monster Argiope 1099,3,120000,120000,1
+prt_maze01.gat,179,140,21,21 monster Mantis 1139,3,120000,120000,1
+prt_maze01.gat,19,180,21,21 monster Savage 1166,5,120000,120000,1
+prt_maze01.gat,139,60,21,21 monster Bigfoot 1060,5,120000,120000,1
+prt_maze01.gat,139,100,21,21 monster Argos 1100,3,120000,120000,1
+prt_maze01.gat,139,180,21,21 monster Caramel 1103,5,120000,120000,1
+prt_maze01.gat,59,140,21,21 monster Yoyo 1057,4,120000,120000,1
+prt_maze01.gat,59,180,21,21 monster Martin 1145,5,120000,120000,1
+prt_maze01.gat,179,180,21,21 monster Coco 1104,5,120000,120000,1
+prt_maze01.gat,19,140,21,21 monster Steel ChonChon 1042,5,120000,120000,1
+prt_maze01.gat,99,20,21,21 monster Creamy 1018,1,120000,120000,1
+prt_maze01.gat,139,140,21,21 monster Stainer 1174,5,120000,120000,1
+prt_maze01.gat,59,60,21,21 monster Boa 1025,5,120000,120000,1
+prt_maze01.gat,19,20,21,21 monster Poporing 1031,5,120000,120000,1
+prt_maze01.gat,19,60,21,21 monster Wolf 1013,5,120000,120000,1
+prt_maze01.gat,179,60,21,21 monster Rocker 1052,5,120000,120000,1
+prt_maze01.gat,99,100,21,21 monster ChonChon 1011,5,120000,120000,1
+prt_maze01.gat,139,20,21,21 monster Lunatic 1063,5,120000,120000,1
+prt_maze01.gat,99,20,21,21 monster Fabre 1007,5,120000,120000,1
+prt_maze01.gat,179,20,21,21 monster Poring 1002,5,120000,120000,1
+prt_maze01.gat,99,60,21,21 monster Smokie 1056,5,120000,120000,1
+prt_maze01.gat,19,180,21,21 monster Savage Babe 1167,3,120000,120000,1
+prt_maze01.gat,99,180,21,21 monster Dustiness 1114,5,120000,120000,1
+prt_maze01.gat,59,20,21,21 monster Pupa 1008,5,120000,120000,1
+prt_maze01.gat,59,100,21,21 monster Horn 1128,5,120000,120000,1
+prt_maze01.gat,0,0,0,0 monster Yellow Plant 1081,2,180000,180000,1
prt_maze01.gat,0,0,0,0 monster Blue Plant 1079,3,360000,180000,1
-prt_maze01.gat,0,0,0,0 monster Shining Plant 1083,2,1800000,900000,1
-prt_maze01.gat,0,0,0,0 monster Vagabond Wolf 1092,1,3600000,1800000,1
+prt_maze01.gat,0,0,0,0 monster Shining Plant 1083,2,1800000,1800000,1
+prt_maze01.gat,0,0,0,0 monster Vagabond Wolf 1092,1,3600000,3600000,1
prt_maze01.gat,0,0,0,0 monster Black Mushroom 1084,5,360000,180000,1
-prt_maze01.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
-prt_maze01.gat,0,0,0,0 monster Red Mushroom 1085,5,180000,90000,1
-prt_maze01.gat,0,0,0,0 monster White Plant 1082,3,180000,90000,1
+prt_maze01.gat,0,0,0,0 monster Red Plant 1078,5,180000,180000,1
+prt_maze01.gat,0,0,0,0 monster Red Mushroom 1085,5,180000,180000,1
+prt_maze01.gat,0,0,0,0 monster White Plant 1082,3,180000,180000,1
//(prt_maze02.gat)*
prt_maze02.gat,0,0,0,0 monster Bigfoot 1060,5,0,0,0
prt_maze02.gat,0,0,0,0 monster Poporing 1031,25,0,0,0
-prt_maze02.gat,0,0,0,0 monster Sasquatch 1243,1,600000,300000,1
-prt_maze02.gat,0,0,0,0 monster Leib Olmai 1306,1,1800000,900000,1
+prt_maze02.gat,0,0,0,0 monster Sasquatch 1243,1,600000,600000,1
+prt_maze02.gat,0,0,0,0 monster Leib Olmai 1306,1,1800000,1800000,1
//(prt_maze03.gat)*
prt_maze03.gat,0,0,0,0 monster Killer Mantis 1294,1,0,0,0
@@ -61,15 +61,15 @@ prt_maze03.gat,0,0,0,0 monster Sidewinder 1037,30,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 Stem Worm 1215,20,0,0,0
prt_maze03.gat,0,0,0,0 monster Mantis 1139,30,0,0,0
-prt_maze03.gat,0,0,0,0 monster Yellow Plant 1081,1,600000,300000,1
-prt_maze03.gat,0,0,0,0 monster Blue Plant 1079,5,900000,450000,1
-prt_maze03.gat,0,0,0,0 monster Vocal 1088,1,1800000,200000,1
-prt_maze03.gat,0,0,0,0 monster Eclipse 1093,1,1800000,200000,1
-prt_maze03.gat,0,0,0,0 monster Mastering 1090,1,1800000,200000,1
-prt_maze03.gat,0,0,0,0 monster Shining Plant 1083,5,1800000,200000,1
-prt_maze03.gat,0,0,0,0 monster Vagabond Wolf 1092,1,3600000,200000,1
-prt_maze03.gat,0,0,0,0 monster Baphomet 1039,1,3600000,7200000,1
-prt_maze03.gat,0,0,0,0 monster Ghostring 1120,1,3600000,7200000,1
+prt_maze03.gat,0,0,0,0 monster Yellow Plant 1081,1,600000,600000,1
+prt_maze03.gat,0,0,0,0 monster Blue Plant 1079,5,900000,900000,1
+prt_maze03.gat,0,0,0,0 monster Vocal 1088,1,1800000,1800000,1
+prt_maze03.gat,0,0,0,0 monster Eclipse 1093,1,1800000,1800000,1
+prt_maze03.gat,0,0,0,0 monster Mastering 1090,1,1800000,1800000,1
+prt_maze03.gat,0,0,0,0 monster Shining Plant 1083,5,1800000,1800000,1
+prt_maze03.gat,0,0,0,0 monster Vagabond Wolf 1092,1,3600000,1800000,1
+prt_maze03.gat,0,0,0,0 monster Baphomet 1039,1,7200000,7200000,1
+prt_maze03.gat,0,0,0,0 monster Ghostring 1120,1,7200000,7200000,1
prt_maze03.gat,0,0,0,0 monster Black Mushroom 1084,6,360000,180000,1
prt_maze03.gat,0,0,0,0 monster Red Plant 1078,5,360000,180000,1
prt_maze03.gat,0,0,0,0 monster Red Mushroom 1085,5,180000,90000,1
diff --git a/npc/mobs/dungeons/pront_sewers.txt b/npc/mobs/dungeons/pront_sewers.txt
index bac25a8d3..ce077fff6 100644
--- a/npc/mobs/dungeons/pront_sewers.txt
+++ b/npc/mobs/dungeons/pront_sewers.txt
@@ -41,4 +41,4 @@ 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 Thief Bug Larva 1051,20,0,0,0
prt_sewb4.gat,0,0,0,0 monster Thief Bug Egg 1048,10,0,0,0
-prt_sewb4.gat,0,0,0,0 monster Golden Thief Bug 1086,1,3600000,7200000,0
+prt_sewb4.gat,0,0,0,0 monster Golden Thief Bug 1086,1,3600000,3600000,0
diff --git a/npc/mobs/dungeons/sunkenship.txt b/npc/mobs/dungeons/sunkenship.txt
index c75307cf7..db4fe13b3 100644
--- a/npc/mobs/dungeons/sunkenship.txt
+++ b/npc/mobs/dungeons/sunkenship.txt
@@ -96,8 +96,8 @@ treasure01.gat,89,160,0,0 monster Hydra 1068,1,305000,100000,1
treasure01.gat,89,161,0,0 monster Hydra 1068,1,300000,100000,1
treasure01.gat,0,0,0,0 monster Kukre 1070,10,0,0,1
treasure01.gat,21,165,5,9 monster Kukre 1070,10,300000,150000,1
-treasure01.gat,162,58,0,0 monster Penomena 1216,1,900000,450000,0
-treasure01.gat,168,59,0,0 monster Wanderer 1208,1,1800000,900000,0
+treasure01.gat,162,58,0,0 monster Penomena 1216,1,900000,900000,0
+treasure01.gat,168,59,0,0 monster Wanderer 1208,1,1800000,1800000,0
//(treasure02.gat)*
treasure02.gat,23,142,1,1 monster Marionette 1143,1,200000,100000,1
@@ -137,5 +137,5 @@ treasure02.gat,108,57,0,0 monster Hydra 1068,1,300000,100000,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,0,0,0,0 monster Kukre 1070,20,0,0,1
-treasure02.gat,0,0,0,0 monster Ghostring 1120,1,1800000,900000,1
-treasure02.gat,101,151,8,8 monster Drake 1112,1,3600000,7200000,1
+treasure02.gat,0,0,0,0 monster Ghostring 1120,1,3600000,3600000,1
+treasure02.gat,101,151,8,8 monster Drake 1112,1,7200000,7200000,1
diff --git a/npc/mobs/dungeons/turtleisland.txt b/npc/mobs/dungeons/turtleisland.txt
index b1d246c68..89f773978 100644
--- a/npc/mobs/dungeons/turtleisland.txt
+++ b/npc/mobs/dungeons/turtleisland.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
@@ -19,7 +19,7 @@ tur_dun01.gat,0,0,0,0 monster Thara Frog 1034,10,0,0,0
//(tur_dun02.gat)*
tur_dun02.gat,0,0,0,0 monster Freezer 1319,20,0,0,0
-tur_dun02.gat,0,0,0,0 monster Soldier 1316,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 Perimeter 1314,40,0,0,0
tur_dun02.gat,0,0,0,0 monster Pest 1256,15,0,0,0
@@ -39,7 +39,7 @@ tur_dun04.gat,100,93,20,20 monster Freezer 1319,4,120000,60000,0
tur_dun04.gat,0,0,0,0 monster Heater 1318,30,0,0,0
tur_dun04.gat,100,93,20,20 monster Heater 1318,3,120000,60000,0
tur_dun04.gat,0,0,0,0 monster Perimeter 1314,4,0,0,0
-tur_dun04.gat,99,93,20,20 monster Turtle General 1312,1,3600000,7200000,0
+tur_dun04.gat,99,93,20,20 monster Turtle General 1312,1,3600000,3600000,0
//(tur_dun05.gat)? //no data at emp.org
tur_dun05.gat,0,0,0,0 monster Perimeter 1314,3,20000,0,0
diff --git a/npc/mobs/dungeons/umbaladun.txt b/npc/mobs/dungeons/umbaladun.txt
index 5adb03481..9381d5b0b 100644
--- a/npc/mobs/dungeons/umbaladun.txt
+++ b/npc/mobs/dungeons/umbaladun.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
@@ -11,16 +11,16 @@
//============================================================
-//(um_dun01.gat)?
+//(um_dun01.gat)*
um_dun01.gat,0,0,0,0 monster Stainer 1174,30,0,0,0
um_dun01.gat,0,0,0,0 monster Dustiness 1114,30,0,0,0
-um_dun01.gat,0,0,0,0 monster Wooden Fighter 1499,30,0,0,0
+um_dun01.gat,0,0,0,0 monster Wootan Fighter 1499,30,0,0,0
um_dun01.gat,0,0,0,0 monster Stone Shooter 1495,10,0,0,0
um_dun01.gat,0,0,0,0 monster Wooden Golem 1497,5,0,0,0
-//(um_dun02.gat)?
-um_dun02.gat,0,0,0,0 monster Wooden Fighter 1499,20,0,0,0
-um_dun02.gat,0,0,0,0 monster Wooden Shooter 1498,10,0,0,0
+//(um_dun02.gat)*
+um_dun02.gat,0,0,0,0 monster Wootan Fighter 1499,20,0,0,0
+um_dun02.gat,0,0,0,0 monster Wootan Shooter 1498,10,0,0,0
um_dun02.gat,0,0,0,0 monster Dryad 1493,30,0,0,0
um_dun02.gat,0,0,0,0 monster Wooden Golem 1497,30,0,0,0
-um_dun02.gat,0,0,0,0 monster Stone Shooter 1495,10,0,0,0
+um_dun02.gat,0,0,0,0 monster Stone Shooter 1495,20,0,0,0
diff --git a/npc/mobs/fields/ayothaya.txt b/npc/mobs/fields/ayothaya.txt
index 405cd18d0..76d903c5e 100644
--- a/npc/mobs/fields/ayothaya.txt
+++ b/npc/mobs/fields/ayothaya.txt
@@ -20,4 +20,4 @@ ayo_fild01.gat,0,0,0,0 monster Coco 1104,25,0,0,0
ayo_fild02.gat,0,0,0,0 monster Coco 1104,25,0,0,0
ayo_fild02.gat,0,0,0,0 monster Yoyo 1057,20,0,0,0
ayo_fild02.gat,0,0,0,0 monster Leaf Cat 1586,20,0,0,0
-ayo_fild02.gat,0,0,0,0 monster Smokie 1056,20,0,0,0 \ No newline at end of file
+ayo_fild02.gat,0,0,0,0 monster Smokie 1056,20,0,0,0
diff --git a/npc/mobs/fields/comodo.txt b/npc/mobs/fields/comodo.txt
index 26227daf8..1da9865ab 100644
--- a/npc/mobs/fields/comodo.txt
+++ b/npc/mobs/fields/comodo.txt
@@ -41,9 +41,9 @@ cmd_fild03.gat,0,0,0,0 monster Anolian 1206,60,0,0,0
cmd_fild03.gat,0,0,0,0 monster Pest 1256,30,0,0,0
cmd_fild03.gat,0,0,0,0 monster Rotar Zairo 1392,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 Toad 1089,1,1800000,1500000,0
-cmd_fild03.gat,0,0,0,0 monster Shining Plant 1083,3,1800000,1800000,1
-cmd_fild03.gat,0,0,0,0 monster Mutant Dragonoid 1262,1,3600000,2000000,0
+cmd_fild03.gat,0,0,0,0 monster Toad 1089,1,3600000,1800000,1
+cmd_fild03.gat,0,0,0,0 monster Shining Plant 1083,3,3600000,1800000,1
+cmd_fild03.gat,0,0,0,0 monster Mutant Dragonoid 1262,1,7200000,3600000,1
//(cmd_fild04.gat)*
cmd_fild04.gat,221,120,120,40 monster Sea Otter 1323,20,0,0,0
diff --git a/npc/mobs/fields/geffen.txt b/npc/mobs/fields/geffen.txt
index db662dbb2..79bfc305d 100644
--- a/npc/mobs/fields/geffen.txt
+++ b/npc/mobs/fields/geffen.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
@@ -15,16 +15,16 @@ gef_fild00.gat,0,0,0,0 monster Poporing 1031,20,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 Fabre 1007,80,0,0,0
gef_fild00.gat,0,0,0,0 monster Poring 1002,80,0,0,0
-gef_fild00.gat,124,321,0,0 monster Blue Plant 1079,1,900000,450000,1
-gef_fild00.gat,95,128,0,0 monster Blue Plant 1079,1,900000,450000,1
-gef_fild00.gat,54,186,5,5 monster Green Plant 1080,3,360000,180000,1
-gef_fild00.gat,54,212,5,5 monster Green Plant 1080,3,360000,180000,1
+gef_fild00.gat,124,321,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild00.gat,95,128,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild00.gat,54,186,5,5 monster Green Plant 1080,3,360000,360000,1
+gef_fild00.gat,54,212,5,5 monster Green Plant 1080,3,360000,360000,1
//(gef_fild01.gat)*
gef_fild01.gat,0,0,0,0 monster Poporing 1031,40,0,0,0
gef_fild01.gat,0,0,0,0 monster Roda Frog 1012,80,0,0,0
-gef_fild01.gat,0,0,0,0 monster Toad 1089,1,1800000,200000,1
-gef_fild01.gat,215,225,10,10 monster Green Plant 1080,5,360000,180000,1
+gef_fild01.gat,0,0,0,0 monster Toad 1089,1,3600000,1800000,1
+gef_fild01.gat,215,225,10,10 monster Green Plant 1080,5,360000,360000,1
//(gef_fild02.gat)*
gef_fild02.gat,0,0,0,0 monster Choco 1214,1,0,0,0
@@ -32,12 +32,12 @@ gef_fild02.gat,0,0,0,0 monster Orc Warrior 1023,40,0,0,0
gef_fild02.gat,0,0,0,0 monster Yoyo 1057,10,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 Coco 1104,20,0,0,0
-gef_fild02.gat,207,214,1,1 monster Blue Plant 1079,1,360000,180000,1
-gef_fild02.gat,215,209,2,1 monster Blue Plant 1079,2,360000,180000,1
-gef_fild02.gat,220,214,1,1 monster Blue Plant 1079,1,360000,180000,1
+gef_fild02.gat,207,214,1,1 monster Blue Plant 1079,1,360000,360000,1
+gef_fild02.gat,215,209,2,1 monster Blue Plant 1079,2,360000,360000,1
+gef_fild02.gat,220,214,1,1 monster Blue Plant 1079,1,360000,360000,1
gef_fild02.gat,164,194,1,1 monster Shining Plant 1083,1,1800000,900000,1
-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,227,316,6,6 monster Green Plant 1080,8,360000,360000,1
+gef_fild02.gat,87,48,6,6 monster Red Mushroom 1085,5,360000,360000,1
//(gef_fild03.gat)*
gef_fild03.gat,0,0,0,0 monster High Orc 1213,10,0,0,0
@@ -72,8 +72,8 @@ gef_fild04.gat,0,0,0,0 monster ChonChon 1011,40,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,30,0,0,0
gef_fild04.gat,0,0,0,0 monster Poring 1002,40,0,0,0
-gef_fild04.gat,152,82,5,2 monster Green Plant 1080,3,360000,180000,1
-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,360000,1
+gef_fild04.gat,224,82,5,2 monster Green Plant 1080,3,360000,360000,1
//(gef_fild05.gat)*
gef_fild05.gat,0,0,0,0 monster Wild Rose 1261,50,0,0,0
@@ -110,10 +110,10 @@ gef_fild07.gat,0,0,0,0 monster ChonChon 1011,50,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,70,0,0,0
gef_fild07.gat,0,0,0,0 monster Poring 1002,70,0,0,0
-gef_fild07.gat,269,289,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild07.gat,269,289,0,0 monster Blue Plant 1079,1,900000,900000,1
gef_fild07.gat,185,247,0,0 monster Shining Plant 1083,1,1800000,900000,1
-gef_fild07.gat,122,221,0,0 monster Green Plant 1080,3,360000,180000,1
-gef_fild07.gat,269,289,3,3 monster Green Plant 1080,3,360000,180000,1
+gef_fild07.gat,122,221,0,0 monster Green Plant 1080,3,360000,360000,1
+gef_fild07.gat,269,289,3,3 monster Green Plant 1080,3,360000,360000,1
//(gef_fild08.gat)*
gef_fild08.gat,0,0,0,0 monster Kobold 3 1135,20,0,0,0
@@ -122,20 +122,20 @@ gef_fild08.gat,0,0,0,0 monster Kobold 1 1133,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 Poison Spore 1077,20,0,0,0
gef_fild08.gat,0,0,0,0 monster Steel ChonChon 1042,80,0,0,0
-gef_fild08.gat,111,319,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,162,247,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,344,78,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,65,341,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,111,319,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild08.gat,144,140,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild08.gat,162,247,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild08.gat,325,311,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild08.gat,344,78,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild08.gat,59,91,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild08.gat,65,341,0,0 monster Blue Plant 1079,1,900000,900000,1
+gef_fild08.gat,70,80,0,0 monster Blue Plant 1079,1,900000,900000,1
//(gef_fild09.gat)*
gef_fild09.gat,0,0,0,0 monster Poison Spore 1077,20,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 Ambernite 1094,70,0,0,0
-gef_fild09.gat,277,201,5,5 monster Blue Plant 1079,3,900000,450000,1
+gef_fild09.gat,277,201,5,5 monster Blue Plant 1079,3,900000,900000,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
@@ -151,10 +151,10 @@ gef_fild09.gat,51,43,0,0 monster Red Mushroom 1085,1,180000,90000,1
gef_fild10.gat,0,0,0,0 monster Orc Lady 1273,40,0,0,0
gef_fild10.gat,0,0,0,0 monster Orc Warrior 1023,50,0,0,0
gef_fild10.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
-gef_fild10.gat,287,61,5,5 monster Blue Plant 1079,3,900000,450000,1
-gef_fild10.gat,46,350,5,5 monster Blue Plant 1079,3,900000,450000,1
-gef_fild10.gat,0,0,0,0 monster Orc Lord 1190,1,7200000,3600000,0
-gef_fild10.gat,300,253,5,5 monster Green Plant 1080,3,360000,180000,1
+gef_fild10.gat,287,61,5,5 monster Blue Plant 1079,3,900000,900000,1
+gef_fild10.gat,46,350,5,5 monster Blue Plant 1079,3,900000,900000,1
+gef_fild10.gat,0,0,0,0 monster Orc Lord 1190,1,7200000,7200000,0
+gef_fild10.gat,300,253,5,5 monster Green Plant 1080,3,360000,360000,1
//(gef_fild11.gat)*
gef_fild11.gat,0,0,0,0 monster Goblin Leader 1299,1,0,0,0
@@ -166,16 +166,16 @@ gef_fild11.gat,0,0,0,0 monster Goblin 3 1124,30,0,0,0
gef_fild11.gat,0,0,0,0 monster Goblin 4 1125,20,0,0,0
gef_fild11.gat,0,0,0,0 monster Goblin 5 1126,20,0,0,0
gef_fild11.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
-gef_fild11.gat,101,277,4,1 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,176,288,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,253,357,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,283,100,4,1 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,101,277,4,1 monster Black Mushroom 1084,3,360000,360000,1
+gef_fild11.gat,174,240,1,3 monster Black Mushroom 1084,3,360000,360000,1
+gef_fild11.gat,176,288,1,4 monster Black Mushroom 1084,3,360000,360000,1
+gef_fild11.gat,247,249,1,4 monster Black Mushroom 1084,3,360000,360000,1
+gef_fild11.gat,253,357,1,4 monster Black Mushroom 1084,3,360000,360000,1
+gef_fild11.gat,257,209,1,4 monster Black Mushroom 1084,3,360000,360000,1
+gef_fild11.gat,283,100,4,1 monster Black Mushroom 1084,3,360000,360000,1
//(gef_fild12.gat)*
-gef_fild12.gat,0,0,0,0 monster Kobold Leader 1296,1,240000,0,0
+gef_fild12.gat,0,0,0,0 monster Kobold Leader 1296,1,240000,240000,0
gef_fild12.gat,0,0,0,0 monster Kobold Archer 1282,40,0,0,0
gef_fild12.gat,0,0,0,0 monster Kobold 3 1135,30,0,0,0
gef_fild12.gat,0,0,0,0 monster Kobold 2 1134,30,0,0,0
@@ -187,7 +187,7 @@ gef_fild13.gat,0,0,0,0 monster Creamy 1018,40,0,0,0
gef_fild13.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
gef_fild13.gat,0,0,0,0 monster Ambernite 1094,30,0,0,0
-//(gef_fild14.gat)
+//(gef_fild14.gat)*
gef_fild14.gat,0,0,0,0 monster High Orc 1213,40,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 Orc Lady 1273,40,0,0,0
diff --git a/npc/mobs/fields/mjolnir.txt b/npc/mobs/fields/mjolnir.txt
index 0f78d9642..6590d7690 100644
--- a/npc/mobs/fields/mjolnir.txt
+++ b/npc/mobs/fields/mjolnir.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
@@ -92,8 +92,8 @@ mjolnir_04.gat,0,0,0,0 monster Mantis 1139,20,0,0,0
mjolnir_04.gat,0,0,0,0 monster Flora 1118,30,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 Hornet 1004,70,0,0,0
-mjolnir_04.gat,200,200,30,30 monster Shining Plant 1083,3,1800000,900000,1
-mjolnir_04.gat,0,0,0,0 monster Mistress 1059,1,7200000,3600000,0
+mjolnir_04.gat,200,200,30,30 monster Shining Plant 1083,3,1800000,1800000,1
+mjolnir_04.gat,0,0,0,0 monster Mistress 1059,1,7200000,7200000,0
mjolnir_04.gat,107,357,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,173,369,0,0 monster Green Plant 1080,1,180000,90000,1
diff --git a/npc/mobs/fields/morocc.txt b/npc/mobs/fields/morocc.txt
index f01a85702..31f58ef77 100644
--- a/npc/mobs/fields/morocc.txt
+++ b/npc/mobs/fields/morocc.txt
@@ -25,20 +25,20 @@ 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,132,307,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,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,89,315,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,99,261,0,0 monster Yellow Plant 1081,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,313,149,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_fild02.gat,342,267,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,359,215,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,132,307,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild02.gat,139,222,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild02.gat,194,294,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild02.gat,275,241,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild02.gat,89,315,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild02.gat,94,195,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild02.gat,99,261,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild02.gat,230,62,0,0 monster Green Plant 1080,1,180000,180000,1
+moc_fild02.gat,299,61,0,0 monster Green Plant 1080,1,180000,180000,1
+moc_fild02.gat,313,149,0,0 monster Green Plant 1080,1,180000,180000,1
+moc_fild02.gat,337,35,0,0 monster Green Plant 1080,1,180000,180000,1
+moc_fild02.gat,342,267,0,0 monster Green Plant 1080,1,180000,180000,1
+moc_fild02.gat,353,103,0,0 monster Green Plant 1080,1,180000,180000,1
+moc_fild02.gat,359,215,0,0 monster Green Plant 1080,1,180000,180000,1
//ƒ\ƒOƒ‰ƒg»”™ ‚O‚R(moc_fild03.gat)*
moc_fild03.gat,0,0,0,0 monster Greatest General 1277,40,0,0,0
@@ -47,13 +47,13 @@ moc_fild03.gat,0,0,0,0 monster Elder Willow 1033,80,0,0,0
moc_fild03.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
moc_fild03.gat,0,0,0,0 monster Willow 1010,30,0,0,0
moc_fild03.gat,0,0,0,0 monster Vagabond Wolf 1092,1,1800000,900000,0
-moc_fild03.gat,108,199,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_fild03.gat,213,201,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,77,311,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,108,199,5,5 monster Green Plant 1080,2,180000,180000,1
+moc_fild03.gat,200,263,5,5 monster Green Plant 1080,2,180000,180000,1
+moc_fild03.gat,213,201,5,5 monster Green Plant 1080,2,180000,180000,1
+moc_fild03.gat,216,69,5,5 monster Green Plant 1080,2,180000,180000,1
+moc_fild03.gat,261,161,5,5 monster Green Plant 1080,2,180000,180000,1
+moc_fild03.gat,77,311,5,5 monster Green Plant 1080,2,180000,180000,1
+moc_fild03.gat,96,65,5,5 monster Green Plant 1080,2,180000,180000,1
//ƒ\ƒOƒ‰ƒg»”™ ‚O‚S(moc_fild04.gat)*
moc_fild04.gat,0,0,0,0 monster Desert Wolf 1106,20,0,0,0
@@ -110,11 +110,11 @@ moc_fild09.gat,0,0,0,0 monster Deniro 1105,5,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 Piere 1160,5,0,0,0
moc_fild09.gat,0,0,0,0 monster Ant Egg 1097,20,0,0,0
-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,332,341,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_fild09.gat,64,78,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,240,313,5,5 monster Yellow Plant 1081,2,180000,180000,1
+moc_fild09.gat,305,62,5,5 monster Yellow Plant 1081,2,180000,180000,1
+moc_fild09.gat,332,341,5,5 monster Yellow Plant 1081,2,180000,180000,1
+moc_fild09.gat,54,325,5,5 monster Yellow Plant 1081,2,180000,180000,1
+moc_fild09.gat,64,78,5,5 monster Yellow Plant 1081,2,180000,180000,1
//ƒ\ƒOƒ‰ƒg»”™ ‚P‚O(moc_fild10.gat)*
moc_fild10.gat,0,0,0,0 monster Magnolia 1138,1,0,0,0
@@ -123,8 +123,8 @@ moc_fild10.gat,0,0,0,0 monster Shell Picky 1050,50,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 Drops 1113,30,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_fild10.gat,198,150,40,30 monster Yellow Plant 1081,10,180000,180000,1
+moc_fild10.gat,198,150,40,30 monster Green Plant 1080,5,180000,180000,1
//ƒ\ƒOƒ‰ƒg»”™ ‚P‚P(moc_fild11.gat)*
moc_fild11.gat,0,0,0,0 monster Magnolia 1138,20,0,0,0
@@ -142,7 +142,7 @@ 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 Drops 1113,35,0,0,0
moc_fild12.gat,0,0,0,0 monster PecoPeco Egg 1047,35,0,0,0
-moc_fild12.gat,181,336,40,20 monster Yellow Plant 1081,10,180000,90000,1
+moc_fild12.gat,181,336,40,20 monster Yellow Plant 1081,10,180000,180000,1
//ƒ\ƒOƒ‰ƒg»”™ ‚P‚R(moc_fild13.gat)*
moc_fild13.gat,0,0,0,0 monster Sidewinder 1037,35,0,0,0
@@ -151,39 +151,39 @@ moc_fild13.gat,0,0,0,0 monster Anacondaq 1030,70,0,0,0
moc_fild13.gat,0,0,0,0 monster Boa 1025,35,0,0,0
moc_fild13.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
moc_fild13.gat,0,0,0,0 monster Drops 1113,20,0,0,0
-moc_fild13.gat,101,185,5,5 monster Yellow Plant 1081,3,180000,90000,1
-moc_fild13.gat,101,297,0,0 monster Yellow Plant 1081,1,180000,90000,1
-moc_fild13.gat,106,258,5,5 monster Yellow Plant 1081,3,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,161,273,5,5 monster Yellow Plant 1081,3,180000,90000,1
-moc_fild13.gat,84,329,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,93,301,0,0 monster Yellow Plant 1081,1,180000,90000,1
-moc_fild13.gat,264,136,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,265,197,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,280,99,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,282,155,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,295,358,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,304,333,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,307,307,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,101,185,5,5 monster Yellow Plant 1081,3,180000,180000,1
+moc_fild13.gat,101,297,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild13.gat,106,258,5,5 monster Yellow Plant 1081,3,180000,180000,1
+moc_fild13.gat,108,150,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild13.gat,109,168,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild13.gat,161,273,5,5 monster Yellow Plant 1081,3,180000,180000,1
+moc_fild13.gat,84,329,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild13.gat,89,92,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild13.gat,93,301,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild13.gat,264,136,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,264,64,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,265,197,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,266,289,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,280,99,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,281,333,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,282,155,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,284,227,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,295,358,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,304,244,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,304,333,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,305,91,0,0 monster Red Mushroom 1085,1,180000,180000,1
+moc_fild13.gat,307,307,0,0 monster Red Mushroom 1085,1,180000,180000,1
//ƒ\ƒOƒ‰ƒg»”™ ‚P‚S(moc_fild14.gat)*
moc_fild14.gat,0,0,0,0 monster Sidewinder 1037,20,0,0,0
moc_fild14.gat,0,0,0,0 monster Desert Wolf 1106,80,0,0,0
moc_fild14.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
moc_fild14.gat,0,0,0,0 monster Desert Wolf Puppy 1107,40,0,0,0
-moc_fild14.gat,149,333,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_fild14.gat,165,282,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,85,271,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,149,333,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild14.gat,160,366,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild14.gat,165,282,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild14.gat,64,342,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild14.gat,85,271,0,0 monster Yellow Plant 1081,1,180000,180000,1
moc_fild14.gat,124,93,5,5 monster Shining Plant 1083,1,1800000,900000,1
//ƒ\ƒOƒ‰ƒg»”™ ‚P‚T(moc_fild15.gat)*
@@ -193,19 +193,19 @@ 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 Andre 1095,40,0,0,0
moc_fild15.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
-moc_fild15.gat,104,347,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,195,373,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_fild15.gat,341,164,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,370,85,0,0 monster Yellow Plant 1081,1,180000,90000,1
-moc_fild15.gat,40,126,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,57,39,0,0 monster Yellow Plant 1081,1,180000,90000,1
-moc_fild15.gat,0,0,0,0 monster Phreeoni 1159,1,7200000,3600000,0
+moc_fild15.gat,104,347,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,158,144,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,195,373,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,232,126,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,294,74,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,341,164,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,341,365,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,353,230,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,370,85,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,40,126,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,46,250,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,57,39,0,0 monster Yellow Plant 1081,1,180000,180000,1
+moc_fild15.gat,0,0,0,0 monster Phreeoni 1159,1,7200000,7200000,0
//ƒ\ƒOƒ‰ƒg»”™ ‚P‚U(moc_fild16.gat)*
moc_fild16.gat,0,0,0,0 monster Sandman 1165,70,0,0,0
diff --git a/npc/mobs/fields/niflheim.txt b/npc/mobs/fields/niflheim.txt
index 05909cec0..7360c9b77 100644
--- a/npc/mobs/fields/niflheim.txt
+++ b/npc/mobs/fields/niflheim.txt
@@ -3,40 +3,42 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.1
+//= 1.3
//===== Compatible With: =====================================
//= Any Athena Version
//===== Additional Comments: =================================
-//= 1.1 commented the town mobs
+//= 1.2 updated [shadow],
+//= 1.3 many changes and wrong LOD ID 5373 -> 1373 [Lupus]
//============================================================
-//niflheim
-//niflheim.gat,0,0,0,0 monster Lord Of Death 1373,1,3600000,1800000,1
-//niflheim.gat,0,0,0,0 monster Gibbet 1503,10,0,0,0
-//niflheim.gat,0,0,0,0 monster Dullahan 1504,10,0,0,0
-//niflheim.gat,0,0,0,0 monster Loli Ruri 1505,8,0,0,0
-//niflheim.gat,0,0,0,0 monster Disguise 1506,15,0,0,0
-//niflheim.gat,0,0,0,0 monster Bloody Murderer 1507,2,0,0,0
-//niflheim.gat,0,0,0,0 monster Quve 1508,10,0,0,0
-//niflheim.gat,0,0,0,0 monster Lude 1509,20,0,0,0
-//niflheim.gat,0,0,0,0 monster Hylozoist 1510,8,0,0,0
+//niflheim)*
+niflheim.gat,0,0,0,0 monster Lord of Death 1373,1,7800000,7800000,1
+niflheim.gat,0,0,0,0 monster Quve 1508,20,30000,30000,0
+niflheim.gat,0,0,0,0 monster Lude 1509,20,30000,30000,0
+niflheim.gat,0,0,0,0 monster Hylozoist 1510,8,600000,600000,0
+niflheim.gat,0,0,0,0 monster Gibbet 1503,10,1200000,1200000,0
+niflheim.gat,0,0,0,0 monster Dullahan 1504,5,1800000,1800000,0
-//nif_fild01)?
+//nif_fild01)*
+nif_fild01.gat,0,0,0,0 monster Quve 1508,30,0,0,0
+nif_fild01.gat,0,0,0,0 monster Hylozoist 1510,10,600000,600000,0
+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,300000,0
nif_fild01.gat,0,0,0,0 monster Gibbet 1503,10,0,0,0
-nif_fild01.gat,0,0,0,0 monster Dullahan 1504,10,0,0,0
-nif_fild01.gat,0,0,0,0 monster Loli Ruri 1505,8,0,0,0
-nif_fild01.gat,0,0,0,0 monster Disguise 1506,15,0,0,0
-nif_fild01.gat,0,0,0,0 monster Bloody Murderer 1507,2,0,0,0
-nif_fild01.gat,0,0,0,0 monster Quve 1508,10,0,0,0
-nif_fild01.gat,0,0,0,0 monster Lude 1509,20,0,0,0
-nif_fild01.gat,0,0,0,0 monster Hylozoist 1510,8,0,0,0
+nif_fild01.gat,0,0,0,0 monster Dullahan 1504,13,0,0,0
+nif_fild01.gat,0,0,0,0 monster Dullahan 1504,7,1800000,1800000,0
+//nif_fild01.gat,0,0,0,0 monster Loli Ruri 1505,8,0,0,0
-//nif_fild02)?
+//nif_fild02)*
+nif_fild02.gat,0,0,0,0 monster Lude 1509,10,360000,360000,0
+nif_fild02.gat,0,0,0,0 monster Hylozoist 1510,6,0,0,0
+nif_fild02.gat,0,0,0,0 monster Hylozoist 1510,4,1200000,1200000,0
nif_fild02.gat,0,0,0,0 monster Gibbet 1503,10,0,0,0
-nif_fild02.gat,0,0,0,0 monster Dullahan 1504,10,0,0,0
-nif_fild02.gat,0,0,0,0 monster Loli Ruri 1505,8,0,0,0
-nif_fild02.gat,0,0,0,0 monster Disguise 1506,15,0,0,0
-nif_fild02.gat,0,0,0,0 monster Bloody Murderer 1507,2,0,0,0
-nif_fild02.gat,0,0,0,0 monster Quve 1508,10,0,0,0
-nif_fild02.gat,0,0,0,0 monster Lude 1509,20,0,0,0
-nif_fild02.gat,0,0,0,0 monster Hylozoist 1510,8,0,0,0
+nif_fild02.gat,0,0,0,0 monster Gibbet 1503,5,300000,300000,0
+nif_fild02.gat,0,0,0,0 monster Gibbet 1503,5,1200000,1200000,0
+nif_fild02.gat,0,0,0,0 monster Dullahan 1504,5,0,0,0
+nif_fild02.gat,0,0,0,0 monster Dullahan 1504,5,600000,600000,0
+nif_fild02.gat,0,0,0,0 monster Loli Ruri 1505,19,180000,180000,0
+nif_fild02.gat,0,0,0,0 monster Loli Ruri 1505,2,1800000,1800000,0
+nif_fild02.gat,0,0,0,0 monster Bloody Murderer 1507,7,0,0,0
+nif_fild02.gat,0,0,0,0 monster Bloody Murderer 1507,4,1200000,1200000,0
diff --git a/npc/mobs/fields/payon.txt b/npc/mobs/fields/payon.txt
index 8bce8a562..83fc59183 100644
--- a/npc/mobs/fields/payon.txt
+++ b/npc/mobs/fields/payon.txt
@@ -57,6 +57,7 @@ pay_fild04.gat,0,0,0,0 monster Mastering 1090,1,1800000,900000,1
pay_fild04.gat,346,335,5,5 monster Shining Plant 1083,1,1800000,900000,1
pay_fild04.gat,0,0,0,0 monster Angeling 1096,1,3600000,1800000,1
pay_fild04.gat,0,0,0,0 monster Ghostring 1120,1,3600000,1800000,1
+pay_fild04.gat,0,0,0,0 monster Deviling 1582,1,7200000,3600000,1
pay_fild04.gat,254,193,10,10 monster Green Plant 1080,5,360000,180000,1
//(pay_fild05.gat)*
@@ -123,6 +124,6 @@ pay_fild11.gat,0,0,0,0 monster Horong 1129,50,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 Poison Spore 1077,40,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 Eddga 1115,1,7200000,3600000,1
+pay_fild11.gat,0,0,0,0 monster Eddga 1115,1,7200000,7200000,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/mobs/fields/umbala.txt b/npc/mobs/fields/umbala.txt
index 6ac5fa660..f09b31ead 100644
--- a/npc/mobs/fields/umbala.txt
+++ b/npc/mobs/fields/umbala.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Darkchild (1.0)
//===== Current Version: =====================================
-//= 1.2
+//= 1.3
//===== Compatible With: =====================================
//= Any eAthena Version; RO Ep6+
//===== Additional Comments: =================================
@@ -11,28 +11,28 @@
//============================================================
-//(um_fild01.gat)? no info
+//(um_fild01.gat)*
um_fild01.gat,0,0,0,0 monster Stem Worm 1215,45,0,0,0
-um_fild01.gat,0,0,0,0 monster Wooden Fighter 1499,55,0,0,0
+um_fild01.gat,0,0,0,0 monster Wootan Fighter 1499,55,0,0,0
um_fild01.gat,0,0,0,0 monster Dryad 1493,15,0,0,0
um_fild01.gat,0,0,0,0 monster Harpy 1376,2,0,0,0
-//(um_fild02.gat)?
+//(um_fild02.gat)*
um_fild02.gat,0,0,0,0 monster Dustiness 1114,20,0,0,0
-um_fild02.gat,0,0,0,0 monster King of Beetle 1494,30,0,0,0
-um_fild02.gat,0,0,0,0 monster Wooden Fighter 1499,42,0,0,0
-um_fild02.gat,0,0,0,0 monster Wooden Shooter 1498,44,0,0,0
+um_fild02.gat,0,0,0,0 monster Beetle King 1494,30,0,0,0
+um_fild02.gat,0,0,0,0 monster Wootan Fighter 1499,42,0,0,0
+um_fild02.gat,0,0,0,0 monster Wootan Shooter 1498,44,0,0,0
-//(um_fild03.gat)?
+//(um_fild03.gat)*
um_fild03.gat,0,0,0,0 monster Pest 1256,10,0,0,0
um_fild03.gat,0,0,0,0 monster Parasite 1500,55,0,0,0
um_fild03.gat,0,0,0,0 monster Alligator 1271,30,0,0,0
um_fild03.gat,0,0,0,0 monster Dragon Tail 1321,25,0,0,0
-um_fild03.gat,0,0,0,0 monster Gryphon 1447,1,150000,150000,0
+um_fild03.gat,0,0,0,0 monster Gryphon 1259,1,3600000,3600000,0
-//(um_fild04.gat)?
+//(um_fild04.gat)*
um_fild04.gat,0,0,0,0 monster Stainer 1174,30,0,0,0
-um_fild04.gat,0,0,0,0 monster King of Beetle 1494,30,0,0,0
-um_fild04.gat,0,0,0,0 monster Wooden Shooter 1498,29,0,0,0
-um_fild04.gat,0,0,0,0 monster Wooden Fighter 1499,10,0,0,0
+um_fild04.gat,0,0,0,0 monster Beetle King 1494,30,0,0,0
+um_fild04.gat,0,0,0,0 monster Wootan Shooter 1498,29,0,0,0
+um_fild04.gat,0,0,0,0 monster Wootan Fighter 1499,10,0,0,0
um_fild04.gat,0,0,0,0 monster Choco 1214,11,0,0,0
diff --git a/npc/mobs/fields/yuno.txt b/npc/mobs/fields/yuno.txt
index 7b0cbbb27..02c87a8ac 100644
--- a/npc/mobs/fields/yuno.txt
+++ b/npc/mobs/fields/yuno.txt
@@ -3,58 +3,136 @@
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
-//= 1.1
+//= 1.3
//===== 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]
//============================================================
-//(yuno_fild04.gat)*
-yuno_fild04.gat,0,0,0,0 monster Goat 1372,40,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 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 Poring 1002,20,0,0,0
+//========================================================================================
+// - Yuno Field 01
+//========================================================================================
+
+yuno_fild01.gat,0,0,0,0 monster Poring 1002,55,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Poporing 1031,35,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Dustiness 1114,25,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild01.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
+yuno_fild01.gat,0,0,0,0 monster Shining Plant 1083,5,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Yellow Plant 1081,20,360000,180000,1
+
+//========================================================================================
+// - Yuno Field 02
+//========================================================================================
+
+yuno_fild02.gat,0,0,0,0 monster Sageworm 1281,5,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Dustiness 1114,15,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Beetle King 1494,15,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Horn 1128,35,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Stainer 1174,25,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Wild Rose 1261,15,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
+yuno_fild02.gat,0,0,0,0 monster Yellow Plant 1081,20,360000,180000,1
+yuno_fild02.gat,0,0,0,0 monster Green Plant 1080,15,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 03
+//========================================================================================
+
+yuno_fild03.gat,0,0,0,0 monster Drops 1113,30,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Poring 1002,40,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Sidewinder 1037,5,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Marin 1242,20,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Geographer 1368,15,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Archangeling 1388,1,3600000,1800000,1
+yuno_fild03.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
+yuno_fild03.gat,0,0,0,0 monster Green Plant 1080,50,180000,90000,1
+yuno_fild03.gat,0,0,0,0 monster Yellow Plant 1081,20,360000,180000,1
+
+//========================================================================================
+// - Yuno Field 04
+//========================================================================================
+
+yuno_fild04.gat,0,0,0,0 monster Poring 1002,50,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Pupa 1008,15,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Drops 1113,30,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Condor 1009,15,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Creamy 1018,10,0,0,0
yuno_fild04.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
yuno_fild04.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
yuno_fild04.gat,0,0,0,0 monster Yellow Plant 1081,10,360000,180000,1
-yuno_fild04.gat,0,0,0,0 monster Harpy 1376,1,0,0,0
-
-//(yuno_fild03.gat)*
-yuno_fild03.gat,0,0,0,0 monster Goat 1372,60,0,0,0
-yuno_fild03.gat,0,0,0,0 monster Sleeper 1386,30,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 Geographer 1368,20,0,0,0
-yuno_fild03.gat,0,0,0,0 monster Demon Pungus 1378,30,0,0,0
-yuno_fild03.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
-yuno_fild03.gat,0,0,0,0 monster Shining Plant 1083,2,1800000,900000,1
-yuno_fild03.gat,0,0,0,0 monster Blue Plant 1079,4,360000,180000,1
-yuno_fild03.gat,0,0,0,0 monster Yellow Plant 1081,20,360000,180000,1
-yuno_fild03.gat,0,0,0,0 monster Harpy 1376,2,0,0,0
-
-//(yuno_fild02.gat)*
-yuno_fild02.gat,0,0,0,0 monster Sleeper 1386,10,0,0,0
-yuno_fild02.gat,0,0,0,0 monster Grand Peco 1369,70,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 Geographer 1368,20,0,0,0
-yuno_fild02.gat,0,0,0,0 monster Driller 1380,30,0,0,0
-yuno_fild02.gat,0,0,0,0 monster Dustiness 1114,20,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 Red Plant 1078,20,180000,90000,1
-yuno_fild02.gat,0,0,0,0 monster Shining Plant 1083,1,1800000,900000,1
-yuno_fild02.gat,0,0,0,0 monster Blue Plant 1079,3,360000,180000,1
-yuno_fild02.gat,0,0,0,0 monster Yellow Plant 1081,20,360000,180000,1
-yuno_fild02.gat,0,0,0,0 monster Archangeling 1388,1,3600000,1800000,1
-
-//(yuno_fild01.gat)*
-yuno_fild01.gat,0,0,0,0 monster Grand Peco 1369,3,0,0,0
-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 Green Plant 1080,20,180000,90000,1
-yuno_fild01.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,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,360000,180000,1
-yuno_fild01.gat,0,0,0,0 monster Yellow Plant 1081,23,360000,180000,1
+
+//========================================================================================
+// - Yuno Field 05
+//========================================================================================
+
+yuno_fild05.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Goat 1372,5,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Demon Pungus 1378,20,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Sleeper 1386,45,0,0,0
+yuno_fild05.gat,0,0,0,0 monster The Paper 1375,15,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+yuno_fild05.gat,0,0,0,0 monster Yellow Plant 1081,10,360000,180000,1
+yuno_fild05.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 07
+//========================================================================================
+
+yuno_fild07.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Goat 1372,60,0,0,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,15,360000,180000,1
+
+//========================================================================================
+// - Yuno Field 08
+//========================================================================================
+
+yuno_fild08.gat,0,0,0,0 monster Grand Peco 1369,20,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 Geographer 1368,20,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Wild Rose 1261,15,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
+yuno_fild08.gat,0,0,0,0 monster Yellow Plant 1081,20,360000,180000,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 Gargoyle 1253,10,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Dustiness 1114,20,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1122,10,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1123,5,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1124,10,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1125,5,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1126,5,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Horn 1128,25,0,0,0
+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,15,360000,180000,1
+yuno_fild09.gat,0,0,0,0 monster Green Plant 1080,15,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 11
+//========================================================================================
+
+yuno_fild11.gat,0,0,0,0 monster Sleeper 1386,55,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 Red Plant 1078,10,180000,90000,1
+yuno_fild11.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild11.gat,0,0,0,0 monster Yellow Plant 1081,15,360000,180000,1
+
+//========================================================================================
+// - Yuno Field 12
+//========================================================================================
+
+yuno_fild12.gat,0,0,0,0 monster Dustiness 1114,35,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Demon Pungus 1378,20,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,5,180000,90000,1
+yuno_fild12.gat,0,0,0,0 monster Yellow Plant 1081,10,360000,180000,1
diff --git a/npc/mobs/pvp.txt b/npc/mobs/pvp.txt
index 61d2d01dd..931c79d43 100644
--- a/npc/mobs/pvp.txt
+++ b/npc/mobs/pvp.txt
@@ -11,21 +11,21 @@
//============================================================
-//PvP : “ì–k푈(pvp_n_8-1)
+//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 : ƒƒ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 : ƒ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 : ƒ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 : ƒ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/npcs_athena.conf b/npc/npcs_athena.conf
new file mode 100644
index 000000000..0db759281
--- /dev/null
+++ b/npc/npcs_athena.conf
@@ -0,0 +1,539 @@
+
+//--------------------------------------------------------------
+// Map Flags
+//--------------------------------------------------------------
+// Files to set options in maps such as PVP, etc.
+//=======================================
+
+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/noicewall.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
+
+// How high is the water in maps?
+water_height: conf/mapflag/water_height.txt
+
+//--------------------------------------------------------------
+// Special
+//--------------------------------------------------------------
+
+// PCLoginEvent NPC. NPC which is activated for every player who logs in.
+//npc: npc/sample/PCLoginEvent.txt
+
+
+//--------------------------------------------------------------
+// NPCs
+//--------------------------------------------------------------
+
+// ---------------- Your Own Npcs -----------------------
+//Add Them Here ;)
+
+
+//------------------------ Cities ----------------------------
+npc: npc/cities/alberta.txt
+npc: npc/cities/aldebaran.txt
+npc: npc/cities/amatsu.txt
+npc: npc/cities/comodo.txt
+npc: npc/cities/geffen.txt
+npc: npc/cities/izlude.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
+
+
+//-------------------------- Jobs -------------------------------
+//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/swordsman.txt
+
+//2-1 With Quest
+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 With Quest
+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
+
+//2-2 Without Quest
+//npc: npc/jobs/2-2/noquest/crusader.txt
+npc: npc/jobs/2-2/noquest/dancer-bard.txt
+npc: npc/jobs/2-2/noquest/monk.txt
+
+//2-1-1 Without Quest
+npc: npc/jobs/2-1-1/AssassinCross.txt
+npc: npc/jobs/2-1-1/LordKnight.txt
+npc: npc/jobs/2-1-1/HighPriest.txt
+npc: npc/jobs/2-1-1/HighWizard.txt
+npc: npc/jobs/2-1-1/WhiteSmith.txt
+npc: npc/jobs/2-1-1/Sniper.txt
+
+//2-2-1 Without Quest
+npc: npc/jobs/2-2-1/Champion.txt
+npc: npc/jobs/2-2-1/Clown.txt
+npc: npc/jobs/2-2-1/Creator.txt
+npc: npc/jobs/2-2-1/Gypsy.txt
+npc: npc/jobs/2-2-1/Paladin.txt
+npc: npc/jobs/2-2-1/Professor.txt
+npc: npc/jobs/2-2-1/Stalker.txt
+
+
+//------------------------- Merchants ----------------------------
+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/grandpa_pharmacist.txt
+npc: npc/merchants/inn.txt
+npc: npc/merchants/milk_trader.txt
+npc: npc/merchants/renters.txt
+npc: npc/merchants/alchemist.txt
+
+// Temp Shops (made in kRO to test effects/items)
+npc: npc/merchants/scrolls_arrows.txt
+
+// Custom
+//npc: npc/merchants/custom/2-2shop.txt
+// Free Falcon & Peco breeder, Free Carts
+//npc: npc/merchants/custom/breeder.txt
+
+
+//--------------------------- Quests ------------------------------
+// Item Quests
+npc: npc/quests/quests_alberta.txt
+npc: npc/quests/quests_aldebaran.txt
+npc: npc/quests/quests_comodo.txt
+npc: npc/quests/quests_geffen.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
+
+// Extra Item Making
+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/bongun.txt
+npc: npc/quests/munak.txt
+npc: npc/quests/bongunsword.txt
+npc: npc/quests/monstertamers.txt
+
+// New Headgear Quests
+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
+
+// Custom Quests, might be balance breaking (Enable if you want)
+//npc: npc/quests/all_quest.txt
+//npc: npc/quests/magicalhatquest.txt
+//npc: npc/quests/fashion.txt
+//npc: npc/quests/custom/excalibur.txt
+//npc: npc/quests/custom/elvenear.txt
+//npc: npc/quests/custom/ironcane.txt
+//npc: npc/quests/custom/sunglasses.txt
+//npc: npc/quests/custom/berzebub.txt
+//npc: npc/quests/custom/new_hats.txt
+// Above Npcs are better ^_^
+//npc: npc/quests/custom/event_32_new_hats.txt
+npc: npc/quests/custom/valhallen.txt
+//both Lord Kaho, but different and quest.txt has balmung to:
+//npc: npc/quests/custom/kaho_balmung.txt
+//npc: npc/quests/custom/kahohorn.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/swordsman_skills.txt
+npc: npc/quests/skills/thief_skills.txt
+
+//npc: npc/other/platinum_skills.txt
+
+
+// -------------------------- Guides -------------------------------
+npc: npc/guides/guides_alb.txt
+npc: npc/guides/guides_alde.txt
+npc: npc/guides/guides_com.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
+//more to come
+
+
+// -------------------------- 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
+//more to come
+
+
+//---------------------------- Events --------------------------------
+//npc: npc/events/easter.txt
+//npc: npc/events/valentinesday.txt
+//npc: npc/events/xmas.txt
+//npc: npc/events/alchemist.txt
+//npc: npc/events/twintowers.txt
+//npc: npc/events/custom/uneasy_cemetery.txt
+//npc: npc/events/custom/draculax.txt
+
+
+//---------------------------- Others --------------------------------
+npc: npc/other/books.txt
+npc: npc/other/msg_boards.txt
+npc: npc/other/pvp.txt
+npc: npc/other/IceCream.txt
+npc: npc/other/card_remover.txt
+//npc: npc/other/wedding.txt
+//npc: npc/other/gefenia.txt
+//npc: npc/other/momotaro.txt
+//npc: npc/other/tougijou.txt
+//npc: npc/other/arena_mvp.txt
+
+// Global Scripts Functions ------------------
+npc: npc/other/Global_Functions.txt
+
+
+//------------------------- Unofficial NPCs --------------------------
+//npc: npc/other/kafra_bank.txt
+//npc: npc/other/bank.txt
+//npc: npc/jobs/custom/reset.txt
+//npc: npc/jobs/custom/jobchange.txt
+//npc: npc/other/heal.txt
+//npc: npc/other/heal_payment.txt
+//npc: npc/other/blackjack.txt
+
+// Warper NPC (Enable for free warp service)
+// 1st is Warper with only option for cities and dungeons
+//npc: npc/other/warper.txt
+// 2nd you can choose which lvl of the dungeon (you have to disabled 1 if you use 2!)
+//npc: npc/other/warper2.txt
+
+// Free Stylist NPC - Cloths/Hair Dye - (Requires 77 dye palletes)
+//npc: npc/merchants/custom/dye.txt
+
+// Dev NPCs
+npc: npc/other/devnpc.txt
+// Unofficial poetry
+npc: npc/other/poetry/ayothaya.txt
+
+//-------------------------- MC Cameri's NPCs ----------------------------
+//= Bank NPC
+//npc: npc/other/mc_cameri/bank.txt
+
+//= Healing NPC
+//npc: npc/other/mc_cameri/heal.txt
+
+//= Warp NPC
+//npc: npc/other/mc_cameri/warper.txt
+
+//= Job Changer NPC
+//npc: npc/other/mc_cameri/jobchanger.txt
+
+
+//-------------------------- 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
+//npc: npc/guild/nguild/nguild_dunsw.txt
+npc: npc/guild/nguild/nguild_treas.txt
+npc: npc/guild/nguild/nguild_guardians.txt
+
+//Guild Wars: Extras
+//npc: npc/guild/Extras/woe_gflag.txt
+npc: npc/guild/Extras/woe_warper.txt
+
+//------------------ Guild Wars(Non-optimized) -----------------------
+//Guild Wars: General
+//npc: npc/guild/old/ev_agit_event.txt
+
+//Guild Wars: Al de Baran
+//npc: npc/guild/old/aldeg_flag.txt
+//npc: npc/guild/old/ev_agit_aldeg.txt
+//npc: npc/guild/old/aldeg_cas01.txt
+//npc: npc/guild/old/guardian/aldeg_cas01_guardian.txt
+//npc: npc/guild/old/treasure/aldeg_cas01_treasure.txt
+//npc: npc/guild/old/aldeg_cas02.txt
+//npc: npc/guild/old/guardian/aldeg_cas02_guardian.txt
+//npc: npc/guild/old/treasure/aldeg_cas02_treasure.txt
+//npc: npc/guild/old/aldeg_cas03.txt
+//npc: npc/guild/old/guardian/aldeg_cas03_guardian.txt
+//npc: npc/guild/old/treasure/aldeg_cas03_treasure.txt
+//npc: npc/guild/old/aldeg_cas04.txt
+//npc: npc/guild/old/guardian/aldeg_cas04_guardian.txt
+//npc: npc/guild/old/treasure/aldeg_cas04_treasure.txt
+//npc: npc/guild/old/aldeg_cas05.txt
+//npc: npc/guild/old/guardian/aldeg_cas05_guardian.txt
+//npc: npc/guild/old/treasure/aldeg_cas05_treasure.txt
+
+//Guild Wars: Geffen
+//npc: npc/guild/old/gefg_flag.txt
+//npc: npc/guild/old/ev_agit_gefg.txt
+//npc: npc/guild/old/gefg_cas01.txt
+//npc: npc/guild/old/guardian/gefg_cas01_guardian.txt
+//npc: npc/guild/old/treasure/gefg_cas01_treasure.txt
+//npc: npc/guild/old/gefg_cas02.txt
+//npc: npc/guild/old/guardian/gefg_cas02_guardian.txt
+//npc: npc/guild/old/treasure/gefg_cas02_treasure.txt
+//npc: npc/guild/old/gefg_cas03.txt
+//npc: npc/guild/old/guardian/gefg_cas03_guardian.txt
+//npc: npc/guild/old/treasure/gefg_cas03_treasure.txt
+//npc: npc/guild/old/gefg_cas04.txt
+//npc: npc/guild/old/guardian/gefg_cas04_guardian.txt
+//npc: npc/guild/old/treasure/gefg_cas04_treasure.txt
+//npc: npc/guild/old/gefg_cas05.txt
+//npc: npc/guild/old/guardian/gefg_cas05_guardian.txt
+//npc: npc/guild/old/treasure/gefg_cas05_treasure.txt
+
+//Guild Wars: Payon
+//npc: npc/guild/old/payg_flag.txt
+//npc: npc/guild/old/ev_agit_payg.txt
+//npc: npc/guild/old/payg_cas01.txt
+//npc: npc/guild/old/guardian/payg_cas01_guardian.txt
+//npc: npc/guild/old/treasure/payg_cas01_treasure.txt
+//npc: npc/guild/old/payg_cas02.txt
+//npc: npc/guild/old/guardian/payg_cas02_guardian.txt
+//npc: npc/guild/old/treasure/payg_cas02_treasure.txt
+//npc: npc/guild/old/payg_cas03.txt
+//npc: npc/guild/old/guardian/payg_cas03_guardian.txt
+//npc: npc/guild/old/treasure/payg_cas03_treasure.txt
+//npc: npc/guild/old/payg_cas04.txt
+//npc: npc/guild/old/guardian/payg_cas04_guardian.txt
+//npc: npc/guild/old/treasure/payg_cas04_treasure.txt
+//npc: npc/guild/old/payg_cas05.txt
+//npc: npc/guild/old/guardian/payg_cas05_guardian.txt
+//npc: npc/guild/old/treasure/payg_cas05_treasure.txt
+
+//Guild Wars: Prontera
+//npc: npc/guild/old/prtg_flag.txt
+//npc: npc/guild/old/ev_agit_prtg.txt
+//npc: npc/guild/old/prtg_cas01.txt
+//npc: npc/guild/old/guardian/prtg_cas01_guardian.txt
+//npc: npc/guild/old/treasure/prtg_cas01_treasure.txt
+//npc: npc/guild/old/prtg_cas02.txt
+//npc: npc/guild/old/guardian/prtg_cas02_guardian.txt
+//npc: npc/guild/old/treasure/prtg_cas02_treasure.txt
+//npc: npc/guild/old/prtg_cas03.txt
+//npc: npc/guild/old/guardian/prtg_cas03_guardian.txt
+//npc: npc/guild/old/treasure/prtg_cas03_treasure.txt
+//npc: npc/guild/old/prtg_cas04.txt
+//npc: npc/guild/old/guardian/prtg_cas04_guardian.txt
+//npc: npc/guild/old/treasure/prtg_cas04_treasure.txt
+//npc: npc/guild/old/prtg_cas05.txt
+//npc: npc/guild/old/guardian/prtg_cas05_guardian.txt
+//npc: npc/guild/old/treasure/prtg_cas05_treasure.txt
+
+
+//--------------------- Warps ---------------------------
+//= Cities ============================
+npc: npc/warps/cities/alberta.txt
+npc: npc/warps/cities/aldebaran.txt
+npc: npc/warps/cities/amatsu.txt
+npc: npc/warps/ayothaya.txt
+npc: npc/warps/cities/comodo.txt
+npc: npc/warps/einbroch.txt
+npc: npc/warps/cities/geffen.txt
+npc: npc/warps/cities/gonryun.txt
+npc: npc/warps/cities/izlude.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/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/coal_mine.txt
+npc: npc/warps/dungeons/com_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/louyang_dun.txt
+npc: npc/warps/dungeons/lutie_dun.txt
+npc: npc/warps/dungeons/morroc_duns.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/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/gefenia.txt
+npc: npc/warps/fields/geffen_fild.txt
+npc: npc/warps/fields/glastheim.txt
+npc: npc/warps/fields/jawaii.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
+//= Guilds ==============================
+npc: npc/warps/guild/guildcastles.txt
+//= Other ================================
+npc: npc/warps/other/jobquests.txt
+npc: npc/warps/other/other.txt
+//= PVP ==================================
+npc: npc/warps/pvp/pvp.txt
+
+
+//--------------------- Mobs ---------------------------
+npc: npc/mobs/pvp.txt
+npc: npc/mobs/fields/amatsu.txt
+npc: npc/mobs/fields/ayothaya.txt
+npc: npc/mobs/fields/comodo.txt
+npc: npc/mobs/fields/gefenia.txt
+npc: npc/mobs/fields/geffen.txt
+npc: npc/mobs/fields/gonryun.txt
+npc: npc/mobs/fields/louyang.txt
+npc: npc/mobs/fields/lutie.txt
+npc: npc/mobs/fields/mjolnir.txt
+npc: npc/mobs/fields/morocc.txt
+npc: npc/mobs/fields/niflheim.txt
+npc: npc/mobs/fields/payon.txt
+npc: npc/mobs/fields/prontera.txt
+npc: npc/mobs/fields/umbala.txt
+npc: npc/mobs/fields/yuno.txt
+npc: npc/mobs/dungeons/amatdun.txt
+npc: npc/mobs/dungeons/anthell.txt
+npc: npc/mobs/dungeons/ayodun.txt
+npc: npc/mobs/dungeons/beachdun.txt
+npc: npc/mobs/dungeons/byalan.txt
+npc: npc/mobs/dungeons/clocktower.txt
+npc: npc/mobs/dungeons/coalmine.txt
+npc: npc/mobs/dungeons/geftower.txt
+npc: npc/mobs/dungeons/glastheim.txt
+npc: npc/mobs/dungeons/gondun.txt
+npc: npc/mobs/dungeons/guilddun.txt
+npc: npc/mobs/dungeons/louydun.txt
+npc: npc/mobs/dungeons/magmadun.txt
+npc: npc/mobs/dungeons/moc_pyramid.txt
+npc: npc/mobs/dungeons/moc_sphinx.txt
+npc: npc/mobs/dungeons/orcdun.txt
+npc: npc/mobs/dungeons/payoncave.txt
+npc: npc/mobs/dungeons/pront_maze.txt
+npc: npc/mobs/dungeons/pront_sewers.txt
+npc: npc/mobs/dungeons/sunkenship.txt
+npc: npc/mobs/dungeons/toyfactory.txt
+npc: npc/mobs/dungeons/turtleisland.txt
+npc: npc/mobs/dungeons/umbaladun.txt
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index 332737c0c..1f9261dec 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Lupus, kobra_k88
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Compatible With: =====================================
//= eAthena 1.0
//===== Description: =========================================
@@ -37,6 +37,7 @@ function script F_ClearJobVar {
// 2-2 Jobs ------------------------------
set ROGUE_Q,0; set ROGUE_Q2,0;
set ALCH_Q,0; set ALCH_Q2,0;
+ set MONK_Q,0;
return;
}
@@ -84,3 +85,8 @@ function script Is_Thief_Class {
function script Is_Sword_Class {
return ( Class==Job_Swordman || Class==Job_Knight || Class==Job_Knight2 || Class==Job_Crusader || Class==Job_Crusader2 || Class==4002 || Class==4008 || Class==4014 || Class==4015 || Class==4022 );
}
+//-----------------------------------------------------
+// returns 1 if the player is either Super Novice or Super Baby, 0 otherwise
+function script Is_Super_Class {
+ return ( Class==Job_Super_Baby || Class==Job_SuperNovice );
+} \ No newline at end of file
diff --git a/npc/other/bank.txt b/npc/other/bank.txt
index a02412e3c..379ddc735 100644
--- a/npc/other/bank.txt
+++ b/npc/other/bank.txt
@@ -14,7 +14,7 @@
//= to set the cost variable to whatever you want the fee to be.
//============================================================
prontera.gat,132,217,5 script Banker 109,{
-set @cost,0;
+set @cost,500;
mes "[Banker]";
mes "Welcome to the First Bank of Prontera. How can I help you today?";
next;
diff --git a/npc/other/devnpc.txt b/npc/other/devnpc.txt
index 33c67d03f..ec196fe6e 100644
--- a/npc/other/devnpc.txt
+++ b/npc/other/devnpc.txt
@@ -199,7 +199,6 @@ OnInit:
}
//Aria\\
-Aria
prontera.gat,156,179,4 script Aria 805,{
npcspeed 150;
mes "[Aria]";
@@ -229,10 +228,14 @@ Lariatalk:
Lquote0:
npctalk "OMGWTFBBQ";
-
+ break;
Lquote1:
npctalk "So its u -> 0";
npctalk "... That did not look right";
+ break;
+Lquote2:
+ npctalk "????";
+ break;
Lquote3:
npctalk "OMGITSJEEBUS!#!@%!";
diff --git a/npc/other/eliza.txt b/npc/other/eliza.txt
new file mode 100644
index 000000000..d5c3c0765
--- /dev/null
+++ b/npc/other/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.";
+ break;
+// 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?";
+ break;
+Lquote1b:
+ npctalk "What do you think about machines?";
+ break;
+Lquote1c:
+ npctalk "Why do you mention computers?";
+ break;
+Lquote1d:
+ npctalk "What do you think machines have to do with your problem?";
+ break;
+// name
+Lquote2:
+ npctalk "I am not interested in names";
+ break;
+// 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";
+ break;
+
+Lquote3b:
+ npctalk "Apologies are not necessary";
+ break;
+
+Lquote3c:
+ npctalk "What feelings do you have when you apologize";
+ break;
+
+// 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$+"?";
+ break;
+
+Lquote4b:
+ npctalk "Does thinking of "+$p2$+" bring anything else to mind?";
+ break;
+
+Lquote4c:
+ npctalk "What else do you remember?";
+ break;
+
+Lquote4d:
+ npctalk "Why do you recall "+$p2$+" right now?";
+ break;
+
+Lquote4e:
+ npctalk "What in the present situation reminds you of "+$p2$+"?";
+ break;
+
+Lquote4f:
+ npctalk "What is the connection between me and "+$p2$+"?";
+ break;
+
+// 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$+" ?";
+ break;
+
+Lquote5b:
+ npctalk "Why do you think I should recall "+$p2$+" now";
+ break;
+
+Lquote5c:
+ npctalk "What about "+$p2$+"";
+ break;
+
+Lquote5d:
+ npctalk "You mentioned "+$p2$+"";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote6b:
+ npctalk "Do you wish that "+$p2$+"?";
+ break;
+
+Lquote6c:
+ npctalk "What do you think about "+$p2$+"?";
+ break;
+
+Lquote6d:
+ npctalk "Really-- if "+$p2$+"?";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote7b:
+ npctalk "Have you ever fantasized "+$p2$+" while you were awake?";
+ break;
+
+Lquote7c:
+ npctalk "Have you dreamt "+$p2$+" before?";
+ break;
+
+// dream about
+
+Lquote8:
+ npctalk "How do you feel about "+$p2$+" in reality?";
+ break;
+
+// 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?";
+ break;
+
+Lquote9b:
+ npctalk "Do you dream often?";
+ break;
+
+Lquote9c:
+ npctalk "What persons appear in your dreams?";
+ break;
+
+Lquote9d:
+ npctalk "Don't you believe that dream has to do with your problem?";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote10b:
+ npctalk "Tell me more about your family";
+ break;
+
+// 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";
+ break;
+
+Lquote11b:
+ npctalk "Does he influence you strongly?";
+ break;
+
+Lquote11c:
+ npctalk "What else comes to mind when you think of your father?";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote12b:
+ npctalk "Why do you want "+$p2$+"";
+ break;
+
+Lquote12c:
+ npctalk "Suppose you got "+$p2$+" soon";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote13b:
+ npctalk "What makes you happy just now";
+ break;
+
+Lquote13c:
+ npctalk "Can you explain why you are suddenly "+$p2$+"";
+ break;
+
+// 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";
+ break;
+
+Lquote14b:
+ npctalk "I'm sure its not pleasant to be sad";
+ break;
+
+// $p2 are like "+$p3$+"
+Lquote15:
+ npctalk "What resemblance do you see between "+$p2$+" and "+$p3$+"";
+ break;
+
+// "+$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$+"";
+ break;
+
+Lquote16b:
+ npctalk "What resemblance do you see?";
+ break;
+
+Lquote16c:
+ npctalk "Could there really be some connection?";
+ break;
+
+Lquote16d:
+ npctalk "How?";
+ break;
+// alike
+Lquote17:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote17a;
+ if($foo == 1) goto Lquote17b;
+Lquote17a:
+ npctalk "In what way?";
+ break;
+
+Lquote17b:
+ npctalk "What similarities are there?";
+ break;
+// same
+Lquote18:
+ npctalk "What other connections do you see?";
+ break;
+
+// 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?";
+ break;
+
+Lquote19b:
+ npctalk "Perhaps I already knew you were "+$p2$+"";
+ break;
+
+Lquote19c:
+ npctalk "Why do you tell me you were "+$p2$+" now?";
+ break;
+
+// 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$+" ?";
+ break;
+
+Lquote20b:
+ npctalk "Do you thin you were "+$p2$+"";
+ break;
+
+Lquote20c:
+ npctalk "What would it mean if you were "+$p2$+"";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote21b:
+ npctalk "Do you want to be "+$p2$+" ?";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote22b:
+ npctalk "Would you want to be "+$p2$+"";
+ break;
+
+Lquote22c:
+ npctalk "You wish I would tell you you are "+$p2$+"";
+ break;
+
+Lquote22d:
+ npctalk "What would it mean if you were "+$p2$+"";
+ break;
+
+// am
+Lquote23:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote23a;
+ if($foo == 1) goto Lquote23b;
+
+Lquote23a:
+ npctalk "Why do you say AM?";
+ break;
+
+Lquote23b:
+ npctalk "I don't understand that";
+ break;
+
+// 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?";
+ break;
+
+Lquote24b:
+ npctalk "Would you prefer if I weren't "+$p2$+"";
+ break;
+
+Lquote24c:
+ npctalk "Perhaps I am "+$p2$+" in your fantasies";
+ break;
+
+// you are
+Lquote25:
+ npctalk "What makes you think I am "+$p2$+" ?";
+ break;
+
+// 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?";
+ break;
+
+Lquote26b:
+ npctalk "What other reasons might there be?";
+ break;
+
+Lquote26c:
+ npctalk "Does that reason seem to explain anything else?";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote27b:
+ npctalk "What do you think?";
+ break;
+
+Lquote27c:
+ npctalk "What if I had been "+$p2$+"";
+ break;
+
+// 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";
+ break;
+
+Lquote28b:
+ npctalk "What if you could "+$p2$+" ?";
+ break;
+
+// I feel
+Lquote29:
+ npctalk "Do you often feel "+$p2$+" ?";
+ break;
+
+// I felt
+Lquote30:
+ npctalk "What other feelings do you have?";
+ break;
+
+// $p1$ I $p2$ you $p3$
+Lquote31:
+ npctalk "Perhaps in your fantasy we "+$p3$+" each other?";
+ break;
+
+// 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?";
+ break;
+
+Lquote32b:
+ npctalk "Do you believe I don't "+$p2$+"";
+ break;
+
+Lquote32c:
+ npctalk "Perhaps I will "+$p2$+" in good time";
+ break;
+
+// 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";
+ break;
+
+Lquote33b:
+ npctalk "You are sure?";
+ break;
+
+Lquote33c:
+ npctalk "I understand";
+ break;
+
+// 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?";
+ break;
+
+Lquote34b:
+ npctalk "You are being a bit negative";
+ break;
+
+Lquote34c:
+ npctalk "Are you saying NO just to be negative?";
+ break;
+
+// someone
+Lquote35:
+ npctalk "Can you be more specific?";
+ break;
+
+// 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";
+ break;
+
+Lquote36b:
+ npctalk "Can you think of anyone in particular?";
+ break;
+
+Lquote36c:
+ npctalk "Who for example?";
+ break;
+
+Lquote36d:
+ npctalk "You are thinking of a special person?";
+ break;
+
+// 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?";
+ break;
+
+Lquote37b:
+ npctalk "When?";
+ break;
+
+Lquote37c:
+ npctalk "What incident are you thinking of?";
+ break;
+
+Lquote37d:
+ npctalk "Really-- always?";
+ break;
+
+// 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?";
+ break;
+
+Lquote38b:
+ npctalk "Does that question interest you?";
+ break;
+
+Lquote38c:
+ npctalk "What is it you really want to know?";
+ break;
+
+Lquote38d:
+ npctalk "What do you think?";
+ break;
+
+Lquote38e:
+ npctalk "What comes to your mind when you ask that?";
+ break;
+
+// perhaps
+Lquote39:
+ npctalk "You do not seem quite certain";
+ break;
+
+// 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$+"";
+ break;
+
+Lquote40b:
+ npctalk "Possibly they are "+$p2$;
+ break;
+
+// 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";
+ break;
+
+Lquote41b:
+ npctalk "I am not sure I understand you fully";
+ break;
+
+Lquote41c:
+ npctalk "What does that suggest to you?";
+ break;
+
+Lquote41d:
+ npctalk "Please continue";
+ break;
+
+Lquote41e:
+ npctalk "Go on";
+ break;
+
+Lquote41f:
+ npctalk "Do you feel strongly about discussing such things?";
+ break;
+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;
+ break;
+}
diff --git a/npc/other/heal_payment.txt b/npc/other/heal_payment.txt
index 39a832985..96713e46a 100644
--- a/npc/other/heal_payment.txt
+++ b/npc/other/heal_payment.txt
@@ -42,7 +42,7 @@ prontera.gat,150,184,5 script Healring#h2-1::Healring 1002,{
mes "Booiing Boooing: BoooiiinnnG (or healing and regeneration: "+(@tempHp+@tempSp)+" z)?";
mes "BOINNG: Booing (I use zenys for a good cause: my medicines and my Poring Food)!";
next;
- menu "Only healings ("+@tempHp+"z)",HEALINGS,"Only a regeneration ("+@tempSp+"z)",REGENERATION,"Healings with regeneration ("+(@tempHp+@tempSp)+"z)",HEALINGS_AND_REGENERATION,"Nothing, thanks",CANCEL;
+ menu "Only healings ("+@tempHp+"z)",HEALINGS,"Only a regeneration ("+@tempSp+"z)",REGENERATION,"Healings with regeneration ("+(@tempHp+@tempSp)+"z)",HEALINGS_AND_REGEN,"Nothing, thanks",CANCEL;
ONLY_REGENERATION:
mes "[Healring]";
@@ -63,7 +63,7 @@ prontera.gat,150,184,5 script Healring#h2-1::Healring 1002,{
heal 0,30000;
goto FIN;
- HEALINGS_AND_REGENERATION:
+ HEALINGS_AND_REGEN:
if (Zeny < (@tempHp+@tempSp)) goto NO_ZENYS;
set Zeny, Zeny-(@tempHp+@tempSp);
heal 30000,30000;
diff --git a/npc/other/kafra_bank.txt b/npc/other/kafra_bank.txt
index 8d8bf4fc9..970581ce7 100644
--- a/npc/other/kafra_bank.txt
+++ b/npc/other/kafra_bank.txt
@@ -1,9 +1,9 @@
//===== eAthena Script =======================================
-//= 2nd Bank of Prontera ( with daily 0.01% income! )
+//= The 2nd Bank of Prontera ( with daily 0.01% income! )
//===== By: ==================================================
//= Lupus (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.2
//===== Compatible With: =====================================
//= eAthena 1.x
//===== Description: =========================================
@@ -13,82 +13,90 @@
// #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 112,{
- cutin "kafra_06",2;
- mes"[Manya]";
+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 summ
+ 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.";
+ 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 a bank account",-,"-Quit",B_EXIT2;
+ if(#kafrabank==0) menu "-Open an account",-,"-Quit",B_EXIT2;
if(#kafrabank>0) menu "-Deposit money",-,"-Withdraw money",M_WITHDRAW,"-Quit",B_EXIT2;
- mes"[Manya]";
+ 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>1000000) goto L_TOO_BIG_AMOUNT;
+ if(@kafrabank>10000000) goto L_TOO_BIG_AMOUNT;
if(@kafrabank>zeny) goto L_NOT_ENOUGH;
set zeny,zeny-@kafrabank;
set #kafrabank,#kafrabank+@kafrabank;
- mes"[Manya]";
+ 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"[Manya]";
+ 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>1000000) goto L_TOO_BIG_AMOUNT;
+ if(@kafrabank>10000000) goto L_TOO_BIG_AMOUNT;
if(@kafrabank>#kafrabank) goto L_NOT_ENOUGH;
set #kafrabank,#kafrabank-@kafrabank;
set zeny,zeny+@kafrabank;
- mes"[Manya]";
+ 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"[Manya]";
+ mes"[Maniss]";
mes "You don't have enough zeny for this operation.";
next;
goto B_EXIT2;
L_ZERO_ACCOUNT:
- mes"[Manya]";
+ mes"[Maniss]";
mes "You don't have any zeny on your account!";
next;
goto B_EXIT2;
L_TOO_BIG_AMOUNT:
- mes"[Manya]";
- mes "Sorry. The maximum deposit you can make on a time is 1,000,000 zeny.";
+ 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"[Manya]";
+ mes"[Maniss]";
mes "We're sorry, the minimum amount of zeny you can deposit is 1,000 zeny.";
next;
goto B_EXIT2;
@@ -98,9 +106,11 @@ B_EXIT:
next;
B_EXIT2:
- mes"[Manya]";
+ mes"[Maniss]";
mes "Thank you for using our Bank Service. We hope to see you again soon.";
- cutin "kafra_06",255;
close;
-
-} \ No newline at end of file
+}
+
+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/other/mc_cameri/heal.txt b/npc/other/mc_cameri/heal.txt
new file mode 100644
index 000000000..a3135f855
--- /dev/null
+++ b/npc/other/mc_cameri/heal.txt
@@ -0,0 +1,30 @@
+//===== eAthena Script =======================================
+//= Heal Npc
+//===== By: ==================================================
+//= MC Cameri
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 0.1+;
+//===== Description: =========================================
+//= Poring Which Heals For Free
+//===== Additional Comments: =================================
+//= You can use this one if you want simple one-click healing
+//============================================================
+
+prontera.gat,150,184,5 script Healring::Healring0 1002,{
+ npctalk "Booing!";
+ emotion 21;
+ percentheal 100,100;
+}
+
+morocc.gat,159,96,5 duplicate(Healring0) Healring 1002
+geffen.gat,121,61,5 duplicate(Healring0) Healring 1002
+payon.gat,180,105,5 duplicate(Healring0) Healring 1002
+alberta.gat,185,144,5 duplicate(Healring0) Healring 1002
+aldebaran.gat,134,123,5 duplicate(Healring0) Healring 1002
+izlude.gat,125,118,5 duplicate(Healring0) Healring 1002
+xmas.gat,149,136,5 duplicate(Healring0) Healring 1002
+comodo.gat,188,162,5 duplicate(Healring0) Healring 1002
+amatsu.gat,200,80,5 duplicate(Healring0) Healring 1002
+gonryun.gat,164,130,5 duplicate(Healring0) Healring 1002 \ No newline at end of file
diff --git a/npc/other/mc_cameri/jobchanger.txt b/npc/other/mc_cameri/jobchanger.txt
new file mode 100644
index 000000000..0436b0a4f
--- /dev/null
+++ b/npc/other/mc_cameri/jobchanger.txt
@@ -0,0 +1,18 @@
+//===== eAthena Script =======================================
+//= Job Changer NPC
+//===== By: ==================================================
+//= MC Cameri
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 0.1+;
+//===== Description: =========================================
+//= Job Changer NPC
+//===== Additional Comments: =================================
+//= v1.0 -
+//============================================================
+
+prontera.gat,157,188,0 script Job Changer 730,{
+ mes "[Job Advisor]";
+ close;
+} \ No newline at end of file
diff --git a/npc/other/mc_cameri/warper.txt b/npc/other/mc_cameri/warper.txt
new file mode 100644
index 000000000..0d0a94cc0
--- /dev/null
+++ b/npc/other/mc_cameri/warper.txt
@@ -0,0 +1,418 @@
+//===== eAthena Script =======================================
+//= Warp NPC
+//===== By: ==================================================
+//= MC Cameri
+//===== Current Version: =====================================
+//= 2.0
+//===== Compatible With: =====================================
+//= Any eAthena Version with duplicate; RO Ep6+
+//===== Description: =========================================
+//= Warp NPC with warp to almost everywhere that show how
+//= many people are on each map
+//===== Additional Comments: =================================
+//= Most of the code here has been taken from warper2.txt in
+//= the folder /npc/other/.
+//= Credits given to Someone(that's his nickname).
+//= 2.0 Increased performance by removing variables.
+//= -Fixed the memory problem.
+//= 1.0 First Version, consumed a lot of memory, about 2MB.
+//============================================================
+
+- script Warp NPC::warpra 115,{
+// colors
+ set @red$,"^FF0000";
+ set @reset$,"^000000";
+
+// towns
+ set @towns, getmapusers("alberta.gat") + getmapusers("aldebaran.gat")
+ + getmapusers("amatsu.gat") + getmapusers("comodo.gat") + getmapusers("gonryun.gat")
+ + getmapusers("geffen.gat") + getmapusers("izlude.gat") + getmapusers("xmas.gat")
+ + getmapusers("morocc.gat") + getmapusers("niflheim.gat") + getmapusers("payon.gat")
+ + getmapusers("prontera.gat") + getmapusers("yuno.gat") + getmapusers("umbala.gat")
+ + getmapusers("valkyrie.gat") + getmapusers("louyang.gat");
+// town inns
+ set @towns, @towns + getmapusers("alberta_in.gat") + getmapusers("aldeba_in.gat")
+ + getmapusers("geffen_in.gat") + getmapusers("izlude_in.gat") + getmapusers("morocc_in.gat")
+ + getmapusers("prt_in.gat") + getmapusers("xmas_in.gat") + getmapusers("cmd_in01.gat")
+ + getmapusers("cmd_in02.gat") + getmapusers("yuno_in01.gat") + getmapusers("yuno_in02.gat")
+ + getmapusers("yuno_in03.gat") + getmapusers("yuno_in04.gat") + getmapusers("yuno_in05.gat")
+ + getmapusers("ama_in01.gat") + getmapusers("ama_in02.gat") + getmapusers("gon_in.gat")
+ + getmapusers("um_in.gat") + getmapusers("nif_in.gat") + getmapusers("lou_in01.gat")
+ + getmapusers("lou_in02.gat") + getmapusers("payon_in01.gat") + getmapusers("payon_in02.gat")
+ + getmapusers("payon_in03.gat");
+// dungeons
+ set @anthell, getmapusers("anthell01.gat") + getmapusers("anthell02.gat");
+ set @beach, getmapusers("beach_dun.gat") + getmapusers("beach_dun2.gat") + getmapusers("beach_dun3.gat");
+ set @byalan, getmapusers("iz_dun00.gat") + getmapusers("iz_dun01.gat") + getmapusers("iz_dun02.gat") + getmapusers("iz_dun03.gat") + getmapusers("iz_dun04.gat");
+ set @clock, getmapusers("alde_dun01.gat") + getmapusers("alde_dun02.gat") + getmapusers("alde_dun03.gat") + getmapusers("alde_dun04.gat") + getmapusers("c_tower1.gat") + getmapusers("c_tower2.gat") + getmapusers("c_tower3.gat") + getmapusers("c_tower4.gat");
+ set @coal, getmapusers("mjo_dun01.gat") + getmapusers("mjo_dun02.gat") + getmapusers("mjo_dun03.gat");
+ set @culvert, getmapusers("prt_sewb1.gat") + getmapusers("prt_sewb2.gat") + getmapusers("prt_sewb3.gat") + getmapusers("prt_sewb4.gat");
+ set @geffen, getmapusers("gef_dun00.gat") + getmapusers("gef_dun01.gat") + getmapusers("gef_dun02.gat") + getmapusers("gef_dun03.gat");
+ set @glast, getmapusers("glast_01.gat") + getmapusers("gl_cas01.gat") + getmapusers("gl_cas02.gat") + getmapusers("gl_knt01.gat") + getmapusers("gl_knt02.gat")
+ + getmapusers("gl_chyard.gat") + getmapusers("gl_sew01.gat") + getmapusers("gl_sew02.gat") + getmapusers("gl_sew03.gat") + getmapusers("gl_sew04.gat") + getmapusers("gl_church.gat")
+ + getmapusers("gl_step.gat") + getmapusers("gl_dun01.gat") + getmapusers("gl_dun02.gat") + getmapusers("gl_prison.gat") + getmapusers("gl_prison1.gat");
+ set @hidden, getmapusers("prt_maze01.gat") + getmapusers("prt_maze02.gat") + getmapusers("prt_maze03.gat");
+ set @magma, getmapusers("mag_dun01.gat") + getmapusers("mag_dun02.gat");
+ set @orc, getmapusers("orcsdun01.gat") + getmapusers("orcsdun02.gat");
+ set @payond, getmapusers("pay_dun00.gat") + getmapusers("pay_dun01.gat") + getmapusers("pay_dun02.gat") + getmapusers("pay_dun03.gat") + getmapusers("pay_dun04.gat");
+ set @pyramids, getmapusers("moc_pryd01.gat") + getmapusers("moc_pryd02.gat") + getmapusers("moc_pryd03.gat") + getmapusers("moc_pryd04.gat") + getmapusers("moc_pryd05.gat") + getmapusers("moc_pryd06.gat");
+ set @sphinx, getmapusers("in_sphinx1.gat") + getmapusers("in_sphinx2.gat") + getmapusers("in_sphinx3.gat") + getmapusers("in_sphinx4.gat") + getmapusers("in_sphinx5.gat");
+ set @sunken, getmapusers("treasure01.gat") + getmapusers("treasure02.gat");
+ set @toy, getmapusers("xmas_dun01.gat") + getmapusers("xmas_dun02.gat");
+ set @turtle, getmapusers("tur_dun01.gat") + getmapusers("tur_dun02.gat") + getmapusers("tur_dun03.gat") + getmapusers("tur_dun04.gat");
+ set @ama, getmapusers("ama_dun01.gat") + getmapusers("ama_dun02.gat") + getmapusers("ama_dun02.gat");
+ set @gon, getmapusers("gon_dun01.gat") + getmapusers("gon_dun02.gat") + getmapusers("gon_dun03.gat");
+ set @gefenia, getmapusers("gefenia01.gat") + getmapusers("gefenia02.gat") + getmapusers("gefenia03.gat") + getmapusers("gefenia04.gat");
+ set @dungeons, @anthell + @beach + @dbyalan + @clock + @coal + @culvert + @geffen + @glast + @hidden
+ + @magma + @orc + @payond + @pyramids + @sphinx + @sunken + @toy + @turtle + @ama + @gon + @gefenia;
+
+ mes "[Warp NPC]";
+ mes "Hello, I can warp you to any Town and Dungeon! Were do you want to go?";
+ next;
+ menu "Towns [" + @red$ + @towns + @reset$ + "]",town,"Dungeons [" + @red$ + @dungeons + @reset$ +"]",dungeon;
+town:
+// + getmapusers("prt_in.gat") + getmapusers("xmas_in.gat") + getmapusers("cmd_in01.gat")
+// + getmapusers("cmd_in02.gat") + getmapusers("yuno_in01.gat") + getmapusers("yuno_in02.gat")
+// + getmapusers("yuno_in03.gat") + getmapusers("yuno_in04.gat") + getmapusers("yuno_in05.gat")
+// + getmapusers("ama_in01.gat") + getmapusers("ama_in02.gat") + getmapusers("gon_in.gat")
+// + getmapusers("um_in.gat") + getmapusers("nif_in.gat") + getmapusers("lou_in01.gat")
+// + getmapusers("lou_in02.gat");
+ menu "Alberta [" + @red$ + (getmapusers("alberta.gat")+getmapusers("alberta_in.gat")) + @reset$ + "]",walberta,
+ "Aldebaran [" + @red$ + (getmapusers("aldebaran.gat")+ getmapusers("aldeba_in.gat")) + @reset$ + "]",waldebaran,
+ "Amatsu [" + @red$ + (getmapusers("amatsu.gat")+getmapusers("ama_in02.gat")) + @reset$ + "]",wamatsu,
+ "Comodo [" + @red$ + (getmapusers("comodo.gat")+getmapusers("cmd_in01.gat")+getmapusers("cmd_in02.gat")) + @reset$ + "]",wcomodo,
+ "Gonryun [" + @red$ + (getmapusers("gonryun.gat")+getmapusers("gon_in.gat")) + @reset$ + "]",wgonryun,
+ "Geffen [" + @red$ + (getmapusers("geffen.gat")+getmapusers("geffen_in.gat")) + @reset$ + "]",wgeffen,
+ "Izlude [" + @red$ + (getmapusers("izlude.gat")+getmapusers("izlude_in.gat")) + @reset$ + "]",wizlude,
+ "Lutie [" + @red$ + (getmapusers("xmas.gat")+getmapusers("xmas_in.gat")) + @reset$ + "]",wxmas,
+ "Morroc [" + @red$ + (getmapusers("morocc.gat")+getmapusers("morocc_in.gat")) + @reset$ + "]",wmorroc,
+ "Niflheim [" + @red$ + (getmapusers("niflheim.gat")+getmapusers("nif_in.gat")) + @reset$ + "]",wniflheim,
+ "Payon [" + @red$ + (getmapusers("payon.gat")+getmapusers("payon_in01.gat")+getmapusers("payon_in02.gat")+getmapusers("payon_in03.gat")) + @reset$ + "]",wpayon,
+ "Prontera [" + @red$ + (getmapusers("prontera.gat")+getmapusers("prt_in.gat")) + @reset$ + "]",wprontera,
+ "Yuno [" + @red$ + (getmapusers("yuno.gat")+getmapusers("yuno_in01.gat")+getmapusers("yuno_in02.gat")+getmapusers("yuno_in03.gat")+getmapusers("yuno_in04.gat")+getmapusers("yuno_in05.gat")) + @reset$ + "]",wyuno,
+ "Umbala [" + @red$ + (getmapusers("umbala.gat")+getmapusers("um_in.gat")) + @reset$ + "]",wumbala,
+ "Valkyrie [" + @red$ + getmapusers("valkyrie.gat") + @reset$ + "]",wvalk,
+ "Louyang [" + @red$ + (getmapusers("louyang.gat")+getmapusers("lou_in01.gat")+getmapusers("lou_in02.gat")) + @reset$ + "]",wlouyang;
+dungeon:
+ menu "Amatsu Dungeon [" + @red$ + @ama + @reset$ + "]",ama,
+ "Gonryun Dungeon [" + @red$ + @gon + @reset$ + "]",gon,
+ "Anthell [" + @red$ + @anthell + @reset$ + "]",ant,
+ "Beach Dungeon [" + @red$ + @beach + @reset$ + "]",beach,
+ "Byalan Dungeon [" + @red$ + @byalan + @reset$ + "]",byalan,
+ "Clock Tower [" + @red$ + @clock + @reset$ + "]",clock,
+ "Coal Mines [" + @red$ + @coal + @reset$ + "]",coal,
+ "Culvert [" + @red$ + @culvert + @reset$ + "]",culvert,
+ "Geffen Dungeon [" + @red$ + @geffen + @reset$ + "]",geffen,
+ "Glast Heim [" + @red$ + @glast + @reset$ + "]",glast,
+ "Hidden Dungeon [" + @red$ + @hidden + @reset$ + "]",hidden,
+ "Magma Dungeon [" + @red$ + @magma + @reset$ + "]",magma,
+ "Orc Dungeon [" + @red$ + @orc + @reset$ + "]",orc,
+ "Payon Dungeon [" + @red$ + @payond + @reset$ + "]",payon,
+ "Pyramids [" + @red$ + @pyramids + @reset$ + "]",pyramids,
+ "Sphinx [" + @red$ + @sphinx + @reset$ + "]",sphinx,
+ "Sunken Ship [" + @red$ + @sunken + @reset$ + "]",sunken,
+ "Toy Factory [" + @red$ + @toy + @reset$ + "]",toy,
+ "Turtle Dungeon [" + @red$ + @tutrle + @reset$ + "]",turtle,
+ "Gefenia [" + @red$ + @gefenia + @reset$ + "]",gefenia;
+ant:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("anthell01.gat")+ @reset$ + "]",danthell1,
+ "Level 2 [" + @red$ + getmapusers("anthell02.gat")+ @reset$ + "]",danthell2;
+beach:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("beach_dun.gat") + @reset$ + "]",dbeach1,
+ "Level 2 [" + @red$ + getmapusers("beach_dun2.gat") + @reset$ + "]",dbeach2,
+ "Level 3 [" + @red$ + getmapusers("beach_dun3.gat") + @reset$ + "]",dbeach3;
+byalan:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("iz_dun00.gat") + @reset$ + "]",dbyalan1,
+ "Level 2 [" + @red$ + getmapusers("iz_dun01.gat") + @reset$ + "]",dbyalan2,
+ "Level 3 [" + @red$ + getmapusers("iz_dun02.gat") + @reset$ + "]",dbyalan3,
+ "Level 4 [" + @red$ + getmapusers("iz_dun03.gat") + @reset$ + "]",dbyalan4,
+ "Level 5 [" + @red$ + getmapusers("iz_dun04.gat") + @reset$ + "]",dbyalan5;
+clock:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("c_tower1.gat") + @reset$ + "]",dclock1,
+ "Level 2 [" + @red$ + getmapusers("c_tower2.gat") + @reset$ + "]",dclock2,
+ "Level 3 [" + @red$ + getmapusers("c_tower3.gat") + @reset$ + "]",dclock3,
+ "Level 4 [" + @red$ + getmapusers("c_tower4.gat") + @reset$ + "]",dclock4,
+ "Basement 1 [" + @red$ + getmapusers("alde_dun01.gat") + @reset$ + "]",dalde1,
+ "Basement 2 [" + @red$ + getmapusers("alde_dun02.gat") + @reset$ + "]",dalde2,
+ "Basement 3 [" + @red$ + getmapusers("alde_dun03.gat") + @reset$ + "]",dalde3,
+ "Basement 4 [" + @red$ + getmapusers("alde_dun04.gat") + @reset$ + "]",dalde4;
+coal:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("mjo_dun01.gat") + @reset$ + "]",dcoal1,
+ "Level 2 [" + @red$ + getmapusers("mjo_dun02.gat") + @reset$ + "]",dcoal2,
+ "Level 3 [" + @red$ + getmapusers("mjo_dun03.gat") + @reset$ + "]",dcoal3;
+culvert:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("prt_sewb1.gat") + @reset$ + "]",dculvert1,
+ "Level 2 [" + @red$ + getmapusers("prt_sewb2.gat") + @reset$ + "]",dculvert2,
+ "Level 3 [" + @red$ + getmapusers("prt_sewb3.gat") + @reset$ + "]",dculvert3,
+ "Level 4 [" + @red$ + getmapusers("prt_sewb4.gat") + @reset$ + "]",dculvert4;
+geffen:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("gef_dun00.gat") + @reset$ + "]",dgeffen1,
+ "Level 2 [" + @red$ + getmapusers("gef_dun01.gat") + @reset$ + "]",dgeffen2,
+ "Level 3 [" + @red$ + getmapusers("gef_dun02.gat") + @reset$ + "]",dgeffen3,
+ "Level 4 [" + @red$ + getmapusers("gef_dun03.gat") + @reset$ + "]",dgeffen4;
+glast:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Entrance [" + @red$ + getmapusers("glast_01.gat") + @reset$ + "]",dglastent,
+ "Castle 1 [" + @red$ + getmapusers("gl_cas01.gat") + @reset$ + "]",dglastcast1,
+ "Castle 2 [" + @red$ + getmapusers("gl_cas02.gat") + @reset$ + "]",dglastcast2,
+ "Chivalry 1 [" + @red$ + getmapusers("gl_knt01.gat") + @reset$ + "]",dglastchiv1,
+ "Chivalry 2 [" + @red$ + getmapusers("gl_knt02.gat") + @reset$ + "]",dglastchiv2,
+ "Churchyard [" + @red$ + getmapusers("gl_chyard.gat") + @reset$ + "]",dglastyard,
+ "Culvert 1 [" + @red$ + getmapusers("gl_sew01.gat") + @reset$ + "]",dglastcul1,
+ "Culvert 2 [" + @red$ + getmapusers("gl_sew02.gat") + @reset$ + "]",dglastcul1,
+ "Culvert 3 [" + @red$ + getmapusers("gl_sew03.gat") + @reset$ + "]",dglastcul3,
+ "Culvert 4 [" + @red$ + getmapusers("gl_sew04.gat") + @reset$ + "]",dglastcul4,
+ "St.Abbey [" + @red$ + getmapusers("gl_church.gat") + @reset$ + "]",dglastchur,
+ "Staircase Dungeon [" + @red$ + getmapusers("gl_step.gat") + @reset$ + "]",dglaststep,
+ "Underground Cave 1 [" + @red$ + getmapusers("gl_dun01.gat") + @reset$ + "]",dglastcave1,
+ "Underground Cave 2 [" + @red$ + getmapusers("gl_dun02.gat") + @reset$ + "]",dglastcave2,
+ "Underground Prison 1 [" + @red$ + getmapusers("gl_prison.gat") + @reset$ + "]",dglastpris1,
+ "Underground Prison 2 [" + @red$ + getmapusers("gl_prison1.gat") + @reset$ + "]",dglastpris2;
+hidden:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("prt_maze01.gat") + @reset$ + "]",dhidden1,
+ "Level 2 [" + @red$ + getmapusers("prt_maze02.gat") + @reset$ + "]",dhidden2,
+ "Level 3 [" + @red$ + getmapusers("prt_maze03.gat") + @reset$ + "]",dhidden3;
+magma:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("mag_dun01.gat") + @reset$ + "]",dmagma1,
+ "Level 2 [" + @red$ + getmapusers("mag_dun02.gat") + @reset$ + "]",dmagma2;
+orc:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("orcsdun01.gat") + @reset$ + "]",dorc1,
+ "Level 2 [" + @red$ + getmapusers("orcsdun02.gat") + @reset$ + "]",dorc2;
+payon:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("pay_dun00.gat") + @reset$ + "]",dpayon1,
+ "Level 2 [" + @red$ + getmapusers("pay_dun01.gat") + @reset$ + "]",dpayon2,
+ "Level 3 [" + @red$ + getmapusers("pay_dun02.gat") + @reset$ + "]",dpayon3,
+ "Level 4 [" + @red$ + getmapusers("pay_dun03.gat") + @reset$ + "]",dpayon4,
+ "Level 5 [" + @red$ + getmapusers("pay_dun04.gat") + @reset$ + "]",dpayon5;
+pyramids:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("moc_pryd01.gat") + @reset$ + "]",dpyramids1,
+ "Level 2 [" + @red$ + getmapusers("moc_pryd02.gat") + @reset$ + "]",dpyramids2,
+ "Level 3 [" + @red$ + getmapusers("moc_pryd03.gat") + @reset$ + "]",dpyramids3,
+ "Level 4 [" + @red$ + getmapusers("moc_pryd04.gat") + @reset$ + "]",dpyramids4,
+ "Basement 1 [" + @red$ + getmapusers("moc_pryd05.gat") + @reset$ + "]",dpyramidsb1,
+ "Basement 2 [" + @red$ + getmapusers("moc_pryd06.gat") + @reset$ + "]",dpyramidsb2;
+sphinx:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("in_sphinx1.gat") + @reset$ + "]",dsphinx1,
+ "Level 2 [" + @red$ + getmapusers("in_sphinx2.gat") + @reset$ + "]",dsphinx2,
+ "Level 3 [" + @red$ + getmapusers("in_sphinx3.gat") + @reset$ + "]",dsphinx3,
+ "Level 4 [" + @red$ + getmapusers("in_sphinx4.gat") + @reset$ + "]",dsphinx4,
+ "Level 5 [" + @red$ + getmapusers("in_sphinx5.gat") + @reset$ + "]",dsphinx5;
+sunken:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("treasure01.gat") + @reset$ + "]",dsunken1,
+ "Level 2 [" + @red$ + getmapusers("treasure02.gat") + @reset$ + "]",dsunken2;
+toy:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("xmas_dun01.gat") + @reset$ + "]",dtoy1,
+ "Level 2 [" + @red$ + getmapusers("xmas_dun02.gat") + @reset$ + "]",dtoy2;
+turtle:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Entrance [" + @red$ + getmapusers("tur_dun01.gat") + @reset$ + "]",dturtleent,
+ "Level 1 [" + @red$ + getmapusers("tur_dun02.gat") + @reset$ + "]",dturtle1,
+ "Level 2 [" + @red$ + getmapusers("tur_dun03.gat") + @reset$ + "]",dturtle2,
+ "Level 3 [" + @red$ + getmapusers("tur_dun04.gat") + @reset$ + "]",dturtle3;
+ama:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("ama_dun01.gat") + @reset$ + "]",dama1,
+ "Level 2 [" + @red$ + getmapusers("ama_dun02.gat") + @reset$ + "]",dama2,
+ "Level 3 [" + @red$ + getmapusers("ama_dun03.gat") + @reset$ + "]",dama3;
+gon:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("gon_dun01.gat") + @reset$ + "]",dgon1,
+ "Level 2 [" + @red$ + getmapusers("gon_dun02.gat") + @reset$ + "]",dgon2,
+ "Level 3 [" + @red$ + getmapusers("gon_dun03.gat") + @reset$ + "]",dgon3;
+gefenia:
+ mes "[Warp NPC]";
+ mes "Please select a Level. Beware that you will be warped directly into the dungeon.";
+ next;
+ menu "Level 1 [" + @red$ + getmapusers("gefenia01.gat") + @reset$ + "]",dgefenia1,
+ "Level 2 [" + @red$ + getmapusers("gefenia02.gat") + @reset$ + "]",dgefenia2,
+ "Level 3 [" + @red$ + getmapusers("gefenia03.gat") + @reset$ + "]",dgefenia3,
+ "Level 4 [" + @red$ + getmapusers("gefenia04.gat") + @reset$ + "]",dgefenia4;
+
+//----------------Towns----------------\\
+
+walberta: warp "alberta.gat",192,147; close;
+waldebaran: warp "aldebaran.gat",140,131; close;
+wamatsu: warp "amatsu.gat",198,84; close;
+wcomodo: warp "comodo.gat",209,143; close;
+wgonryun: warp "gonryun.gat",160,121; close;
+wgeffen: warp "geffen.gat",119,59; close;
+wizlude: warp "izlude.gat",128,114; close;
+wxmas: warp "xmas.gat",147,134; close;
+wmorroc: warp "morocc.gat",156,93; close;
+wniflheim: warp "niflheim.gat",85,154; close;
+wpayon: warp "payon.gat",152,75; close;
+wprontera: warp "prontera.gat",156,191; close;
+wyuno: warp "yuno.gat",157,51; close;
+wumbala: warp "umbala.gat",145,155; close;
+wlouyang: warp "louyang.gat",210,108; close;
+wvalk: warp "valkyrie",48,8; close;
+
+//----------------Dungeons----------------\\
+
+danthell1: warp "anthell01.gat",35,262; close;
+danthell2: warp "anthell02.gat",168,170; close;
+dbeach1: warp "beach_dun.gat",266,67; close;
+dbeach2: warp "beach_dun2.gat",255,244; close;
+dbeach3: warp "beach_dun3.gat",23,260; close;
+dbyalan1: warp "iz_dun00.gat",168,168; close;
+dbyalan2: warp "iz_dun01.gat",253,252; close;
+dbyalan3: warp "iz_dun02.gat",236,204; close;
+dbyalan4: warp "iz_dun03.gat",32,63; close;
+dbyalan5: warp "iz_dun04.gat",26,27; close;
+dalde1: warp "alde_dun01.gat",297,25; close;
+dalde2: warp "alde_dun02.gat",127,169; close;
+dalde3: warp "alde_dun03.gat",277,178; close;
+dalde4: warp "alde_dun04.gat",268,74; close;
+dclock1: warp "c_tower1.gat",199,159; close;
+dclock2: warp "c_tower2.gat",148,283; close;
+dclock3: warp "c_tower3.gat",65,147; close;
+dclock4: warp "c_tower4.gat",56,155; close;
+dcoal1: warp "mjo_dun01.gat",52,17; close;
+dcoal2: warp "mjo_dun02.gat",381,343; close;
+dcoal3: warp "mjo_dun03.gat",302,262; close;
+dculvert1: warp "prt_sewb1.gat",131,247; close;
+dculvert2: warp "prt_sewb2.gat",19,19; close;
+dculvert3: warp "prt_sewb3.gat",180,169; close;
+dculvert4: warp "prt_sewb4.gat",100,92; close;
+dgeffen1: warp "gef_dun00.gat",104,99; close;
+dgeffen2: warp "gef_dun01.gat",115,236; close;
+dgeffen3: warp "gef_dun02.gat",106,132; close;
+dgeffen4: warp "gef_dun03.gat",203,200; close;
+dglastent: warp "glast_01.gat",375,304; close;
+dglastcast1: warp "gl_cas01.gat",199,29; close;
+dglastcast2: warp "gl_cas02.gat",104,25; close;
+dglastchiv1: warp "gl_knt01.gat",150,15; close;
+dglastchiv2: warp "gl_knt02.gat",157,287; close;
+dglastyard: warp "gl_chyard.gat",147,15; close;
+dglastcul1: warp "gl_sew01.gat",258,255; close;
+dglastcul2: warp "gl_sew02.gat",108,291; close;
+dglastcul3: warp "gl_sew03.gat",171,283; close;
+dglastcul4: warp "gl_sew04.gat",68,277; close;
+dglastchur: warp "gl_church.gat",156,7; close;
+dglaststep: warp "gl_step.gat",12,7; close;
+dglastcave1: warp "gl_dun01.gat",133,271; close;
+dglastcave2: warp "gl_dun02.gat",224,274; close;
+dglastpris1: warp "gl_prison.gat",14,70; close;
+dglastpris2: warp "gl_prison1.gat",150,14; close;
+dhidden1: warp "prt_maze01.gat",176,7; close;
+dhidden2: warp "prt_maze02.gat",94,9; close;
+dhidden3: warp "prt_maze03.gat",23,8; close;
+dmagma1: warp "mag_dun01.gat",126,68; close;
+dmagma2: warp "mag_dun02.gat",47,30; close;
+dorc1: warp "orcsdun01.gat",32,170; close;
+dorc2: warp "orcsdun02.gat",21,185; close;
+dpayon1: warp "pay_dun00.gat",21,183; close;
+dpayon2: warp "pay_dun01.gat",19,33; close;
+dpayon3: warp "pay_dun02.gat",19,63; close;
+dpayon4: warp "pay_dun03.gat",155,159; close;
+dpayon5: warp "pay_dun04.gat",201,204; close;
+dpyramids1: warp "moc_pryd01.gat",192,9; close;
+dpyramids2: warp "moc_pryd02.gat",10,192; close;
+dpyramids3: warp "moc_pryd03.gat",100,92; close;
+dpyramids4: warp "moc_pryd04.gat",181,11; close;
+dpyramidsb1: warp "moc_pryd05.gat",94,96; close;
+dpyramidsb2: warp "moc_pryd06.gat",192,8; close;
+dsphinx1: warp "in_sphinx1.gat",288,9; close;
+dsphinx2: warp "in_sphinx2.gat",149,81; close;
+dsphinx3: warp "in_sphinx3.gat",210,54; close;
+dsphinx4: warp "in_sphinx4.gat",10,222; close;
+dsphinx5: warp "in_sphinx5.gat",100,99; close;
+dsunken1: warp "treasure01.gat",69,24; close;
+dsunken2: warp "treasure02.gat",102,27; close;
+dtoy1: warp "xmas_dun01.gat",205,15; close;
+dtoy2: warp "xmas_dun02.gat",129,133; close;
+dturtleent: warp "tur_dun01.gat",154,49; close;
+dturtle1: warp "tur_dun02.gat",148,261; close;
+dturtle2: warp "tur_dun03.gat",132,189; close;
+dturtle3: warp "tur_dun04.gat",100,192; close;
+dama1: warp "ama_dun01.gat",228,11; close;
+dama2: warp "ama_dun02.gat",34,41; close;
+dama3: warp "ama_dun03.gat",119,14; close;
+dgon1: warp "gon_dun01.gat",153,53; close;
+dgon2: warp "gon_dun02.gat",28,113; close;
+dgon3: warp "gon_dun03.gat",68,16; close;
+dgefenia1: warp "gefenia01.gat",40,103; close;
+dgefenia2: warp "gefenia02.gat",203,34; close;
+dgefenia3: warp "gefenia03.gat",266,168; close;
+dgefenia4: warp "gefenia04.gat",130,272; close;
+}
+alberta.gat,31,240,4 duplicate(warpra) Warp NPC 115
+aldebaran.gat,145,118,4 duplicate(warpra) Warp NPC 115
+amatsu.gat,194,83,1 duplicate(warpra) Warp NPC 115
+comodo.gat,194,158,4 duplicate(warpra) Warp NPC 115
+geffen.gat,115,66,4 duplicate(warpra) Warp NPC 115
+izlude.gat,131,116,4 duplicate(warpra) Warp NPC 115
+xmas.gat,150,136,4 duplicate(warpra) Warp NPC 115
+morocc.gat,156,99,4 duplicate(warpra) Warp NPC 115
+payon.gat,182,110,4 duplicate(warpra) Warp NPC 115
+prontera.gat,153,183,4 duplicate(warpra) Warp NPC 115
+yuno.gat,137,162,4 duplicate(warpra) Warp NPC 115
+moc_fild04.gat,207,331,4 duplicate(warpra) Warp NPC 115
+izlu2dun.gat,104,82,4 duplicate(warpra) Warp NPC 115
+mjolnir_02.gat,85,363,4 duplicate(warpra) Warp NPC 115
+prt_fild05.gat,273,215,4 duplicate(warpra) Warp NPC 115
+glast_01.gat,370,308,4 duplicate(warpra) Warp NPC 115
+yuno_fild03.gat,37,135,4 duplicate(warpra) Warp NPC 115
+gef_fild10.gat,71,339,4 duplicate(warpra) Warp NPC 115
+pay_arche.gat,39,135,4 duplicate(warpra) Warp NPC 115
+moc_ruins.gat,64,166,4 duplicate(warpra) Warp NPC 115
+moc_fild19.gat,106,97,4 duplicate(warpra) Warp NPC 115
+alb2trea.gat,73,101,4 duplicate(warpra) Warp NPC 115
+tur_dun01.gat,148,239,4 duplicate(warpra) Warp NPC 115
+gonryun.gat,151,130,4 duplicate(warpra) Warp NPC 115
+louyang.gat,210,106,4 duplicate(warpra) Warp NPC 115
+umbala.gat,132,130,4 duplicate(warpra) Warp NPC 115
+valkyrie.gat,48,35,8 duplicate(warpra) Warp NPC 115
diff --git a/npc/other/msg_boards.txt b/npc/other/msg_boards.txt
index 634337abf..d0910627b 100644
--- a/npc/other/msg_boards.txt
+++ b/npc/other/msg_boards.txt
@@ -18,16 +18,14 @@
// Al De Baran //
//=======================================================================//
/ Welcome Sign ------------------------------------------------
-aldebaran.gat,133,104,1 script Welcome Sign 111,
-{
+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;
}
// Kafra Corp. Main Office Sign ---------------------------------------------------------------
-aldebaran.gat,53,223,1 script Kafra Corp. Main Office 111,
-{
+aldebaran.gat,53,223,1 script Kafra Corp. Main Office 111,{
mes "~sign reads...~";
mes "This is the Kafra Services Main Office, home to the lovely Kafra employees.";
close;
@@ -38,24 +36,21 @@ aldebaran.gat,53,223,1 script Kafra Corp. Main Office 111,
// Alberta //
//=======================================================================//
// Sign: Alberta Harbor -----------------------------------------------
-alberta.gat,35,241,1 script Alberta Harbor 111,
-{
+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,
-{
+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,
-{
+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!";
@@ -68,48 +63,42 @@ alberta.gat,37,39,1 script Merchant Guild 111,
// Geffen //
//=======================================================================//
// Welcome Sign ----------------------------------------------
-geffen.gat,116,58,1 script Welcome Sign 111,
-{
+geffen.gat,116,58,1 script Welcome Sign 111,{
mes "~sign reads...~";
mes "Greetings!! You are in the wonderfull city of Geffen! Geffen is the city of Magic and home to Mages and Wizards!.";
close;
}
// Sign: Restaurant Inn ---------------------------------------------
-geffen.gat,167,175,1 script Geffen Restaurant Inn 111,
-{
+geffen.gat,167,175,1 script Geffen Restaurant Inn 111,{
mes "~sign reads..... ~";
mes "Welcome weary travelers! Have a hot meal and stay the night at the the Geffen Restaurant Inn!";
close;
}
// Sign: Mage Association ---------------------------------------
-geffen.gat,61,174,1 script Mage Association 111,
-{
+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,
-{
+geffen.gat,113,104,1 script Geffen Tower 111,{
mes "~sign reads...~";
mes "This is the Geffen Tower, home to the Wizard Academey as well as the infamous Geffen Dungeon. Novices beware!!!";
close;
}
// Sign: Blacksmith Guild -------------------------------------------
-geffen.gat,184,61,1 script Blacksmith Guild 111,
-{
+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,
-{
+geffen.gat,119,190,0 script Sign Post 111,{
mes "~sign reads...~";
mes "North to Geffen Fields";
mes "NorthEast to Al De Baran";
@@ -128,16 +117,14 @@ geffen.gat,119,190,0 script Sign Post 111,
// Morroc //
//=======================================================================//
// Welcome Sign ---------------------------------------------------
-morocc.gat,168,264,1 script Welcome Sign 111,
-{
+morocc.gat,168,264,1 script Welcome Sign 111,{
mes "~sign reads...~";
mes "Morocc welcomes you! Morocc is the city of the desert and home to Thieves, Assassins, and alls sorts of Egyption temptations!";
close;
}
// Sign: Inn ----------------------------------------------------------
-morocc.gat,272,272,1 script Morroc Town Inn 111,
-{
+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;
@@ -154,16 +141,14 @@ morocc.gat,272,272,1 script Morroc Town Inn 111,
// Prontera //
//=======================================================================//
// Welcome Sign -----------------------------------------------------------
-prontera.gat,156,197,1 script Welcome Sign 111,
-{
+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,
-{
+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";
diff --git a/npc/other/platinum_skills.txt b/npc/other/platinum_skills.txt
index 765982fe3..8d594b720 100644
--- a/npc/other/platinum_skills.txt
+++ b/npc/other/platinum_skills.txt
@@ -3,13 +3,14 @@
//===== By: =================================================================================
//= Keichii and edited by DarkChild
//===== Current Version: ====================================================================
-//= 2.0
+//= 2.1
//===== 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
//===========================================================================================
prontera.gat,128,200,6 script Platinum Skill NPC 94,{
mes "[Platinum Skill NPC]";
@@ -18,13 +19,14 @@ next;
menu "Yes",Lgetskills,"No",Lnogetskills;
Lgetskills:
-if ((Class==Job_Novice) || (Class==4001)) goto Lskillsnovice;
-if ((Class==Job_Swordman) || (Class==7) || (Class==Job_Knight2) || (Class==14)|| (Class==Job_Crusader2) || (Class==4002) || (Class==4008) || (Class==Job_Lord_Knight2) || (Class==4015) || (Class==Job_Paladin2)) goto Lskillsswordie;
-if ((Class==Job_Mage) || (Class==9) || (Class==16) || (Class==4003) || (Class==4010) || (Class==4017)) goto Lskillsmage;
-if ((Class==Job_Archer) || (Class==11) || (Class==19) || (Class==20) || (Class==4004) || (Class==4012) || (Class==4020) || (Class==4021)) goto Lskillsarcher;
-if ((Class==Job_Acolyte) || (Class==8) || (Class==15) || (Class==4005) || (Class==4009) || (Class==4016)) goto Lskillsaco;
-if ((Class==Job_Merchant) || (Class==10) || (Class==18) || (Class==4006) || (Class==4011) || (Class==4019)) goto Lskillsmerchie;
-if ((Class==Job_Thief) || (Class==12) || (Class==17) || (Class==4007) || (Class==4013) || (Class==4018)) goto Lskillsthief;
+if ((Class==0) || (Class==Job_Baby) || (Class==4001)) goto Lskillsnovice;
+if ((Class==Job_SuperNovice) || (Class==Job_Super_Baby)) goto Lskillssnovice;
+if ((Class==Job_Swordman) || (Class==7) || (Class==13) || (Class==14)|| (Class==21) || (Class==Job_Baby_Swordman) || (Class==Job_Baby_Knight) || (Class==Job_Baby_Knight2) || (Class==Job_Baby_Crusader) || (Class==Job_Baby_Crusader2)) || (Class==4002) || (Class==4008) || (Class==Job_Lord_Knight2) || (Class==4015) || (Class==Job_Paladin2) goto Lskillsswordie;
+if ((Class==Job_Mage) || (Class==Job_Baby_Mage) || (Class==Job_Baby_Wizard) || (Class==Job_Baby_Sage) || (Class==9) || (Class==16) || (Class==4003) || (Class==4010) || (Class==4017)) goto Lskillsmage;
+if ((Class==Job_Archer) || (Class==11) || (Class==19) || (Class==20) || (Class==49) || (Class==65) || (Class==66) ||(Class==4004) || (Class==4012) || (Class==4020) || (Class==4021)) goto Lskillsarcher;
+if ((Class==Job_Acolyte) || (Class==8) || (Class==15) || (Class==50) || (Class==54) || (Class==61) || (Class==4005) || (Class==4009) || (Class==4016)) goto Lskillsaco;
+if ((Class==Job_Merchant) || (Class==10) || (Class==18) || (Class==51) || (Class==56) || (Class==64) || (Class==4006) || (Class==4011) || (Class==4019)) goto Lskillsmerchie;
+if ((Class==Job_Thief) || (Class==12) || (Class==17) || (Class==52) || (Class==58) || (Class==63) || (Class==4007) || (Class==4013) || (Class==4018)) goto Lskillsthief;
Lskillsnovice:
mes "[Platinum Skill NPC]";
mes "I see that you are a Novice. I will now add the special skills available to the Novice job.";
@@ -34,6 +36,14 @@ mes " ";
mes "You now have all the special skills available to the Novice job.";
next;
goto LskillsEND;
+Lskillssnovice:
+mes "[Platinum Skills]";
+mes "I see that you are a Super Novice. I will now add the special skills available to your job.";
+skill 142,1,0; //Snovices don't have play dead, do they?
+mes " ";
+mes "You now have all the special skills available to your Novice job.";
+next;
+goto LskillsEND;
Lskillsswordie:
mes "[Platinum Skill NPC]";
mes "I see that you are a Swordman, Knight, Crusader, Lord Knight or Paladin. I will now add the special skills available to these jobs.";
diff --git a/npc/other/pvp.txt b/npc/other/pvp.txt
index b4d2fe583..d46a7b412 100644
--- a/npc/other/pvp.txt
+++ b/npc/other/pvp.txt
@@ -22,32 +22,27 @@
//==========================================================================
// Alberta -----------------------------------------
-alberta_in.gat, 22, 146,4 script PvP Narrator#1 84,
-{
+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,
-{
+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,
-{
+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,
-{
+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,
-{
+geffen_in.gat, 67,63,4 script PvP Narrator#5 84,{
callfunc "F_PvPNarr", "geffen_in.gat", 64, 60;
end;
}
@@ -134,8 +129,7 @@ function script F_PvPNarr {
//==========================================================================
// Alberta -----------------------------------
-alberta_in.gat, 26,146,4 script Gate Keeper#1::GateKeep 83,
-{
+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.....";
diff --git a/npc/other/wedding.txt b/npc/other/wedding.txt
index f5eea044b..97e45f9f9 100644
--- a/npc/other/wedding.txt
+++ b/npc/other/wedding.txt
@@ -7,7 +7,7 @@
//=====By================================================
// AppleGirl and Evera(version 1.0)
//=====Current Version===================================
-// 1.4
+// 1.45b
//=====Compatible With:==================================
// Any eAthena Version; RO Episode 6+
//=====Description=======================================
@@ -29,6 +29,8 @@
// 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:
//
@@ -45,21 +47,21 @@
// @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($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($@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;
+ 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$;
@@ -70,7 +72,8 @@ L_GroomCeremony:
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,
- getitem 2635,1;//Items: Wedding_Ring_F,
+ 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]";
@@ -105,13 +108,14 @@ L_BrideCeremony:
deltimer "weddinglimit2";
marriage $name$;
delitem 2613,1;//Items: Diamond_Ring,
- getitem 2634,1;//Items: Wedding_Ring_M,
+ 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 $@progress,0;
set $groom$,"null";
set $bride$,"null";
set @register,0;
@@ -156,7 +160,7 @@ L_OtherReason:
input $reason$;
next;
areaannounce "prt_church.gat",0,0,350,350,""+$reason$+"",0;
- set $progress,0;
+ set $@progress,0;
set $groom$,"null";
set $bride$,"null";
set $name$,"null";
@@ -195,11 +199,11 @@ L_InProgress:
close;
L_WrongBrideName:
mes "[Marry Happy]";
- mes "How come you forgot your wife name!? Sorry come back later when you know who you want to marry.";
+ 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 name!? Sorry come back later when you know who you want to marry.";
+ 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]";
@@ -363,8 +367,8 @@ L_WeddingSystem:
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 "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";
@@ -374,16 +378,16 @@ L_Marry:
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($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($@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.";
+ 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";
@@ -393,7 +397,7 @@ L_Marry:
set $groom$,strcharinfo(0);
set @register,1;
set zeny,zeny-@costgroomA;
- set $progress,1;
+ set $@progress,1;
if(sex == 1) getitem 7170,1;
if(sex == 0) getitem 2338,1;
set @outfit,1;
@@ -409,12 +413,12 @@ L_Marry:
L_BrideRegister:
if ($name$ != strcharinfo(0)) goto L_NotBride;
if($groom$ == strcharinfo(0)) goto L_CantMarryYourself;
- if($progress != 1) goto L_GroomNotRegistered;
+ 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 mis, 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;
@@ -425,7 +429,7 @@ L_BrideRegister:
set $bride$,strcharinfo(0);
set @register,1;
set zeny,zeny-@costbrideA;
- set $progress,2;
+ set $@progress,2;
set event_wedding,1;
if(sex == 1) getitem 7170,1;
if(sex == 0) getitem 2338,1;
@@ -456,7 +460,7 @@ L_GroomRegister2:
set $groom$,strcharinfo(0);
set @register,1;
set zeny,zeny-@costgroomB;
- set $progress,1;
+ 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";
@@ -480,7 +484,7 @@ L_BrideRegister2:
set $bride$,strcharinfo(0);
set @register,1;
set zeny,zeny-@costbrideB;
- set $progress,2;
+ set $@progress,2;
set event_wedding,1;
deltimer "weddinglimit1";
addtimer 300000,"weddinglimit2";
@@ -612,7 +616,7 @@ L_DivorceSystem:
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 $@progress,0;
set $groom$,"null";
set $name$,"null";
set $name2$,"null";
@@ -634,7 +638,7 @@ prt_church.gat,99,124,0 script weddinglimit1 -1,{
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 $@progress,0;
set $groom$,"null";
set $bride$,"null";
set $name$,"null";
@@ -691,7 +695,7 @@ areaannounce "prt_church.gat",0,0,350,350,"And so be it, by the powers vested in
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 $@progress,0;
set $groom$,"null";
set $bride$,"null";
set $name$,"null";
@@ -700,7 +704,7 @@ areaannounce "prt_church.gat",0,0,350,350,"I pronouce you Husband and Wife, you
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 $@progress,0;
set $groom$,"null";
set $bride$,"null";
set $name$,"null";
@@ -708,4 +712,4 @@ areaannounce "prt_church.gat",0,0,350,350,"The wedding has been cancelled.",0;
set @register,0;
set event_wedding,0;
set @get_ring,0;
-} \ No newline at end of file
+}
diff --git a/npc/quests/all_quest.txt b/npc/quests/all_quest.txt
index a6a6e3264..73a47c6e7 100644
--- a/npc/quests/all_quest.txt
+++ b/npc/quests/all_quest.txt
@@ -501,7 +501,7 @@ LCancel6:
Headset:
mes "[Quest Assistant]";
mes "These are Articles needed for my Grandfather's masterpiece.";
- mes "^3355FF100 Steel^000000";
+ mes "^3355FF40 Steel^000000";
mes "^3355FF1 Oridecon^000000";
mes "^3355FF1 Alchol^000000";
mes "^3355FF1 Coal^000000";
diff --git a/npc/quests/bunnyband.txt b/npc/quests/bunnyband.txt
index 81ff319c5..2f459da80 100644
--- a/npc/quests/bunnyband.txt
+++ b/npc/quests/bunnyband.txt
@@ -16,8 +16,7 @@
// Prontera ------------------------------------------------------------------------------------------------------------------------------------------
-prontera.gat,146,87,6 script Kafra Corp. Rep.#1::KCRep 83,
-{
+prontera.gat,146,87,6 script Kafra Corp. Rep.#1::KCRep 83,{
mes "[Kafra Corp. Rep.]";
if (BUNYBND == 1) goto L_Check;
mes "^529DFFSpecial Event, ^FF0000Bunny Band ^529DFFQuest!!^000000";
diff --git a/npc/quests/custom/event_32_new_hats.txt b/npc/quests/custom/event_32_new_hats.txt
index 52056d437..5ad0c66f4 100644
--- a/npc/quests/custom/event_32_new_hats.txt
+++ b/npc/quests/custom/event_32_new_hats.txt
@@ -699,7 +699,7 @@ L1_19:
mes "Let me check the items you have brought here.";
next;
if((countitem(10007) < 1)) goto L_ITEM_1b;
- if((countitem(10008) < 1)) goto L_ITEM_2b;
+ if((countitem(10009) < 1)) goto L_ITEM_2b;
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;
diff --git a/npc/quests/custom/event_6_new_hats.txt b/npc/quests/custom/event_6_new_hats.txt
index 583f190b9..ab4413138 100644
--- a/npc/quests/custom/event_6_new_hats.txt
+++ b/npc/quests/custom/event_6_new_hats.txt
@@ -1,366 +1,366 @@
-//===== eAthena Script =======================================
-//= Custom Quest For New Headgears
-//===== By: ==================================================
-//= RedxSwordxHero, Lupus
-//===== Current Version: =====================================
-//= 1.2
-//===== 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]
-//============================================================
-
-
-prontera.gat,140,172,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,
- 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;
- delitem 609,100;//Items: Amulet,
- delitem 978,1;//Items: Cobaltblue Dyestuff,
- delitem 2264,1; //Items: Munak Hat,
- 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;
-}
-
-prontera.gat,143,172,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,
- 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;
- delitem 5041,1;//Items: Heart Hairpin,
- delitem 999,10; //Items: Steel,
- 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;
-}
-
-prontera.gat,141,172,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,
- 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;
- delitem 10007,1;//Items: Silk Ribbon,
- delitem 10009,1; //Items: Wild Flower,
- 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,
- 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;
- delitem 999,10;//Items: Steel,
- delitem 948,200; //Items: Bears Footskin,
- 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;
-}
-
-prontera.gat,142,172,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,
- 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;
- delitem 741,1;//Items: Poring Doll,
- delitem 909,300;//Items: Jellopy,
- 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,
- 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;
- delitem 999,1;//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 "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:
- enablenpc "Zac";
- end;
-}
-
-- script EDJac -1,{
-OnInit:
-OnMinute30:
- disablenpc "Jac";
- end;
-OnMinute16:
- enablenpc "Jac";
- end;
-}
-
-- script EDPac -1,{
-OnInit:
-OnMinute45:
- disablenpc "Pac";
- end;
-OnMinute31:
- enablenpc "Pac";
- end;
-}
-
-- script EDBlac -1,{
-OnInit:
-OnMinute00:
- disablenpc "Blac";
- end;
-OnMinute46:
- enablenpc "Blac";
- end;
-}
+//===== eAthena Script =======================================
+//= Custom Quest For New Headgears
+//===== By: ==================================================
+//= RedxSwordxHero, Lupus
+//===== Current Version: =====================================
+//= 1.2
+//===== 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]
+//============================================================
+
+
+prontera.gat,140,172,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,
+ 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;
+ delitem 609,100;//Items: Amulet,
+ delitem 978,1;//Items: Cobaltblue Dyestuff,
+ delitem 2264,1; //Items: Munak Hat,
+ 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;
+}
+
+prontera.gat,143,172,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,
+ 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;
+ delitem 5041,1;//Items: Heart Hairpin,
+ delitem 999,10; //Items: Steel,
+ 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;
+}
+
+prontera.gat,141,172,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,
+ 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;
+ delitem 10007,1;//Items: Silk Ribbon,
+ delitem 10009,1; //Items: Wild Flower,
+ 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,
+ 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;
+ delitem 999,10;//Items: Steel,
+ delitem 948,200; //Items: Bears Footskin,
+ 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;
+}
+
+prontera.gat,142,172,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,
+ 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;
+ delitem 741,1;//Items: Poring Doll,
+ delitem 909,300;//Items: Jellopy,
+ 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,
+ 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;
+ delitem 999,1;//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 "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:
+ enablenpc "Zac";
+ end;
+}
+
+- script EDJac -1,{
+OnInit:
+OnMinute30:
+ disablenpc "Jac";
+ end;
+OnMinute16:
+ enablenpc "Jac";
+ end;
+}
+
+- script EDPac -1,{
+OnInit:
+OnMinute45:
+ disablenpc "Pac";
+ end;
+OnMinute31:
+ enablenpc "Pac";
+ end;
+}
+
+- script EDBlac -1,{
+OnInit:
+OnMinute00:
+ disablenpc "Blac";
+ end;
+OnMinute46:
+ enablenpc "Blac";
+ end;
+}
diff --git a/npc/quests/custom/kahohorn.txt b/npc/quests/custom/kahohorn.txt
index d0dfbf082..9891ed62d 100644
--- a/npc/quests/custom/kahohorn.txt
+++ b/npc/quests/custom/kahohorn.txt
@@ -26,6 +26,7 @@ geffen.gat,115,107,5 script Lord Kaho's Servant 61,{
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.";
diff --git a/npc/quests/custom/new_hats.txt b/npc/quests/custom/new_hats.txt
index bdbbb93c7..8c4b88bc2 100644
--- a/npc/quests/custom/new_hats.txt
+++ b/npc/quests/custom/new_hats.txt
@@ -1,13 +1,19 @@
//===== eAthena Script =======================================
-//= The 32 New Hats
+//= The 32 New Hats (custom)
//===== By: ==================================================
//= Darkchild
//===== Current Version: =====================================
-//= 1.4
+//= 1.5
//===== Compatible With: =====================================
//= eAthena 1.0
//===== Description: =========================================
-//= 4 brothers give you quests to get 32 new hats
+//=
+//= Don't use these NPC, there are separate quests for these
+//= items in quests/newgear/ folder
+//=
+//= And some of these items have made-up ingredients
+//= 4 brothers give you quests to get 32 new hats
+//=
//===== Additional Comments: =================================
//= There are 2 scripts for these 32 'new' hats.
//= The other one doesnt have all the new ones and has some old ones
@@ -17,6 +23,7 @@
//= 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]
+//= 1.5 Fixed Posture Fix Hat (Campus Hat).
//============================================================
prontera.gat,140,172,5 script Zac 704,{
mes "[Zac]";
@@ -25,21 +32,21 @@ prontera.gat,140,172,5 script Zac 704,{
mes "I provide 8 hats and my brothers provides the other 24.";
mes "What hat do you want me to make?";
next;
- menu "Attitude Campus Hat",L1_1,"Fox Mask",L1_2,"X Cross Hairpin",L1_3,"Flower Hair Pin",L1_4,"Tulip Hair Pin",L1_5,"Mushroom Hairband",L1_6,"Troublesome Raccoon Doll",L1_7,"Blue Fish",L1_8;
+ menu "Posture Fix Hat",L1_1,"Fox Mask",L1_2,"X Cross Hairpin",L1_3,"Flower Hair Pin",L1_4,"Tulip Hair Pin",L1_5,"Mushroom Hairband",L1_6,"Troublesome Raccoon Doll",L1_7,"Blue Fish",L1_8;
L1_1:
mes "[Zac]";
mes "Let me check the items you have brought here.";
next;
- if((countitem(2285)<1) && (countitem(1550)<1)) goto L_ITEM_1;//Items: Apple o' Archer, Book,
+ if((countitem(2285)<1) || (countitem(1550)<1)) goto L_ITEM_1;//Items: Apple o' Archer, Book,
mes "[Zac]";
mes "Wow!! Well done! Finally you have gathered all items needed!";
- mes "We will make the Attitude Campus Hat for you right away.";
+ mes "We will make the Posture Fix Hat for you right away.";
mes "Please Wait a Moment.";
next;
delitem 2285,1;//Items: Apple o' Archer,
delitem 1550,1;//Items: Book,
mes "[Zac]";
- mes "Tah Dah!!!^FF0000Attitude Campus Hat^000000...! Please Take it!";
+ mes "Tah Dah!!!^FF0000Posture Fix Hat^000000...! Please Take it!";
getitem 5073,1;//Items: Campus Hat,
next;
mes "[Zac]";
@@ -54,7 +61,7 @@ prontera.gat,140,172,5 script Zac 704,{
mes "about this?";
next;
mes "[Zac]";
- mes "Attitude Campus Hat requires~~";
+ mes "Posture Fix Hat requires~~";
next;
mes "[Zac]";
mes "1 Apple o' Archer";
diff --git a/npc/quests/juice_maker.txt b/npc/quests/juice_maker.txt
index 19819b759..c94d9234d 100644
--- a/npc/quests/juice_maker.txt
+++ b/npc/quests/juice_maker.txt
@@ -19,8 +19,7 @@
// Morrison ------------------------------------------------
-prt_in.gat,47,173,2 script Morrison 97,
-{
+prt_in.gat,47,173,2 script Morrison 97,{
mes "[Little Morrison]";
if(MEAT > 10) goto L_Candy;
if(MARIANNE == 1) goto L_GoAway;
@@ -110,8 +109,7 @@ L_Candy:
}
// Housewife Marianne ---------------------------------------------------
-prt_in.gat,49,172,2 script Housewife Marianne 53,
-{
+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;
@@ -183,8 +181,7 @@ L_Juice:
}
// Juicer Marx Hansen ---------------------------------------------------------
-payon_in01.gat,5,48,7 script Juicer Marx Hansen 86,
-{
+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?";
diff --git a/npc/quests/monstertamers.txt b/npc/quests/monstertamers.txt
index 3b6868aee..ef20c4027 100644
--- a/npc/quests/monstertamers.txt
+++ b/npc/quests/monstertamers.txt
@@ -16,8 +16,7 @@
//<================================================= Alberta ===============================================>\\
-alberta_in.gat,173,77,3 script Monster Tamer 125,
-{
+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:
@@ -130,8 +129,7 @@ M_Menu:
//<================================================= Al De Baran ===============================================>\\
-aldeba_in.gat,167,177,3 script Monster Tamer 125,
-{
+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:
@@ -328,8 +326,7 @@ M_Menu:
//<================================================= Izlude ===============================================>\\
-izlude_in.gat,128,64,3 script Monster Tamer 125,
-{
+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:
diff --git a/npc/quests/mrsmile.txt b/npc/quests/mrsmile.txt
index 7a145ac1f..1f2bdb309 100644
--- a/npc/quests/mrsmile.txt
+++ b/npc/quests/mrsmile.txt
@@ -15,8 +15,7 @@
// Alberta ------------------------------------------------------------------------------------------
-alberta.gat,113,53,3 script Smile Assistance::SmileAT 92,
-{
+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;
diff --git a/npc/quests/newgears/arjen.txt b/npc/quests/newgears/arjen.txt
new file mode 100644
index 000000000..96d854b22
--- /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.3
+//===== 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]
+//============================================================
+
+//86
+geffen.gat,128,148,6 script Arjen 807,{
+ mes "[Arjen]";
+ mes "What item information do you require?";
+ next;
+ menu "X-Shaped Hairpin.",M_1,"Bandage",M_2,"Flower Hairpin.",M_3,"Quit.",M_EXIT;
+M_1:
+ 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(10011) < 1) || (countitem(7220) < 400)) GOTO L_NOITEM1;//Items: Stellar Hairpin, Ectoplasm,
+ mes "[Arjen]";
+ mes "Yes, that's just what I require!";
+ mes "Nayayayaaaaaa!";
+ delitem 10011,1;//Items: Stellar Hairpin,
+ delitem 7220,400;//Items: Ectoplasm,
+ 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 Hairpin for its spacial properties.";
+ mes "And I need 400 Ectoiplasm to give it its 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,
+ mes "[Arjen]";
+ mes "Wow! You have the stuff I need! Thanks!";
+ mes "Lemme do a swap, your stuff for the bandage";
+ delitem 930,500;//Items: Rotten Bandage,
+ delitem 970,1;//Items: Alcohol,
+ 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.",M_REQ3,"No, thanks.",M_EXIT;
+
+L_NOITEM3:
+ mes "[Arjen]";
+ mes "Sorry, but you don't have the correct items.";
+ next;
+
+M_REQ3:
+ 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,
+ mes "[Arjen]";
+ mes "Thanks!";
+ delitem 2269,1;//Items: Romantic Flower,
+ delitem 999,10;//Items: Steel,
+ set Zeny,Zeny-20000;
+ next;
+ getitem 5061,1;//Items: Flower Hairpin,
+ mes "[Arjen]";
+ mes "Enjoy!";
+ close;
+
+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..ae61a0560
--- /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,
+ mes "[Netpia]";
+ mes "Wow, thank you! Let me just take your items.";
+ delitem 2244,1;//Items: Big Ribbon,
+ delitem 2209,1;//Items: Ribbon,
+ delitem 10007,1;//Items: Silk Ribbon,
+ 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..674ba9956
--- /dev/null
+++ b/npc/quests/newgears/bear_hat.txt
@@ -0,0 +1,68 @@
+//===== eAthena Script =======================================
+//= Bear Hat Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== 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]
+//============================================================
+
+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(7167) < 300)) GOTO L_NOITEM;//Items: Panda Hat, Pin Cusion, Spool of Thread, Strange Piece of Iron,
+ mes "[Bora]";
+ mes "Yay! now I can make my famous Bear Hat!";
+ mes "Now, give me your items!";
+ delitem 5030,1;//Items: Panda Hat,
+ delitem 7213,100;//Items: Pin Cusion,
+ delitem 7217,100;//Items: Spool of Thread,
+ delitem 7167,300;//Items: Strange Piece of Iron,
+ 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 Pin Cusion,";
+ mes "100 Spool of Thread";
+ mes "300 Strange Pieces of Iron.";
+ next;
+ mes "[Bora]";
+ mes "For the Pin Cusion (Stabbing Needles) 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..2d2b89a77
--- /dev/null
+++ b/npc/quests/newgears/burning_blood_bandana.txt
@@ -0,0 +1,65 @@
+//===== eAthena Script =======================================
+//= Burning Blood Bandana Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== 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 [Lupus]
+//============================================================
+
+
+yuno.gat,301,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 Scarf, Burning Heart, White Dyestuff, Bandana,
+ mes "[Genbolt]";
+ mes "Very well, here you go.";
+ delitem 7216,300;//Items: Red Scarf,
+ delitem 7097,300;//Items: Burning Heart,
+ delitem 982,1;//Items: White Dyestuff,
+ delitem 2211,1;//Items: Bandana,
+ 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 Scarfs,";
+ 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..d23f10a93
--- /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,
+ mes "[KoneKone]";
+ mes "Wow! thankies! I will now take your items!";
+ delitem 2213,1;//Items: Kitty Band,
+ delitem 914,200;//Items: Fluff,
+ delitem 983,1;//Items: Black Dyestuff,
+ set Zeny,Zeny-10000;
+ 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..7f6a5eb89
--- /dev/null
+++ b/npc/quests/newgears/fox_mask.txt
@@ -0,0 +1,57 @@
+//===== eAthena Script =======================================
+//= Fox Mask Quest
+//===== By: ==================================================
+//= KitsuneStarWind (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any eAthena version.
+//===== Description: =========================================
+// Seperate quest for the Fox Mask.
+//===== Additional Comments: =================================
+// 1.2 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,
+ next;
+ 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..d71005d4e
--- /dev/null
+++ b/npc/quests/newgears/hat_seller.txt
@@ -0,0 +1,143 @@
+//===== eAthena Script =======================================1
+//= Hat Seller (New Hat Quests)
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.2
+//===== 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]
+//============================================================
+
+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",M_1,"Straw Hat",M_2,"Cowboy Hat",M_3,"Sombrero",M_4,"Furry Hat",M_5,"Quit",M_EXIT;
+
+M_1:
+ 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 Healthy Branch,";
+ mes "300 Bamboo Trunk.";
+ 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(7203) < 300) || (countitem(7150) < 300)) GOTO L_NOITEM;//Items: Sakkat, Healthy Branch, Bamboo Trunk,
+ delitem 2280,1;//Items: Sakkat,
+ delitem 7203,300;//Items: Healthy Branch,
+ 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 Slotted Cap,";
+ mes "300 Skin of the Black Bear.";
+ next;
+ mes "[Hat Seller]";
+ mes "Bring those, and we got a deal.";
+ mes "You got them?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if ((countitem(2227) < 1) || (countitem(7161) < 300)) GOTO L_NOITEM;//Items: Cap, Bear Skin,
+ delitem 2227,1;//Items: Cap,
+ delitem 7161,300;//Items: Bear Skin,
+ 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..a98eb8dd4
--- /dev/null
+++ b/npc/quests/newgears/indian_headband.txt
@@ -0,0 +1,57 @@
+//===== eAthena Script =======================================
+//= Indian Headband Quest
+//===== By: ==================================================
+//= Halca (1.0), Mass Zero (1.1)
+//= Lupus (1.2)
+//===== Current Version: =====================================
+//= 1.3
+//===== 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]
+//============================================================
+
+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 Hair Band,";
+ 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(2210) < 1) || (Zeny < 10000)) GOTO L_NOITEM;//Items: Peco Feather, Striped Bandana, Hair Band,
+ delitem 2210,1;//Items: Hair Band,
+ 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..ede29d3be
--- /dev/null
+++ b/npc/quests/newgears/mask_of_alarm.txt
@@ -0,0 +1,53 @@
+//===== eAthena Script =======================================
+//= Mask of Alarm Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== 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]
+//============================================================
+
+aldebaran.gat,236,235,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 a Alarm Mask,";
+ mes "bring me 300,000 Zeny,";
+ mes "and 1 Monster Oxygen Mask.";
+ next;
+ mes "[Muslam]";
+ mes "Got these?";
+ next;
+ menu "Yep!",-,"Nope!",M_EXIT;
+
+ if ((countitem(10002) < 1) || (Zeny < 300000)) GOTO L_NOITEM;//Items: Monster Oxygen Mask,
+ mes "[Muslam]";
+ mes "Great!";
+ delitem 10002,1;//Items: Monster Oxygen Mask,
+ set Zeny,Zeny-300000;
+ next;
+ getitem 5086,1;//Items: Alarm Mask,
+ mes "[Muslam]";
+ mes "Enjoy your item!";
+ close;
+
+L_NOITEM:
+ mes "[Muslam]";
+ mes "Where is 1 Monster Oxygen Mask and 300,000 Zeny?";
+ close;
+
+M_EXIT:
+ mes "[Muslam]";
+ mes "Mkay! byeee.";
+ close;
+}
diff --git a/npc/quests/newgears/mushroom_hairband.txt b/npc/quests/newgears/mushroom_hairband.txt
new file mode 100644
index 000000000..71e07a244
--- /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 (Class == 0) 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,
+ mes "[Aipo]";
+ mes "Wow! Thanks! Lemme make the item then.";
+ delitem 921,300;//Items: Mushroom Spore,
+ 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..5809141ef
--- /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.3
+//===== 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 [Lupus]
+//============================================================
+
+yuno.gat,353,282,7 script Neris 806,{
+ mes "[Neris]";
+ mes "So, whatcha want then?";
+ next;
+ menu "Golden Bells.",M_LGB,"Crown of Mistress.",M_COM,"Crown of Ancient Queen.",M_COAQ,"Nothing, thanks.",M_EXIT;
+
+M_LGB:
+ 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,
+ mes "[Neris]";
+ mes "Now, lets swap your items.";
+ delitem 10016,1;//Items: Golden Bell,
+ delitem 714,1;//Items: Emperium,
+ delitem 969,3;//Items: Gold,
+ set Zeny,Zeny-1000;
+ 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,
+ mes "[Neris]";
+ mes "Now, lets swap your items.";
+ delitem 2249,1;//Items: Coronet,
+ delitem 714,1;//Items: Emperium,
+ delitem 969,3;//Items: Gold,
+ set Zeny,Zeny-1000;
+ 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,
+ mes "[Neris]";
+ mes "Now, lets swap your items";
+ delitem 10006,1;//Items: Queen's Hair Ornament,
+ delitem 714,1;//Items: Emperium,
+ delitem 969,3;//Items: Gold,
+ set Zeny,Zeny-1000;
+ 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/old_blacksmith.txt b/npc/quests/newgears/old_blacksmith.txt
new file mode 100644
index 000000000..d2fbde87a
--- /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.3
+//===== 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 [Lupus]
+//============================================================
+
+yuno.gat,246,51,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,
+ mes "[Old Blacksmith]";
+ mes "Wow, never thought a little fella like you could get tha.t";
+ mes "Bwahaha, ok.";
+ delitem 2255,1;//Items: Evil Wing,
+ delitem 2286,1;//Items: Elven Ears,
+ set Zeny,Zeny-20000;
+ 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,
+ mes "[Old Blacksmith]";
+ mes "Well well well! Someone who has the spirit!";
+ mes "Okay, gimme the items.";
+ delitem 2286,1;//Items: Elven Ears,
+ delitem 2254,1;//Items: Angel Wing,
+ set Zeny,Zeny-20000;
+ 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/posture_fix_hat.txt b/npc/quests/newgears/posture_fix_hat.txt
new file mode 100644
index 000000000..d234e64f6
--- /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 (Class == 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,
+ mes "[Nan Hyang]";
+ mes "Ahh at last, someone who is serious!";
+ delitem 1550,1;//Items: Book,
+ delitem 2285,1;//Items: Apple o' Archer,
+ 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..4e31273d7
--- /dev/null
+++ b/npc/quests/newgears/sea_otter_hat.txt
@@ -0,0 +1,54 @@
+//===== eAthena Script =======================================
+//= Sea Otter Hat Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== 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]
+//============================================================
+
+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 Lazy Racoon Hat,";
+ mes "1 Transformation Leaf";
+ next;
+ mes "[Pretty Rency]";
+ mes "Do you have these items?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if ((countitem(5084) < 1) || (countitem(5064) < 1)) GOTO L_NOITEM;//Items: Lazy Racoon Hat, Transformation Leaf,
+ mes "[Pretty Rency]";
+ mes "Congratulations!";
+ delitem 5084,1;//Items: Lazy Racoon Hat,
+ delitem 5064,1;//Items: Transformation Leaf,
+ 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;
+}
diff --git a/npc/quests/newgears/traveler.txt b/npc/quests/newgears/traveler.txt
new file mode 100644
index 000000000..a31177ad1
--- /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.4
+//===== 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]
+//============================================================
+
+morocc.gat,274,79,6 script Traveler 807,{
+ mes "[Traveler]";
+ if (Class == 0) GOTO L_NOVICE;
+ mes "What kind of hat do you want from me?";
+ next;
+ menu "Lazy Racoon Hat.",M_N1,"Fresh Bluish Fish",M_N2,"Drooping Cat",M_N3,"Transformation Leaf",M_N4,"Nothing.",M_EXIT;
+
+M_N1:
+ 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,
+ mes "[Traveler]";
+ mes "Well, then here is your item";
+ delitem 1026,1000;//Items: Acorn,
+ delitem 7065,100;//Items: Sea Otter Fur,
+ delitem 945,10;//Items: Raccoon Leaf,
+ 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,
+ mes "[Traveler]";
+ mes "Okay, thanks.";
+ 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,
+ 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,
+ mes "[Traveler]";
+ mes "Okay, here you are.";
+ delitem 2233,1;//Items: Circlet,
+ delitem 983,1;//Items: Black Dyestuff,
+ delitem 7206,300;//Items: Black Cat Doll,
+ 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,
+ mes "[Traveler]";
+ mes "Thanks. here's your leaf.";
+ delitem 945,600;//Items: Raccoon 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..8f6b2ebfa
--- /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 (Class == 0) 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,
+ mes "[Ses]";
+ mes "Yay! thanks! Pineapple!";
+ mes "Here you go!";
+ delitem 2278,1;//Items: Mr. Smile,
+ delitem 975,1;//Items: Scarlet Dyestuffs,
+ 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/quests_alberta.txt b/npc/quests/quests_alberta.txt
index 5c30668b8..4cab7bb9c 100644
--- a/npc/quests/quests_alberta.txt
+++ b/npc/quests/quests_alberta.txt
@@ -23,9 +23,7 @@
//=======================================================================================================//
// Doll Quest
//=======================================================================================================//
-alberta.gat,117,134,8 script Elin 96,
-{
-
+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?";
@@ -382,8 +380,7 @@ alberta_in.gat,122,53,4 script Cherokee 47,{
//=======================================================================================================//
// Bao Bao, Cresent Hairpin, Fashionbale Glasses, Heart Hairpin
//=======================================================================================================//
-alberta.gat,120,53,3 script Zic 51,
-{
+alberta.gat,120,53,3 script Zic 51,{
mes "[Zic]";
mes "Yay! A cool breeze! That's why I love the sea!!";
emotion 2;
@@ -503,8 +500,7 @@ alberta.gat,120,53,3 script Zic 51,
//=======================================================================================================//
// Hat of Sun God, Sunday Hat, Mage Hat, Magician Hat
//=======================================================================================================//
-alberta.gat,135,79,3 script Tempestra 71,
-{
+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;
diff --git a/npc/quests/quests_comodo.txt b/npc/quests/quests_comodo.txt
index 37e8d8d01..3bef59926 100644
--- a/npc/quests/quests_comodo.txt
+++ b/npc/quests/quests_comodo.txt
@@ -21,8 +21,7 @@
//============================================================================================//
// Cross Hat, Bulb Hairband, Striped Hairband, Blue Hairband
//==================================================
-comodo.gat,227,158,4 script Hair Ornament Girl 700,
-{
+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.";
@@ -117,8 +116,7 @@ M_Menu:
//===================================================================================================//
// 'Mine Helmet', 'Parcel Hat', 'Money Loser's Grief', 'Phantom of the Opera Mask'
//===============================================================//
-comodo.gat,274,137,5 script Mari Isac 702,
-{
+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";
diff --git a/npc/quests/quests_payon.txt b/npc/quests/quests_payon.txt
index f59cd3c15..101d26e9f 100644
--- a/npc/quests/quests_payon.txt
+++ b/npc/quests/quests_payon.txt
@@ -220,8 +220,7 @@ L_GotOra:
//========================================================================================//
// Derivuchi Cap(Hat of Petite Diablo), Helm of Angel
//========================================================================================//
-payon_in01.gat,56,12,4 script Young Man 89,
-{
+payon_in01.gat,56,12,4 script Young Man 89,{
mes "[Young Man]";
mes "What is it?............";
next;
diff --git a/npc/quests/quests_prontera.txt b/npc/quests/quests_prontera.txt
index b1cb63512..0948a55ab 100644
--- a/npc/quests/quests_prontera.txt
+++ b/npc/quests/quests_prontera.txt
@@ -15,8 +15,7 @@
// Ph.D Hat Quest-------------------------------------------------------
-prt_in.gat,38,108,4 script Teacher 53,
-{
+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;
diff --git a/npc/quests/quests_yuno.txt b/npc/quests/quests_yuno.txt
index 7bde004be..25d74cf99 100644
--- a/npc/quests/quests_yuno.txt
+++ b/npc/quests/quests_yuno.txt
@@ -17,8 +17,7 @@
//===========================================================================
-yuno_in01.gat,103,158,4 script Bain 98,
-{
+yuno_in01.gat,103,158,4 script Bain 98,{
set @name$, "[Bain]";
OnStart:
diff --git a/npc/quests/skills/acolyte_skills.txt b/npc/quests/skills/acolyte_skills.txt
index 795df5d90..13d13503f 100644
--- a/npc/quests/skills/acolyte_skills.txt
+++ b/npc/quests/skills/acolyte_skills.txt
@@ -14,8 +14,7 @@
//============================================================
-prt_church.gat,173,23,4 script Acolyte Klift 79,
-{
+prt_church.gat,173,23,4 script Acolyte Klift 79,{
mes "[Acolyte Klift]";
if (callfunc("Is_Holy_Class")) goto L_Start;
diff --git a/npc/quests/skills/archer_skills.txt b/npc/quests/skills/archer_skills.txt
index 3839ab777..9918bed94 100644
--- a/npc/quests/skills/archer_skills.txt
+++ b/npc/quests/skills/archer_skills.txt
@@ -19,8 +19,7 @@
//<======================== Roberto: Arrow crafting =========================>\\
-morocc.gat,121,109,5 script Roberto 88,
-{
+morocc.gat,121,109,5 script Roberto 88,{
mes "[Roberto]";
if (callfunc("Is_Bow_Class")) goto L_Start;
@@ -143,8 +142,7 @@ L_LowLvl:
//<============================== Arrow Repel ===============================>\\
-payon.gat,190,176,5 script Jason 88,
-{
+payon.gat,103,63,5 script Jason 88,{
mes "[Jason]";
if (callfunc("Is_Bow_Class")) goto L_Start;
diff --git a/npc/quests/skills/mage_skills.txt b/npc/quests/skills/mage_skills.txt
index 9bcb2e5e9..101b02a1d 100644
--- a/npc/quests/skills/mage_skills.txt
+++ b/npc/quests/skills/mage_skills.txt
@@ -15,8 +15,7 @@
-geffen_in.gat,151,119,4 script BLIZZARDRISS 71,
-{
+geffen_in.gat,151,119,4 script BLIZZARDRISS 71,{
mes "[BLIZZARDRISS]";
if(callfunc("Is_Magic_Class")) goto L_Start;
diff --git a/npc/quests/skills/merchant_skills.txt b/npc/quests/skills/merchant_skills.txt
index 958e3b7e7..454c4b6d8 100644
--- a/npc/quests/skills/merchant_skills.txt
+++ b/npc/quests/skills/merchant_skills.txt
@@ -19,16 +19,14 @@
//--------------------------------------- Necko: Crazy Uproar--------------------------------\\
-alberta.gat,89,96,5 script Necko 139,0,4,
-{
+alberta.gat,89,96,5 script Necko 139,0,4,{
mes "[!?]";
mes "Muahahahahhhahahahahhahah!!";
mes "Pukakakakakkakakakakakakaka!!";
close;
}
-alberta.gat,83,96,5 script Necko 98,
-{
+alberta.gat,83,96,5 script Necko 98,{
mes "[Necko]";
if (callfunc("Is_Merc_Class")) goto L_Start;
@@ -118,8 +116,7 @@ L_GotSkill:
//----------------------------------------- Charlron: Change cart ---------------------------------\\
-alberta.gat,119,221,6 script Charlron 107,
-{
+alberta.gat,119,221,6 script Charlron 107,{
mes "[Charlron]";
if (callfunc("Is_Merc_Class")) goto L_Start;
L_Other:
@@ -180,8 +177,7 @@ L_GotSkill:
//-------------------------====-------- Gershuan: Cart Revolution ---------------------------------\\
-alberta.gat,232,106,6 script Gershaun 57,
-{
+alberta.gat,232,106,6 script Gershaun 57,{
if (callfunc("Is_Merc_Class")) goto L_Start;
L_Other:
diff --git a/npc/quests/skills/novice_skills.txt b/npc/quests/skills/novice_skills.txt
index 85a565142..9f7d91595 100644
--- a/npc/quests/skills/novice_skills.txt
+++ b/npc/quests/skills/novice_skills.txt
@@ -16,8 +16,7 @@
//<---------------------------------------------------------------------------------------------- Nurse Aid: First Aid NPC ---------------------------------------------------------------------------->\\
-prt_in.gat,235,133,4 script Nurse Aid 90,
-{
+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;
@@ -91,8 +90,7 @@ L_GotAid:
//<-------------------------------------------------------------------------------------------------- Bulma: Play Dead -------------------------------------------------------------------------------------------->\\
-prt_in.gat,73,87,2 script Bulma 98,
-{
+prt_in.gat,73,87,2 script Bulma 98,{
mes "[Bulma]";
if(Class == Job_Novice) goto L_Novice;
@@ -221,8 +219,7 @@ L_GotSkill:
//Newbie Assistant------------------------------------------------------------------------------
-prt_castle.gat,174,147,2 script Newbie Assistant 84,
-{
+prt_castle.gat,174,147,2 script Newbie Assistant 84,{
mes "[Newbie Assistant]";
if(Class == Job_Novice) goto L_Start;
diff --git a/npc/quests/skills/swordsman_skills.txt b/npc/quests/skills/swordsman_skills.txt
index df3331525..4558754b6 100644
--- a/npc/quests/skills/swordsman_skills.txt
+++ b/npc/quests/skills/swordsman_skills.txt
@@ -3,22 +3,22 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.0a
+//= 1.1
//===== 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.0a Now using functions found in "Global_Functions.txt"
+//= for class checks.
+//= 1.1 Added missing delitem [Lupus]
//============================================================
//<-------------------------------------- Fatal Blow------------------------------------>\\
-prt_in.gat,75,88,5 script Leon 85,
-{
+prt_in.gat,75,88,5 script Leon 85,{
mes "[Leon]";
if(callfunc("Is_Sword_Class")) goto L_Start;
if(Class == Job_Novice) goto L_Novice;
@@ -159,8 +159,7 @@ L_Done:
//<---------------------------------- Moving HP Recovery ---------------------------------->\\
-izlude_in.gat,175,130,2 script Knight De Thomas 98,
-{
+izlude_in.gat,175,130,2 script Knight De Thomas 98,{
mes "[Knight De Thomas]";
if(callfunc("Is_Sword_Class")) goto L_Start;
@@ -235,6 +234,8 @@ L_Check:
mes "Haha! You have just learned HP Moving Recovery!";
delitem 713,200;
delitem 1058,1;
+//-- Padded armor does not have to be deleted! --
+// delitem 2312,1;
skill 144,1,0;
set MOVHPREC, 0;
next;
@@ -261,8 +262,7 @@ L_Check:
//<----------------------------------------- Auto-Berserk --------------------------------->\\
-prt_in.gat,94,57,3 script Juan 85,
-{
+prt_in.gat,94,57,3 script Juan 85,{
mes "[Juan]";
if(callfunc("Is_Sword_Class")) goto L_Start;
diff --git a/npc/quests/skills/thief_skills.txt b/npc/quests/skills/thief_skills.txt
index 039be7621..e3311c00a 100644
--- a/npc/quests/skills/thief_skills.txt
+++ b/npc/quests/skills/thief_skills.txt
@@ -21,8 +21,7 @@
//======================================================================================================
-moc_prydb1.gat,154,128,4 script Alcouskou 118,
-{
+moc_prydb1.gat,154,128,4 script Alcouskou 118,{
mes "[Alcouskou]";
if(callfunc("Is_Thief_Class")) goto L_Start;
if(Class==Job_Novice) goto L_Novice;
@@ -330,8 +329,7 @@ L_Fling:
//====================================================================================
-payon.gat,149,120,4 script RuRumuni 99,
-{
+payon.gat,91,77,4 script RuRumuni 99,{
mes "[RuRumuni]";
if(SANDATTACK == 1 && BAGNFNTY != 2) goto L_Start;
diff --git a/npc/sample/PCLoginEvent.txt b/npc/sample/PCLoginEvent.txt
index d668c0960..707398277 100644
--- a/npc/sample/PCLoginEvent.txt
+++ b/npc/sample/PCLoginEvent.txt
@@ -26,8 +26,28 @@
// 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
index 6a9bfe08d..84a5e599d 100644
--- a/npc/sample/bank_test.txt
+++ b/npc/sample/bank_test.txt
@@ -1,18 +1,18 @@
-// ƒJƒvƒ‰‹âsƒT[ƒrƒX ƒeƒXƒgƒXƒNƒŠƒvƒg
-prontera.gat,162,188,1 script ‹âsˆõƒJƒvƒ‰ 112,{
+// Bank Test
+prontera.gat,162,188,1 script Bank Test 112,{
cutin "kafra_06",2;
- mes"[‹âsˆõƒJƒvƒ‰]";
- mes "ƒJƒvƒ‰‹âsƒT[ƒrƒX‚Å‚·B";
- mes "–ˆ“x‚²—˜—p‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚·ô";
- mes "1000z‚©‚ç‚Å‚Ì‚²—˜—p‚É‚È‚è‚Ü‚·B";
+ 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 "—a‚¯‚é",BANK_IN,"ˆø‚«o‚·",BANK_OUT,"‚â‚Á‚Ï‚â‚ß‚é",B_EXIT2;
+ menu "Deposit",BANK_IN,"Withdraw",BANK_OUT,"Exit",B_EXIT2;
BANK_IN:
- mes"[‹âsˆõƒJƒvƒ‰]";
- mes "—a‚¯‚é‹àŠz‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢ô";
- mes "‚¿‚È‚Ý‚ÉAŽè”—¿‚Æ‚µ‚Ä";
- mes "—a‚©‚è‹à‚Ì1%’¸‚«‚Ü‚·B";
+ 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;
@@ -21,15 +21,15 @@ BANK_IN:
if(@kafrabank+@kafrabank2>Zeny) goto BANK_F;
set Zeny,Zeny-@kafrabank-@kafrabank2;
set #kafrabank,#kafrabank+@kafrabank;
- mes "Žè”—¿^135445" + @kafrabank2 + "z^000000’¸‚«‚Ü‚·‚ËB";
+ mes "You now have: ^135445" + @kafrabank2 + "z^000000";
goto B_EXIT;
BANK_OUT:
if(#kafrabank==0) goto BANK_F2;
- mes"[‹âsˆõƒJƒvƒ‰]";
- mes "Œ»Ý‚ ‚È‚½‚©‚炨—a‚©‚肵‚Ä‚¢‚é‚Ì‚Í";
- mes "^135445" + #kafrabank + "^000000Zeny‚Å‚·B";
- mes "ˆø‚«o‚·‹àŠz‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢ô";
+ 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;
@@ -41,19 +41,18 @@ BANK_OUT:
goto B_EXIT;
BANK_F:
- mes"[‹âsˆõƒJƒvƒ‰]";
- mes "Ž‚¿‹à‚ª‘«‚è‚È‚¢‚悤‚Å‚·‚ËB";
+ mes "[Bank Test]";
+ mes "You can't withdraw more than ^135445"+ #kafrabank + "^000000z.";
goto B_EXIT2;
BANK_F2:
- mes"[‹âsˆõƒJƒvƒ‰]";
- mes "‚ ‚È‚½‚©‚ç‚ÍA1z‚à";
- mes "‚¨—a‚©‚肵‚Ä‚¢‚È‚¢‚Å‚·‚æH";
+ mes "[Bank Test]";
+ mes "Your account is empty, you may not withdraw at this time.";
goto B_EXIT2;
B_EXIT:
- mes "–³Ž–‚ÉŽæ‚èˆø‚«‚Å‚«‚Ü‚µ‚½B";
+ mes "Thanks for using depositing";
B_EXIT2:
- mes "‚Ü‚½‚Ì‚²—˜—p‚ð‚¨‘Ò‚¿‚µ‚Ä‚¢‚Ü‚·ô";
+ mes "Good bye!";
cutin "kafra_06",255;
close;
}
diff --git a/npc/sample/npc_extend_shop.txt b/npc/sample/npc_extend_shop.txt
index 3f9f71c2d..41ea5c112 100644
--- a/npc/sample/npc_extend_shop.txt
+++ b/npc/sample/npc_extend_shop.txt
@@ -1,68 +1,60 @@
-//ƒŒƒAƒAƒCƒeƒ€‚m‚o‚bƒVƒ‡ƒbƒv
-
-
-
-// ƒAƒCƒeƒ€Œn
-prontera.gat,163,170,3 shop ‚‹‰‚ȃAƒCƒeƒ€‰® 75,507:-1,508:-1,509:-1,510:-1,514:-1,518:-1,533:-1,607:-1,608:-1,529:-1,530:-1,603:-1,604:-1,616:-1,617:-1,644:-1,724:-1,718:-1,714:-1,756:-1,757:-1,984:-1,985:-1,1002:-1,998:-1,999:-1,1003:-1,989:-1,713:-1,970:-1,971:-1,972:-1,7026:-1,7027:-1701:-1,968:-1,1029:-1,1030:-1,7034:-1,7035:-1,7036:-1,7047:-1
-
-
-
-// ‘•”õ@•ÐŽèŒ•
-prontera.gat,149,170,3 shop ‹†‹É‚̕Ў茕‰® 76,1108:-1,1111:-1,1114:-1,1120:-1,1125:-1,1127:-1,1128:-1,1130:-1,1131:-1,1132:-1,1133:-1,1134:-1,1135:-1,1136:-1,1137:-1,1138:-1,1139:-1,1140:-1,1141:-1,1144:-1,1145:-1
-// ‘•”õ@—¼ŽèŒ•
-prontera.gat,149,167,3 shop ‹†‹É‚Ì—¼ŽèŒ•‰® 76,1117:-1,1152:-1,1155:-1,1158:-1,1161:-1,1162:-1,1164:-1,1165:-1,1166:-1,1167:-1,1168:-1,1170:-1
-// ‘•”õ@’ZŒ•
-prontera.gat,149,164,3 shop ‹†‹É‚Ì’ZŒ•‰® 76,1202:-1,1205:-1,1208:-1,1211:-1,1214:-1,1220:-1,1223:-1,1226:-1,1227:-1,1228:-1,1229:-1,1231:-1,1232:-1,1233:-1,1234:-1,1236:-1,1237:-1,1239:-1
-// ‘•”õ@ƒJƒ^[ƒ‹
-prontera.gat,149,161,3 shop ‹†‹É‚̃Jƒ^[ƒ‹‰® 76,1251:-1,1253:-1,1255:-1,1256:-1,1257:-1,1258:-1,1259:-1,1260:-1,1261:-1
-// ‘•”õ@•€
-prontera.gat,149,158,3 shop ‹†‹É‚Ì•€‰® 76,1302:-1,1305:-1,1306:-1,1352:-1,1361:-1,1363:-1,1364:-1,1366:-1,1367:-1,1368:-1
-// ‘•”õ@‘„
-prontera.gat,149,155,3 shop ‹†‹É‚Ì‘„‰® 76,1402:-1,1405:-1,1408:-1,1413:-1,1414:-1,1415:-1,1417:-1,1455:-1,1461:-1,1464:-1,1466:-1,1467:-1,1468:-1,1469:-1,1470:-1,1471:-1
-// ‘•”õ@“ÝŠí
-prontera.gat,149,152,3 shop ‹†‹É‚̓݊퉮 76,1502:-1,1505:-1,1508:-1,1511:-1,1514:-1,1517:-1,1520:-1,1523:-1,1524:-1,1525:-1,1526:-1,1527:-1,1528:-1,1529:-1,1530:-1
-// ‘•”õ@–{
-prontera.gat,149,149,3 shop ‹†‹É‚Ì–{‰® 76,1550:-1,1551:-1,1552:-1,1553:-1,1554:-1,1555:-1,1556:-1,1557:-1,1558:-1
-// ‘•”õ@ñ
-prontera.gat,149,146,3 shop ‹†‹É‚Ìñ‰® 76,1602:-1,1605:-1,1608:-1,1611:-1,1613:-1,1614:-1,1615:-1,1472:-1,1473:-1
-// ‘•”õ@‹|
-prontera.gat,149,143,3 shop ‹†‹É‚Ì‹|‰® 76,1705:-1,1708:-1,1711:-1,1715:-1,1716:-1,1719:-1,1720:-1
-
-
-
-// ‘•”õ@“ª•”i‚r•t‚«j
-prontera.gat,162,167,5 shop ŽŠ‚‚Ì‚rŠ•‰® 77,2202:-1,2204:-1,2209:-1,2217:-1,2221:-1,2223:-1,2225:-1,2227:-1,2229:-1,2231:-1,2233:-1
-// ‘•”õ@“ª•”i‚r–³‚µ‚»‚Ì‚Pj
-prontera.gat,162,164,5 shop ŽŠ‚‚Ì•Ï‘••i‰®‚P 77,2207:-1,2210:-1,2213:-1,2214:-1,2215:-1,2230:-1,2234:-1,2235:-1,2236:-1,2244:-1,2245:-1,2246:-1,2247:-1,2248:-1,2249:-1,2250:-1,2251:-1,2252:-1,2253:-1,2254:-1,2255:-1,2256:-1,2257:-1,2258:-1,2259:-1,2260:-1,2261:-1,2262:-1,2263:-1,2264:-1,2271:-1,2272:-1,2273:-1,2274:-1,2275:-1,2277:-1,2279:-1,2280:-1,2282:-1,2283:-1,2284:-1,2285:-1,2287:-1,2289:-1,2290:-1,2293:-1,2294:-1,2298:-1,2299:-1
-// ‘•”õ@“ª•”i‚r–³‚µ‚»‚Ì‚Qj
-prontera.gat,162,161,5 shop ŽŠ‚‚Ì•Ï‘••i‰®‚Q 77,5001:-1,5002:-1,5003:-1,5006:-1,5007:-1,5008:-1,5009:-1,5010:-1,5011:-1,5012:-1,5013:-1,5014:-1,5015:-1,5016:-1,5017:-1,5018:-1,5019:-1,5020:-1,5021:-1,5022:-1,5023:-1,5024:-1,5025:-1,5026:-1,5027:-1,5028:-1,5029:-1,5030:-1,5031:-1,5032:-1,5033:-1,5034:-1,5035:-1,5036:-1,5037:-1,5038:-1,5039:-1,5040:-1,5041:-1,5042:-1,5043:-1,5045:-1,5046:-1,5047:-1,5048:-1,5049:-1,5050:-1,5052:-1,5053:-1
-// ‘•”õ@“ª•”i’†’i•‰º’ij
-prontera.gat,162,158,5 shop ŽŠ‚‚Ì•Ï‘••i‰®‚R 77,2276:-1,2281:-1,2286:-1,2288:-1,2291:-1,2292:-1,2295:-1,2296:-1,2297:-1,5004:-1,5005:-1,5054:-1,2265:-1,2266:-1,2267:-1,2268:-1,2269:-1,2270:-1,5051:-1
-// ‘•”õ@ŠZ
-prontera.gat,162,155,5 shop ŽŠ‚‚ÌŠZ‰® 77,2311:-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
-// ‘•”õ@‚
-prontera.gat,162,152,5 shop ŽŠ‚‚Ì‚‰® 77,2102:-1,2104:-1,2106:-1,2108:-1,2109:-1
-// ‘•”õ@ŒC
-prontera.gat,162,149,5 shop ŽŠ‚‚ÌŒC‰® 77,2402:-1,2404:-1,2406:-1,2407:-1,2410:-1,2412:-1
-// ‘•”õ@ŠO“…
-prontera.gat,162,146,5 shop ŽŠ‚‚ÌŠO“…‰® 77,2502:-1,2504:-1,2506:-1,2507:-1,2508:-1,2509:-1
-// ‘•”õ@ƒAƒNƒZƒTƒŠ
-prontera.gat,162,143,5 shop ŽŠ‚‚̃AƒNƒZƒTƒŠ‰® 77,2601:-1,2602:-1,2603:-1,2604:-1,2605:-1,2607:-1,2610:-1,2615:-1,2616:-1,2617:-1,2618:-1,2619:-1,2620:-1,2621:-1,2622:-1,2623:-1,2624:-1,2625:-1,2626:-1,2629:-1,2631:-1
-
-
-
-// •Ší‚ÉŽh‚·ƒJ[ƒh
-prontera.gat,162,235,5 shop Å‹­‚Ì•ŠíƒJ[ƒh‰® 80,4002:-1,4004:-1,4006:-1,4018:-1,4025:-1,4026:-1,4019:-1,4029:-1,4043:-1,4017:-1,4020:-1,4024:-1,4037:-1,4055:-1,4057:-1,4076:-1,4096:-1,4104:-1,4005:-1,4030:-1,4049:-1,4062:-1,4065:-1,4069:-1,4085:-1,4130:-1,4007:-1,4035:-1,4060:-1,4063:-1,4068:-1,4080:-1,4094:-1,4111:-1,4118:-1,4140:-1,4082:-1,4092:-1,4126:-1,4072:-1,4086:-1,4106:-1,4115:-1,4117:-1,4121:-1,4125:-1,4134:-1,4137:-1,4142:-1,4147:-1
-// “ª‚É‘}‚·ƒJ[ƒh
-prontera.gat,149,235,3 shop Å‹­‚Ì“ªƒJ[ƒh‰® 80,4010:-1,4039:-1,4041:-1,4046:-1,4052:-1,4087:-1,4110:-1,4112:-1,4122:-1,4127:-1,4132:-1,4143:-1,4148:-1
-// ŠZ‚É‘}‚·ƒJ[ƒh
-prontera.gat,162,238,5 shop Å‹­‚ÌŠZƒJ[ƒh‰® 80,4001:-1,4003:-1,4008:-1,4011:-1,4014:-1,4016:-1,4021:-1,4023:-1,4031:-1,4078:-1,4047:-1,4054:-1,4089:-1,4098:-1,4099:-1,4101:-1,4114:-1,4119:-1,4141:-1,4042:-1,4061:-1,4105:-1,4135:-1
-// ‚‚É‘}‚·ƒJ[ƒh
-prontera.gat,149,238,3 shop Å‹­‚Ì‚ƒJ[ƒh‰® 80,4012:-1,4013:-1,4032:-1,4058:-1,4059:-1,4066:-1,4074:-1,4083:-1,4120:-1,4124:-1,4136:-1,4138:-1,4045:-1,4067:-1,4075:-1,4090:-1,4128:-1,4146:-1
-// Œ¨‚É‚©‚¯‚é‚à‚Ì‚É‘}‚·ƒJ[ƒh
-prontera.gat,162,241,5 shop Å‹­‚ÌŠO“…ƒJ[ƒh‰® 80,4056:-1,4071:-1,4081:-1,4095:-1,4108:-1,4109:-1,4113:-1,4116:-1,4133:-1,4015:-1,4088:-1,4102:-1,4129:-1
-// ŒC‚É‘}‚·ƒJ[ƒh
-prontera.gat,149,241,3 shop Å‹­‚ÌŒCƒJ[ƒh‰® 80,4009:-1,4038:-1,4050:-1,4070:-1,4097:-1,4100:-1,4107:-1,4123:-1,4131:-1
-// ƒAƒNƒZƒTƒŠ[‚É‘}‚·ƒJ[ƒh
-prontera.gat,162,244,5 shop Å‹­‚̃AƒNƒZƒTƒŠƒJ[ƒh‰® 80,4022:-1,4027:-1,4028:-1,4034:-1,4051:-1,4064:-1,4091:-1,4079:-1,4033:-1,4040:-1,4044:-1,4048:-1,4053:-1,4073:-1,4084:-1,4093:-1,4103:-1,4139:-1,4036:-1,4077:-1,4144:-1,4145:-1
+//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_test_npctimer2.txt b/npc/sample/npc_test_npctimer2.txt
new file mode 100644
index 000000000..d426e1e81
--- /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_str.txt b/npc/sample/npc_test_str.txt
index 77591a210..1c04927dd 100644
--- a/npc/sample/npc_test_str.txt
+++ b/npc/sample/npc_test_str.txt
@@ -1,17 +1,17 @@
-// •¶Žš—ñ•Ï”‚̃eƒXƒg
-prontera.gat,164,188,1 script •¶Žš—ñƒeƒXƒg 112,{
- set @str$, "•¶Žš—ñ‚P";
- mes "•¶Žš—ñ•Ï”F" + @str$ ;
- mes "Šm”FF" + @str$ + " ...OK?";
+// 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 "”äŠr`eqOKF" + (@str$=="•¶Žš—ñ‚P");
- mes "”äŠr`eqNGF" + (@str$=="•¶Žš—ñ");
- mes "”äŠr`neOKF" + (@str$!="00000");
- mes "”äŠr`neNGF" + (@str$!="•¶Žš—ñ‚P");
- mes "”äŠr`gtOKF" + ("aab">"aaa");
- mes "”äŠr`ltNGF" + ("aab"<"aaa");
+ 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 "“ü—̓f[ƒ^‚Í " + @str2$ + " ‚Å‚·B";
+ mes "You've entered '" + @str2$ + "' string.";
close;
}
diff --git a/npc/warps/cities/aldebaran.txt b/npc/warps/cities/aldebaran.txt
index 8523cf5a8..7376c21fa 100644
--- a/npc/warps/cities/aldebaran.txt
+++ b/npc/warps/cities/aldebaran.txt
@@ -15,7 +15,7 @@
//===== Al De Baran Warps =====================================
aldebaran.gat,118,63,0 warp ald01 1,1,aldeba_in.gat,211,117
-aldebaran.gat,138,34,0 warp ald001 2,2,mjolnir_12.gat,199,375
+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
diff --git a/npc/warps/cities/amatsu.txt b/npc/warps/cities/amatsu.txt
index 29a6c80af..7d19d5f70 100644
--- a/npc/warps/cities/amatsu.txt
+++ b/npc/warps/cities/amatsu.txt
@@ -18,13 +18,13 @@ 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,amatsu.gat,52,144
+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,99,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
@@ -46,7 +46,8 @@ 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,174,172
+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
-amatsu.gat,95,148,0 warp warp1990 1,1,ama_in01.gat,88,97
+//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/louyang.txt b/npc/warps/cities/louyang.txt
index c39a8dcf0..480d0a316 100644
--- a/npc/warps/cities/louyang.txt
+++ b/npc/warps/cities/louyang.txt
@@ -3,13 +3,14 @@
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version 6.0+
//===== Description: =========================================
//= Warp Points for Lou Yang
//===== Additional Comments: =================================
-//= No comment!
+//= 1.1 Added 2 escapes from 2 mountains 018,019 [Lupus]
+//= Some players used to stuck there after warps
//============================================================
//= Lou Yang Town ============================================
@@ -44,5 +45,5 @@ 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 louwarp018 3,3,louyang.gat,94,268
+lou_fild01.gat,181,171,0 warp louwarp019 3,3,lou_fild01.gat,194,169
diff --git a/npc/warps/cities/payon.txt b/npc/warps/cities/payon.txt
index 0d03800fe..78231e4ef 100644
--- a/npc/warps/cities/payon.txt
+++ b/npc/warps/cities/payon.txt
@@ -5,7 +5,7 @@
//= Darkchild (1.1)
//= Nana (1.3)
//===== Current Version: =====================================
-//= 1.3
+//= 1.3.1
//===== Compatible With: =====================================
//= Any eAthena Mod
//===== Description: =========================================
@@ -134,4 +134,4 @@ payon_in03.gat,27,172,0 warp payonwarp086 2,2,payon_in03.gat,27,157
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,103,71 \ No newline at end of file
+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/yuno.txt b/npc/warps/cities/yuno.txt
index 9232e7f88..402e506f7 100644
--- a/npc/warps/cities/yuno.txt
+++ b/npc/warps/cities/yuno.txt
@@ -13,7 +13,7 @@
//============================================================
//= Yuno City ================================================
-yuno.gat,158,15,0 warp yun-yunfild 1,1,yuno_fild04.gat,231,209
+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
diff --git a/npc/warps/dungeons/ant_hell.txt b/npc/warps/dungeons/ant_hell.txt
index f32615499..4d4d48bbf 100644
--- a/npc/warps/dungeons/ant_hell.txt
+++ b/npc/warps/dungeons/ant_hell.txt
@@ -19,7 +19,7 @@ anthell01.gat,35,267,0 script ant001 45,1,1,{
moc15: warp "moc_fild15.gat",251,248; break;
}
anthell02.gat,171,169,0 script ant001 45,1,2,{
- if(!anthell==0) goto moc15;
+ if(anthell==0) goto moc15;
moc04: warp "moc_fild04.gat",213,327; break;
moc15: warp "moc_fild15.gat",251,248; break;
}
diff --git a/npc/warps/einbroch.txt b/npc/warps/einbroch.txt
new file mode 100644
index 000000000..2ffe1b2c9
--- /dev/null
+++ b/npc/warps/einbroch.txt
@@ -0,0 +1,111 @@
+//Einbroch and Einbech warps by Sara - Semi-final 2
+//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_fild07.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 <-> Einbroch and Einbech
+ein_fild08.gat,164,381,0 warp ein009 1,1,einbroch.gat,150,26
+einbroch.gat,150,24,0 warp ein009a 1,1,ein_fild08.gat,164,379
+ein_fild09.gat,70,353,0 warp ein010 1,1,einbech.gat,62,31
+einbech.gat,62,29,0 warp ein010a 1,1,ein_fild09.gat,72,353
+
+//Dungeon Warps
+einbech.gat,139,253,0 warp ein011 1,1,ein_dun01.gat,22,17
+ein_dun01.gat,22,15,0 warp ein011a 1,1,einbech.gat,139,251
+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
+
+//Inside Warps
+ein_in01.gat,13,213,0 warp ein013 1,1,einbroch.gat,131,80
+einbroch.gat,133,80,0 warp ein013a 1,1,ein_in01.gat,15,213
+ein_in01.gat,110,267,0 warp ein014 1,1,einbroch.gat,204,120
+einbroch.gat,202,120,0 warp ein014a 1,1,ein_in01.gat,108,267
+ein_in01.gat,110,236,0 warp ein015 1,1,einbroch.gat,204,100
+einbroch.gat,202,100,0 warp ein015a 1,1,ein_in01.gat,108,236
+ein_in01.gat,80,199,0 warp ein016 1,1,einbroch.gat,178,71
+einbroch.gat,178,73,0 warp ein016a 1,1,ein_in01.gat,80,201
+ein_in01.gat,195,224,0 warp ein017 1,1,einbroch.gat,255,200
+einbroch.gat,257,200,0 warp ein017a 1,1,ein_in01.gat,197,224
+ein_in01.gat,211,232,0 warp ein018 1,1,ein_in01.gat,273,232
+ein_in01.gat,271,232,0 warp ein018a 1,1,ein_in01.gat,209,232
+ein_in01.gat,211,216,0 warp ein019 1,1,ein_in01.gat,273,218
+ein_in01.gat,271,218,0 warp ein019a 1,1,ein_in01.gat,209,216
+ein_in01.gat,181,277,0 warp ein020 1,1,ein_in01.gat,281,224
+ein_in01.gat,283,224,0 warp ein020a 1,1,ein_in01.gat,179,277
+ein_in01.gat,232,273,0 warp ein021 1,1,ein_in01.gat,274,244
+ein_in01.gat,274,246,0 warp ein021a 1,1,ein_in01.gat,232,275
+ein_in01.gat,273,273,0 warp ein022 1,1,ein_in01.gat,264,244
+ein_in01.gat,264,246,0 warp ein022a 1,1,ein_in01.gat,273,275
+ein_in01.gat,232,176,0 warp ein023 1,1,ein_in01.gat,264,205
+ein_in01.gat,264,203,0 warp ein023a 1,1,ein_in01.gat,232,174
+ein_in01.gat,274,176,0 warp ein024 1,1,ein_in01.gat,274,205
+ein_in01.gat,274,203,0 warp ein024a 1,1,ein_in01.gat,274,174
+
+//House with couches
+//- Bottom-left doorway
+//ein_in01.gat,11,147,0 warp ein025 1,1,mapname.gat,x,y
+//mapname.gat,x,y,0 warp ein025a 1,1,ein_in01.gat,13,147
+//- Top-right doorway
+//ein_in01.gat,26,131,0 warp ein026 1,1,mapname.gat,x,y
+//mapname.gat,x,y,0 warp ein026a 1,1,ein_in01.gat,26,133
+
+ein_in01.gat,145,152,0 warp ein027 1,1,einbech.gat,253,110
+einbech.gat,255,110,0 warp ein027a 1,1,ein_in01.gat,147,152
+ein_in01.gat,39,85,0 warp ein028 1,1,ein_in01.gat,37,36
+ein_in01.gat,39,36,0 warp ein028a 1,1,ein_in01.gat,37,85
+ein_in01.gat,14,13,0 warp ein029 1,1,einbroch.gat,255,109
+einbroch.gat,255,107,0 warp ein029a 1,1,ein_in01.gat,14,15
+
+//2 floor laboratory-ish house
+//- Left Exit
+//ein_in01.gat,103,95,0 warp ein030 1,1,mapname.gat,x,y
+//mapname.gat,x,y,0 warp ein030a 1,1,ein_in01.gat,105,95
+//- Right Exit
+//ein_in01.gat,120,77,0 warp ein031 1,1,mapname.gat,x,y
+//mapname.gat,x,y,0 warp ein031a 1,1,ein_in01.gat,120,79
+//- Elevator
+ein_in01.gat,126,88,0 warp ein032 1,1,ein_in01.gat,100,140
+ein_in01.gat,100,142,0 warp ein032a 1,1,ein_in01.gat,126,86
+
+//House
+//- Bottom-left doorway
+//ein_in01.gat,187,98,0 warp ein033 1,1,mapname.gat,x,y
+//mapname.gat,x,y,0 warp ein033a 1,1,ein_in01.gat,189,98
+//- Top-right doorway
+//ein_in01.gat,204,81,0 warp ein034 1,1,mapname.gat,x,y
+//mapname.gat,x,y,0 warp ein034a 1,1,ein_in01.gat,204,83
+
+ein_in01.gat,265,105,0 warp ein035 1,1,einbech.gat,143,112
+einbech.gat,145,112,0 warp ein035a 1,1,ein_in01.gat,267,105
+ein_in01.gat,288,89,0 warp ein036 1,1,einbech.gat,155,106
+einbech.gat,153,106,0 warp ein036a 1,1,ein_in01.gat,286,89
+ein_in01.gat,108,13,0 warp ein037 1,1,einbroch.gat,217,212
+einbroch.gat,217,214,0 warp ein037a 1,1,ein_in01.gat,108,15
+ein_in01.gat,200,32,0 warp ein038 1,1,einbech.gat,170,144
+einbech.gat,170,146,0 warp ein038a 1,1,ein_in01.gat,200,30
+ein_in01.gat,189,37,0 warp ein039 1,1,einbech.gat,177,136
+einbech.gat,177,138,0 warp ein039a 1,1,ein_in01.gat,189,35
+ein_in01.gat,288,25,0 warp ein040 1,1,einbroch.gat,52,52
+einbroch.gat,50,52,0 warp ein040a 1,1,ein_in01.gat,286,25
+airport.gat,125,14,0 warp ein041 1,1,airport.gat,19,20
+airport.gat,19,18,0 warp ein041a 1,1,airport.gat,123,14
+airport.gat,160,14,0 warp ein042 1,1,airport.gat,48,20
+airport.gat,48,18,0 warp ein042a 1,1,airport.gat,162,14
+einbroch.gat,64,208,0 warp ein043 1,1,airport.gat,143,15
+airport.gat,143,13,0 warp ein043a 1,1,einbroch.gat,64,206 \ No newline at end of file
diff --git a/npc/warps/fields/amatsu_fild.txt b/npc/warps/fields/amatsu_fild.txt
index 56506edc7..19df68ff5 100644
--- a/npc/warps/fields/amatsu_fild.txt
+++ b/npc/warps/fields/amatsu_fild.txt
@@ -13,9 +13,10 @@
//============================================================
//= Amatsu Fields ============================================
-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_test.gat,50,19
+// 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/yuno_fild.txt b/npc/warps/fields/yuno_fild.txt
index c501c80c5..1948d6d17 100644
--- a/npc/warps/fields/yuno_fild.txt
+++ b/npc/warps/fields/yuno_fild.txt
@@ -3,29 +3,63 @@
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version; RO Episode 5+
//===== Description: =========================================
//= Warp Points for Yuno Field
//===== Additional Comments: =================================
-//= No Comment!
+//= 1.1 - Updated for the new Yuno Fields
//============================================================
//= 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_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,211,0 warp yunfild-yun 1,1,yuno.gat,158,17
+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
diff --git a/object_del.bat b/object_del.bat
index 5cc7074d2..1eb96e1ac 100644
--- a/object_del.bat
+++ b/object_del.bat
@@ -3,13 +3,29 @@ 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\*.o
+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\*.o
+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 *.exe
-
+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/readme/npcfeatures.html b/readme/npcfeatures.html
index be16c2e66..11d8eb1aa 100644
--- a/readme/npcfeatures.html
+++ b/readme/npcfeatures.html
@@ -90,20 +90,21 @@
<tr>
<td colspan="18" bgcolor="#FCFCFC" class="content">
<ul>
-<li>Town Npcs (11/13)</li>
+<li>Town Npcs (11/14)</li>
<ul><li>&nbsp;Prontera - 100%</li></ul>
<ul><li>&nbsp;Morocc - 100%</li></ul>
<ul><li>&nbsp;Geffen - 100%</li></ul>
<ul><li>&nbsp;Izlude - 100%</li></ul>
<ul><li>&nbsp;Alberta - 100%</li></ul>
<ul><li>&nbsp;Al de Baran - 100%</li></ul>
+<ul><li>&nbsp;Lou Yang - 10%</li></ul>
<ul><li>&nbsp;Lutie - 100%</li></ul>
<ul><li>&nbsp;Amatsu - 100%</li></ul>
<ul><li>&nbsp;Comodo - 100%</li></ul>
<ul><li>&nbsp;Niflheim - 100%</li></ul>
<ul><li>&nbsp;Umbala - 100%</li></ul>
<ul><li>&nbsp;Gonryun - 60%</li></ul>
-<ul><li>&nbsp;Payon(New Maps) - 50%</li></ul>
+<ul><li>&nbsp;Payon(New Maps) - 99%</li></ul>
<li>Job Quests (16/33)</li>
<ul><li>&nbsp;Novice Class (2/2)</li></ul>
<ul><ul><li>&nbsp;Novice - 100%</li></ul></ul>
diff --git a/save-tmpl/bank.txt b/save-tmpl/bank.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/save-tmpl/bank.txt
+++ /dev/null
diff --git a/sql-files/database.sql b/sql-files/database.sql
deleted file mode 100644
index e774125cf..000000000
--- a/sql-files/database.sql
+++ /dev/null
@@ -1,2180 +0,0 @@
-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;
-
-INSERT INTO `item_db` VALUES (501, 'Red_Potion', 'Red Potion', 0, 50, NULL, 70, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(45,64),0;', NULL);
-INSERT INTO `item_db` VALUES (502, 'Orange_Potion', 'Orange Potion', 0, 200, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(105,144),0;', NULL);
-INSERT INTO `item_db` VALUES (503, 'Yellow_Potion', 'Yellow Potion', 0, 550, NULL, 130, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(175,234),0;', NULL);
-INSERT INTO `item_db` VALUES (504, 'White_Potion', 'White Potion', 0, 1200, NULL, 150, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(325,404),0;', NULL);
-INSERT INTO `item_db` VALUES (505, 'Blue_Potion', 'Blue Potion', 0, 5000, NULL, 150, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal 0,rand(40,59);', NULL);
-INSERT INTO `item_db` VALUES (506, 'Green_Potion', 'Green Potion', 0, 40, NULL, 70, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion;', NULL);
-INSERT INTO `item_db` VALUES (507, 'Red_Herb', 'Red Herb', 0, 18, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(18,27),0;', NULL);
-INSERT INTO `item_db` VALUES (508, 'Yellow_Herb', 'Yellow Herb', 0, 40, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(38,57),0;', NULL);
-INSERT INTO `item_db` VALUES (509, 'White_Herb', 'White Herb', 0, 120, NULL, 70, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(75,114),0;', NULL);
-INSERT INTO `item_db` VALUES (510, 'Blue_Herb', 'Blue Herb', 0, 60, NULL, 70, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal 0,rand(15,29);', NULL);
-INSERT INTO `item_db` VALUES (511, 'Green_Herb', 'Green Herb', 0, 10, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'sc_end SC_Poison;', NULL);
-INSERT INTO `item_db` VALUES (512, 'Apple', 'Apple', 0, 15, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(16,21),0;', NULL);
-INSERT INTO `item_db` VALUES (513, 'Banana', 'Banana', 0, 15, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(17,20),0;', NULL);
-INSERT INTO `item_db` VALUES (514, 'Grape', 'Grape', 0, 200, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal 0,rand(10,14);', NULL);
-INSERT INTO `item_db` VALUES (515, 'Carrot', 'Carrot', 0, 15, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(18,19),0;', NULL);
-INSERT INTO `item_db` VALUES (516, 'Sweet_Potato', 'Sweet Potato', 0, 15, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(15,22),0;', NULL);
-INSERT INTO `item_db` VALUES (517, 'Meat', 'Meat', 0, 50, NULL, 150, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(70,99),0;', NULL);
-INSERT INTO `item_db` VALUES (518, 'Honey', 'Honey', 0, 500, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(70,99),rand(20,39);', NULL);
-INSERT INTO `item_db` VALUES (519, 'Milk', 'Milk', 0, 25, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(27,36),0;', NULL);
-INSERT INTO `item_db` VALUES (520, 'Hinalle_Leaflet', 'Hinalle Leaflet', 0, 150, NULL, 10, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(175,234),0;', NULL);
-INSERT INTO `item_db` VALUES (521, 'Aloe_Leaflet', 'Aloe Leaflet', 0, 360, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(325,404),0;', NULL);
-INSERT INTO `item_db` VALUES (522, 'Mastela_Fruit', 'Mastela Fruit', 0, 840, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(400,599),0;', NULL);
-INSERT INTO `item_db` VALUES (523, 'Holy_Water', 'Holy Water', 0, 20, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'sc_end SC_Curse;', NULL);
-INSERT INTO `item_db` VALUES (525, 'Panacea', 'Panacea', 0, 500, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse;', NULL);
-INSERT INTO `item_db` VALUES (526, 'Royal_Jelly', 'Royal Jelly', 0, 7000, NULL, 150, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(325,404),rand(40,59); sc_end SC_Posion; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse;', NULL);
-INSERT INTO `item_db` VALUES (528, 'Monster\'s_Feed', 'Monster\'s Feed', 0, 60, NULL, 150, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(72,107),0;', NULL);
-INSERT INTO `item_db` VALUES (529, 'Candy', 'Candy', 0, 10, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(45,64),0;', NULL);
-INSERT INTO `item_db` VALUES (530, 'Candy_Cane', 'Candy Cane', 0, 20, NULL, 40, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(105,144),0;', NULL);
-INSERT INTO `item_db` VALUES (531, 'Apple_Juice', 'Apple Juice', 0, 20, NULL, 40, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(25,34),0;', NULL);
-INSERT INTO `item_db` VALUES (532, 'Banana_Juice', 'Banana Juice', 0, 20, NULL, 40, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(26,33),0;', NULL);
-INSERT INTO `item_db` VALUES (533, 'Grape_Juice', 'Grape Juice', 0, 250, NULL, 40, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal 0,rand(15,24);', NULL);
-INSERT INTO `item_db` VALUES (534, 'Carrot_Juice', 'Carrot Juice', 0, 20, NULL, 40, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(27,32),0;', NULL);
-INSERT INTO `item_db` VALUES (535, 'Pumkin', 'Pumpkin', 0, 15, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal 19,0;', NULL);
-INSERT INTO `item_db` VALUES (536, 'Ice_Cream', 'Ice Cream', 0, 150, NULL, 80, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(105,144),0;', NULL);
-INSERT INTO `item_db` VALUES (537, 'Pet_Food', 'Pet Food', 0, 1000, NULL, 10, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(50,89),0;', NULL);
-INSERT INTO `item_db` VALUES (538, 'Well-baked_Cookie', 'Well-baked Cookie', 0, 1000, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(160,199),0;', NULL);
-INSERT INTO `item_db` VALUES (539, 'Piece_of_Cake', 'Piece of Cake', 0, 3000, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(270,329),0;', NULL);
-INSERT INTO `item_db` VALUES (540, 'Falcon_food', 'Falcon food', 0, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (541, 'Pecopeco_food', 'Pecopeco food', 0, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (542, 'Festive_Cookie', 'Festive Cookie', 0, 10, NULL, 10, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(325,404),0;', NULL);
-INSERT INTO `item_db` VALUES (543, 'Festive_Rainbow_Cake', 'Festive Rainbow Cake', 0, NULL, NULL, 10, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(325,404),0;', NULL);
-INSERT INTO `item_db` VALUES (544, 'Raw_Fish', 'Raw Fish', 0, 20, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(25,59),0;', NULL);
-INSERT INTO `item_db` VALUES (545, 'Condensed_Red_Potion', 'Condensed Red Potion', 0, NULL, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(45,64),0;', NULL);
-INSERT INTO `item_db` VALUES (546, 'Condensed_Yellow_Potion', 'Condensed Yellow Potion', 0, NULL, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(175,234),0;', NULL);
-INSERT INTO `item_db` VALUES (547, 'Condensed_White_Potion', 'Condensed White Potion', 0, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(325,404),0;', NULL);
-INSERT INTO `item_db` VALUES (548, 'Cheese', 'Cheese', 0, 2800, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal 0,rand(10,14);', NULL);
-INSERT INTO `item_db` VALUES (549, 'Yam', 'Hot Potato', 0, 180, NULL, 80, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(50,99),0;', NULL);
-INSERT INTO `item_db` VALUES (550, 'Rice_Cake', 'Rice Popper', 0, NULL, 5, 10, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(10,14),0;', NULL);
-INSERT INTO `item_db` VALUES (551, 'Sushi', 'Sushi', 0, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(50,60),0;', NULL);
-INSERT INTO `item_db` VALUES (552, 'Ketupat', 'Ketupat', 0, NULL, NULL, 10, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(100,200),0;', NULL);
-INSERT INTO `item_db` VALUES (553, 'Dumpling', 'Dumpling', 0, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(39,68),0;', NULL);
-INSERT INTO `item_db` VALUES (554, 'Mochi', 'Mochi', 0, 100, NULL, 80, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(100,200),0;', NULL);
-INSERT INTO `item_db` VALUES (555, 'Rice_Cake', 'Rice_Cake', 0, NULL, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal rand(30,50),0;', NULL);
-INSERT INTO `item_db` VALUES (556, 'Rolled_Rice', 'Rolled Rice', 0, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (557, 'Cut_Rice_Rolls', 'Cut Rice Rolls', 0, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (558, 'Chocolate', 'Chocolate', 0, 500, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal 1,1;', NULL);
-INSERT INTO `item_db` VALUES (559, 'Hand-made_Chocolate', 'Hand-made Chocolate', 0, 5000, NULL, 80, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemheal 50,50;', NULL);
-INSERT INTO `item_db` VALUES (560, 'White_Chocolate', 'White Chocolate', 0, 0, NULL, 80, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (561, 'Milk_Chocolate_Bar', 'Milk Chocolate', 0, 0, NULL, 80, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (562, 'Pizza', 'Pizza', 0, NULL, NULL, 150, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (563, 'Pizza_', 'Pizza', 0, NULL, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (564, 'Meat_Dumpling', 'Meat Dumpling', 0, NULL, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'itemheal rand(175,234),0;', NULL);
-INSERT INTO `item_db` VALUES (601, 'Fly_Wing', 'Fly Wing', 2, 60, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'warp "Random",0,0;', NULL);
-INSERT INTO `item_db` VALUES (602, 'Butterfly_Wing', 'Butterfly Wing', 2, 300, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'warp "SavePoint",0,0;', NULL);
-INSERT INTO `item_db` VALUES (603, 'Old_Blue_Box', 'Old Blue Box', 2, 10000, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -1,1;', NULL);
-INSERT INTO `item_db` VALUES (604, 'Dead_Branch', 'Dead Branch', 2, 50, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'monster "this",0,0,"--ja--",-1,1,;', NULL);
-INSERT INTO `item_db` VALUES (605, 'Anodyne', 'Anodyne', 2, 2000, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemskill 8,1,"??????????";', NULL);
-INSERT INTO `item_db` VALUES (606, 'Aloevera', 'Aloevera', 2, 1500, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemskill 6,1,"?????";', NULL);
-INSERT INTO `item_db` VALUES (607, 'Yggdrasilberry', 'Yggdrasilberry', 0, 2, NULL, 300, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'percentheal 100,100;', NULL);
-INSERT INTO `item_db` VALUES (608, 'Yggdrasil_Seed', 'Yggdrasil Seed', 0, 5000, NULL, 300, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'percentheal 50,50;', NULL);
-INSERT INTO `item_db` VALUES (609, 'Amulet', 'Amulet', 2, 100, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (610, 'Yggdrasil_Leaf', 'Yggdrasil Leaf', 2, 4000, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemskill 54,1,"????????";', NULL);
-INSERT INTO `item_db` VALUES (611, 'Magnifier', 'Magnifier', 2, 40, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'itemskill 40,1,"???";', NULL);
-INSERT INTO `item_db` VALUES (612, 'Mini_Furnace', 'Mini Furnace', 2, 150, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'produce 16;', NULL);
-INSERT INTO `item_db` VALUES (613, 'Iron_Hammer', 'Iron Hammer', 2, 1000, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'produce 1;', NULL);
-INSERT INTO `item_db` VALUES (614, 'Golden_Hammer', 'Golden Hammer', 2, 3000, NULL, 300, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'produce 2;', NULL);
-INSERT INTO `item_db` VALUES (615, 'Oridecon_Hammer', 'Oridecon Hammer', 2, 5000, NULL, 400, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'produce 3;', NULL);
-INSERT INTO `item_db` VALUES (616, 'Old_Card_Album', 'Old Card Album', 2, 10000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -3,1;', NULL);
-INSERT INTO `item_db` VALUES (617, 'Old_Violet_Box', 'Old Violet Box', 2, 10000, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -2,1;', NULL);
-INSERT INTO `item_db` VALUES (618, 'Worn_Out_Scroll', 'Worn Out Scroll', 2, 50, NULL, 20, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -5,1;', NULL);
-INSERT INTO `item_db` VALUES (619, 'Unripe_Apple', 'Unripe Apple', 2, 1000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1002;', NULL);
-INSERT INTO `item_db` VALUES (620, 'Orange_Juice', 'Orange Juice', 2, 1500, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1113;', NULL);
-INSERT INTO `item_db` VALUES (621, 'Bitter_Herb', 'Bitter Herb', 2, 20, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1031;', NULL);
-INSERT INTO `item_db` VALUES (622, 'Rainbow_Carrot', 'Rainbow Carrot', 2, 2500, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1063;', NULL);
-INSERT INTO `item_db` VALUES (623, 'Earthworm_the_Dude', 'Earthworm the Dude', 2, 4000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1049;', NULL);
-INSERT INTO `item_db` VALUES (624, 'Rotten_Fish', 'Rotten Fish', 2, 2500, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1011;', NULL);
-INSERT INTO `item_db` VALUES (625, 'Rusty_Iron', 'Rusty Iron', 2, 100, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1042;', NULL);
-INSERT INTO `item_db` VALUES (626, 'Monster_Juice', 'Monster Juice', 2, 1500, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1035;', NULL);
-INSERT INTO `item_db` VALUES (627, 'Sweet_Milk', 'Sweet Milk', 2, 7000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1167;', NULL);
-INSERT INTO `item_db` VALUES (628, 'Well_Dried_Bone', 'Well Dried Bone', 2, 10000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1107;', NULL);
-INSERT INTO `item_db` VALUES (629, 'Singing_Flower', 'Singing Flower', 2, 300, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1052;', NULL);
-INSERT INTO `item_db` VALUES (630, 'Dew_Laden_Moss', 'Dew Laden Moss', 2, 10, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1014;', NULL);
-INSERT INTO `item_db` VALUES (631, 'Deadly_Noxious_Herb', 'Deadly Noxious Herb', 2, 20, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1077;', NULL);
-INSERT INTO `item_db` VALUES (632, 'Fatty_Chubby_Earthworm', 'Fatty Chubby Earthworm', 2, 5000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1019;', NULL);
-INSERT INTO `item_db` VALUES (633, 'Baked_Yam', 'Baked Yam', 2, 20, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1056;', NULL);
-INSERT INTO `item_db` VALUES (634, 'Tropical_Banana', 'Tropical Banana', 2, 20, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1057;', NULL);
-INSERT INTO `item_db` VALUES (635, 'Horror_of_Tribe', 'Horror of Tribe', 2, 300, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1023;', NULL);
-INSERT INTO `item_db` VALUES (636, 'No_Recipient', 'No Recipient', 2, 100, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1026;', NULL);
-INSERT INTO `item_db` VALUES (637, 'Old_Broom', 'Old Broom', 2, 350, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1110;', NULL);
-INSERT INTO `item_db` VALUES (638, 'Silver_Knife_of_Chastity', 'Silver Knife of Chastity', 2, 12000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1170;', NULL);
-INSERT INTO `item_db` VALUES (639, 'Armlet_of_Obedience', 'Armlet of Obedience', 2, 18000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1029;', NULL);
-INSERT INTO `item_db` VALUES (640, 'Shining_Stone', 'Shining Stone', 2, 3000, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1155;', NULL);
-INSERT INTO `item_db` VALUES (641, 'Contract_in_Shadow', 'Contracts in Shadow', 2, 100, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1109;', NULL);
-INSERT INTO `item_db` VALUES (642, 'Book_of_Devil', 'Book of Devil', 2, 1800, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1101;', NULL);
-INSERT INTO `item_db` VALUES (643, 'Pet_Incubator', 'Pet Incubator', 2, 3000, NULL, 30, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'bpet;', NULL);
-INSERT INTO `item_db` VALUES (644, 'Gift_Box', 'Gift Box', 2, 2, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -4,1;', NULL);
-INSERT INTO `item_db` VALUES (645, 'Concentration_Potion', 'Concentration Potion', 2, 800, NULL, 100, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'sc_start SC_SpeedPot0,1800,0;', NULL);
-INSERT INTO `item_db` VALUES (656, 'Awakening_Potion', 'Awakening Potion', 2, 1500, NULL, 150, NULL, NULL, NULL, NULL, 8904431, 2, NULL, NULL, 40, NULL, 'sc_start SC_SpeedPot1,1800,0;', NULL);
-INSERT INTO `item_db` VALUES (657, 'Berserk_Potion', 'Berserk Potion', 2, 3000, NULL, 200, NULL, NULL, NULL, NULL, 411302, 2, NULL, NULL, 85, NULL, 'sc_start SC_SpeedPot2,1800,0;', NULL);
-INSERT INTO `item_db` VALUES (658, 'Tribal_Solidarity', 'Tribal Solidarity', 3, 1000, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (659, 'Her_Heart', 'Her Heart', 2, 500, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1188;', NULL);
-INSERT INTO `item_db` VALUES (660, 'Forbidden_Red_Candle', 'Red Candle', 2, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1200;', NULL);
-INSERT INTO `item_db` VALUES (661, 'Sky_Apron', 'Sky Apron', 2, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'pet 1275;', NULL);
-INSERT INTO `item_db` VALUES (663, 'Rice_Cake', 'Rice Cake', 0, NULL, NULL, 10, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'percentheal 10,10;', NULL);
-INSERT INTO `item_db` VALUES (664, 'Gift_Box_', 'Gift Box', 2, NULL, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -4,1;', NULL);
-INSERT INTO `item_db` VALUES (665, 'Gift_Box__', 'Gift Box', 2, NULL, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -4,1;', NULL);
-INSERT INTO `item_db` VALUES (666, 'Gift_Box___', 'Gift Box', 2, NULL, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -4,1;', NULL);
-INSERT INTO `item_db` VALUES (667, 'Gift_Box____', 'Gift Box', 2, NULL, NULL, 200, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'getitem -4,1;', NULL);
-INSERT INTO `item_db` VALUES (668, 'Angpow', 'Angpow', 0, 1, NULL, 2, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'set Zeny,Zeny+rand(100,10000);', NULL);
-INSERT INTO `item_db` VALUES (669, 'Rice_Cake_Soup', 'Rice Cake Soup', 2, NULL, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (670, 'Gold_Coin_Pouch', 'Gold Coin Pouch', 2, NULL, NULL, 400, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (671, 'Gold_Coin', 'Gold Coin', 2, NULL, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (672, 'Copper_Coin_Pouch', 'Copper Coin Pouch', 2, NULL, NULL, 400, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (673, 'Copper_Coin', 'Copper_Coin', 2, NULL, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (674, 'Mysterious_Ore_Coin', 'Mysterious Ore Coin', 2, NULL, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (675, 'Silver_Coin', 'Silver Coin', 2, NULL, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (676, 'Silver_Coin_Pouch', 'Silver Coin Pouch', 2, NULL, NULL, 400, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (677, 'Platinum Coin', 'Platinum Coin', 2, NULL, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (678, 'Deadly_Poison_Bottle', 'Deadly Poison Bottle', 2, NULL, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (679, 'Recall_Pills', 'Recall Pills', 2, NULL, NULL, 300, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (680, 'Carnation', 'Carnation', 2, NULL, NULL, 1000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (681, 'Wedding_Photo_Album', 'Wedding Photo Album', 2, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (682, 'Realgar_Wine', 'Realgar Wine', 2, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'sc_start SC_ATKPOT,30,30;', NULL);
-INSERT INTO `item_db` VALUES (683, 'Exorcize_Herb', 'Exorcize Herb', 2, NULL, NULL, 50, NULL, NULL, NULL, NULL, 10477567, 2, NULL, NULL, NULL, NULL, 'sc_start SC_MATKPOT,30,30;', NULL);
-INSERT INTO `item_db` VALUES (701, 'Ora_Ora', 'Ora Ora', 3, 55000, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (702, 'Animal_Gore', 'Animal Gore', 3, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (703, 'Hinalle', 'Hinalle', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (704, 'Aloe', 'Aloe', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (705, 'Clover', 'Clover', 3, 10, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (706, 'Four_Leaf_Clover', 'Four-Leaf Clover', 3, 80000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (707, 'Singing_Plant', 'Singing Plant', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (708, 'Ment', 'Ment', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (709, 'Izidor', 'Izidor', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (710, 'Illusion_Flower', 'Illusion Flower', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (711, 'Shoot', 'Shoot', 3, 16, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (712, 'Flower', 'Flower', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (713, 'Empty_Bottle', 'Empty Bottle', 3, 6, NULL, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (714, 'Emperium', 'Emperium', 3, 2, NULL, 1000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (715, 'Yellow_Gemstone', 'Yellow Gemstone', 3, 600, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (716, 'Red_Gemstone', 'Red Gemstone', 3, 600, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (717, 'Blue_Gemstone', 'Blue Gemstone', 3, 600, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (718, 'Garnet', 'Garnet', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (719, 'Amethyst', 'Amethyst', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (720, 'Aquamarine', 'Aquamarine', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (721, 'Emerald', 'Emerald', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (722, 'Pearl', 'Pearl', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (723, 'Ruby', 'Ruby', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (724, 'Cursed_Ruby', 'Cursed Ruby', 3, 1000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (725, 'Sardonyx', 'Sardonyx', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (726, 'Sapphire', 'Sapphire', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (727, 'Opal', 'Opal', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (728, 'Topaz', 'Topaz', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (729, 'Zircon', 'Zircon', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (730, '1_Carat_Diamond', '1 Carat Diamond', 3, 10000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (731, '2_Carat_Diamond', '2 Carat Diamond', 3, 25000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (732, '3_Carat_Diamond', '3 Carat Diamond', 3, 55000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (733, 'Cracked_Diamond', 'Cracked Diamond', 3, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (734, 'Red_Frame', 'Red Frame', 3, 3000, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (735, 'Chung_Jah', 'Chung Jah', 3, 5000, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (736, 'China', 'China', 3, 1000, NULL, 300, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (737, 'Black_Ladle', 'Black Ladle', 3, 400, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (738, 'Pencil_Case', 'Pencil Case', 3, 300, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (739, 'Rouge', 'Rouge', 3, 10000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (740, 'Puppet', 'Puppet', 3, 1000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (741, 'Poring_Doll', 'Poring Doll', 3, 1800, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (742, 'Chonchon_Doll', 'Chonchon Doll', 3, 3000, 1000, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (743, 'Spore_Doll', 'Spore Doll', 3, 5500, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (744, 'Bouquet', 'Bouquet', 3, 2000, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (745, 'Wedding_Bouquet', 'Wedding Bouquet', 3, 10000, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (746, 'Glass_Bead', 'Glass Bead', 3, 1400, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (747, 'Crystal_Mirror', 'Crystal Mirror', 3, 15000, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (748, 'Witherless_Rose', 'Witherless Rose', 3, 55000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (749, 'Frozen_Rose', 'Frozen Rose', 3, 35000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (750, 'Baphomet_Doll', 'Baphomet Doll', 3, 18000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (751, 'Osiris_Doll', 'Osiris Doll', 3, 14000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (752, 'Rocker_Doll', 'Grasshopper Doll', 3, 4000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (753, 'Yoyo_Doll', 'Yoyo Doll', 3, 6000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (754, 'Raccoon_Doll', 'Raccoon Doll', 3, 5000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (756, 'Rough_Oridecon', 'Rough Oridecon', 3, 548, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (757, 'Rough_Elunium', 'Rough Elunium', 3, 648, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (901, 'Danggie', 'Danggie', 3, 250, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (902, 'Tree_Root', 'Tree Root', 3, 12, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (903, 'Reptile_Tongue', 'Reptile Tongue', 3, 50, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (904, 'Scorpion_Tail', 'Scorpion Tail', 3, 124, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (905, 'Stem', 'Stem', 3, 58, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (906, 'Pointed_Scale', 'Pointed Scale', 3, 70, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (907, 'Resin', 'Resin', 3, 120, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (908, 'Spawn', 'Spawn', 3, 148, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (909, 'Jellopy', 'Jellopy', 3, 6, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (910, 'Garlet', 'Garlet', 3, 40, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (911, 'Scell', 'Scell', 3, 160, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (912, 'Zargon', 'Zargon', 3, 480, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (913, 'Tooth_of_Bat', 'Tooth of Bat', 3, 34, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (914, 'Fluff', 'Fluff', 3, 8, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (915, 'Chrysalis', 'Chrysalis', 3, 8, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (916, 'Feather_of_Birds', 'Feather of Birds', 3, 10, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (917, 'Talon', 'Talon', 3, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (918, 'Sticky_Webfoot', 'Sticky Webfoot', 3, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (919, 'Animal_Skin', 'Animal Skin', 3, 36, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (920, 'Wolf_Claw', 'Wolf Claw', 3, 58, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (921, 'Mushroom_Spore', 'Mushroom Spore', 3, 36, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (922, 'Orc\'s_Fang', 'Orc\'s Fang', 3, 220, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (923, 'Evil_Horn', 'Evil Horn', 3, 1020, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (924, 'Powder_of_Butterfly', 'Powder of Butterfly', 3, 90, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (925, 'Bill_of_Birds', 'Bill of Birds', 3, 64, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (926, 'Snake_Scale', 'Snake Scale', 3, 82, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (928, 'Insect_Feeler', 'Insect Feeler', 3, 114, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (929, 'Immortal_Heart', 'Immortal Heart', 3, 374, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (930, 'Rotten_Bandage', 'Rotten Bandage', 3, 358, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (931, 'Orcish_Voucher', 'Orcish Voucher', 3, 168, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (932, 'Skel-Bone', 'Skel-Bone', 3, 232, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (934, 'Memento', 'Memento', 3, 600, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (935, 'Shell', 'Shell', 3, 14, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (936, 'Scale_Shell', 'Scale Shell', 3, 466, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (937, 'Venom_Canine', 'Venom Canine', 3, 148, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (938, 'Sticky_Mucus', 'Sticky Mucus', 3, 70, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (939, 'Bee_Sting', 'Bee Sting', 3, 32, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (940, 'Grasshopper\'s_Leg', 'Grasshopper\'s Leg', 3, 36, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (941, 'Nose_Ring', 'Nose Ring', 3, 568, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (942, 'Yoyo_Tail', 'Yoyo Tail', 3, 114, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (943, 'Solid_Shell', 'Solid Shell', 3, 448, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (944, 'Horseshoe', 'Horseshoe', 3, 588, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (945, 'Raccoon_Leaf', 'Raccoon Leaf', 3, 106, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (946, 'Snail\'s_Shell', 'Snail\'s Shell', 3, 64, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (947, 'Horn', 'Horn', 3, 116, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (948, 'Bear\'s_Footskin', 'Bear\'s Footskin', 3, 174, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (949, 'Feather', 'Feather', 3, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (950, 'Heart_of_Mermaid', 'Heart of Mermaid', 3, 264, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (951, 'Fin', 'Fin', 3, 412, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (952, 'Cactus_Needle', 'Cactus Needle', 3, 82, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (953, 'Stone_Heart', 'Stone Heart', 3, 184, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (954, 'Shining_Scale', 'Shining Scale', 3, 466, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (955, 'Worm_Peeling', 'Worm Peeling', 3, 52, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (956, 'Gill', 'Gill', 3, 342, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (957, 'Decayed_Nail', 'Decayed Nail', 3, 82, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (958, 'Horrendous_Mouth', 'Horrendous Mouth', 3, 390, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (959, 'Stinky_Scale', 'Stinky Scale', 3, 168, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (960, 'Nipper', 'Nipper', 3, 114, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (961, 'Conch', 'Conch', 3, 158, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (962, 'Tentacle', 'Tentacle', 3, 70, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (963, 'Sharp_scale', 'Sharp Scale', 3, 250, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (964, 'Crab_Shell', 'Crap Shell', 3, 90, 5, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (965, 'Clam_Shell', 'Clam Shell', 3, 56, 5, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (966, 'Clam_Flesh', 'Clam Flesh', 3, 158, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (967, 'Turtle_Shell', 'Turtle Shell', 3, 680, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (968, 'Heroic_Emblem', 'Heroic Emblem', 3, 3000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (969, 'Gold', 'Gold', 3, 200000, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (970, 'Alcohol', 'Alcohol', 3, 400, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (971, 'Detrimindexta', 'Detrimindexta', 3, 400, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (972, 'Karvodailnirol', 'Karvodailnirol', 3, 400, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (973, 'Counteragent', 'Counteragent', 3, 200, NULL, 70, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (974, 'Mixture', 'Mixture', 3, 200, NULL, 70, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (975, 'Scarlet_Dyestuffs', 'Scarlet Dyestuffs', 3, 1000, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (976, 'Lemon_Dyestuffs', 'Lemon Dyestuffs', 3, 1000, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (978, 'Cobaltblue_Dyestuffs', 'Cobaltblue Dyestuffs', 3, 1000, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (979, 'Darkgreen_Dyestuffs', 'Darkgreen Dyestuffs', 3, 1000, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (980, 'Orange_Dyestuffs', 'Orange Dyestuffs', 3, 1000, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (981, 'Violet_Dyestuffs', 'Violet Dyestuffs', 3, 1000, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (982, 'White_Dyestuffs', 'White Dyestuffs', 3, 1000, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (983, 'Black_Dyestuffs', 'Black Dyestuffs', 3, 1000, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (984, 'Oridecon', 'Oridecon', 3, 1100, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (985, 'Elunium', 'Elunium', 3, 1100, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (986, 'Anvil', 'Anvil', 3, 30000, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (987, 'Oridecon_Anvil', 'Oridecon Anvil', 3, 120000, NULL, 700, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (988, 'Golden_Anvil', 'Golden Anvil', 3, 300000, NULL, 900, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (989, 'Emperium_Anvil', 'Emperium Anvil', 3, 600000, NULL, 1000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (990, 'Red_Blood', 'Red Blood', 3, 1000, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (991, 'Crystal_Blue', 'Crystal Blue', 3, 1000, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (992, 'Wind_of_Verdure', 'Wind of Verdure', 3, 1000, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (993, 'Green_Live', 'Green Live', 3, 1000, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (994, 'Flame_Heart', 'Flame Heart', 3, 3000, NULL, 300, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (995, 'Mystic_Frozen', 'Mystic Frozen', 3, 3000, NULL, 300, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (996, 'Rough_Wind', 'Rough Wind', 3, 3000, NULL, 300, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (997, 'Great_Nature', 'Great Nature', 3, 3000, NULL, 300, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (998, 'Iron', 'Iron', 3, 100, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (999, 'Steel', 'Steel', 3, 1000, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1000, 'Star_Crumb', 'Star Crumb', 3, 4500, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1001, 'Star_Dust', 'Star Dust', 3, 1500, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1002, 'Iron_Ore', 'Iron Ore', 3, 50, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1003, 'Coal', 'Coal', 3, 500, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1004, 'Chivalry_Emblem', 'Chivalry Emblem', 3, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1005, 'Hammer_of_Blacksmith', 'Hammer of Blacksmith', 3, 2, NULL, 800, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1006, 'Old_Magic_Book', 'Old Magic Book', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1007, 'Necklace_of_Wisdom', 'Necklace of Wisdom', 3, 2, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1008, 'Necklace_of_Oblivion', 'Necklace of Oblivion', 3, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1009, 'Hand_of_God', 'Hand of God', 3, 2, NULL, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1010, 'Phracon', 'Phracon', 3, 200, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1011, 'Emveretarcon', 'Emveretarcon', 3, 1000, NULL, 200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1012, 'Frill', 'Frill', 3, 250, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1013, 'Rainbow_Shell', 'Rainbow Shell', 3, 90, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1014, 'Ant_Jaw', 'Ant Jaw', 3, 232, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1015, 'Tongue', 'Tongue', 3, 528, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1016, 'Rat_Tail', 'Rat Tail', 3, 52, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1017, 'Mole_Whiskers', 'Mole Whiskers', 3, 106, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1018, 'Mole_Claw', 'Mole Claw', 3, 210, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1019, 'Trunk', 'Trunk', 3, 60, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1020, 'Black_Hair', 'Black Hair', 3, 292, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1021, 'Dokkaebi_Horn', 'Dokkaebi Horn', 3, 292, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1022, 'Nine_Tails', 'Nine Tails', 3, 650, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1023, 'Fish_Tail', 'Fish Tail', 3, 196, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1024, 'Squid_Ink', 'Squid ink', 3, 264, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1025, 'Cobweb', 'Cobweb', 3, 184, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1026, 'Acorn', 'Acorn', 3, 98, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1027, 'Porcupine_Quill', 'Porcupine Quill', 3, 158, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1028, 'Mane', 'Mane', 3, 196, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1029, 'Tiger_Skin', 'Tiger Skin', 3, 548, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1030, 'Tiger\'s_Footskin', 'Tiger\'s Footskin', 3, 1500, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1031, 'Mantis_Scythe', 'Mantis Scythe', 3, 196, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1032, 'Maneater_Blossom', 'Maneater Blossom', 3, 196, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1033, 'Maneater_Root', 'Maneater Root', 3, 208, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1034, 'Blue_Hair', 'Blue Hair', 3, 342, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1035, 'Dragon_Canine', 'Dragon Canine', 3, 484, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1036, 'Dragon_Scale', 'Dragon Scale', 3, 500, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1037, 'Dragon_Tail', 'Dragon Tail', 3, 1200, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1038, 'Little_Evil_Horn', 'Little Evil Horn', 3, 528, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1039, 'Little_Evil_Wing', 'Little Evil Wing', 3, 2000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1040, 'Elder_Pixie\'s_Moustache', 'Elder Pixie\'s Moustache', 3, 232, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1041, 'Lantern', 'Lantern', 3, 250, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1042, 'Bug_Leg', 'Bug Leg', 3, 430, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1043, 'Orc_Claw', 'Orc Claw', 3, 168, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1044, 'Zenorc\'s_Fang', 'Zenorc\'s Fang', 3, 264, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1045, 'Cultish_Masque', 'Cultish Masque', 3, 412, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1046, 'Scorpion_Nipper', 'Scorpion Nipper', 3, 614, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1047, 'Dead_Medusa', 'Dead Medusa', 3, 548, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1048, 'Horrendous_Hair', 'Horrendous Hair', 3, 800, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1049, 'Skirt_of_Virgin', 'Skirt of Virgin', 3, 1700, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1050, 'Tendon', 'Tendon', 3, 220, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1051, 'Detonator', 'Detonator', 3, 450, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1052, 'Single_Cell', 'Single Cell', 3, 46, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1053, 'Ancient_Tooth', 'Ancient Tooth', 3, 548, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1054, 'Ancient_Lips', 'Ancient Lips', 3, 1000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1055, 'Earthworm_Peeling', 'Earthworm Peeling', 3, 196, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1056, 'Grit', 'Grit', 3, 306, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1057, 'Moth_Dust', 'Moth Dust', 3, 138, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1058, 'Moth_Wings', 'Moth Wings', 3, 200, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1059, 'Fabric', 'Fabric', 3, 306, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1060, 'Golden_Hair', 'Golden Hair', 3, 430, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1061, 'Witched_Starsand', 'Witched Starsand', 3, 484, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1062, 'Jack_o\'_Pumpkin', 'Jack o\' Pumpkin', 3, 374, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1063, 'Fang', 'Fang', 3, 680, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1064, 'Reins', 'Reins', 3, 802, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1065, 'Trap', 'Trap', 3, 100, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1066, 'Fine-grained_Trunk', 'Fine-grained Trunk', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1067, 'Solid_Trunk', 'Solid Trunk', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1068, 'Barren_Trunk', 'Barren Trunk', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1069, 'Orange_Net_Mushroom', 'Orange Net Mushroom', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1070, 'Orange_Gooey_Mushroom_', 'Orange Gooey Mushroom', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1071, 'Unknown_Test_Tube', 'Unknown Testtube', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1072, 'Delivery_Message', 'DEL Message', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1073, 'Voucher', 'Voucher', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1074, 'Voucher_', 'Voucher', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1075, 'Voucher__', 'Voucher', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1076, 'Voucher___', 'Voucher', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1077, 'Voucher____', 'Voucher', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1078, 'Voucher_____', 'Voucher', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1079, 'Voucher______', 'Voucher', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1080, 'Voucher_______', 'Voucher', 3, 2, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1081, 'Delivery_Box', 'DEL Box', 3, 2, NULL, 1200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1082, 'Delivery_Box_', 'DEL Box', 3, 2, NULL, 1200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1083, 'Delivery_Box__', 'DEL Box', 3, 2, NULL, 1200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1084, 'Kafra_Pass', 'Kapra Pass', 3, 0, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1085, 'Unknown_Test_Tube', 'Unknown Testtube', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1086, 'Unknown_Test_Tube', 'Unknown Testtube', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1087, 'Unknown_Test_Tube', 'Unknown Testtube', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1088, 'Morroc_Solution', 'Morocc Solution', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1089, 'Payon_Solution', 'Payon Solution', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1090, 'Unknown_Test_Tube', 'Unknown Testtube', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1091, 'Delivery_Box', 'DEL Box', 3, 2, NULL, 1200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1092, 'Empty_Test_Tube', 'Empty Testtube', 3, 3, NULL, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1093, 'Empty_Potion_Bottle', 'Empty Potion Bottle', 3, 10, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1094, 'Short_Daenggie', 'Short Daenggie', 3, 278, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1095, 'Clock_Hand', 'Needle of Alarm', 3, 546, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1096, 'Round_Shell', 'Round Shell', 3, 954, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1097, 'Worn_Out_Page', 'Worn Out Page', 3, 820, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1098, 'Manacles', 'Manacles', 3, 658, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1099, 'Worn-out_Prison_Uniform', 'Worn-out Prison Uniform', 3, 680, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1101, 'Sword', 'Sword', 4, 100, NULL, 500, 25, NULL, 1, 3, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1102, 'Sword_', 'Sword', 4, 100, NULL, 500, 25, NULL, 1, 4, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1103, 'Sword__', 'Sword', 4, 100, NULL, 500, 25, NULL, 1, 0, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1104, 'Falchion', 'Falchion', 4, 1500, NULL, 600, 39, NULL, 1, 3, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1105, 'Falchion_', 'Falchion', 4, 1500, NULL, 600, 39, NULL, 1, 4, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1106, 'Falchion__', 'Falchion', 4, 1500, NULL, 600, 39, NULL, 1, 0, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1107, 'Blade', 'Blade', 4, 2900, NULL, 700, 53, NULL, 1, 3, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1108, 'Blade_', 'Blade', 4, 2900, NULL, 700, 53, NULL, 1, 4, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1109, 'Blade__', 'Blade', 4, 2900, NULL, 700, 53, NULL, 1, 0, 8803555, 2, 2, 1, 2, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1110, 'Rapier', 'Rapier', 4, 10000, NULL, 500, 70, NULL, 1, 2, 8803555, 2, 2, 2, 14, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1111, 'Rapier_', 'Rapier', 4, 10000, NULL, 500, 70, NULL, 1, 3, 8803555, 2, 2, 2, 14, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1112, 'Rapier__', 'Rapier', 4, 10000, NULL, 500, 70, NULL, 1, 0, 8803555, 2, 2, 2, 14, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1113, 'Scimiter', 'Scimiter', 4, 17000, NULL, 700, 85, NULL, 1, 2, 8803555, 2, 2, 2, 14, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1114, 'Scimiter_', 'Scimiter', 4, 17000, NULL, 700, 85, NULL, 1, 3, 8803555, 2, 2, 2, 14, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1115, 'Scimiter__', 'Scimiter', 4, 17000, NULL, 700, 85, NULL, 1, 0, 8803555, 2, 2, 2, 14, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1116, 'Katana', 'Katana', 4, 2000, NULL, 1000, 60, NULL, 1, 3, 16514, 2, 34, 1, 4, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1117, 'Katana_', 'Katana', 4, 2000, NULL, 1000, 60, NULL, 1, 4, 16514, 2, 34, 1, 4, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1118, 'Katana__', 'Katana', 4, 2000, NULL, 1000, 60, NULL, 1, 0, 16514, 2, 34, 1, 4, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1119, 'Tsurugi', 'Tsurugi', 4, 51000, NULL, 1200, 130, NULL, 1, 1, 414946, 2, 2, 3, 27, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1120, 'Tsurugi_', 'Tsurugi', 4, 51000, NULL, 1200, 130, NULL, 1, 2, 414946, 2, 2, 3, 27, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1121, 'Tsurugi__', 'Tsurugi', 4, 51000, NULL, 1200, 130, NULL, 1, 0, 414946, 2, 2, 3, 27, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1122, 'Ring_Pommel_Saber', 'Ring Pommel Saber', 4, 24000, NULL, 900, 100, NULL, 1, 2, 414946, 2, 2, 2, 14, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1123, 'Haedonggum', 'Haedonggum', 4, 50000, NULL, 900, 120, NULL, 1, 1, 414946, 2, 2, 3, 27, 2, NULL, 'bonus bInt,3;');
-INSERT INTO `item_db` VALUES (1124, 'Orcish_Sword', 'Orcish sword', 4, 20, NULL, 800, 90, NULL, 1, 0, 8803555, 2, 2, 3, 5, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1125, 'Ring_Pommel_Saber_', 'Ring Pommel Saber', 4, 24000, NULL, 900, 100, NULL, 1, 3, 414946, 2, 2, 2, 14, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1126, 'Saber', 'Saber', 4, 49000, NULL, 1000, 115, NULL, 1, 2, 414946, 2, 2, 3, 27, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1127, 'Saber_', 'Saber', 4, 49000, NULL, 1000, 115, NULL, 1, 3, 414946, 2, 2, 3, 27, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1128, 'Haedonggum_', 'Haedonggum', 4, 50000, NULL, 900, 120, NULL, 1, 2, 414946, 2, 2, 3, 27, 2, NULL, 'bonus bInt,3;');
-INSERT INTO `item_db` VALUES (1129, 'Flamberge', 'Flamberge', 4, 60000, NULL, 1500, 150, NULL, 1, 0, 16512, 2, 2, 3, 27, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1130, 'Nagan', 'Nagan', 4, 20, NULL, 500, 120, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus bDoubleRate,25; bonus2 bAddRace,7,5;');
-INSERT INTO `item_db` VALUES (1131, 'Ice_Falchion', 'Ice Falchion', 4, 20, NULL, 600, 100, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus bAtkEle,1; skill 14,3; bonus2 bAddEff,Eff_Freeze,500; bonus3 bAutoSpell,14,3,25;');
-INSERT INTO `item_db` VALUES (1132, 'Edge', 'Edge', 4, 20, NULL, 700, 115, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus2 bAddEff,Eff_Curse,300; bonus2 bWeaponComaRace,11,10;');
-INSERT INTO `item_db` VALUES (1133, 'Fire_Brand', 'Fire Brand', 4, 20, NULL, 500, 100, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus bAtkEle,3; skill 19,3; bonus3 bAutoSpell,19,3,25;');
-INSERT INTO `item_db` VALUES (1134, 'Caesar\'s_Sword', 'Caesar\'s Sword', 4, 20, NULL, 700, 140, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus2 bAddRace,3,25; bonus bIgnoreDefRace,3;');
-INSERT INTO `item_db` VALUES (1135, 'Cutlas', 'Cutlas', 4, 20, NULL, 900, 150, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'skill 5,5; bonus bStr,2; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (1136, 'Solar_Sword', 'Solar Sword', 4, 20, NULL, 1200, 85, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus bAtkEle,3; bonus2 bHPDrainRate,100,1;');
-INSERT INTO `item_db` VALUES (1137, 'Excalibur', 'Excalibur', 4, 20, NULL, 1200, 150, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus bInt,5; bonus bLuk,10; bonus bDex,-1; bonus bAtkEle,6;');
-INSERT INTO `item_db` VALUES (1138, 'Mysteltainn_', 'Mysteltainn', 4, 20, NULL, 1000, 170, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus bAtkEle,7; bonus2 bAddEle,8,15; bonus2 bAddEff,Eff_Stone,100; bonus bDex,3;');
-INSERT INTO `item_db` VALUES (1139, 'Talefing_', 'Talefing', 4, 20, NULL, 1000, 200, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus bAtkEle,7;');
-INSERT INTO `item_db` VALUES (1140, 'Byeollungum', 'Byeollungum', 4, 20, NULL, 900, 150, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus2 bSubRace,11,-10; bonus2 bAddRace,10,50; bonus bStr,2; bonus bAgi,2; bonus bVit,2; bonus bInt,2; bonus bDex,2; bonus bLuk,2;');
-INSERT INTO `item_db` VALUES (1141, 'Immaterial_Sword', 'Immaterial Sword', 4, 20, NULL, 900, 140, NULL, 1, 0, 414946, 2, 2, 4, 40, 2, NULL, 'bonus bAtkEle,8;');
-INSERT INTO `item_db` VALUES (1142, 'Jewel_Sword', 'Crystal Sword', 4, 20, NULL, 2200, 104, NULL, 1, 0, 414946, 2, 2, 3, 68, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1143, 'Gaia_Sword', 'Gaia Sword', 4, 20, NULL, 2500, 115, NULL, 1, 0, 414946, 2, 2, 3, 74, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (1144, 'Sashimi', 'Sashimi', 4, 20, NULL, 1400, 75, NULL, 1, 0, 414946, 2, 2, 3, 48, 2, NULL, 'bonus bAtkEle,4; bonus3 bAddMonsterDropItem,544,5,2500;');
-INSERT INTO `item_db` VALUES (1145, 'Holy_Avenger', 'Holy Avenger', 4, 20, NULL, 1350, 125, NULL, 1, 0, 16384, 2, 2, 3, 75, 2, NULL, 'bonus bAtkEle,6; bonus bVit,2;');
-INSERT INTO `item_db` VALUES (1151, 'Slayer', 'Slayer', 4, 15000, NULL, 1300, 90, NULL, 1, 2, 16514, 2, 34, 2, 18, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1152, 'Slayer_', 'Slayer', 4, 15000, NULL, 1300, 90, NULL, 1, 3, 16514, 2, 34, 2, 18, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1153, 'Slayer__', 'Slayer', 4, 15000, NULL, 1300, 90, NULL, 1, 0, 16514, 2, 34, 2, 18, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1154, 'Bastard_Sword', 'Bastard Sword', 4, 22500, NULL, 1600, 115, NULL, 1, 2, 16514, 2, 34, 2, 18, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1155, 'Bastard_Sword_', 'Bastard Sword', 4, 22500, NULL, 1600, 115, NULL, 1, 3, 16514, 2, 34, 2, 18, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1156, 'Bastard_Sword__', 'Bastard Sword', 4, 22500, NULL, 1600, 115, NULL, 1, 0, 16514, 2, 34, 2, 18, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1157, 'Two_hand_Sword', 'Two-handed Sword', 4, 60000, NULL, 2200, 160, NULL, 1, 1, 16514, 2, 34, 3, 33, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1158, 'Two_hand_Sword_', 'Two-handed Sword', 4, 60000, NULL, 2200, 160, NULL, 1, 2, 16514, 2, 34, 3, 33, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1159, 'Two_hand_Sword__', 'Two-handed Sword', 4, 60000, NULL, 2200, 160, NULL, 1, 0, 16514, 2, 34, 3, 33, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1160, 'Broad_Sword', 'Broad Sword', 4, 65000, NULL, 2000, 140, NULL, 1, 1, 16514, 2, 34, 3, 33, 3, NULL, 'bonus bDef,5;');
-INSERT INTO `item_db` VALUES (1161, 'Balmung', 'Balmung', 4, 20, NULL, 1000, 250, NULL, 2, 0, 2088959, 2, 2, 4, 48, 1, NULL, 'bonus bInt,20; bonus bLuk,20;');
-INSERT INTO `item_db` VALUES (1162, 'Broad_Sword_', 'Broad Sword', 4, 65000, NULL, 2000, 140, NULL, 1, 2, 16514, 2, 34, 3, 33, 3, NULL, 'bonus bDef,5;');
-INSERT INTO `item_db` VALUES (1163, 'Claymore', 'Claymore', 4, 74000, NULL, 2500, 180, NULL, 1, 0, 16512, 2, 34, 3, 33, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1164, 'Muramasa', 'Muramasa', 4, 20, NULL, 1000, 155, NULL, 1, 0, 16514, 2, 34, 4, 48, 3, NULL, 'bonus bCritical,30; bonus bAspdAddRate,8; bonus2 bAddEff2,Eff_Curse,200;');
-INSERT INTO `item_db` VALUES (1165, 'Masamune', 'Masamune', 4, 20, NULL, 1000, 200, NULL, 1, 0, 16514, 2, 34, 4, 48, 3, NULL, 'bonus bFlee,30; bonus bStr,-5; bonus bAspd,2; bonus bDefRate,-50; bonus bDef2Rate,-50;');
-INSERT INTO `item_db` VALUES (1166, 'Dragon_Slayer', 'Dragon Slayer', 4, 20, NULL, 1300, 150, NULL, 1, 0, 16514, 2, 34, 4, 48, 3, NULL, 'bonus bIgnoreDefRace,9; bonus2 bAddRace,9,15;');
-INSERT INTO `item_db` VALUES (1167, 'Schweizersabel', 'Schweizersabel', 4, 20, NULL, 1600, 160, NULL, 1, 0, 16514, 2, 34, 4, 48, 3, NULL, 'bonus bAtkEle,4; skill 20,3; bonus bDef,1; bonus3 bAutoSpell,20,3,25;');
-INSERT INTO `item_db` VALUES (1168, 'Zweihander', 'Zweihander', 4, 20, NULL, 2200, 200, NULL, 1, 0, 16514, 2, 34, 4, 48, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (1169, 'Executioner_', 'Executioner', 4, 20, NULL, 2200, 155, NULL, 1, 0, 16514, 2, 34, 4, 48, 3, NULL, 'bonus bIgnoreDefRace,7; bonus2 bAddRace,7,20; bonus2 bSubRace,7,-10; bonus bAtkEle,7;');
-INSERT INTO `item_db` VALUES (1170, 'Katzbalger', 'Katzbalger', 4, 20, NULL, 2000, 175, NULL, 1, 0, 16514, 2, 34, 4, 48, 3, NULL, 'bonus bVit,10; bonus bDef,10;');
-INSERT INTO `item_db` VALUES (1201, 'Knife', 'Knife', 4, 50, NULL, 400, 17, NULL, 1, 3, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1202, 'Knife_', 'Knife', 4, 50, NULL, 400, 17, NULL, 1, 4, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1203, 'Knife__', 'Knife', 4, 50, NULL, 400, 17, NULL, 1, 0, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1204, 'Cutter', 'Cutter', 4, 1250, NULL, 500, 30, NULL, 1, 3, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1205, 'Cutter_', 'Cutter', 4, 1250, NULL, 500, 30, NULL, 1, 4, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1206, 'Cutter__', 'Cutter', 4, 1250, NULL, 500, 30, NULL, 1, 0, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1207, 'Main_Gauche', 'Main Gauche', 4, 2400, NULL, 600, 43, NULL, 1, 3, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1208, 'Main_Gauche_', 'Main Gauche', 4, 2400, NULL, 600, 43, NULL, 1, 4, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1209, 'Main_Gauche__', 'Main Gauche', 4, 2400, NULL, 600, 43, NULL, 1, 0, 10444527, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1210, 'Dirk', 'Dirk', 4, 8500, NULL, 500, 59, NULL, 1, 2, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1211, 'Dirk_', 'Dirk', 4, 8500, NULL, 500, 59, NULL, 1, 3, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1212, 'Dirk__', 'Dirk', 4, 8500, NULL, 500, 59, NULL, 1, 0, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1213, 'Dagger', 'Dagger', 4, 14000, NULL, 600, 73, NULL, 1, 2, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1214, 'Dagger_', 'Dagger', 4, 14000, NULL, 600, 73, NULL, 1, 3, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1215, 'Dagger__', 'Dagger', 4, 14000, NULL, 600, 73, NULL, 1, 0, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1216, 'Stiletto', 'Stiletto', 4, 19500, NULL, 700, 87, NULL, 1, 2, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1217, 'Stiletto_', 'Stiletto', 4, 19500, NULL, 700, 87, NULL, 1, 3, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1218, 'Stiletto__', 'Stiletto', 4, 19500, NULL, 700, 87, NULL, 1, 0, 10444527, 2, 2, 2, 12, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1219, 'Gladius', 'Gladius', 4, 43000, NULL, 700, 105, NULL, 1, 2, 2055918, 2, 2, 3, 24, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1220, 'Gladius_', 'Gladius', 4, 43000, NULL, 700, 105, NULL, 1, 3, 2055918, 2, 2, 3, 24, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1221, 'Gladius__', 'Gladius', 4, 43000, NULL, 700, 105, NULL, 1, 0, 2055918, 2, 2, 3, 24, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1222, 'Damascus', 'Damascus', 4, 49000, NULL, 800, 118, NULL, 1, 1, 2055918, 2, 2, 3, 24, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1223, 'Fortune_Sword', 'Fortune Sword', 4, 20, NULL, 500, 90, NULL, 1, 0, 2055918, 2, 2, 4, 24, 1, NULL, 'bonus bLuk,5; bonus bFlee2,20;');
-INSERT INTO `item_db` VALUES (1224, 'Sword_Breaker', 'Swordbreaker', 4, 20, NULL, 1000, 70, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1225, 'Mail_Breaker', 'Mailbreaker', 4, 20, NULL, 1000, 70, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1226, 'Damascus_', 'Damascus', 4, 49000, NULL, 800, 118, NULL, 1, 2, 2055918, 2, 2, 3, 24, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1227, 'Weeder_Knife', 'Weeder Knife', 4, 20, NULL, 400, 80, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus bIgnoreDefRace,3; bonus2 bAddRace,3,15; bonus2 bSubRace,3,15;');
-INSERT INTO `item_db` VALUES (1228, 'Combat_Knife', 'Combat Knife', 4, 20, NULL, 400, 80, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus bIgnoreDefRace,7; bonus2 bSubRace,7,10; bonus2 bSubRace,6,-10;');
-INSERT INTO `item_db` VALUES (1229, 'Mama\'s_Knife', 'Mama\'s Knife', 4, 20, NULL, 500, 75, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus bCritical,30; bonus2 bAddRace,7,3; bonus3 bAddMonsterDropItem,517,2,5000;');
-INSERT INTO `item_db` VALUES (1230, 'House_Auger', 'House Auger', 4, 20, NULL, 600, 80, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus bDefRatioAtkRace,10; bonus bDefRatioAtkRace,11;');
-INSERT INTO `item_db` VALUES (1231, 'Bazerald', 'Bazerald', 4, 20, NULL, 500, 70, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus bAtkEle,3; bonus bInt,5; bonus bMatkRate,10;');
-INSERT INTO `item_db` VALUES (1232, 'Assassin_Dagger', 'Assasin Dagger', 4, 20, NULL, 600, 140, NULL, 1, 0, 4096, 2, 2, 4, 36, 1, NULL, 'bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdAddRate,2; bonus bAtkEle,7;');
-INSERT INTO `item_db` VALUES (1233, 'Exercise', 'Excorcise', 4, 20, NULL, 700, 90, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus bIgnoreDefRace,6; bonus2 bSubRace,6,5; bonus2 bSubRace,7,-10;');
-INSERT INTO `item_db` VALUES (1234, 'Moonlight_Sword', 'Walgwanggum', 4, 20, NULL, 700, 50, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus bMaxSPrate,10;');
-INSERT INTO `item_db` VALUES (1235, 'Azoth', 'Azoth', 4, 20, NULL, 700, 110, NULL, 1, 0, 262144, 2, 2, 4, 36, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1236, 'Sucsamad', 'Sucsamad', 4, 20, NULL, 800, 140, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus2 bAddEle,2,10; bonus2 bAddEle,4,10;');
-INSERT INTO `item_db` VALUES (1237, 'Grimtooth_', 'Grimtooth', 4, 20, NULL, 800, 180, NULL, 1, 0, 2055918, 2, 2, 4, 36, 1, NULL, 'bonus bFlee,10; bonus bFlee2,5; bonus bDefRate,-50; bonus bDef2Rate,-50;');
-INSERT INTO `item_db` VALUES (1238, 'Zeny_Knife', 'Zeny Knife', 4, 20, NULL, 1200, 64, NULL, 1, 0, 2055918, 2, 2, 3, 40, 1, NULL, 'bonus bGetZenyNum,100;');
-INSERT INTO `item_db` VALUES (1239, 'Poison_Knife', 'Poison Knife', 4, 20, NULL, 800, 64, NULL, 1, 0, 2055918, 2, 2, 3, 65, 1, NULL, 'bonus bAtkEle,5;');
-INSERT INTO `item_db` VALUES (1240, 'Princess_Knife', 'Princess Knife', 4, 20, NULL, 400, 84, NULL, 1, 0, 2055918, 2, 2, 4, 1, 1, NULL, 'bonus bStr,1; bonus bAgi,1; bonus bVit,1; bonus bInt,1; bonus bDex,1; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (1241, 'Cursed_Dagger', 'Cursed Dagger', 4, 20, NULL, 400, 55, NULL, 1, 0, 66052, 2, 2, 4, 85, 1, NULL, 'bonus2 bAddEff,Eff_Curse,500;');
-INSERT INTO `item_db` VALUES (1242, 'Counter_Dagger', 'Counter Dagger', 4, 20, NULL, 550, 75, NULL, 1, 0, 66052, 2, 2, 4, 55, 1, NULL, 'bonus bCritical,5; skill 61,1; bonus3 bAutoSpell,61,1,25;');
-INSERT INTO `item_db` VALUES (1243, 'Main_Gauche_For_Novice', 'Novice\'s Main Gauche', 4, NULL, NULL, 1, 45, NULL, 1, 0, 8388609, 2, 2, 1, 1, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (1250, 'Jur', 'Jur', 4, 19500, NULL, 800, 125, NULL, 1, 2, 4096, 2, 34, 2, 18, 16, NULL, NULL);
-INSERT INTO `item_db` VALUES (1251, 'Jur_', 'Jur', 4, 19500, NULL, 800, 125, NULL, 1, 3, 4096, 2, 34, 2, 18, 16, NULL, NULL);
-INSERT INTO `item_db` VALUES (1252, 'Katar', 'Katar', 4, 41000, NULL, 1200, 148, NULL, 1, 1, 4096, 2, 34, 3, 33, 16, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (1253, 'Katar_', 'Katar', 4, 41000, NULL, 1200, 148, NULL, 1, 2, 4096, 2, 34, 3, 33, 16, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (1254, 'Jamadhar', 'Jamadhar', 4, 37200, NULL, 1500, 165, NULL, 1, 0, 4096, 2, 34, 3, 33, 16, NULL, NULL);
-INSERT INTO `item_db` VALUES (1255, 'Jamadhar_', 'Jamadhar', 4, 37200, NULL, 1500, 165, NULL, 1, 1, 4096, 2, 34, 3, 33, 16, NULL, NULL);
-INSERT INTO `item_db` VALUES (1256, 'Katar_of_Cold_Icicle', 'Katar of Cold Icicle', 4, 45000, NULL, 1200, 105, NULL, 1, 0, 4096, 2, 34, 3, 55, 16, NULL, 'bonus bAtkEle,1; bonus2 bAddEff,Eff_Freeze,500;');
-INSERT INTO `item_db` VALUES (1257, 'Katar_of_Thornbush', 'Katar of Dusty Thornbush', 4, 45000, NULL, 1200, 105, NULL, 1, 0, 4096, 2, 34, 3, 55, 16, NULL, 'bonus bAtkEle,2; bonus2 bAddEff,Eff_Blind,500;');
-INSERT INTO `item_db` VALUES (1258, 'Katar_of_Raging_Blaze', 'Katar of Raging Blaze', 4, 45000, NULL, 1200, 105, NULL, 1, 0, 4096, 2, 34, 3, 55, 16, NULL, 'bonus bAtkEle,3; bonus2 bAddEff,Eff_Silence,500;');
-INSERT INTO `item_db` VALUES (1259, 'Katar_of_Piercing_Wind', 'Katar of Piercing Wind', 4, 45000, NULL, 1200, 105, NULL, 1, 0, 4096, 2, 34, 3, 55, 16, NULL, 'bonus bAtkEle,4; bonus2 bAddEff,Eff_Sleep,500;');
-INSERT INTO `item_db` VALUES (1260, 'Sharpened_Legbone_of_Ghoul', 'Sharpened Legbone of Ghoul', 4, 52500, NULL, 1700, 150, NULL, 1, 0, 4096, 2, 34, 3, 65, 16, NULL, 'bonus bAtkEle,9;');
-INSERT INTO `item_db` VALUES (1261, 'Infiltrator', 'Infiltrator', 4, 57000, NULL, 1500, 140, NULL, 1, 0, 4096, 2, 34, 4, 75, 16, NULL, 'bonus2 bAddRace,7,50; bonus bDef,3; bonus bFlee,5; bonus bFlee2,2;');
-INSERT INTO `item_db` VALUES (1301, 'Axe', 'Axe', 4, 500, NULL, 800, 38, NULL, 1, 3, 8803555, 2, 2, 1, 3, 6, NULL, NULL);
-INSERT INTO `item_db` VALUES (1302, 'Axe_', 'Axe', 4, 500, NULL, 800, 38, NULL, 1, 4, 8803555, 2, 2, 1, 3, 6, NULL, NULL);
-INSERT INTO `item_db` VALUES (1303, 'Axe__', 'Axe', 4, 500, NULL, 800, 38, NULL, 1, 0, 8803555, 2, 2, 1, 3, 6, NULL, NULL);
-INSERT INTO `item_db` VALUES (1304, 'Orcish_Axe', 'Orcish Axe', 4, 20, NULL, 1500, 75, NULL, 1, 0, 8803555, 2, 2, 3, 3, 6, NULL, NULL);
-INSERT INTO `item_db` VALUES (1305, 'Cleaver', 'Cleaver', 4, 20, NULL, 1200, 140, NULL, 1, 0, 8668323, 2, 2, 4, 44, 6, NULL, 'bonus2 bAddRace,7,5; bonus3 bAddMonsterDropItem,517,2,3000;');
-INSERT INTO `item_db` VALUES (1306, 'War_Axe', 'War Axe', 4, 20, NULL, 4200, 145, NULL, 1, 1, 263168, 2, 2, 3, 76, 6, NULL, 'bonus bDex,2; bonus bLuk,2;');
-INSERT INTO `item_db` VALUES (1351, 'Battle_Axe', 'Battle Axe', 4, 5400, NULL, 1500, 80, NULL, 1, 3, 279714, 2, 34, 1, 3, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1352, 'Battle_Axe_', 'Battle Axe', 4, 5400, NULL, 1500, 80, NULL, 1, 4, 279714, 2, 34, 1, 3, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1353, 'Battle_Axe__', 'Battle Axe', 4, 5400, NULL, 1500, 80, NULL, 1, 0, 279714, 2, 34, 1, 3, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1354, 'Hammer', 'Hammer', 4, 15500, NULL, 2000, 120, NULL, 1, 2, 279714, 2, 34, 2, 16, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1355, 'Hammer_', 'Hammer', 4, 15500, NULL, 2000, 120, NULL, 1, 3, 279714, 2, 34, 2, 16, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1356, 'Hammer__', 'Hammer', 4, 15500, NULL, 2200, 120, NULL, 1, 0, 279714, 2, 34, 2, 16, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1357, 'Buster', 'Buster', 4, 34000, NULL, 2200, 155, NULL, 1, 1, 279714, 2, 34, 3, 30, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1358, 'Buster_', 'Buster', 4, 34000, NULL, 2200, 155, NULL, 1, 2, 279714, 2, 34, 3, 30, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1359, 'Buster__', 'Buster', 4, 34000, NULL, 2200, 155, NULL, 1, 0, 279714, 2, 34, 3, 30, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1360, 'Two_handed_Axe', 'Two-handed Axe', 4, 55000, NULL, 2500, 185, NULL, 1, 1, 279714, 2, 34, 3, 30, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1361, 'Two_handed_Axe_', 'Two-handed Axe', 4, 55000, NULL, 2500, 185, NULL, 1, 2, 279714, 2, 34, 3, 30, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1362, 'Two_handed_Axe__', 'Two-handed Axe', 4, 55000, NULL, 2500, 185, NULL, 1, 0, 279714, 2, 34, 3, 30, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (1363, 'Blood_Axe', 'Bloody Axe', 4, 20, NULL, 4000, 170, NULL, 1, 0, 279714, 2, 34, 4, 44, 7, NULL, 'bonus bStr,10; bonus bSpeedRate,25;');
-INSERT INTO `item_db` VALUES (1364, 'Great_Axe', 'Great Axe', 4, 20, NULL, 1800, 187, NULL, 1, 0, 279714, 2, 34, 4, 44, 7, NULL, 'bonus2 bAddEff,Eff_Stan,1500;');
-INSERT INTO `item_db` VALUES (1365, 'Sabbath', 'Sabbath', 4, 20, NULL, 2300, 120, NULL, 1, 0, 279714, 2, 34, 4, 44, 7, NULL, 'bonus2 bWeaponComaRace,6,50; bonus bAtkEle,7;');
-INSERT INTO `item_db` VALUES (1366, 'Light_Epsilon', 'Light Epsilon', 4, 20, NULL, 2300, 180, NULL, 1, 0, 279714, 2, 34, 4, 44, 7, NULL, 'bonus bAtkEle,6; skill 28,3; bonus2 bAddRace,6,3;');
-INSERT INTO `item_db` VALUES (1367, 'Slaughter', 'Slaughter', 4, 20, NULL, 2500, 120, NULL, 1, 0, 279714, 2, 34, 4, 44, 7, NULL, 'bonus bIgnoreDefRace,2; bonus2 bWeaponComaRace,2,40;');
-INSERT INTO `item_db` VALUES (1368, 'Tomahawk', 'Tomahawk', 4, 20, NULL, 2500, 165, NULL, 1, 0, 279714, 2, 34, 4, 44, 7, NULL, 'bonus bAtkEle,4;');
-INSERT INTO `item_db` VALUES (1369, 'Guillotine', 'Guillotine', 4, 20, NULL, 3000, 215, NULL, 1, 0, 279714, 2, 34, 4, 44, 7, NULL, 'bonus2 bWeaponComaRace,7,30;');
-INSERT INTO `item_db` VALUES (1401, 'Javelin', 'Javelin', 4, 150, NULL, 700, 28, NULL, 3, 3, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1402, 'Javelin_', 'Javelin', 4, 150, NULL, 700, 28, NULL, 3, 4, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1403, 'Javelin__', 'Javelin', 4, 150, NULL, 700, 28, NULL, 3, 0, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1404, 'Spear', 'Spear', 4, 1700, NULL, 850, 44, NULL, 3, 3, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1405, 'Spear_', 'Spear', 4, 1700, NULL, 850, 44, NULL, 3, 4, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1406, 'Spear__', 'Spear', 4, 1700, NULL, 850, 44, NULL, 3, 0, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1407, 'Pike', 'Pike', 4, 3450, NULL, 1000, 60, NULL, 3, 3, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1408, 'Pike_', 'Pike', 4, 3450, NULL, 1000, 60, NULL, 3, 4, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1409, 'Pike__', 'Pike', 4, 3450, NULL, 1000, 60, NULL, 3, 0, 16514, 2, 2, 1, 4, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1410, 'Lance', 'Lance', 4, 60000, NULL, 2500, 185, NULL, 3, 0, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1411, 'Lance_', 'Lance', 4, 60000, NULL, 2500, 185, NULL, 3, 0, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1412, 'Lance__', 'Lance', 4, 60000, NULL, 2500, 185, NULL, 3, 0, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1413, 'Gungnir', 'Gungnir', 4, 20, NULL, 500, 120, NULL, 3, 0, 16514, 2, 2, 4, 4, 4, NULL, 'bonus bAtkEle,4; bonus bPerfectHitRate,25; bonus bHit,30;');
-INSERT INTO `item_db` VALUES (1414, 'Gelerdria', 'Gelerdria', 4, 20, NULL, 700, 145, NULL, 3, 0, 16514, 2, 2, 4, 48, 4, NULL, 'bonus bAtkEle,2; bonus bMaxHP,500; bonus bMaxSP,-50;');
-INSERT INTO `item_db` VALUES (1415, 'Skewer', 'Brocca', 4, 20, NULL, 850, 100, NULL, 3, 0, 16514, 2, 2, 4, 48, 4, NULL, 'bonus bIgnoreDefRace,11; bonus2 bAddEle,0,25;');
-INSERT INTO `item_db` VALUES (1416, 'Tjungkuletti', 'Tjungkuletti', 4, 20, NULL, 1000, 95, NULL, 3, 0, 16514, 2, 2, 4, 48, 4, NULL, NULL);
-INSERT INTO `item_db` VALUES (1417, 'Pole_Axe', 'Pole Axe', 4, 20, NULL, 3800, 160, NULL, 3, 1, 16514, 2, 2, 3, 71, 4, NULL, 'bonus bStr,1; bonus bInt,2; bonus bDex,1;');
-INSERT INTO `item_db` VALUES (1451, 'Guisarme', 'Guisarme', 4, 13000, NULL, 1000, 84, NULL, 3, 2, 16514, 2, 34, 2, 18, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1452, 'Guisarme_', 'Guisarme', 4, 13000, NULL, 1000, 84, NULL, 3, 3, 16514, 2, 34, 2, 18, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1453, 'Guisarme__', 'Guisarme', 4, 13000, NULL, 1000, 84, NULL, 3, 0, 16514, 2, 34, 2, 18, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1454, 'Glaive', 'Glaive', 4, 20000, NULL, 1200, 104, NULL, 3, 2, 16514, 2, 34, 2, 18, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1455, 'Glaive_', 'Glaive', 4, 20000, NULL, 1200, 104, NULL, 3, 3, 16514, 2, 34, 2, 18, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1456, 'Glaive__', 'Glaive', 4, 20000, NULL, 1200, 104, NULL, 3, 0, 16514, 2, 34, 2, 18, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1457, 'Partizan', 'Partizan', 4, 27000, NULL, 2000, 124, NULL, 3, 1, 16514, 2, 34, 2, 18, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1458, 'Partizan_', 'Partizan', 4, 27000, NULL, 2000, 124, NULL, 3, 2, 16514, 2, 34, 2, 18, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1459, 'Partizan__', 'Partizan', 4, 27000, NULL, 2000, 124, NULL, 3, 0, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1460, 'Trident', 'Trident', 4, 51000, NULL, 1200, 150, NULL, 3, 2, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1461, 'Trident_', 'Trident', 4, 51000, NULL, 1200, 150, NULL, 3, 3, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1462, 'Trident__', 'Trident', 4, 51000, NULL, 1200, 150, NULL, 3, 0, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1463, 'Halberd', 'Halberd', 4, 54000, NULL, 2500, 165, NULL, 3, 1, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1464, 'Halberd_', 'Halberd', 4, 54000, NULL, 2500, 165, NULL, 3, 2, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1465, 'Halberd__', 'Halberd', 4, 54000, NULL, 2500, 165, NULL, 3, 0, 16514, 2, 34, 3, 33, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (1466, 'Crescent_Scythe', 'Crescent Scythe', 4, 20, NULL, 2500, 180, NULL, 3, 0, 16514, 2, 34, 4, 48, 5, NULL, 'bonus bCritical,30; bonus bHit,10;');
-INSERT INTO `item_db` VALUES (1467, 'Bill_Guisarme', 'Bill Guisarme', 4, 20, NULL, 1000, 183, NULL, 3, 0, 16514, 2, 34, 4, 48, 5, NULL, 'bonus2 bAddRace,2,10; bonus2 bAddRace,7,5;');
-INSERT INTO `item_db` VALUES (1468, 'Zephyrus', 'Zephyrus', 4, 20, NULL, 2000, 170, NULL, 3, 0, 16514, 2, 34, 4, 48, 5, NULL, 'bonus bAtkEle,4; skill 21,3; bonus2 bAddEff,Eff_Silence,200; bonus3 bAutoSpell,21,3,25;');
-INSERT INTO `item_db` VALUES (1469, 'Longinus\'s_Spear', 'Longinus\'s Spear', 4, 20, NULL, 2500, 180, NULL, 3, 0, 16514, 2, 34, 4, 48, 5, NULL, 'bonus bAtkEle,7; bonus2 bAddRace,7,10; bonus2 bAddRace,8,10;');
-INSERT INTO `item_db` VALUES (1470, 'Brionac', 'Brionac', 4, 20, NULL, 3000, 190, NULL, 3, 0, 16514, 2, 34, 4, 48, 5, NULL, 'bonus bAtkEle,6; skill 28,5; skill 13,3; bonus3 bAutoSpell,13,3,25;');
-INSERT INTO `item_db` VALUES (1471, 'Hellfire', 'Hellfire', 4, 20, NULL, 3500, 200, NULL, 3, 0, 16514, 2, 34, 4, 48, 5, NULL, 'bonus bAtkEle,3; skill 17,3; bonus3 bAutoSpell,17,3,25;');
-INSERT INTO `item_db` VALUES (1472, 'Staff_of_Soul', 'Soul Staff', 4, 20, NULL, 1400, 25, NULL, 1, 0, 66052, 2, 34, 3, 73, 10, NULL, 'bonus bInt,5; bonus bAgi,2; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1473, 'Wizardy_Staff', 'Wizardy Staff', 4, 20, NULL, 2400, 120, NULL, 1, 0, 66052, 2, 34, 4, 90, 10, NULL, 'bonus bInt,6; bonus bDex,2; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1501, 'Club', 'Club', 4, 120, NULL, 700, 23, NULL, 1, 3, 8836595, 2, 2, 1, 2, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1502, 'Club_', 'Club', 4, 120, NULL, 700, 23, NULL, 1, 4, 8836595, 2, 2, 1, 2, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1503, 'Club__', 'Club', 4, 120, NULL, 700, 23, NULL, 1, 0, 8836595, 2, 2, 1, 2, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1504, 'Mace', 'Mace', 4, 1600, NULL, 800, 37, NULL, 1, 3, 8836595, 2, 2, 1, 2, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1505, 'Mace_', 'Mace', 4, 1600, NULL, 800, 37, NULL, 1, 4, 8836595, 2, 2, 1, 2, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1506, 'Mace__', 'Mace', 4, 1600, NULL, 800, 37, NULL, 1, 0, 8836595, 2, 2, 1, 2, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1507, 'Smasher', 'Smasher', 4, 9000, NULL, 1000, 54, NULL, 1, 2, 8836595, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1508, 'Smasher_', 'Smasher', 4, 9000, NULL, 1000, 54, NULL, 1, 3, 8836595, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1509, 'Smasher__', 'Smasher', 4, 9000, NULL, 1000, 54, NULL, 1, 3, 8836595, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1510, 'Flail', 'Flail', 4, 16000, NULL, 900, 69, NULL, 1, 2, 447986, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1511, 'Flail_', 'Flail', 4, 16000, NULL, 900, 69, NULL, 1, 3, 447986, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1512, 'Flail__', 'Flail', 4, 16000, NULL, 900, 69, NULL, 1, 3, 447986, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1513, 'Morning_Star', 'Morning Star', 4, 41000, NULL, 1500, 110, NULL, 1, 1, 447986, 2, 2, 3, 27, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1514, 'Morning_Star_', 'Morning Star', 4, 41000, NULL, 1500, 110, NULL, 1, 2, 447986, 2, 2, 3, 27, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1515, 'Morning_Star__', 'Morning Star', 4, 41000, NULL, 1500, 110, NULL, 1, 2, 447986, 2, 2, 3, 27, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1516, 'Sword_Mace', 'Sword Mace', 4, 50000, NULL, 1200, 130, NULL, 1, 0, 447986, 2, 2, 3, 27, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1517, 'Sword_Mace_', 'Sword Mace', 4, 50000, NULL, 1200, 130, NULL, 1, 1, 447986, 2, 2, 3, 27, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1518, 'Sword_Mace__', 'Sword Mace', 4, 50000, NULL, 1200, 130, NULL, 1, 1, 447986, 2, 2, 3, 27, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1519, 'Chain', 'Chain', 4, 23000, NULL, 800, 84, NULL, 1, 2, 447986, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1520, 'Chain_', 'Chain', 4, 23000, NULL, 800, 84, NULL, 1, 3, 447986, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1521, 'Chain__', 'Chain', 4, 23000, NULL, 800, 84, NULL, 1, 3, 447986, 2, 2, 2, 14, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1522, 'Stunner', 'Stunner', 4, 60000, NULL, 2000, 140, NULL, 1, 0, 33040, 2, 2, 3, 27, 8, NULL, 'bonus2 bAddEff,Eff_Stan,1000;');
-INSERT INTO `item_db` VALUES (1523, 'Spike', 'Spike', 4, 20, NULL, 700, 85, NULL, 1, 0, 33040, 2, 2, 4, 40, 8, NULL, 'bonus bCritical,40; bonus bDefRate,-67; bonus bDef2Rate,-67;');
-INSERT INTO `item_db` VALUES (1524, 'Golden_Mace', 'Golden Mace', 4, 20, NULL, 800, 110, NULL, 1, 1, 33040, 2, 2, 4, 40, 8, NULL, 'bonus2 bAddRace,1,10;');
-INSERT INTO `item_db` VALUES (1525, 'Long_Mace', 'Long Mace', 4, 20, NULL, 800, 135, NULL, 3, 0, 33040, 2, 2, 4, 40, 8, NULL, 'bonus bLongAtkDef,10;');
-INSERT INTO `item_db` VALUES (1526, 'Slash', 'Slash', 4, 20, NULL, 1000, 145, NULL, 1, 0, 33040, 2, 2, 4, 40, 8, NULL, 'bonus2 bAddRace,1,15; bonus2 bWeaponComaRace,1,10;');
-INSERT INTO `item_db` VALUES (1527, 'Quadrille', 'Quadrille', 4, 20, NULL, 900, 165, NULL, 1, 0, 33040, 2, 2, 4, 40, 8, NULL, 'bonus2 bAddRace,1,10; bonus2 bAddRace,7,10; bonus2 bAddEle,2,10;');
-INSERT INTO `item_db` VALUES (1528, 'Grand_Cross', 'Grand Cross', 4, 20, NULL, 1500, 140, NULL, 1, 0, 33040, 2, 2, 4, 40, 8, NULL, 'bonus bAtkEle,6; skill 77,3; bonus3 bAutoSpell,77,3,25;');
-INSERT INTO `item_db` VALUES (1529, 'Iron_Driver', 'Iron Driver', 4, 20, NULL, 3000, 155, NULL, 1, 0, 33024, 2, 2, 3, 78, 8, NULL, NULL);
-INSERT INTO `item_db` VALUES (1530, 'Mjolnir', 'Mjolnir', 4, 20, NULL, 6000, 250, NULL, 1, 0, 10477567, 2, 2, 4, 98, 8, NULL, 'bonus bAtkEle,4; bonus bDex,40; bonus bStr,15; bonus bAspdRate,30;');
-INSERT INTO `item_db` VALUES (1531, 'Spanner', 'Spanner', 4, 20, NULL, 2500, 115, NULL, 1, 0, 33040, 2, 2, 3, 55, 8, 'bonus2 bAddEff,Eff_Freeze,100; bonus2 bAddEff,Eff_Stan,100; bonus2 bAddEff,Eff_Blind,100; bonus2 bAddEff,Eff_Poison,100;', NULL);
-INSERT INTO `item_db` VALUES (1550, 'Book', 'Book', 4, 30000, NULL, 600, 85, NULL, 1, 3, 65792, 2, 2, 2, 14, 15, NULL, NULL);
-INSERT INTO `item_db` VALUES (1551, 'Bible', 'Bible', 4, 60000, NULL, 1000, 115, NULL, 1, 2, 65792, 2, 2, 3, 27, 15, NULL, 'bonus bInt,2;');
-INSERT INTO `item_db` VALUES (1552, 'Tablet', 'Tablet', 4, 51000, NULL, 800, 125, NULL, 1, 1, 65792, 2, 2, 3, 27, 15, NULL, NULL);
-INSERT INTO `item_db` VALUES (1553, 'Book_of_Billows', 'Book of Billows', 4, 35000, NULL, 750, 90, NULL, 1, 0, 65792, 2, 2, 3, 27, 15, NULL, 'bonus bAtkEle,1;');
-INSERT INTO `item_db` VALUES (1554, 'Book_of_Mother_Earth', 'Book of Mother Earth', 4, 35000, NULL, 750, 90, NULL, 1, 0, 65792, 2, 2, 3, 27, 15, NULL, 'bonus bAtkEle,2;');
-INSERT INTO `item_db` VALUES (1555, 'Book_of_Blazing_Sun', 'Book of Blazing Sun', 4, 35000, NULL, 750, 90, NULL, 1, 0, 65792, 2, 2, 3, 27, 15, NULL, 'bonus bAtkEle,3;');
-INSERT INTO `item_db` VALUES (1556, 'Book_of_Gust_of_Wind', 'Book of Gust of Wind', 4, 35000, NULL, 750, 90, NULL, 1, 0, 65792, 2, 2, 3, 27, 15, NULL, 'bonus bAtkEle,4;');
-INSERT INTO `item_db` VALUES (1557, 'Book_of_the_Apocalypse', 'Book of the Apocalypse', 4, 35000, NULL, 800, 120, NULL, 1, 0, 65792, 2, 2, 4, 40, 15, NULL, 'bonus bAtkEle,7; bonus2 bSubEle,6,-5; bonus2 bAddEle,1,7; bonus2 bAddEle,2,7; bonus2 bAddEle,3,7; bonus2 bAddEle,4,7;');
-INSERT INTO `item_db` VALUES (1558, 'Girl\'s_Diary', 'Girl\'s Diary', 4, 20, NULL, 300, 60, NULL, 1, 1, 65792, 2, 2, 4, 40, 15, NULL, 'bonus2 bAddDamageClass,1188,150;');
-INSERT INTO `item_db` VALUES (1599, 'Angra_Manyu', 'Angra Manyu', 4, 120, NULL, 10, 1, NULL, 1, 5, 10477567, 2, 2, 4, 2, 8, NULL, 'bonus bStr,420; bonus bAgi,420; bonus bVit,50; bonus bInt,420; bonus bDex,420; bonus bSplashRange,3; bonus bUseSPrate,-100; bonus bNoGemStone,0; bonus bSpeedRate,25; bonus bMatkRate,100;');
-INSERT INTO `item_db` VALUES (1601, 'Rod', 'Rod', 4, 50, NULL, 400, 15, NULL, 1, 3, 8487701, 2, 2, 1, 1, 10, NULL, 'bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1602, 'Rod_', 'Rod', 4, 50, NULL, 400, 15, NULL, 1, 4, 8487701, 2, 2, 1, 1, 10, NULL, 'bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1603, 'Rod__', 'Rod', 4, 50, NULL, 400, 15, NULL, 1, 0, 8487701, 2, 2, 1, 1, 10, NULL, 'bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1604, 'Wand', 'Wand', 4, 2500, NULL, 400, 25, NULL, 1, 2, 8487701, 2, 2, 2, 12, 10, NULL, 'bonus bInt,1; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1605, 'Wand_', 'Wand', 4, 2500, NULL, 400, 25, NULL, 1, 3, 8487701, 2, 2, 2, 12, 10, NULL, 'bonus bInt,1; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1606, 'Wand__', 'Wand', 4, 2500, NULL, 400, 25, NULL, 1, 0, 8487701, 2, 2, 2, 12, 10, NULL, 'bonus bInt,1; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1607, 'Staff', 'Staff', 4, 9500, NULL, 400, 40, NULL, 1, 2, 99092, 2, 2, 2, 12, 10, NULL, 'bonus bInt,2; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1608, 'Staff_', 'Staff', 4, 9500, NULL, 400, 40, NULL, 1, 3, 99092, 2, 2, 2, 12, 10, NULL, 'bonus bInt,2; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1609, 'Staff__', 'Staff', 4, 9500, NULL, 400, 40, NULL, 1, 0, 99092, 2, 2, 2, 12, 10, NULL, 'bonus bInt,2; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1610, 'Arc_Wand', 'Arc Wand', 4, 45000, NULL, 400, 60, NULL, 1, 1, 99092, 2, 2, 3, 24, 10, NULL, 'bonus bInt,3; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1611, 'Arc_Wand_', 'Arc Wand', 4, 45000, NULL, 400, 60, NULL, 1, 2, 99092, 2, 2, 3, 24, 10, NULL, 'bonus bInt,3; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1612, 'Arc_Wand__', 'Arc Wand', 4, 45000, NULL, 400, 60, NULL, 1, 0, 99092, 2, 2, 3, 24, 10, NULL, 'bonus bInt,3; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1613, 'Mighty_Staff', 'Mighty Staff', 4, 20, NULL, 700, 130, NULL, 1, 0, 99092, 2, 2, 3, 24, 10, NULL, 'bonus bStr,10; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1614, 'Blessed_Wand', 'Wand of Occult', 4, 20, NULL, 700, 75, NULL, 1, 0, 99092, 2, 2, 3, 24, 10, NULL, 'bonus bInt,3; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1615, 'Bone_Wand', 'Bone Wand', 4, 20, NULL, 700, 40, NULL, 1, 0, 99092, 2, 2, 3, 24, 10, NULL, 'bonus bInt,4; bonus bAtkEle,9; bonus bMatkRate,15;');
-INSERT INTO `item_db` VALUES (1701, 'Bow', 'Bow', 4, 1000, NULL, 500, 15, NULL, 5, 3, 1706056, 2, 34, 1, 4, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1702, 'Bow_', 'Bow', 4, 1000, NULL, 500, 15, NULL, 5, 4, 1706056, 2, 34, 1, 4, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1703, 'Bow__', 'Bow', 4, 1000, NULL, 500, 15, NULL, 5, 0, 1706056, 2, 34, 1, 4, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1704, 'Composite_Bow', 'Composite Bow', 4, 2500, NULL, 600, 29, NULL, 5, 3, 1706056, 2, 34, 1, 4, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1705, 'Composite_Bow_', 'Composite Bow', 4, 2500, NULL, 600, 29, NULL, 5, 4, 1706056, 2, 34, 1, 4, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1706, 'Composite_Bow__', 'Composite Bow', 4, 2500, NULL, 600, 29, NULL, 5, 0, 1706056, 2, 34, 1, 4, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1707, 'Great_Bow', 'Great Bow', 4, 10000, NULL, 1000, 50, NULL, 5, 2, 1706056, 2, 34, 2, 18, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1708, 'Great_Bow_', 'Great Bow', 4, 10000, NULL, 1000, 50, NULL, 5, 3, 1706056, 2, 34, 2, 18, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1709, 'Great_Bow__', 'Great Bow', 4, 10000, NULL, 1000, 50, NULL, 5, 0, 1706056, 2, 34, 2, 18, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1710, 'CrossBow', 'Cross Bow', 4, 17000, NULL, 900, 65, NULL, 5, 2, 1706056, 2, 34, 2, 18, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1711, 'CrossBow_', 'Cross Bow', 4, 17000, NULL, 900, 65, NULL, 5, 3, 1706056, 2, 34, 2, 18, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1712, 'CrossBow__', 'Cross Bow', 4, 17000, NULL, 900, 65, NULL, 5, 0, 1706056, 2, 34, 2, 18, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1713, 'Arbalest', 'Arbalest', 4, 48000, NULL, 1000, 90, NULL, 5, 1, 1706056, 2, 34, 3, 33, 11, NULL, 'bonus bDex,2;');
-INSERT INTO `item_db` VALUES (1714, 'Gakkung', 'Gakkung', 4, 42000, NULL, 1100, 100, NULL, 5, 1, 1706056, 2, 34, 3, 33, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1715, 'Arbalest_', 'Arbalest', 4, 48000, NULL, 1000, 90, NULL, 5, 2, 1706056, 2, 34, 3, 33, 11, NULL, 'bonus bDex,2;');
-INSERT INTO `item_db` VALUES (1716, 'Gakkung_', 'Gakkung', 4, 42000, NULL, 1100, 100, NULL, 5, 2, 1706056, 2, 34, 3, 33, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1718, 'Hunter_Bow', 'Hunter Bow', 4, 64000, NULL, 1500, 125, NULL, 5, 0, 2048, 2, 34, 3, 33, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1719, 'Bow_of_Roguemaster', 'Roguemaster\'s Bow', 4, 20, NULL, 500, 75, NULL, 11, 0, 64, 2, 34, 4, 48, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1720, 'Bow_of_Rudra', 'Rudra\'s Bow', 4, 20, NULL, 1200, 150, NULL, 5, 0, 1705992, 2, 34, 4, 48, 11, NULL, 'bonus bAtkEle,6; 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;');
-INSERT INTO `item_db` VALUES (1721, 'Repeating_Crossbow', 'Repeating Crossbow', 4, 89000, NULL, 2000, 95, NULL, 9, 1, 133184, 2, 34, 3, 65, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1722, 'Ballista', 'Ballista', 4, 20, NULL, 3500, 145, NULL, 5, 0, 1574912, 2, 34, 4, 77, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (1750, 'Arrow', 'Arrow', 10, 1, NULL, 1, 25, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1751, 'Silver_Arrow', 'Silver Arrow', 10, 3, NULL, 2, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,6;');
-INSERT INTO `item_db` VALUES (1752, 'Fire_Arrow', 'Fire Arrow', 10, 3, NULL, 2, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,3;');
-INSERT INTO `item_db` VALUES (1753, 'Steel_Arrow', 'Steel Arrow', 10, 3, NULL, 2, 40, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1754, 'Crystal_Arrow', 'Crystal Arrow', 10, 3, NULL, 2, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,1;');
-INSERT INTO `item_db` VALUES (1755, 'Arrow_of_Wind', 'Arrow of Wind', 10, 3, NULL, 2, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,4;');
-INSERT INTO `item_db` VALUES (1756, 'Stone_Arrow', 'Stone Arrow', 10, 3, NULL, 2, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,2;');
-INSERT INTO `item_db` VALUES (1757, 'Immaterial_Arrow', 'Immaterial Arrow', 10, 3, NULL, 1, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,8;');
-INSERT INTO `item_db` VALUES (1758, 'Stun_Arrow', 'Stun Arrow', 10, 3, NULL, 3, 1, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus2 bAddEff,Eff_Stan,500;');
-INSERT INTO `item_db` VALUES (1759, 'Freezing_Arrow', 'Freeze Arrow', 10, 3, NULL, 3, 1, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,1; bonus2 bAddEff,Eff_Freeze,500;');
-INSERT INTO `item_db` VALUES (1760, 'Flash_Arrow', 'Flash Arrow', 10, 3, NULL, 3, 1, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus2 bAddEff,Eff_Blind,500;');
-INSERT INTO `item_db` VALUES (1761, 'Curse_Arrow', 'Curse Arrow', 10, 3, NULL, 3, 1, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus2 bAddEff,Eff_Curse,500;');
-INSERT INTO `item_db` VALUES (1762, 'Rusty_Arrow', 'Rusted Arrow', 10, 3, NULL, 2, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,5;');
-INSERT INTO `item_db` VALUES (1763, 'Poison_Arrow', 'Poison Arrow', 10, 3, NULL, 3, 1, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,500;');
-INSERT INTO `item_db` VALUES (1764, 'Incisive_Arrow', 'Sharp Arrow', 10, 3, NULL, 3, 10, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bCritical,10;');
-INSERT INTO `item_db` VALUES (1765, 'Oridecon_Arrow', 'Oridecon Arrow', 10, 3, NULL, 3, 50, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1766, 'Arrow_of_Counter_Evil', 'Arrow of Counter Evil', 10, 40, NULL, 3, 50, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,6;');
-INSERT INTO `item_db` VALUES (1767, 'Arrow_of_Shadow', 'Shadow Arrow', 10, 3, NULL, 2, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus bAtkEle,7;');
-INSERT INTO `item_db` VALUES (1768, 'Sleep_Arrow', 'Sleep Arrow', 10, 3, NULL, 3, 1, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus2 bAddEff,Eff_Sleep,500;');
-INSERT INTO `item_db` VALUES (1769, 'Silence_Arrow', 'Mute Arrow', 10, 3, NULL, 3, 1, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, 'bonus2 bAddEff,Eff_Silence,500;');
-INSERT INTO `item_db` VALUES (1770, 'Iron_Arrow', 'Iron Arrow', 10, 2, NULL, 1, 30, NULL, NULL, NULL, 1706056, 2, 32768, NULL, 1, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (1801, 'Waghnakh', 'Waghnakh', 4, 8000, NULL, 400, 30, NULL, 1, 3, 33024, 2, 2, 1, 1, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1802, 'Waghnakh_', 'Waghnakh', 4, 8000, NULL, 400, 30, NULL, 1, 4, 33024, 2, 2, 1, 1, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1803, 'Knuckle_Duster', 'Knuckle Duster', 4, 25000, NULL, 450, 50, NULL, 1, 2, 33024, 2, 2, 2, 12, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1804, 'Knuckle_Duster_', 'Knuckle Duster', 4, 25000, NULL, 450, 50, NULL, 1, 3, 33024, 2, 2, 2, 12, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1805, 'Hora', 'Hora', 4, 32000, NULL, 450, 65, NULL, 1, 2, 33024, 2, 2, 2, 12, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1806, 'Hora_', 'Hora', 4, 32000, NULL, 450, 65, NULL, 1, 3, 33024, 2, 2, 2, 12, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1807, 'Fist', 'Fist', 4, 53000, NULL, 650, 115, NULL, 1, 0, 33024, 2, 2, 3, 24, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1808, 'Fist_', 'Fist', 4, 53000, NULL, 650, 115, NULL, 1, 1, 33024, 2, 2, 3, 24, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1809, 'Claw', 'Claw', 4, 55000, NULL, 500, 86, NULL, 1, 1, 33024, 2, 2, 3, 24, 12, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (1810, 'Claw_', 'Claw', 4, 55000, NULL, 500, 86, NULL, 1, 2, 33024, 2, 2, 3, 24, 12, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (1811, 'Finger', 'Finger', 4, 58000, NULL, 500, 97, NULL, 1, 1, 33024, 2, 2, 3, 24, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1812, 'Finger_', 'Finger', 4, 58000, NULL, 500, 97, NULL, 1, 2, 33024, 2, 2, 3, 24, 12, NULL, NULL);
-INSERT INTO `item_db` VALUES (1813, 'Kaiser_Knuckle', 'Kaiser Knuckle', 4, 20, NULL, 450, 110, NULL, 1, 0, 33024, 2, 2, 4, 36, 12, NULL, 'bonus bAtkEle,4; bonus2 bAddRace,1,5; bonus2 bAddEle,1,10; bonus2 bAddEle,2,10; bonus2 bAddEle,3,10; bonus2 bAddEle,4,10;');
-INSERT INTO `item_db` VALUES (1814, 'Berserk', 'Berserk', 4, 20, NULL, 500, 120, NULL, 1, 0, 33024, 2, 2, 4, 36, 12, NULL, 'bonus bAspdRate,12;');
-INSERT INTO `item_db` VALUES (1901, 'Violin', 'Violin', 4, 4000, NULL, 700, 50, NULL, 1, 3, 524288, 2, 2, 1, 2, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1902, 'Violin_', 'Violin', 4, 4000, NULL, 700, 50, NULL, 1, 4, 524288, 2, 2, 1, 2, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1903, 'Mandolin', 'Mandolin', 4, 18000, NULL, 400, 90, NULL, 1, 2, 524288, 2, 2, 2, 14, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1904, 'Mandolin_', 'Mandolin', 4, 18000, NULL, 400, 90, NULL, 1, 3, 524288, 2, 2, 2, 14, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1905, 'Lute', 'Lute', 4, 24500, NULL, 500, 105, NULL, 1, 2, 524288, 2, 2, 2, 14, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1906, 'Lute_', 'Lute', 4, 24500, NULL, 500, 105, NULL, 1, 3, 524288, 2, 2, 2, 14, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1907, 'Guitar', 'Guitar', 4, 47000, NULL, 900, 142, NULL, 1, 0, 524288, 2, 2, 3, 27, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1908, 'Guitar_', 'Guitar', 4, 47000, NULL, 900, 142, NULL, 1, 1, 524288, 2, 2, 3, 27, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1909, 'Harp', 'Harp', 4, 62000, NULL, 900, 114, NULL, 1, 1, 524288, 2, 2, 3, 27, 13, NULL, 'bonus bInt,2;');
-INSERT INTO `item_db` VALUES (1910, 'Harp_', 'Harp', 4, 62000, NULL, 900, 114, NULL, 1, 2, 524288, 2, 2, 3, 27, 13, NULL, 'bonus bInt,2;');
-INSERT INTO `item_db` VALUES (1911, 'Guh_Moon_Goh', 'Guhmoongoh', 4, 54000, NULL, 1300, 126, NULL, 1, 1, 524288, 2, 2, 3, 27, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1912, 'Guh_Moon_Goh_', 'Guhmoongoh', 4, 54000, NULL, 1300, 126, NULL, 1, 2, 524288, 2, 2, 3, 27, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (1950, 'Rope', 'Rope', 4, 2500, NULL, 400, 45, NULL, 2, 3, 1048576, 2, 2, 1, 3, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1951, 'Rope_', 'Rope', 4, 2500, NULL, 400, 45, NULL, 2, 4, 1048576, 2, 2, 1, 3, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1952, 'Line', 'Line', 4, 12000, NULL, 300, 80, NULL, 2, 2, 1048576, 2, 2, 2, 16, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1953, 'Line_', 'Line', 4, 12000, NULL, 300, 80, NULL, 2, 3, 1048576, 2, 2, 2, 16, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1954, 'Wire', 'Wire', 4, 17500, NULL, 1000, 95, NULL, 2, 2, 1048576, 2, 2, 2, 16, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1955, 'Wire_', 'Wire', 4, 17500, NULL, 1000, 95, NULL, 2, 3, 1048576, 2, 2, 2, 16, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1956, 'Rante', 'Rante', 4, 32000, NULL, 900, 135, NULL, 2, 0, 1048576, 2, 2, 3, 30, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1957, 'Rante_', 'Rante', 4, 32000, NULL, 900, 135, NULL, 2, 1, 1048576, 2, 2, 3, 30, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1958, 'Tail', 'Tail', 4, 41000, NULL, 700, 105, NULL, 2, 1, 1048576, 2, 2, 3, 30, 14, NULL, 'bonus bLuk,3;');
-INSERT INTO `item_db` VALUES (1959, 'Tail_', 'Tail', 4, 41000, NULL, 700, 105, NULL, 2, 2, 1048576, 2, 2, 3, 30, 14, NULL, 'bonus bLuk,3;');
-INSERT INTO `item_db` VALUES (1960, 'Whip', 'Whip', 4, 38000, NULL, 700, 120, NULL, 2, 1, 1048576, 2, 2, 3, 30, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1961, 'Whip_', 'Whip', 4, 38000, NULL, 700, 120, NULL, 2, 2, 1048576, 2, 2, 3, 30, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (1962, 'Lariat', 'Lariat', 4, 20, NULL, 400, 100, NULL, 2, 0, 1048576, 2, 2, 4, 44, 14, NULL, 'bonus bDex,5; bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (1963, 'Rapture_Rose', 'Rapture Rose', 4, 20, NULL, 300, 115, NULL, 2, 0, 1048576, 2, 2, 4, 44, 14, NULL, 'bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,5000;');
-INSERT INTO `item_db` VALUES (1964, 'Chemeti', 'Chemeti', 4, 20, NULL, 700, 135, NULL, 2, 0, 1048576, 2, 2, 4, 44, 14, NULL, 'bonus bCritical,5; bonus bFlee,10; bonus bFlee2,2;');
-INSERT INTO `item_db` VALUES (2101, 'Guard', 'Guard', 5, 500, NULL, 300, NULL, 3, NULL, 0, 10477567, 2, 32, NULL, 0, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (2102, 'Guard_', 'Guard', 5, 500, NULL, 300, NULL, 3, NULL, 1, 10477567, 2, 32, NULL, 0, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (2103, 'Buckler', 'Buckler', 5, 14000, NULL, 600, NULL, 4, NULL, 0, 2020850, 2, 32, NULL, 0, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (2104, 'Buckler_', 'Buckler', 5, 14000, NULL, 600, NULL, 4, NULL, 1, 2020850, 2, 32, NULL, 0, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (2105, 'Shield', 'Shield', 5, 56000, NULL, 1300, NULL, 6, NULL, 0, 16514, 2, 32, NULL, 0, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (2106, 'Shield_', 'Shield', 5, 56000, NULL, 1300, NULL, 6, NULL, 1, 16514, 2, 32, NULL, 0, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (2107, 'Mirror_Shield', 'Mirror Shield', 5, 60000, NULL, 1000, NULL, 4, NULL, 0, 16514, 2, 32, NULL, 0, 4, NULL, 'bonus bMdef,5;');
-INSERT INTO `item_db` VALUES (2108, 'Mirror_Shield_', 'Mirror Shield', 5, 60000, NULL, 1000, NULL, 4, NULL, 1, 16514, 2, 32, NULL, 0, 4, NULL, 'bonus bMdef,5;');
-INSERT INTO `item_db` VALUES (2109, 'Memorize_Book', 'Book of Summoning', 5, 20, NULL, 1000, NULL, 3, NULL, 0, 66052, 2, 32, NULL, 0, NULL, NULL, 'bonus bInt,1; bonus bMdef,2;');
-INSERT INTO `item_db` VALUES (2110, 'Holy_Guard', 'Holy Guard', 5, 20, NULL, 1400, NULL, 5, NULL, 0, 16384, 2, 32, NULL, 68, 3, NULL, 'bonus bVit,2; bonus bMdef,2;');
-INSERT INTO `item_db` VALUES (2111, 'Evangelist', 'Evangelist', 5, 20, NULL, 1400, NULL, 5, NULL, 0, 16384, 2, 32, NULL, 83, 3, NULL, 'bonus bVit,3; bonus bInt,2; bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2112, 'Novice_Guard', 'Novice Guard', 5, NULL, NULL, 1, NULL, 3, NULL, 0, 8388609, 2, 32, NULL, 0, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (2199, 'Ahura_Mazda', 'Ahura Mazda', 5, 20, NULL, 100, NULL, NULL, NULL, 0, 10477567, 2, 32, NULL, NULL, NULL, NULL, 'bonus bMdef,150; bonus bDef,150; bonus bFlee2,100; bonus2 bSubEle,0,100;');
-INSERT INTO `item_db` VALUES (2201, 'Sunglasses', 'Sunglasses', 5, 5000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 512, NULL, 0, 12, NULL, 'bonus2 bResEff,Eff_Blind,500;');
-INSERT INTO `item_db` VALUES (2202, 'Sunglasses_', 'Sunglasses', 5, 5000, NULL, 100, NULL, 0, NULL, 1, 10477567, 2, 512, NULL, 0, 12, NULL, 'bonus2 bResEff,Eff_Blind,500;');
-INSERT INTO `item_db` VALUES (2203, 'Glasses', 'Glasses', 5, 4000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 512, NULL, 0, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (2204, 'Glasses_', 'Glasses', 5, 4000, NULL, 100, NULL, 0, NULL, 1, 10477567, 2, 512, NULL, 0, 3, NULL, NULL);
-INSERT INTO `item_db` VALUES (2205, 'Diver\'s_Goggles', 'Diver\'s Goggles', 5, 3500, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 512, NULL, 0, 10, NULL, NULL);
-INSERT INTO `item_db` VALUES (2206, 'Wedding_Veil', 'Wedding Veil', 5, 23000, NULL, 100, NULL, 0, NULL, 0, 10477567, 0, 256, NULL, 0, 44, NULL, 'bonus bMdef,5;');
-INSERT INTO `item_db` VALUES (2207, 'Fancy_Flower', 'Fancy Flower', 5, 20, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 256, NULL, 0, 4, NULL, 'bonus2 bSubRace,3,10;');
-INSERT INTO `item_db` VALUES (2208, 'Ribbon', 'Ribbon', 5, 800, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 17, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2209, 'Ribbon_', 'Ribbon', 5, 800, NULL, 100, NULL, 1, NULL, 1, 10477567, 2, 256, NULL, 0, 17, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2210, 'Hair_Band', 'Hair Band', 5, 500, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 9, NULL, NULL);
-INSERT INTO `item_db` VALUES (2211, 'Bandana', 'Bandana', 5, 400, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 6, NULL, NULL);
-INSERT INTO `item_db` VALUES (2212, 'Eye_Bandage', 'Eye Patch', 5, 1000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 512, NULL, 0, 13, NULL, NULL);
-INSERT INTO `item_db` VALUES (2213, 'Kitty_Band', 'Kitty Band', 5, 20, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 2, NULL, NULL);
-INSERT INTO `item_db` VALUES (2214, 'Bunny_Band', 'Bunny Band', 5, 20, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 15, NULL, 'bonus bLuk,2;');
-INSERT INTO `item_db` VALUES (2215, 'Flower_Hairband', 'Flower Band', 5, 20, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 5, NULL, NULL);
-INSERT INTO `item_db` VALUES (2216, 'Biretta', 'Biretta', 5, 9000, NULL, 100, NULL, 4, NULL, 0, 33040, 2, 256, NULL, 0, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (2217, 'Biretta_', 'Biretta', 5, 9000, NULL, 100, NULL, 4, NULL, 1, 33040, 2, 256, NULL, 0, 11, NULL, NULL);
-INSERT INTO `item_db` VALUES (2218, 'Flu_Mask', 'Flu Mask', 5, 300, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 1, NULL, 0, 8, NULL, 'bonus2 bResEff,Eff_Silence,1000;');
-INSERT INTO `item_db` VALUES (2219, 'Flu_Mask_', 'Flu Mask', 5, 300, NULL, 100, NULL, 0, NULL, 1, 10477567, 2, 1, NULL, 0, 8, NULL, 'bonus2 bResEff,Eff_Silence,1000;');
-INSERT INTO `item_db` VALUES (2220, 'Hat', 'Hat', 5, 1000, NULL, 200, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 16, NULL, NULL);
-INSERT INTO `item_db` VALUES (2221, 'Hat_', 'Hat', 5, 1000, NULL, 200, NULL, 2, NULL, 1, 10477567, 2, 256, NULL, 0, 16, NULL, NULL);
-INSERT INTO `item_db` VALUES (2222, 'Turban', 'Turban', 5, 4500, NULL, 300, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (2223, 'Turban_', 'Turban', 5, 4500, NULL, 300, NULL, 3, NULL, 1, 2088958, 2, 256, NULL, 0, 7, NULL, NULL);
-INSERT INTO `item_db` VALUES (2224, 'Goggles', 'Goggles', 5, 10000, NULL, 300, NULL, 5, NULL, 0, 1989866, 2, 768, NULL, 0, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (2225, 'Goggles_', 'Goggles', 5, 10000, NULL, 300, NULL, 5, NULL, 1, 1989866, 2, 768, NULL, 0, 1, NULL, NULL);
-INSERT INTO `item_db` VALUES (2226, 'Cap', 'Cap', 5, 12000, NULL, 400, NULL, 4, NULL, 0, 1989866, 2, 256, NULL, 0, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (2227, 'Cap_', 'Cap', 5, 12000, NULL, 400, NULL, 4, NULL, 1, 1989866, 2, 256, NULL, 0, 14, NULL, NULL);
-INSERT INTO `item_db` VALUES (2228, 'Helm', 'Helm', 5, 44000, NULL, 600, NULL, 6, NULL, 0, 16514, 2, 256, NULL, 0, 40, NULL, NULL);
-INSERT INTO `item_db` VALUES (2229, 'Helm_', 'Helm', 5, 44000, NULL, 600, NULL, 6, NULL, 1, 16514, 2, 256, NULL, 0, 40, NULL, NULL);
-INSERT INTO `item_db` VALUES (2230, 'Gemmed_Sallet', 'Gemmed Sallet', 5, 50000, NULL, 500, NULL, 4, NULL, 0, 414946, 2, 256, NULL, 0, 0, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2231, 'Gemmed_Sallet_', 'Gemmed Sallet', 5, 50000, NULL, 500, NULL, 4, NULL, 1, 414946, 2, 256, NULL, 0, 0, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2232, 'Circlet', 'Circlet', 5, 7500, NULL, 300, NULL, 3, NULL, 0, 99092, 2, 256, NULL, 0, 18, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2233, 'Circlet_', 'Circlet', 5, 7500, NULL, 300, NULL, 3, NULL, 1, 99092, 2, 256, NULL, 0, 18, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2234, 'Tiara', 'Tiara', 5, 20, NULL, 400, NULL, 4, NULL, 0, 2088958, 0, 256, NULL, 45, 19, NULL, 'bonus bInt,2;');
-INSERT INTO `item_db` VALUES (2235, 'Crown', 'Crown', 5, 20, NULL, 400, NULL, 4, NULL, 0, 2088958, 1, 256, NULL, 45, 45, NULL, 'bonus bInt,2;');
-INSERT INTO `item_db` VALUES (2236, 'Santa\'s_Hat', 'Santa\'s Hat', 5, 20, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 20, NULL, 'bonus bMdef,1; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (2237, 'Weird_Goatee', 'Bandit Beard', 5, 2, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 1, NULL, 0, 21, NULL, NULL);
-INSERT INTO `item_db` VALUES (2238, 'Weird_Moustache', 'Moustache', 5, 2, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 1, NULL, 0, 22, NULL, NULL);
-INSERT INTO `item_db` VALUES (2239, 'Single_Glass', 'Single Glass', 5, 10000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 512, NULL, 0, 23, NULL, NULL);
-INSERT INTO `item_db` VALUES (2240, 'Beard', 'Beard', 5, 2, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 1, NULL, 0, 24, NULL, NULL);
-INSERT INTO `item_db` VALUES (2241, 'Granpa_Beard', 'Granpa Beard', 5, 5000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 1, NULL, 0, 25, NULL, NULL);
-INSERT INTO `item_db` VALUES (2242, 'Luxury_Sunglasses', 'Purple Glasses', 5, 24000, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 512, NULL, 0, 26, NULL, 'bonus2 bResEff,Eff_Blind,1000;');
-INSERT INTO `item_db` VALUES (2243, 'Spinning_Eyes', 'Geek Glasses', 5, 20000, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 512, NULL, 0, 27, NULL, 'bonus2 bResEff,Eff_Blind,1500;');
-INSERT INTO `item_db` VALUES (2244, 'Big_Ribbon', 'Big Ribbon', 5, 15000, NULL, 200, NULL, 2, NULL, 0, 2088958, 2, 256, NULL, 0, 28, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2245, 'Sweet_Gent', 'Sweet Gent', 5, 15000, NULL, 400, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 29, NULL, NULL);
-INSERT INTO `item_db` VALUES (2246, 'Golden_Gear', 'Golden Gear', 5, 20, NULL, 900, NULL, 5, NULL, 0, 2088958, 2, 256, NULL, 40, 30, NULL, NULL);
-INSERT INTO `item_db` VALUES (2247, 'Romantic_Gent', 'Romantic Gent', 5, 15000, NULL, 400, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 31, NULL, NULL);
-INSERT INTO `item_db` VALUES (2248, 'Western_Grace', 'Western Grace', 5, 15000, NULL, 400, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 32, NULL, NULL);
-INSERT INTO `item_db` VALUES (2249, 'Coronet', 'Coronet', 5, 20, NULL, 300, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 33, NULL, 'bonus bInt,1;');
-INSERT INTO `item_db` VALUES (2250, 'Fillet', 'Cute Ribbon', 5, 500, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 34, NULL, 'bonus bMaxSP,20;');
-INSERT INTO `item_db` VALUES (2251, 'Holy_Bonnet', 'Monk Hat', 5, 30000, NULL, 100, NULL, 5, NULL, 0, 33040, 2, 256, NULL, 0, 35, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2252, 'Wizard_Hat', 'Wizard Hat', 5, 20, NULL, 300, NULL, 4, NULL, 0, 66052, 2, 256, NULL, 0, 36, NULL, 'bonus bMaxSP,100;');
-INSERT INTO `item_db` VALUES (2253, 'Sunflower', 'Sunflower', 5, 20, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 37, NULL, 'bonus2 bSubRace,4,10;');
-INSERT INTO `item_db` VALUES (2254, 'Angel_Wing', 'Angel Wing', 5, 20, NULL, 100, NULL, 2, NULL, 0, 2088958, 2, 256, NULL, 0, 38, NULL, 'bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,6,3;');
-INSERT INTO `item_db` VALUES (2255, 'Evil_Wing', 'Evil Wing', 5, 20, NULL, 100, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 39, NULL, 'bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,8,3;');
-INSERT INTO `item_db` VALUES (2256, 'Majestic_Goat', 'Majestic Goat', 5, 20, NULL, 800, NULL, 5, NULL, 0, 279714, 2, 256, NULL, 0, 41, NULL, 'bonus bStr,1;');
-INSERT INTO `item_db` VALUES (2257, 'Snow_Horn', 'Snow Horn', 5, 20, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 42, NULL, NULL);
-INSERT INTO `item_db` VALUES (2258, 'Spiky_Band', 'Spiky Band', 5, 20, NULL, 1000, NULL, 6, NULL, 0, 447986, 2, 256, NULL, 50, 43, NULL, NULL);
-INSERT INTO `item_db` VALUES (2259, 'Mini_Propeller', 'Mini Propeller', 5, 20, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 46, NULL, NULL);
-INSERT INTO `item_db` VALUES (2260, 'Mini_Glasses', 'Mini Glasses', 5, 28000, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 512, NULL, 0, 47, NULL, NULL);
-INSERT INTO `item_db` VALUES (2261, 'Prontera_Army_Cap', 'Army Cap', 5, 20, NULL, 400, NULL, 4, NULL, 0, 414946, 2, 256, NULL, 0, 48, NULL, NULL);
-INSERT INTO `item_db` VALUES (2262, 'Pierrot_Nose', 'Pierrot Nose', 5, 20, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 1, NULL, 0, 49, NULL, NULL);
-INSERT INTO `item_db` VALUES (2263, 'Gangster_Patch', 'Zoro Masque', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 512, NULL, 0, 50, NULL, NULL);
-INSERT INTO `item_db` VALUES (2264, 'Munak_Hat', 'Munak Hat', 5, 20, NULL, 300, NULL, 5, NULL, 0, 10477567, 2, 769, NULL, 0, 51, NULL, 'bonus2 bSubRace,1,10;');
-INSERT INTO `item_db` VALUES (2265, 'Gangster_Mask', 'Gangster Mask', 5, 20, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 1, NULL, 0, 52, NULL, 'bonus2 bResEff,Eff_Silence,1500;');
-INSERT INTO `item_db` VALUES (2266, 'Iron_Cain', 'Iron Cain', 5, 20, NULL, 300, NULL, 1, NULL, 0, 16514, 2, 1, NULL, 50, 53, NULL, NULL);
-INSERT INTO `item_db` VALUES (2267, 'Cigar', 'Cigar', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 1, NULL, 0, 54, NULL, 'bonus2 bSubRace,4,3;');
-INSERT INTO `item_db` VALUES (2268, 'Pipe', 'Pipe', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 1, NULL, 0, 55, NULL, 'bonus2 bSubRace,4,3;');
-INSERT INTO `item_db` VALUES (2269, 'Centimental_Flower', 'Centimental Flower', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 1, NULL, 0, 56, NULL, 'bonus2 bSubRace,3,3;');
-INSERT INTO `item_db` VALUES (2270, 'Centimental_Leaf', 'Centimental Leaf', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 1, NULL, 0, 57, NULL, 'bonus2 bSubRace,3,3;');
-INSERT INTO `item_db` VALUES (2271, 'Jack_a_Dandy', 'Jack a Dandy', 5, 45000, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 58, NULL, NULL);
-INSERT INTO `item_db` VALUES (2272, 'Stop_Post', 'Stop Post', 5, 20, NULL, 400, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 59, NULL, NULL);
-INSERT INTO `item_db` VALUES (2273, 'Doctor_Cap', 'Doctor Band', 5, 20, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 60, NULL, 'bonus bInt,1;');
-INSERT INTO `item_db` VALUES (2274, 'Ghost_Bandana', 'Ghost Bandana', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 256, NULL, 0, 61, NULL, 'bonus bAgi,2; bonus2 bSubEle,8,10;');
-INSERT INTO `item_db` VALUES (2275, 'Red_Bandana', 'Red Bandana', 5, 20, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 62, NULL, NULL);
-INSERT INTO `item_db` VALUES (2276, 'Eagle_Eyes', 'Eagle Eyes', 5, 20, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 512, NULL, 0, 63, NULL, NULL);
-INSERT INTO `item_db` VALUES (2277, 'Nurse_Cap', 'Nurse Cap', 5, 20, NULL, 100, NULL, 1, NULL, 0, 33040, 2, 256, NULL, 0, 64, NULL, 'bonus bInt,1; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (2278, 'Mr_Smile', 'Mr. Smile', 5, 60, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 513, NULL, 0, 65, NULL, NULL);
-INSERT INTO `item_db` VALUES (2279, 'Bomb_Wick', 'Bomb Wick', 5, 20, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 66, NULL, NULL);
-INSERT INTO `item_db` VALUES (2280, 'Sakkat', 'Sakkat', 5, 20, NULL, 300, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 0, 67, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (2281, 'Phantom_of_Opera', 'Opera Masque', 5, 8000, NULL, 200, NULL, 2, NULL, 0, 2088958, 2, 513, NULL, 0, 68, NULL, NULL);
-INSERT INTO `item_db` VALUES (2282, 'Heaven_Ring', 'Heaven Ring', 5, 20, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 256, NULL, 0, 69, NULL, 'bonus2 bSubEle,6,10;');
-INSERT INTO `item_db` VALUES (2283, 'Ear_Mufs', 'Ear Mufs', 5, 20, NULL, 200, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 0, 70, NULL, 'bonus2 bResEff,Eff_Curse,1000;');
-INSERT INTO `item_db` VALUES (2284, 'Antler', 'Antler', 5, 20, NULL, 500, NULL, 4, NULL, 0, 2088958, 2, 256, NULL, 0, 71, NULL, NULL);
-INSERT INTO `item_db` VALUES (2285, 'Apple_Of_Archer', 'Apple o\' Archer', 5, 20, NULL, 200, NULL, 0, NULL, 0, 2088958, 2, 256, NULL, 30, 72, NULL, 'bonus bDex,3;');
-INSERT INTO `item_db` VALUES (2286, 'Elven_Ears', 'Elven Ears', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 512, NULL, 70, 73, NULL, NULL);
-INSERT INTO `item_db` VALUES (2287, 'Pirate_Bandana', 'Pirate Bandana', 5, 20, NULL, 100, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 74, NULL, 'bonus bStr,1;');
-INSERT INTO `item_db` VALUES (2288, 'Mr_Scream', 'Mr. Scream', 5, 20, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 513, NULL, 0, 75, NULL, NULL);
-INSERT INTO `item_db` VALUES (2289, 'Poo_Poo_Hat', 'Poo Poo Hat', 5, 20, NULL, 700, NULL, 0, NULL, 0, 10477567, 2, 256, NULL, 0, 76, NULL, 'bonus2 bSubRace,7,10;');
-INSERT INTO `item_db` VALUES (2290, 'Funeral_Costume', 'Funeral Hat', 5, 3000, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 77, NULL, NULL);
-INSERT INTO `item_db` VALUES (2291, 'Masquerade', 'Masquerade', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 512, NULL, 0, 78, NULL, 'bonus2 bAddRace,7,3;');
-INSERT INTO `item_db` VALUES (2292, 'Welding_Mask', 'Welding Mask', 5, 20, NULL, 300, NULL, 2, NULL, 0, 263200, 2, 513, NULL, 50, 79, NULL, 'bonus2 bSubEle,3,10;');
-INSERT INTO `item_db` VALUES (2293, 'Pretend_Murdered', 'Pretend Murdered', 5, 20, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 80, NULL, NULL);
-INSERT INTO `item_db` VALUES (2294, 'Stellar', 'Stellar', 5, 20, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 81, NULL, NULL);
-INSERT INTO `item_db` VALUES (2295, 'Blinker', 'Blinker', 5, 1500, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 512, NULL, 0, 82, NULL, 'bonus2 bResEff,Eff_Blind,10000;');
-INSERT INTO `item_db` VALUES (2296, 'Binoculars', 'Binoculars', 5, 20, NULL, 100, NULL, 1, NULL, 0, 1574920, 2, 512, NULL, 50, 83, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (2297, 'Goblini_Mask', 'Goblini Mask', 5, 20, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 513, NULL, 0, 84, NULL, NULL);
-INSERT INTO `item_db` VALUES (2298, 'Green_Feeler', 'Green Feeler', 5, 20, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 85, NULL, NULL);
-INSERT INTO `item_db` VALUES (2299, 'Viking_Helm', 'Viking Helm', 5, 20, NULL, 500, NULL, 5, NULL, 0, 414946, 2, 256, NULL, 0, 86, NULL, NULL);
-INSERT INTO `item_db` VALUES (2301, 'Cotton_Shirt', 'Cotton Shirt', 5, 10, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2302, 'Cotton_Shirt_', 'Cotton Shirt', 5, 10, NULL, 100, NULL, 1, NULL, 1, 10477567, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2303, 'Leather_Jacket', 'Leather Jacket', 5, 200, NULL, 200, NULL, 2, NULL, 0, 10477567, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2304, 'Leather_Jacket_', 'Leather Jacket', 5, 200, NULL, 200, NULL, 2, NULL, 1, 10477567, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2305, 'Adventure_Suit', 'Adventurer\'s Suit', 5, 1000, NULL, 300, NULL, 3, NULL, 0, 10477567, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2306, 'Adventure_Suit_', 'Adventurer\'s Suit', 5, 1000, NULL, 300, NULL, 3, NULL, 1, 10477567, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2307, 'Mantle', 'Mantle', 5, 10000, NULL, 600, NULL, 4, NULL, 0, 2088958, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2308, 'Mantle_', 'Mantle', 5, 10000, NULL, 600, NULL, 4, NULL, 1, 2088958, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2309, 'Coat', 'Coat', 5, 22000, NULL, 1200, NULL, 5, NULL, 0, 2088958, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2310, 'Coat_', 'Coat', 5, 22000, NULL, 1200, NULL, 5, NULL, 1, 2088958, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2311, 'Mink_Coat', 'Mink Coat', 5, 50000, NULL, 2300, NULL, 6, NULL, 1, 2088958, 2, 16, NULL, 30, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2312, 'Padded_Armor', 'Padded Armor', 5, 48000, NULL, 2800, NULL, 7, NULL, 0, 414946, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2313, 'Padded_Armor_', 'Padded Armor', 5, 48000, NULL, 2800, NULL, 7, NULL, 1, 414946, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2314, 'Chain_Mail', 'Chain Mail', 5, 65000, NULL, 3300, NULL, 8, NULL, 0, 414946, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2315, 'Chain_Mail_', 'Chain Mail', 5, 65000, NULL, 3300, NULL, 8, NULL, 1, 414946, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2316, 'Full_Plate', 'Full Plate', 5, 80000, NULL, 4500, NULL, 10, NULL, 0, 16514, 2, 16, NULL, 40, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2317, 'Full_Plate_', 'Full Plate', 5, 80000, NULL, 4500, NULL, 10, NULL, 1, 16514, 2, 16, NULL, 40, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2318, 'Clothes_of_the_Lord', 'Lord\'s Clothes', 5, 20, NULL, 2500, NULL, 8, NULL, 1, 263200, 2, 16, NULL, 70, 0, NULL, 'bonus bMdef,5; bonus bInt,1;');
-INSERT INTO `item_db` VALUES (2319, 'Glittering_Clothes', 'Glittering Jacket', 5, 20, NULL, 2500, NULL, 7, NULL, 1, 10477566, 2, 16, NULL, 60, 0, NULL, 'bonus bMdef,5;');
-INSERT INTO `item_db` VALUES (2320, 'Formal_Suit', 'Formal Suit', 5, 20, NULL, 300, NULL, 5, NULL, 1, 2088958, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2321, 'Silk_Robe', 'Silk Robe', 5, 8000, NULL, 400, NULL, 3, NULL, 0, 378806, 2, 16, NULL, 0, 0, NULL, 'bonus bMdef,10;');
-INSERT INTO `item_db` VALUES (2322, 'Silk_Robe_', 'Silk Robe', 5, 8000, NULL, 400, NULL, 3, NULL, 1, 378806, 2, 16, NULL, 0, 0, NULL, 'bonus bMdef,10;');
-INSERT INTO `item_db` VALUES (2323, 'Scapulare', 'Scapulare', 5, 6500, NULL, 400, NULL, 4, NULL, 0, 33040, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2324, 'Scapulare_', 'Scapulare', 5, 6500, NULL, 400, NULL, 4, NULL, 1, 33040, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2325, 'Saint_Robe', 'Saint\'s Robe', 5, 54000, NULL, 600, NULL, 6, NULL, 0, 296240, 2, 16, NULL, 0, 0, NULL, 'bonus bMdef,5;');
-INSERT INTO `item_db` VALUES (2326, 'Saint_Robe_', 'Saint\'s Robe', 5, 54000, NULL, 600, NULL, 6, NULL, 1, 296240, 2, 16, NULL, 0, 0, NULL, 'bonus bMdef,5;');
-INSERT INTO `item_db` VALUES (2327, 'Holy_Robe', 'Holy Robe', 5, 20, NULL, 1700, NULL, 7, NULL, 0, 33040, 2, 16, NULL, 60, 0, NULL, 'bonus bMdef,5; bonus2 bSubRace,6,15; bonus2 bSubEle,7,10;');
-INSERT INTO `item_db` VALUES (2328, 'Wooden_Mail', 'Wooden Mail', 5, 5500, NULL, 1000, NULL, 4, NULL, 0, 279714, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2329, 'Wooden_Mail_', 'Wooden Mail', 5, 5500, NULL, 1000, NULL, 4, NULL, 1, 279714, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2330, 'Tights', 'Tights', 5, 71000, NULL, 500, NULL, 6, NULL, 0, 1574920, 2, 16, NULL, 45, 0, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (2331, 'Tights_', 'Tights', 5, 71000, NULL, 500, NULL, 6, NULL, 1, 1574920, 2, 16, NULL, 45, 0, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (2332, 'Silver_Robe', 'Silver Robe', 5, 7000, NULL, 700, NULL, 4, NULL, 0, 66052, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2333, 'Silver_Robe_', 'Silver Robe', 5, 7000, NULL, 700, NULL, 4, NULL, 1, 66052, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2334, 'Mage_Coat', 'Mage Coat', 5, 20, NULL, 600, NULL, 5, NULL, 0, 66052, 2, 16, NULL, 50, 0, NULL, 'bonus bMdef,5; bonus bInt,1;');
-INSERT INTO `item_db` VALUES (2335, 'Thief_Clothes', 'Thief Clothes', 5, 74000, NULL, 100, NULL, 6, NULL, 0, 135232, 2, 16, NULL, 0, 0, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (2336, 'Thief_Clothes_', 'Thief Clothes', 5, 74000, NULL, 100, NULL, 6, NULL, 1, 135232, 2, 16, NULL, 0, 0, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (2337, 'Ninja_Suit', 'Ninja Suit', 5, 20, NULL, 1500, NULL, 7, NULL, 0, 135232, 2, 16, NULL, 50, 0, NULL, 'bonus bAgi,1; bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2338, 'Wedding_Dress', 'Wedding Dress', 5, 43000, NULL, 500, NULL, 0, NULL, 0, 2088958, 0, 16, NULL, 0, 0, NULL, 'bonus bMdef,15; changebase 22;');
-INSERT INTO `item_db` VALUES (2339, 'Pantie', 'Pantie', 5, 1000, NULL, 100, NULL, 4, NULL, 0, 10477567, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2340, 'Novice_Breastplate', 'Novice Breastplate', 5, 89000, NULL, 500, NULL, 4, NULL, 1, 8388609, 2, 16, NULL, 10, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2341, 'Full_Plate_Armor', 'Full Plate Armor', 5, 94000, NULL, 5500, NULL, 11, NULL, 0, 16384, 2, 16, NULL, 70, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2342, 'Full_Plate_Armor_', 'Full Plate Armor', 5, 94000, NULL, 5500, NULL, 11, NULL, 1, 16384, 2, 16, NULL, 70, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2343, 'Robe_of_Casting', 'Casting Robe', 5, 20, NULL, 1100, NULL, 5, NULL, 0, 66048, 2, 16, NULL, 75, 0, NULL, 'bonus bCastrate,-3;');
-INSERT INTO `item_db` VALUES (2344, 'Armor_of_Fire', 'Fire Armor', 5, NULL, NULL, 2200, NULL, 4, NULL, 0, 279714, 2, 16, NULL, 45, 0, NULL, 'bonus bDefEle,3;');
-INSERT INTO `item_db` VALUES (2345, 'Armor_of_Fire_', 'Fire Armor', 5, NULL, NULL, 2200, NULL, 4, NULL, 1, 279714, 2, 16, NULL, 45, 0, NULL, 'bonus bDefEle,3;');
-INSERT INTO `item_db` VALUES (2346, 'Armor_of_Water', 'Water Armor', 5, NULL, NULL, 2200, NULL, 4, NULL, 0, 279714, 2, 16, NULL, 45, 0, NULL, 'bonus bDefEle,1;');
-INSERT INTO `item_db` VALUES (2347, 'Armor_of_Water_', 'Water Armor', 5, NULL, NULL, 2200, NULL, 4, NULL, 1, 279714, 2, 16, NULL, 45, 0, NULL, 'bonus bDefEle,1;');
-INSERT INTO `item_db` VALUES (2348, 'Armor_of_Wind', 'Wind Armor', 5, NULL, NULL, 2200, NULL, 4, NULL, 0, 279714, 2, 16, NULL, 45, 0, NULL, 'bonus bDefEle,4;');
-INSERT INTO `item_db` VALUES (2349, 'Armor_of_Wind_', 'Wind Armor', 5, NULL, NULL, 2200, NULL, 4, NULL, 1, 279714, 2, 16, NULL, 45, 0, NULL, 'bonus bDefEle,4;');
-INSERT INTO `item_db` VALUES (2350, 'Armor_of_Land', 'Earth Armor', 5, NULL, NULL, 2200, NULL, 4, NULL, 0, 279714, 2, 16, NULL, 45, 0, NULL, 'bonus bDefEle,2;');
-INSERT INTO `item_db` VALUES (2351, 'Armor_of_Land_', 'Earth Armor', 5, NULL, NULL, 2200, NULL, 4, NULL, 1, 279714, 2, 16, NULL, 45, 0, NULL, 'bonus bDefEle,2;');
-INSERT INTO `item_db` VALUES (2352, 'Armor_For_Novice', 'Novice Armor', 5, NULL, NULL, 1, NULL, 4, NULL, 0, 8388609, 2, 16, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2401, 'Sandals', 'Sandals', 5, 400, NULL, 200, NULL, 1, NULL, 0, 10477567, 2, 64, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2402, 'Sandals_', 'Sandals', 5, 400, NULL, 200, NULL, 1, NULL, 1, 10477567, 2, 64, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2403, 'Shoes', 'Shoes', 5, 3500, NULL, 400, NULL, 2, NULL, 0, 2088958, 2, 64, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2404, 'Shoes_', 'Shoes', 5, 3500, NULL, 400, NULL, 2, NULL, 1, 2088958, 2, 64, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2405, 'Boots', 'Boots', 5, 18000, NULL, 600, NULL, 4, NULL, 0, 1989866, 2, 64, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2406, 'Boots_', 'Boots', 5, 18000, NULL, 600, NULL, 4, NULL, 1, 1989866, 2, 64, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2407, 'Crystal_Pumps', 'Crystal Pumps', 5, 20, NULL, 100, NULL, 0, NULL, 0, 2088958, 0, 64, NULL, 0, 0, NULL, 'bonus bMdef,10; bonus bLuk,5;');
-INSERT INTO `item_db` VALUES (2408, 'Cuffs', 'Ball\'n\'Chain', 5, 5000, NULL, 3000, NULL, 3, NULL, 0, 10477567, 2, 64, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2409, 'Spiky_Heel', 'Highheals', 5, 8500, NULL, 600, NULL, 2, NULL, 0, 2088958, 2, 64, NULL, 0, 0, NULL, 'bonus bMdef,5;');
-INSERT INTO `item_db` VALUES (2410, 'Sleipnir', 'Sleipnir', 5, 20, NULL, 3500, NULL, 0, NULL, 0, 10477567, 2, 64, NULL, 95, 0, NULL, 'bonus bMdef,10; bonus bMaxHPrate,10; bonus bMaxSPrate,10; bonus bSPrecovRate,15; bonus bSpeedRate,25;');
-INSERT INTO `item_db` VALUES (2411, 'Greaves', 'Greaves', 5, 48000, NULL, 750, NULL, 5, NULL, 0, 16512, 2, 64, NULL, 65, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2412, 'Greaves_', 'Greaves', 5, 48000, NULL, 750, NULL, 5, NULL, 1, 16512, 2, 64, NULL, 65, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2413, 'Safety_Shoes', 'Safety Shoes', 5, 20, NULL, 350, NULL, 6, NULL, 0, 16514, 2, 64, NULL, 30, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2414, 'Sandal_For_Novice', 'Novice Sandal', 5, NULL, NULL, 1, NULL, 2, NULL, 0, 8388609, 2, 64, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2501, 'Hood', 'Hood', 5, 1000, NULL, 200, NULL, 1, NULL, 0, 10477567, 2, 4, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2502, 'Hood_', 'Hood', 5, 1000, NULL, 200, NULL, 1, NULL, 1, 10477567, 2, 4, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2503, 'Muffler', 'Muffler', 5, 5000, NULL, 400, NULL, 2, NULL, 0, 2088958, 2, 4, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2504, 'Muffler_', 'Muffler', 5, 5000, NULL, 400, NULL, 2, NULL, 1, 2088958, 2, 4, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2505, 'Manteau', 'Manteau', 5, 32000, NULL, 600, NULL, 4, NULL, 0, 414946, 2, 4, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2506, 'Manteau_', 'Manteau', 5, 32000, NULL, 600, NULL, 4, NULL, 1, 414946, 2, 4, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2507, 'Cape_Of_Ancient_Lord', 'Cape of Old Marquess', 5, 20, NULL, 600, NULL, 2, NULL, 0, 2088958, 2, 4, NULL, 40, 0, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (2508, 'Ragamuffin_Cape', 'Ragamuffin Manteau', 5, 20, NULL, 500, NULL, 1, NULL, 0, 2088958, 2, 4, NULL, 0, 0, NULL, 'bonus bMdef,10;');
-INSERT INTO `item_db` VALUES (2509, 'Manteau_of_Survival', 'Manteau of Life', 5, 20, NULL, 550, NULL, 0, NULL, 0, 66052, 2, 4, NULL, 75, 0, NULL, 'bonus bVit,10;');
-INSERT INTO `item_db` VALUES (2510, 'Hood_For_Novice', 'Novice Hood', 5, NULL, NULL, 1, NULL, 2, NULL, 0, 8388609, 2, 4, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2601, 'Ring', 'Ring', 5, 30000, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 136, NULL, 20, 0, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (2602, 'Earring', 'Earring', 5, 30000, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 136, NULL, 20, 0, NULL, 'bonus bInt,2;');
-INSERT INTO `item_db` VALUES (2603, 'Necklace', 'Necklace', 5, 30000, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 136, NULL, 20, 0, NULL, 'bonus bVit,2;');
-INSERT INTO `item_db` VALUES (2604, 'Glove', 'Glove', 5, 30000, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 136, NULL, 20, 0, NULL, 'bonus bDex,2;');
-INSERT INTO `item_db` VALUES (2605, 'Brooch', 'Brooch', 5, 30000, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 136, NULL, 20, 0, NULL, 'bonus bAgi,2;');
-INSERT INTO `item_db` VALUES (2607, 'Clip', 'Clip', 5, 30000, NULL, 100, NULL, 0, NULL, 1, 10477567, 2, 136, NULL, 0, 0, NULL, 'bonus bMaxSP,10;');
-INSERT INTO `item_db` VALUES (2608, 'Rosary', 'Rosary', 5, 15000, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 136, NULL, 20, 0, NULL, 'bonus bMdef,5; bonus bLuk,2;');
-INSERT INTO `item_db` VALUES (2609, 'Skull_Ring', 'Skull Ring', 5, 10000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 136, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2610, 'Gold_Ring', 'Gold Ring', 5, 30000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 136, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2611, 'Silver_Ring', 'Silver Ring', 5, 20000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 136, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2612, 'Flower_Ring', 'Flower Ring', 5, 1500, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 136, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2613, 'Diamond_Ring', 'Diamond Ring', 5, 45000, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 136, NULL, 0, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2614, 'Eye_of_Dullahan', 'Eye of Dullahan', 5, 90000, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 136, NULL, 50, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2615, 'Safety_Ring', 'Safety Ring', 5, 75000, NULL, 100, NULL, 3, NULL, 0, 2088958, 2, 136, NULL, 40, 0, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (2616, 'Critical_Ring', 'Critical Ring', 5, 75000, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 136, NULL, 40, 0, NULL, 'bonus bCritical,5;');
-INSERT INTO `item_db` VALUES (2617, 'Celebrant\'s_Mitten', 'Celebrant\'s Mitten', 5, 20, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 136, NULL, 35, 0, NULL, 'bonus bInt,1;');
-INSERT INTO `item_db` VALUES (2618, 'Matyr\'s_Leash', 'Matyr\'s Leash', 5, 20, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 136, NULL, 35, 0, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (2619, 'Thimble_Of_Archer', 'Bow Thimble', 5, 30000, NULL, 100, NULL, 0, NULL, 0, 1574920, 2, 136, NULL, 65, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2620, 'Ring_Of_Rogue', 'Rogue\'s Treasure', 5, 30000, NULL, 100, NULL, 0, NULL, 0, 135232, 2, 136, NULL, 70, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2621, 'Ring_', 'Ancient Ring', 5, 30000, NULL, 200, NULL, 0, NULL, 1, 2088958, 2, 136, NULL, 90, 0, NULL, 'bonus bStr,1;');
-INSERT INTO `item_db` VALUES (2622, 'Earring_', 'Ancient Earring', 5, 30000, NULL, 200, NULL, 0, NULL, 1, 2088958, 2, 136, NULL, 90, 0, NULL, 'bonus bInt,1;');
-INSERT INTO `item_db` VALUES (2623, 'Necklace_', 'Ancient Necklace', 5, 30000, NULL, 200, NULL, 0, NULL, 1, 2088958, 2, 136, NULL, 90, 0, NULL, 'bonus bVit,1;');
-INSERT INTO `item_db` VALUES (2624, 'Glove_', 'Ancient Glove', 5, 30000, NULL, 200, NULL, 0, NULL, 1, 2088958, 2, 136, NULL, 90, 0, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (2625, 'Brooch_', 'Ancient Brooch', 5, 30000, NULL, 200, NULL, 0, NULL, 1, 2088958, 2, 136, NULL, 90, 0, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (2626, 'Rosary_', 'Ancient Rosary', 5, 15000, NULL, 200, NULL, 0, NULL, 1, 2088958, 2, 136, NULL, 90, 0, NULL, 'bonus bMdef,3; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (2627, 'Belt', 'Ancient Belt', 5, 20000, NULL, 1200, NULL, 0, NULL, 1, 10477567, 2, 136, NULL, 25, 0, NULL, NULL);
-INSERT INTO `item_db` VALUES (2628, 'Novice_Armlet', 'Novice Armlet', 5, 400, NULL, 200, NULL, 0, NULL, 1, 8388609, 2, 136, NULL, 0, 0, NULL, 'bonus bStr,1; bonus bInt,1; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (2629, 'Magingiorde', 'Magingiorde', 5, 20, NULL, 8000, NULL, 2, NULL, 0, 10477567, 2, 136, NULL, 90, 0, NULL, 'bonus bStr,40; bonus bMdef,7;');
-INSERT INTO `item_db` VALUES (2630, 'Brysinggamen', 'Brysinggamen', 5, 20, NULL, 1500, NULL, 1, NULL, 0, 10477567, 2, 136, NULL, 95, 0, NULL, 'bonus bStr,3; bonus bAgi,3; bonus bVit,3; bonus bInt,3; bonus bMdef,5;');
-INSERT INTO `item_db` VALUES (2631, 'Pebble_Ring', 'Pebble Ring', 5, NULL, NULL, 10, NULL, 0, NULL, 0, 10477567, 2, 136, NULL, 0, 0, NULL, 'bonus bStr,2; bonus bAgi,2; bonus bVit,2; bonus bInt,2; bonus bDex,2; bonus bLuk,2;');
-INSERT INTO `item_db` VALUES (2634, 'Wedding_Ring_M', 'Wedding Ring', 5, NULL, NULL, 0, NULL, 0, NULL, 0, 10477567, 1, 136, NULL, 0, NULL, NULL, 'skill 334,1; skill 335,1; skill 336,1;');
-INSERT INTO `item_db` VALUES (2635, 'Wedding_Ring_F', 'Wedding Ring', 5, NULL, NULL, 0, NULL, 0, NULL, 0, 10477567, 0, 136, NULL, 0, NULL, NULL, 'skill 334,1; skill 335,1; skill 336,1;');
-INSERT INTO `item_db` VALUES (2636, 'Gold_Christmas_Ring', 'Gold Christmas Ring', 5, NULL, NULL, 0, NULL, 0, NULL, 0, 10477567, 2, 136, NULL, 0, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (2637, 'Silver_Christmas_Ring', 'Silver Christmas Ring', 5, NULL, NULL, 0, NULL, 0, NULL, 0, 10477567, 2, 136, NULL, 0, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (2638, 'Exorcize_Sachet', 'Exorcize Sachet', 5, NULL, NULL, 100, NULL, 0, NULL, NULL, 10477567, NULL, 136, NULL, 0, NULL, NULL, 'bonus bStr,1; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (2639, 'Purification_Sachet', 'Purification Sachet', 5, NULL, NULL, 100, NULL, 0, NULL, NULL, 10477567, NULL, 136, NULL, 0, NULL, NULL, 'bonus bAgi,1; bonus bInt,1;');
-INSERT INTO `item_db` VALUES (4001, 'Poring_Card', 'Poring Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bLuk,2; bonus bFlee2,1;');
-INSERT INTO `item_db` VALUES (4002, 'Fabre_Card', 'Fabre Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bVit,1; bonus bMaxHP,100;');
-INSERT INTO `item_db` VALUES (4003, 'Pupa_Card', 'Pupa Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bMaxHP,700;');
-INSERT INTO `item_db` VALUES (4004, 'Drops_Card', 'Drops Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bDex,1; bonus bHit,3;');
-INSERT INTO `item_db` VALUES (4005, 'Poring__Card', 'Poring Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEle,7,20;');
-INSERT INTO `item_db` VALUES (4006, 'Lunatic_Card', 'Lunatic Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bLuk,1; bonus bCritical,1; bonus bFlee2,1;');
-INSERT INTO `item_db` VALUES (4007, 'Pecopeco_Egg_Card', 'Pecopeco Egg Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,0,20;');
-INSERT INTO `item_db` VALUES (4008, 'Picky_Card', 'Picky Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bStr,1; bonus bBaseAtk,10;');
-INSERT INTO `item_db` VALUES (4009, 'Chonchon_Card', 'Chonchon Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bAgi,1; bonus bFlee,2;');
-INSERT INTO `item_db` VALUES (4010, 'Wilow_Card', 'Wilow Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bMaxSP,80;');
-INSERT INTO `item_db` VALUES (4011, 'Picky__Card', 'Picky Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bVit,1; bonus bMaxHP,100;');
-INSERT INTO `item_db` VALUES (4012, 'Thief_Bug_Egg_Card', 'Thief Bug Egg Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bMaxHP,400;');
-INSERT INTO `item_db` VALUES (4013, 'Andre_Egg_Card', 'Andre Egg Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bMaxHPrate,5;');
-INSERT INTO `item_db` VALUES (4014, 'Roda_Frog_Card', 'Roda Frog Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bMaxHP,400; bonus bMaxSP,50;');
-INSERT INTO `item_db` VALUES (4015, 'Condor_Card', 'Condor Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bFlee,10;');
-INSERT INTO `item_db` VALUES (4016, 'Thief_Bug_Card', 'Thief Bug Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (4017, 'Savage_Babe_Card', 'Savage Babe Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Stan,500;');
-INSERT INTO `item_db` VALUES (4018, 'Andre_Larva_Card', 'Andre Larva Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bInt,1; bonus bMaxSP,10;');
-INSERT INTO `item_db` VALUES (4019, 'Hornet_Card', 'Hornet Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bStr,1; bonus bBaseAtk,3;');
-INSERT INTO `item_db` VALUES (4020, 'Farmiliar_Card', 'Farmiliar Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Blind,500; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4021, 'Rocker_Card', 'Rocker Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (4022, 'Spore_Card', 'Spore Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bVit,2;');
-INSERT INTO `item_db` VALUES (4023, 'Baby_Desert_Wolf_Card', 'Baby Desert Wolf Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bInt,1;');
-INSERT INTO `item_db` VALUES (4024, 'Plankton_Card', 'Plankton Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Sleep,500; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4025, 'Skeleton_Card', 'Skeleton Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bBaseAtk,10; bonus2 bAddEff,Eff_Stan,200;');
-INSERT INTO `item_db` VALUES (4026, 'Thief_bug_Female_Card', 'Thief bug Female Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAgi,1; bonus bFlee,1;');
-INSERT INTO `item_db` VALUES (4027, 'Kukre_Card', 'Kukre Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bAgi,2;');
-INSERT INTO `item_db` VALUES (4028, 'Tarou_Card', 'Tarou Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (4029, 'Wolf_Card', 'Wolf Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bBaseAtk,15; bonus bCritical,1;');
-INSERT INTO `item_db` VALUES (4030, 'Mandragora_Card', 'Mandragora Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEle,4,20;');
-INSERT INTO `item_db` VALUES (4031, 'Pecopeco_Card', 'Pecopeco Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bMaxHPrate,10;');
-INSERT INTO `item_db` VALUES (4032, 'Ambernite_Card', 'Ambernite Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bDef,2;');
-INSERT INTO `item_db` VALUES (4033, 'Poporing_Card', 'Poporing Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 53,1;');
-INSERT INTO `item_db` VALUES (4034, 'Worm_Tail_Card', 'Worm Tail Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bDex,2;');
-INSERT INTO `item_db` VALUES (4035, 'Hydra_Card', 'Hydra Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,7,20;');
-INSERT INTO `item_db` VALUES (4036, 'Muka_Card', 'Muka Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bHPrecovRate,10;');
-INSERT INTO `item_db` VALUES (4037, 'Snake_Card', 'Snake Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Poison,500; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4038, 'Zombie_Card', 'Zombie Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bHPrecovRate,20;');
-INSERT INTO `item_db` VALUES (4039, 'Stainer_Card', 'Stainer Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Silence,2000; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4040, 'Creamy_Card', 'Creamy Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 26,1;');
-INSERT INTO `item_db` VALUES (4041, 'Coco_Card', 'Coco Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Sleep,2000; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4042, 'Steel_Chonchon_Card', 'Steel Chonchon Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,4,10; bonus bDef,2;');
-INSERT INTO `item_db` VALUES (4043, 'Andre_Card', 'Andre Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bBaseAtk,20;');
-INSERT INTO `item_db` VALUES (4044, 'Smokie_Card', 'Smokie Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 51,1;');
-INSERT INTO `item_db` VALUES (4045, 'Horn_Card', 'Horn Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bLongAtkDef,35;');
-INSERT INTO `item_db` VALUES (4046, 'Martin_Card', 'Martin Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Blind,2000; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4047, 'Ghostring_Card', 'Ghostring Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,8; bonus bHPrecovRate,-25;');
-INSERT INTO `item_db` VALUES (4048, 'Poison_Spore_Card', 'Poison Spore Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 52,3;');
-INSERT INTO `item_db` VALUES (4049, 'Vadon_Card', 'Vadon Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEle,3,20;');
-INSERT INTO `item_db` VALUES (4050, 'Male_Thief_Bug_Card', 'Male Thief Bug Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bAgi,2;');
-INSERT INTO `item_db` VALUES (4051, 'Yoyo_Card', 'Yoyo Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bFlee2,5; bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (4052, 'Elder_Willow_Card', 'Elder Willow Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bInt,2;');
-INSERT INTO `item_db` VALUES (4053, 'Vitata_Card', 'Vitata Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 28,1; bonus bUseSPrate,25;');
-INSERT INTO `item_db` VALUES (4054, 'Angeling_Card', 'Angeling Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,6;');
-INSERT INTO `item_db` VALUES (4055, 'Marina_Card', 'Marina Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Freeze,500; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4056, 'Dustiness_Card', 'Dustiness Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,4,30; bonus bFlee,5;');
-INSERT INTO `item_db` VALUES (4057, 'Metaller_Card', 'Metaller Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Silence,500; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4058, 'Thara_Frog_Card', 'Thara Frog Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,7,30;');
-INSERT INTO `item_db` VALUES (4059, 'Soldier_Andre_Card', 'Soldier Andre Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,3,30;');
-INSERT INTO `item_db` VALUES (4060, 'Goblin_Card', 'Goblin Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,2,20;');
-INSERT INTO `item_db` VALUES (4061, 'Cornutus_Card', 'Cornutus Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4062, 'Anacondaq_Card', 'Anacondaq Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEle,5,20;');
-INSERT INTO `item_db` VALUES (4063, 'Caramel_Card', 'Caramel Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,4,20;');
-INSERT INTO `item_db` VALUES (4064, 'Zerom_Card', 'Zerom Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bDex,3;');
-INSERT INTO `item_db` VALUES (4065, 'Kaho_Card', 'Kaho Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEle,2,20;');
-INSERT INTO `item_db` VALUES (4066, 'Orc_Warrior_Card', 'Orc Warrior Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,2,30;');
-INSERT INTO `item_db` VALUES (4067, 'Megalodon_Card', 'Megalodon Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Freeze,2000; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4068, 'Scorpion_Card', 'Scorpion Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,3,20;');
-INSERT INTO `item_db` VALUES (4069, 'Drainliar_Card', 'Drainliar Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEle,1,20;');
-INSERT INTO `item_db` VALUES (4070, 'Eggyra_Card', 'Eggyra Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bSPrecovRate,15;');
-INSERT INTO `item_db` VALUES (4071, 'Orc_Zombie_Card', 'Orc Zombie Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,9,30; bonus bFlee,5;');
-INSERT INTO `item_db` VALUES (4072, 'Golem_Card', 'Golem Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4073, 'Pirate_Skeleton_Card', 'Pirate Skeleton Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 37,5;');
-INSERT INTO `item_db` VALUES (4074, 'BigFoot_Card', 'BigFoot Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,4,30;');
-INSERT INTO `item_db` VALUES (4075, 'Argos_Card', 'Argos Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Stone,2000; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4076, 'Magnolia_Card', 'Magnolia Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Curse,500; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4077, 'Phen_Card', 'Phen Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bNoCastCancel,0; bonus bCastrate,25;');
-INSERT INTO `item_db` VALUES (4078, 'Savage_Card', 'Savage Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bVit,3;');
-INSERT INTO `item_db` VALUES (4079, 'Mantis_Card', 'Mantis Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bStr,3;');
-INSERT INTO `item_db` VALUES (4080, 'Flora_Card', 'Flora Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,5,20;');
-INSERT INTO `item_db` VALUES (4081, 'Hode_Card', 'Hode Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,2,30; bonus bFlee,5;');
-INSERT INTO `item_db` VALUES (4082, 'Desert_Wolf_Card', 'Desert Wolf Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddSize,0,15; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4083, 'Rafflesia_Card', 'Rafflesia Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,5,30;');
-INSERT INTO `item_db` VALUES (4084, 'Marine_Sphere_Card', 'Marine Sphere Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 7,3;');
-INSERT INTO `item_db` VALUES (4085, 'Orc_Skeleton_Card', 'Orc Skeleton Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEle,6,20;');
-INSERT INTO `item_db` VALUES (4086, 'Soldier_Skeleton_Card', 'Soldier Skeleton Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bCritical,9;');
-INSERT INTO `item_db` VALUES (4087, 'Giearth_Card', 'Giearth Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Confusion,10000; bonus2 bSubEle,2,15;');
-INSERT INTO `item_db` VALUES (4088, 'Frilldora_Card', 'Frilldora Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'skill 135,1;');
-INSERT INTO `item_db` VALUES (4089, 'Sword_Fish_Card', 'Swordfish Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,1; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4090, 'Munak_Card', 'Munak Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Stone,1500; bonus2 bSubEle,2,5; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4091, 'Kobold_Card', 'Kobold Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bStr,1; bonus bCritical,4;');
-INSERT INTO `item_db` VALUES (4092, 'Skel_Worker_Card', 'Skel Worker Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddSize,1,15; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4093, 'Obeaune_Card', 'Obeaune Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 35,1;');
-INSERT INTO `item_db` VALUES (4094, 'Archer_Skeleton_Card', 'Archer Skeleton Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (4095, 'Marse_Card', 'Marse Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,1,30;');
-INSERT INTO `item_db` VALUES (4096, 'Zenorc_Card', 'Zenorc Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Poison,400; bonus bBaseAtk,10;');
-INSERT INTO `item_db` VALUES (4097, 'Matyr_Card', 'Matyr Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bMaxHPrate,10; bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (4098, 'Dokebi_Card', 'Dokebi Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,4; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4099, 'Pasana_Card', 'Pasana Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,3; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4100, 'Sohee_Card', 'Sohee Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bMaxSPrate,15; bonus bSPrecovRate,3;');
-INSERT INTO `item_db` VALUES (4101, 'Sand_Man_Card', 'Sandman Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,2; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4102, 'Whisper_Card', 'Whisper Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bFlee,20; bonus2 bSubEle,8,-50;');
-INSERT INTO `item_db` VALUES (4103, 'Horong_Card', 'Horong Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 10,1;');
-INSERT INTO `item_db` VALUES (4104, 'Requiem_Card', 'Requiem Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Confusion,500;');
-INSERT INTO `item_db` VALUES (4105, 'Marc_Card', 'Marc Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,1,5; bonus2 bResEff,Eff_Freeze,10000;');
-INSERT INTO `item_db` VALUES (4106, 'Mummy_Card', 'Mummy Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bHit,20;');
-INSERT INTO `item_db` VALUES (4107, 'Verit_Card', 'Verit Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bMaxHPrate,8; bonus bMaxSPrate,8;');
-INSERT INTO `item_db` VALUES (4108, 'Myst_Card', 'Myst Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,5,30; bonus bFlee,5;');
-INSERT INTO `item_db` VALUES (4109, 'Jakk_Card', 'Jakk Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,3,30; bonus bFlee,5;');
-INSERT INTO `item_db` VALUES (4110, 'Ghoul_Card', 'Ghoul Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Poison,2000; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4111, 'Strouf_Card', 'Strouf Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,6,20;');
-INSERT INTO `item_db` VALUES (4112, 'Marduk_Card', 'Marduk Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Silence,10000;');
-INSERT INTO `item_db` VALUES (4113, 'Marionette_Card', 'Marionette Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,8,30; bonus bFlee,5;');
-INSERT INTO `item_db` VALUES (4114, 'Argiope_Card', 'Argiope Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,5; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4115, 'Hunter_Fly_Card', 'Hunter Fly Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bHpDrainRate,3,15;');
-INSERT INTO `item_db` VALUES (4116, 'Isis_Card', 'Isis Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,7,30; bonus bFlee,5;');
-INSERT INTO `item_db` VALUES (4117, 'Side_Winder_Card', 'Sidewinder Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bDoubleRate,5;');
-INSERT INTO `item_db` VALUES (4118, 'Petit_Card', 'Petit Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,9,20;');
-INSERT INTO `item_db` VALUES (4119, 'Bathory_Card', 'Bathory Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,7;');
-INSERT INTO `item_db` VALUES (4120, 'Petit__Card', 'Petit Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,9,30;');
-INSERT INTO `item_db` VALUES (4121, 'Phreeoni_Card', 'Phreeoni Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bHit,100;');
-INSERT INTO `item_db` VALUES (4122, 'Deviruchi_Card', 'Deviruchi Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bStr,1; bonus2 bResEff,Eff_Blind,10000;');
-INSERT INTO `item_db` VALUES (4123, 'Eddga_Card', 'Eddga Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bInfiniteEndure,0; bonus bMaxHPrate,-25;');
-INSERT INTO `item_db` VALUES (4124, 'Medusa_Card', 'Medusa Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,6,15; bonus2 bResEff,Eff_Stone,10000;');
-INSERT INTO `item_db` VALUES (4125, 'Deviace_Card', 'Deviace Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,7,7; bonus2 bAddRace,2,7; bonus2 bAddRace,3,7; bonus2 bAddRace,4,7;');
-INSERT INTO `item_db` VALUES (4126, 'Minorous_Card', 'Minorous Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddSize,2,15; bonus bBaseAtk,5;');
-INSERT INTO `item_db` VALUES (4127, 'Nightmare_Card', 'Nightmare Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Sleep,10000; bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (4128, 'Golden_Bug_Card', 'Golden Bug Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bNoMagicDamage,0; bonus bUseSPrate,100;');
-INSERT INTO `item_db` VALUES (4129, 'Baphomet__Card', 'Baphomet Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bAgi,3; bonus bCritical,1;');
-INSERT INTO `item_db` VALUES (4130, 'Scorpion_King_Card', 'Scorpion King Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEle,9,20;');
-INSERT INTO `item_db` VALUES (4131, 'Moonlight_Flower_Card', 'Moonlight Flower Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bSpeedRate,25;');
-INSERT INTO `item_db` VALUES (4132, 'Mistress_Card', 'Mistress Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bNoGemStone,0; bonus bUseSPrate,25;');
-INSERT INTO `item_db` VALUES (4133, 'Raydric_Card', 'Raydric Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,0,20;');
-INSERT INTO `item_db` VALUES (4134, 'Dracula_Card', 'Dracula Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bSpDrainRate,3,5;');
-INSERT INTO `item_db` VALUES (4135, 'Orc_Lord_Card', 'Orc Lord Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bShortWeaponDamageReturn,30;');
-INSERT INTO `item_db` VALUES (4136, 'Khalitzburg_Card', 'Khalitzburg Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,6,30;');
-INSERT INTO `item_db` VALUES (4137, 'Drake_Card', 'Drake Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bNoSizeFix,0;');
-INSERT INTO `item_db` VALUES (4138, 'Anubis_Card', 'Anubis Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus2 bSubRace,8,30;');
-INSERT INTO `item_db` VALUES (4139, 'Joker_Card', 'Joker Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 50,1;');
-INSERT INTO `item_db` VALUES (4140, 'Knight_Of_Abyss_Card', 'Knight Of Abyss Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddRace,10,25;');
-INSERT INTO `item_db` VALUES (4141, 'Evil_Druid_Card', 'Evil Druid Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bDefEle,9; bonus bInt,1; bonus bDef,1;');
-INSERT INTO `item_db` VALUES (4142, 'Doppelganger_Card', 'Doppelganger Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAspdRate,30;');
-INSERT INTO `item_db` VALUES (4143, 'Orc_Hero_Card', 'Orc Hero Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bVit,3; bonus2 bResEff,Eff_Stan,10000;');
-INSERT INTO `item_db` VALUES (4144, 'Osiris_Card', 'Osiris Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bRestartFullRecover,0;');
-INSERT INTO `item_db` VALUES (4145, 'Berzebub_Card', 'Berzebub Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bCastrate,-30;');
-INSERT INTO `item_db` VALUES (4146, 'Maya_Card', 'Maya Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bMagicDamageReturn,30;');
-INSERT INTO `item_db` VALUES (4147, 'Baphomet_Card', 'Baphomet Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bHit,-10; bonus bSplashRange,1;');
-INSERT INTO `item_db` VALUES (4148, 'Pharaoh_Card', 'Pharaoh Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bUseSPrate,-30;');
-INSERT INTO `item_db` VALUES (4149, 'Bon_Gun_Card', 'Bon Gun Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bInt,2;');
-INSERT INTO `item_db` VALUES (4150, 'Orc_Archer_Card', 'Orc Archer Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bRange,1;');
-INSERT INTO `item_db` VALUES (4151, 'Mimic_Card', 'Mimic Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bAgi,1; bonus bDex,2; bonus bLuk,3;');
-INSERT INTO `item_db` VALUES (4152, 'Wraith_Card', 'Wraith Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bMatk,8;');
-INSERT INTO `item_db` VALUES (4153, 'Alarm_Card', 'Alarm Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bCastrate,-10;');
-INSERT INTO `item_db` VALUES (4154, 'Arclouse_Card', 'Arclouse Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (4155, 'Rideword_Card', 'Rideword Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bDex,6;');
-INSERT INTO `item_db` VALUES (4156, 'Skeleton_Prisoner_Card', 'Skel Prisoner Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 45,3;');
-INSERT INTO `item_db` VALUES (4157, 'Zombie_Prisoner_Card', 'Zombie Prisoner Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bMaxHPrate,10;');
-INSERT INTO `item_db` VALUES (4158, 'Dark_Priest_Card', 'Dark Priest Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bUseSPrate,-15;');
-INSERT INTO `item_db` VALUES (4159, 'Punk_Card', 'Punk Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bUseSPrate,-15;');
-INSERT INTO `item_db` VALUES (4160, 'Zherlthsh_Card', 'Zherlthsh Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bUseSPrate,-15;');
-INSERT INTO `item_db` VALUES (4161, 'Mysteltainn_Card', 'Mysteltainn Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAtk,30; bonus bMaxHPrate,-22; bonus bCastrate,-10;');
-INSERT INTO `item_db` VALUES (4162, 'Tirfing_Card', 'Tirfing Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAgi,3; bonus bFlee,10;');
-INSERT INTO `item_db` VALUES (4163, 'Executioner_Card', 'Executioner Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bRandomAttackIncrease,300, 4;');
-INSERT INTO `item_db` VALUES (4164, 'Anolian_Card', 'Anolian Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (4165, 'Sting_Card', 'Sting Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bDex,4;');
-INSERT INTO `item_db` VALUES (4166, 'Wander_Man_Card', 'Wander Man Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bHit,30; bonus bCritical,6;');
-INSERT INTO `item_db` VALUES (4167, 'Cramp_Card', 'Cramp Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bAgi,3;');
-INSERT INTO `item_db` VALUES (4168, 'Filamentous_Card', 'Filamentous Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus2 bResEff,Eff_Stone,100; bonus2 bResEff,Eff_Freeze,100; bonus2 bResEff,Eff_Stan,100; bonus2 bResEff,Eff_Sleep,100; bonus2 bResEff,Eff_Poison,100; bonus2 bResEff,Eff_Curse,100; bonus2 bResEff,Eff_Silence,100; bonus2 bResEff,Eff_Confusion,100; bonus2 bResEff,Eff_Blind,100;');
-INSERT INTO `item_db` VALUES (4169, 'Brilight_Card', 'Brilight Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bAgi,2; bonus bLuk,3;');
-INSERT INTO `item_db` VALUES (4170, 'Iron_Fist_Card', 'Iron Fist Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'bonus bVit,2;');
-INSERT INTO `item_db` VALUES (4171, 'High_Orc_Card', 'High Orc Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 16, NULL, NULL, NULL, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (4172, 'Choco_Card', 'Choco Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bStr,100; bonus bAgi,100; bonus bVit,100; bonus bInt,100; bonus bDex,100; bonus bLuk,100;');
-INSERT INTO `item_db` VALUES (4173, 'Stem_Worm_Card', 'Stem Worm Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bDex,2;');
-INSERT INTO `item_db` VALUES (4174, 'Penonema_Card', 'Penomena Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bMaxHPrate, 15;');
-INSERT INTO `item_db` VALUES (4175, 'Marin_Card', 'Marin Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,1,20;');
-INSERT INTO `item_db` VALUES (4176, 'Sasquatch_Card', 'Sasquatch Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bAddSize,1,50; bonus bAtk,-10;');
-INSERT INTO `item_db` VALUES (4177, 'Antonio_Card', 'Antonio Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'skill 50,5; skill 210,5;');
-INSERT INTO `item_db` VALUES (4178, 'Cruiser_Card', 'Cruiser Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Stone,50;');
-INSERT INTO `item_db` VALUES (4179, 'Mystcase_Card', 'Mystcase Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus bCastrate,-50; bonus bAtk,+50;');
-INSERT INTO `item_db` VALUES (4180, 'Chepet_Card', 'Chepet Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bLuk,5;');
-INSERT INTO `item_db` VALUES (4181, 'Stormy_Knight_Card', 'Stormy Knight Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Freeze,25; bonus bAtk,25;');
-INSERT INTO `item_db` VALUES (4182, 'Hatii_Card', 'Hatii Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bAddSize,2,50; bonus bAtk,-10;');
-INSERT INTO `item_db` VALUES (4183, 'Gargoyle_Card', 'Gargoyle Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 136, NULL, NULL, NULL, NULL, 'bonus bRange,5;');
-INSERT INTO `item_db` VALUES (4184, 'Raggler_Card', 'Raggler Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Sleep,50;');
-INSERT INTO `item_db` VALUES (4185, 'Neraid_Card', 'Neraid Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus2 bAddSize,0,50; bonus bAtk,-10;');
-INSERT INTO `item_db` VALUES (4186, 'Pest_Card', 'Pest Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,0,20;');
-INSERT INTO `item_db` VALUES (4187, 'Injustice_Card', 'Injustice Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,9,20;');
-INSERT INTO `item_db` VALUES (4188, 'Goblin_Archer_Card', 'Goblin Archer Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,2,20;');
-INSERT INTO `item_db` VALUES (4189, 'Gryphon_Card', 'Gryphon Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Silence,25; bonus bAtk,25;');
-INSERT INTO `item_db` VALUES (4190, 'Dark_Frame_Card', 'Dark Frame Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 769, NULL, NULL, NULL, NULL, 'skill 32,2;');
-INSERT INTO `item_db` VALUES (4191, 'Wind_Ghost_Card', 'Wind Ghost Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAtkEle,4;');
-INSERT INTO `item_db` VALUES (4192, 'Merman_Card', 'Merman Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAtkEle,1;');
-INSERT INTO `item_db` VALUES (4193, 'Cookie_Card', 'Cookie Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAtkEle,7;');
-INSERT INTO `item_db` VALUES (4194, 'Aster_Card', 'Aster Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,3,20;');
-INSERT INTO `item_db` VALUES (4195, 'Carat_Card', 'Carat Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,6,20;');
-INSERT INTO `item_db` VALUES (4196, 'Bloody_Knight_Card', 'Bloody Knight Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Blind,25; bonus bAtk,25;');
-INSERT INTO `item_db` VALUES (4197, 'Clock_Card', 'Clock Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'bonus bLuk,10;');
-INSERT INTO `item_db` VALUES (4198, 'Clock_Tower_Manager_Card', 'C Tower Manager Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Curse,50;');
-INSERT INTO `item_db` VALUES (4199, 'Alligator_Card', 'Alligator Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Poison,50;');
-INSERT INTO `item_db` VALUES (4200, 'Dark_Lord_Card', 'Dark Lord Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAtkEle,9;');
-INSERT INTO `item_db` VALUES (4201, 'Orc_Lady_Card', 'Orc Lady Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,4,20;');
-INSERT INTO `item_db` VALUES (4202, 'Megalith_Card', 'Megalith Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 4, NULL, NULL, NULL, NULL, 'skill 9,1;');
-INSERT INTO `item_db` VALUES (4203, 'Alice_Card', 'Alice Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAtkEle,6;');
-INSERT INTO `item_db` VALUES (4204, 'Raydric_Archer_Card', 'Raydric Archer Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAtkEle,3;');
-INSERT INTO `item_db` VALUES (4205, 'Greatest_General_Card', 'Greatest General Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,5,20;');
-INSERT INTO `item_db` VALUES (4206, 'Stalatic_Golem_Card', 'Stalactic Golem Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, NULL, NULL, NULL, 'bonus bMaxHP,500; bonus bDex,-3;');
-INSERT INTO `item_db` VALUES (4207, 'Tri_Joint_Card', 'Tri Joint Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,7,20;');
-INSERT INTO `item_db` VALUES (4208, 'Steamrider_Goblin_Card', 'Steam Goblin Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 64, NULL, NULL, NULL, NULL, 'bonus2 bSubEle,8,20;');
-INSERT INTO `item_db` VALUES (4209, 'Sage_Worm_Card', 'Sage Worm Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bAtkEle,8;');
-INSERT INTO `item_db` VALUES (4210, 'Kobold_Archer_Card', 'Kobold archer Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus bHit,25; bonus bAtk,25;');
-INSERT INTO `item_db` VALUES (4211, 'Chimera_Card', 'Chimera Card', 6, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'bonus2 bAddEff,Eff_Stan,25; bonus bAtk,25;');
-INSERT INTO `item_db` VALUES (5001, 'Headset', 'Headset', 5, 20, NULL, 200, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 87, NULL, 'bonus2 bResEff,Eff_Curse,1000;');
-INSERT INTO `item_db` VALUES (5002, 'Jewel_Crown', 'Jewel Crown', 5, 20, NULL, 600, NULL, 4, NULL, 0, 414946, 2, 256, NULL, 60, 88, NULL, 'bonus bMdef,3; bonus bInt,2; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (5003, 'Joker_Jester', 'Joker Jester', 5, 20, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 89, NULL, 'bonus bMdef,5; bonus bLuk,2;');
-INSERT INTO `item_db` VALUES (5004, 'Oxygen_Mask', 'Oxygen Mask', 5, 20, NULL, 200, NULL, 0, NULL, 0, 2088958, 2, 1, NULL, 0, 90, NULL, 'bonus2 bResEff,Eff_Poison,2000;');
-INSERT INTO `item_db` VALUES (5005, 'Gas_Mask', 'Gas Mask', 5, 20, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 513, NULL, 0, 91, NULL, 'bonus2 bResEff,Eff_Poison,3000;');
-INSERT INTO `item_db` VALUES (5006, 'Machoman_Glasses', 'Machoman\'s Glasses', 5, 36000, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 512, NULL, 0, 92, NULL, NULL);
-INSERT INTO `item_db` VALUES (5007, 'Grand_Circlet', 'Grand Circlet', 5, 20, NULL, 200, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 55, 93, NULL, 'bonus bMdef,4; bonus bStr,1; bonus bInt,1; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (5008, 'Puppy_Love', 'Puppy Love', 5, 20, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 94, NULL, NULL);
-INSERT INTO `item_db` VALUES (5009, 'Safety_Helmet', 'Safety Helmet', 5, 20, NULL, 500, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 95, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (5010, 'Indian_Hair_Piece', 'Indian Fillet', 5, 20, NULL, 100, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 0, 96, NULL, NULL);
-INSERT INTO `item_db` VALUES (5011, 'Aerial', 'Aerial', 5, 20, NULL, 100, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 0, 97, NULL, NULL);
-INSERT INTO `item_db` VALUES (5012, 'Ph.D_Hat', 'Ph.D Hat', 5, 20, NULL, 200, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 0, 98, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (5013, 'Horn_Of_Lord_Kaho', 'Lord Kaho\'s Horn', 5, 20, NULL, 100, NULL, 5, NULL, 0, 10477567, 2, 256, NULL, 0, 99, NULL, 'bonus bMdef,10; bonus bStr,5; bonus bAgi,10; bonus bVit,10; bonus bInt,5; bonus bLuk,20;');
-INSERT INTO `item_db` VALUES (5014, 'Fin_Helm', 'Fin Helm', 5, 20, NULL, 300, NULL, 2, NULL, 0, 16514, 2, 512, NULL, 65, 100, NULL, NULL);
-INSERT INTO `item_db` VALUES (5015, 'Egg_Shell', 'Egg Shell', 5, 20, NULL, 200, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 0, 101, NULL, NULL);
-INSERT INTO `item_db` VALUES (5016, 'Boy\'s_Cap', 'Boy\'s Cap', 5, 20, NULL, 100, NULL, 2, NULL, 0, 2088958, 2, 256, NULL, 0, 102, NULL, NULL);
-INSERT INTO `item_db` VALUES (5017, 'Bone_Helm', 'Bone Helm', 5, 20, NULL, 800, NULL, 7, NULL, 0, 279714, 2, 256, NULL, 70, 103, NULL, 'bonus2 bSubEle,7,-15;');
-INSERT INTO `item_db` VALUES (5018, 'Feather_Bonnet', 'Feather Bonnet', 5, 20, NULL, 300, NULL, 4, NULL, 0, 1574920, 2, 256, NULL, 0, 104, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (5019, 'Corsair', 'Corsair', 5, 20, NULL, 500, NULL, 5, NULL, 0, 2088958, 2, 256, NULL, 0, 105, NULL, 'bonus bVit,1;');
-INSERT INTO `item_db` VALUES (5020, 'Kafra_Band', 'Kafra Band', 5, 20, NULL, 500, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 0, 106, NULL, 'bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (5021, 'Bankruptcy_of_Heart', 'Money Loser\'s Grief', 5, NULL, NULL, 1200, NULL, 4, NULL, 0, 263200, 2, 256, NULL, 38, 107, NULL, 'bonus bInt,1; bonus bDex,1;');
-INSERT INTO `item_db` VALUES (5022, 'Solar_God_Helm', 'Solar God Helm', 5, NULL, NULL, 2400, NULL, 4, NULL, 0, 2088832, 2, 768, NULL, 0, 138, NULL, 'bonus bStr,3; bonus bInt,2;');
-INSERT INTO `item_db` VALUES (5023, 'Parcel_Hat', 'Parcel Hat', 5, NULL, NULL, 1000, NULL, 0, NULL, 0, 263200, 2, 256, NULL, 0, 108, NULL, NULL);
-INSERT INTO `item_db` VALUES (5024, 'Cake_Hat', 'Cake Hat', 5, NULL, NULL, 1500, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 109, NULL, NULL);
-INSERT INTO `item_db` VALUES (5025, 'Angel_Helm', 'Angel Helm', 5, NULL, NULL, 1600, NULL, 5, NULL, 0, 2088832, 2, 256, NULL, 74, 110, NULL, 'bonus bAgi,1; bonus bLuk,1; bonus bMdef,3;');
-INSERT INTO `item_db` VALUES (5026, 'Chef_Hat', 'Chef\'s Hat', 5, NULL, NULL, 300, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 50, 111, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (5027, 'Mage_Hat', 'Mage Hat', 5, NULL, NULL, 300, NULL, 1, NULL, 0, 66052, 2, 256, NULL, 0, 112, NULL, 'bonus bInt,2; bonus bMaxSP,150;');
-INSERT INTO `item_db` VALUES (5028, 'Candle', 'Candle', 5, NULL, NULL, 150, NULL, 5, NULL, 0, 10477567, 2, 256, NULL, 0, 113, NULL, NULL);
-INSERT INTO `item_db` VALUES (5029, 'Spore_Hat', 'Spore Hat', 5, NULL, NULL, 900, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 20, 114, NULL, NULL);
-INSERT INTO `item_db` VALUES (5030, 'Panda_Hat', 'Panda Hat', 5, NULL, NULL, 800, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 40, 115, NULL, NULL);
-INSERT INTO `item_db` VALUES (5031, 'Miner\'s_Helmet', 'Miner\'s Helmet', 5, NULL, NULL, 1500, NULL, 4, NULL, 0, 447986, 2, 256, NULL, 55, 116, NULL, 'bonus bDex,2;');
-INSERT INTO `item_db` VALUES (5032, 'Sunday_Hat', 'Sunday Hat', 5, NULL, NULL, 800, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 117, NULL, NULL);
-INSERT INTO `item_db` VALUES (5033, 'Smokie_Hat', 'Smokie Hat', 5, NULL, NULL, 900, NULL, 3, NULL, 0, 2088958, 2, 256, NULL, 50, 118, NULL, NULL);
-INSERT INTO `item_db` VALUES (5034, 'Lightbulb_Hairband', 'Lightbulb Hairband', 5, NULL, NULL, 500, NULL, 0, NULL, 0, 2088958, 2, 256, NULL, 0, 119, NULL, NULL);
-INSERT INTO `item_db` VALUES (5035, 'Poring_Hat', 'Poring Hat', 5, NULL, NULL, 700, NULL, 2, NULL, 0, 2088958, 2, 256, NULL, 38, 120, NULL, NULL);
-INSERT INTO `item_db` VALUES (5036, 'Cross_Hairband', 'Cross Hairband', 5, NULL, NULL, 250, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 10, 121, NULL, NULL);
-INSERT INTO `item_db` VALUES (5037, 'Fruit_Shell', 'Apple Hat', 5, NULL, NULL, 150, NULL, 4, NULL, 0, 10477567, 2, 256, NULL, 5, 122, NULL, NULL);
-INSERT INTO `item_db` VALUES (5038, 'Deviruchi_Hat', 'Deviruchi Hat', 5, NULL, NULL, 800, NULL, 2, NULL, 0, 2088958, 2, 256, NULL, 64, 123, NULL, 'bonus bStr,1; bonus bInt,1;');
-INSERT INTO `item_db` VALUES (5039, 'Rainbow_Eggshell', 'Rainbow Eggshell', 5, NULL, NULL, 400, NULL, 4, NULL, 0, 10477567, 2, 256, NULL, 19, 124, NULL, NULL);
-INSERT INTO `item_db` VALUES (5040, 'Blush', 'Blush', 5, NULL, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 512, NULL, 0, 125, NULL, NULL);
-INSERT INTO `item_db` VALUES (5041, 'Heart_Hairpin', 'Heart Hairpin', 5, NULL, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 256, NULL, 0, 126, NULL, NULL);
-INSERT INTO `item_db` VALUES (5042, 'Hair_Protector', 'Dumpling Decoration', 5, NULL, NULL, 150, NULL, 0, NULL, 0, 2088958, 2, 256, NULL, 14, 127, NULL, NULL);
-INSERT INTO `item_db` VALUES (5043, 'Opera_Ghost_Mask', 'Opera Ghost Mask', 5, NULL, NULL, 200, NULL, 1, NULL, 0, 2088958, 2, 512, NULL, 20, 128, NULL, NULL);
-INSERT INTO `item_db` VALUES (5044, 'Wing_Of_Demon', 'Wing\'s of Demon', 5, NULL, NULL, 350, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 45, 129, NULL, NULL);
-INSERT INTO `item_db` VALUES (5045, 'Magician_Hat', 'Magic Hat', 5, NULL, NULL, 500, NULL, 3, NULL, 0, 99092, 2, 256, NULL, 50, 130, NULL, 'bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50;');
-INSERT INTO `item_db` VALUES (5046, 'Bongun_Hat', 'Bongun Hat', 5, NULL, NULL, 300, NULL, 5, NULL, 0, 10477567, 2, 769, NULL, 0, 139, NULL, NULL);
-INSERT INTO `item_db` VALUES (5047, 'Fashion_Sunglasses', 'Fashion Sunglasses', 5, NULL, NULL, 100, NULL, 0, NULL, 0, 2088958, 2, 256, NULL, 0, 131, NULL, NULL);
-INSERT INTO `item_db` VALUES (5048, 'Cresent_Hairpin', 'Cresent Hairpin', 5, NULL, NULL, 100, NULL, 0, NULL, 0, 10477567, 2, 256, NULL, 0, 132, NULL, NULL);
-INSERT INTO `item_db` VALUES (5049, 'Striped_Bandana', 'Striped Bandana', 5, NULL, NULL, 150, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 133, NULL, NULL);
-INSERT INTO `item_db` VALUES (5050, 'Mysterious_Fruit_Shell', 'Mysterious Fruit Shell', 5, NULL, NULL, 300, NULL, 5, NULL, 0, 10477567, 2, 256, NULL, 30, 134, NULL, NULL);
-INSERT INTO `item_db` VALUES (5051, 'Bell_of_Pussycat', 'Bell of Pussycat', 5, NULL, NULL, 100, NULL, 5, NULL, 0, 10477567, 2, 1, NULL, 0, 135, NULL, NULL);
-INSERT INTO `item_db` VALUES (5052, 'Blue_Bandana', 'Blue Bandana', 5, NULL, NULL, 150, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 136, NULL, NULL);
-INSERT INTO `item_db` VALUES (5053, 'Sphinx_Hat', 'Sphinx Hat', 5, NULL, NULL, 3000, NULL, 5, NULL, 0, 16514, 2, 257, NULL, 65, 137, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (5054, 'Assassin_Mask', 'Assassin Mask', 5, NULL, NULL, 100, NULL, 0, NULL, 0, 4096, 2, 1, NULL, 70, 180, NULL, NULL);
-INSERT INTO `item_db` VALUES (5055, 'Novice_Eggshell', 'Novice Eggshell', 5, NULL, NULL, 10, NULL, 3, NULL, 0, 8388609, 2, 256, NULL, 0, 101, NULL, NULL);
-INSERT INTO `item_db` VALUES (5056, 'Seed_Of_Love', 'Seed Of Love', 5, NULL, NULL, 200, NULL, 0, NULL, 0, 2088958, 2, 256, NULL, 0, 140, NULL, NULL);
-INSERT INTO `item_db` VALUES (5057, 'Black_Cat_Ears', 'Black Cat Ears', 5, NULL, NULL, 200, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 45, 141, NULL, NULL);
-INSERT INTO `item_db` VALUES (5058, 'Resting_Cat', 'Resting Cat', 5, NULL, NULL, 500, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 142, NULL, 'bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;');
-INSERT INTO `item_db` VALUES (5059, 'Bear_Hat', 'Bear Hat', 5, NULL, NULL, 800, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 50, 143, NULL, NULL);
-INSERT INTO `item_db` VALUES (5060, 'Pointy_Cap', 'Pointy Cap', 5, NULL, NULL, 300, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 0, 144, NULL, 'bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (5061, 'Flower_Hairpin', 'Flower Hairpin', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 145, NULL, NULL);
-INSERT INTO `item_db` VALUES (5062, 'Straw_Hat', 'Straw Hat', 5, NULL, NULL, 200, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 50, 146, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (5063, 'Bandaid', 'Bandaid', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 147, NULL, NULL);
-INSERT INTO `item_db` VALUES (5064, 'Transformation_Leaf', 'Transformation Leaf', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 148, NULL, NULL);
-INSERT INTO `item_db` VALUES (5065, 'Fresh_Blueish_Fish', 'Fresh Blueish Fish', 5, NULL, NULL, 500, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 50, 149, NULL, 'bonus2 bAddRace,5,10;');
-INSERT INTO `item_db` VALUES (5066, 'Horns_Of_Succubus', 'Horns of Succubus', 5, NULL, NULL, 800, NULL, 4, NULL, 0, 2088958, 2, 256, NULL, 70, 150, NULL, 'bonus bInt,1; bonus bMdef,10;');
-INSERT INTO `item_db` VALUES (5067, 'Sombrero', 'Sombrero', 5, NULL, NULL, 350, NULL, 4, NULL, 0, 2088958, 2, 256, NULL, 0, 151, NULL, 'bonus bAgi,1;');
-INSERT INTO `item_db` VALUES (5068, 'Ears_of_Demon', 'Ears Of Demon', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 512, NULL, 70, 152, NULL, 'bonus bStr,1;');
-INSERT INTO `item_db` VALUES (5069, 'Fox_Mask', 'Fox Mask', 5, NULL, NULL, 300, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 153, NULL, 'bonus bAgi,1; bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (5070, 'Bandage', 'Bandage', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 154, NULL, 'bonus bStr,2;');
-INSERT INTO `item_db` VALUES (5071, 'Indian_Headband', 'Indian Headband', 5, NULL, NULL, 200, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 155, NULL, 'bonus bDex,1;');
-INSERT INTO `item_db` VALUES (5072, 'Horns_Of_Incubus', 'Horns Of Incubus', 5, NULL, NULL, 800, NULL, 4, NULL, 0, 2088958, 2, 256, NULL, 70, 156, NULL, 'bonus bAgi,1; bonus bMdef,10;');
-INSERT INTO `item_db` VALUES (5073, 'Teacher\'s_Pet', 'Teacher\'s Pet', 5, NULL, NULL, 700, NULL, 2, NULL, 0, 2088958, 2, 256, NULL, 0, 157, NULL, 'bonus bDex,2;');
-INSERT INTO `item_db` VALUES (5074, 'Ears_of_Angel', 'Ears of Angel', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 512, NULL, 70, 158, NULL, 'bonus bStr,1;');
-INSERT INTO `item_db` VALUES (5075, 'Cowboy_Hat', 'Cowboy Hat', 5, NULL, NULL, 500, NULL, 4, NULL, 0, 10477567, 2, 256, NULL, 0, 159, NULL, NULL);
-INSERT INTO `item_db` VALUES (5076, 'Furry_Hat', 'Furry Hat', 5, NULL, NULL, 350, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 160, NULL, 'bonus bLuk,1;');
-INSERT INTO `item_db` VALUES (5077, 'Tulip_Hairpin', 'Tulip Hairpin', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 161, NULL, NULL);
-INSERT INTO `item_db` VALUES (5078, 'Sea_Otter_Hat', 'Sea Otter Hat', 5, NULL, NULL, 800, NULL, 3, NULL, 0, 10477567, 2, 256, NULL, 50, 162, NULL, 'bonus bVit,1;');
-INSERT INTO `item_db` VALUES (5079, 'X_Hairpin', 'X Hairpin', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 256, NULL, 0, 163, NULL, NULL);
-INSERT INTO `item_db` VALUES (5080, 'Crown_of_the_Ancient_Queen', 'Crown of The Ancient Queen', 5, NULL, NULL, 400, NULL, 4, NULL, 0, 10477567, 2, 256, NULL, 45, 164, NULL, NULL);
-INSERT INTO `item_db` VALUES (5081, 'Crown_of_Mistress', 'Crown of Mistress', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 2088958, 0, 256, NULL, 75, 165, NULL, 'bonus bInt,2; bonus bMaxSP,100;');
-INSERT INTO `item_db` VALUES (5082, 'Mushroom_Hairband', 'Mushroom Hairband', 5, NULL, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 256, NULL, 0, 166, NULL, NULL);
-INSERT INTO `item_db` VALUES (5083, 'Back_Ribbon', 'Back Ribbon', 5, NULL, NULL, 200, NULL, 1, NULL, 0, 10477567, 0, 256, NULL, 45, 167, NULL, 'bonus bMdef,10;');
-INSERT INTO `item_db` VALUES (5084, 'Lazy_Raccoon_Hat', 'Lazy Racoon Hat', 5, NULL, NULL, 500, NULL, 1, NULL, 0, 2088958, 2, 256, NULL, 0, 168, NULL, 'bonus2 bResEff,Eff_Sleep,2000;');
-INSERT INTO `item_db` VALUES (5085, 'Small_Twin_Ribbons', 'Small Twin Ribbons', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 0, 512, NULL, 45, 169, NULL, NULL);
-INSERT INTO `item_db` VALUES (5086, 'Sad_Mask', 'Sad Mask', 5, NULL, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 513, NULL, 0, 170, NULL, 'bonus2 bResEff,Eff_Blind,5000;');
-INSERT INTO `item_db` VALUES (5087, 'Expressionless_Mask', 'Expressionless Mask', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 513, NULL, 0, 171, NULL, NULL);
-INSERT INTO `item_db` VALUES (5088, 'Surprised_Mask', 'Surprised Mask', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 513, NULL, 0, 172, NULL, NULL);
-INSERT INTO `item_db` VALUES (5089, 'Annoyed_Mask', 'Annoyed Mask', 5, NULL, NULL, 100, NULL, 1, NULL, 0, 10477567, 2, 513, NULL, 0, 173, NULL, NULL);
-INSERT INTO `item_db` VALUES (5090, 'Mask_of_the_Goblin_Leader', 'Mask of The Goblin Leader', 5, NULL, NULL, 100, NULL, 2, NULL, 0, 10477567, 2, 513, NULL, 0, 174, NULL, NULL);
-INSERT INTO `item_db` VALUES (5091, 'Golden_Bell', 'Golden Bell', 5, NULL, NULL, 200, NULL, 2, NULL, 0, 2088958, 2, 768, NULL, 35, 175, NULL, NULL);
-INSERT INTO `item_db` VALUES (5092, 'Nun_Hat', 'Nun Hat', 5, NULL, NULL, 300, NULL, 5, NULL, 0, 33024, 0, 768, NULL, 65, 176, NULL, NULL);
-INSERT INTO `item_db` VALUES (5093, 'Nun_Hat_', 'Nun Hat', 5, NULL, NULL, 300, NULL, 5, NULL, 0, 33024, 0, 768, NULL, 65, 177, NULL, 'bonus bMaxSP,100;');
-INSERT INTO `item_db` VALUES (5094, 'Orc_Hero_Helm', 'Orc Hero Helm', 5, NULL, NULL, 900, NULL, 5, NULL, 0, 2088958, 2, 768, NULL, 55, 178, NULL, 'bonus bStr,2; bonus bVit,1;');
-INSERT INTO `item_db` VALUES (7001, 'Mold_Powder', 'Mould Powder', 3, 680, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7002, 'Ogre_Tooth', 'Ogre Tooth', 3, 658, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7003, 'Anolian_Skin', 'Anolian Skin', 3, 928, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7004, 'Mud_Lump', 'Mud Lump', 3, 876, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7005, 'Skull', 'Skull', 3, 1044, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7006, 'Wing_of_Red_Bat', 'Wing of Red Bat', 3, 168, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7007, 'Claw_of_Rat', 'Claw of Rat', 3, 748, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7008, 'Stiff_Horn', 'Stiff Horn', 3, 636, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7009, 'Glitter_Shell', 'Glitter Shell', 3, 528, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7010, 'Tail_of_Steel_Scorpion', 'Tail of Steel Scorpion', 3, 548, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7011, 'Claw_of_Monkey', 'Claw of Monkey', 3, 466, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7012, 'Tough_Scalelike_Stem', 'Tough Scalelike Stem', 3, 412, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7013, 'Coral_Reef', 'Coral Reef', 3, 772, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7014, 'Old_Portrait', 'Old Portrait', 3, 1500, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7015, 'Bookclip_in_Memory', 'Bookclip in Memory', 3, 3000, NULL, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7016, 'Spoon_Stub', 'Spoon Stub', 3, 2500, NULL, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7017, 'Executioner\'s_Mitten', 'Executioner\'s Mitten', 3, 4500, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7018, 'Young_Twig', 'Young Twig', 3, 50, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7019, 'Loki\'s_Whispers', 'Loki\'s Whispers', 3, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7020, 'Mother\'s_Nightmare', 'Mother\'s Nightmare', 3, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7021, 'Foolishness_of_the_Blind', 'Foolishness of the Blind', 3, 20, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7022, 'Old_Hilt', 'Old Hilt', 3, 150, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7023, 'Blade_Lost_in_Darkness', 'Blade Lost in Darkness', 3, 12000, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7024, 'Bloody_Edge', 'Bloody Edge', 3, 10000, NULL, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7025, 'Lucifer\'s_Lament', 'Lucifer\'s Lament', 3, 30000, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7026, 'Key_of_Clock_Tower', 'Key of Clock Tower', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7027, 'Key_of_Underground', 'Key of Underground', 3, 2, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7028, 'Invite_for_Duel', 'Invite for Duel', 3, 0, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7029, 'Admission_for_Duel', 'Admission for Duel', 3, 0, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7030, 'Claw_of_Desert_Wolf', 'Claw of Desert Wolf', 3, 208, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7031, 'Old_Frying_Pan', 'Old Frying Pan', 3, 196, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7032, 'Piece_of_Egg_Shell', 'Piece of Egg Shell', 3, 168, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7033, 'Poison_Spore', 'Poison Spore', 3, 114, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7034, 'Red_Socks_with_Holes', 'Red Socks with Holes', 3, 100, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7035, 'Matchstick', 'Matchstick', 3, 100, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7036, 'Fang_of_Garm', 'Fang of Garm', 3, 100, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7037, 'Coupon', 'Coupon', 3, 2000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7038, 'Yarn', 'Yarn', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7039, 'Novice_Nametag', 'Novice Nametag', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7040, 'Megaphone', 'Megaphone', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7041, 'Fine_Grit', 'Fine Grit', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7042, 'Leather_Bag_of_Infinity', 'Leather Bag of Infinity', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7043, 'Fine_Sand', 'Fine Sand', 3, 100, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7044, 'Vigorgra', 'Vigorgra', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7045, 'Magic_Paint', 'Magic Paint', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7046, 'Cart_Parts', 'Cart Parts', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7047, 'Alice\'s_Apron', 'Alice\'s Apron', 3, 2424, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7048, 'Talon_of_Griffon', 'Talon of Griffon', 3, 100, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7049, 'Stone', 'Stone', 3, 0, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7050, 'Cotton_Mat', 'Cotton Mat', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7051, 'Silk_Mat', 'Silk Mat', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7052, 'Wasted_Magazine', 'Wasted Magazine', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7053, 'Cyfar', 'Cyfar', 3, 772, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7054, 'Brigan', 'Brigan', 3, 746, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7055, 'Animal_Poop', 'Animal Poop', 3, NULL, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7056, 'Payment_Statement_for_Kafra_', 'Payment Statement for Ka', 3, NULL, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7057, 'Gjallar', 'Gjallar', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7058, 'Gleipnir', 'Gleipnir', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7059, 'Free_Ticket_for_Kafra_Storag', 'Free Ticket for Kafra St', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7060, 'Free_Ticket_for_Kafra_Transp', 'Free Ticket for Kafra Tr', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7061, 'Free_Ticket_for_the_Cart_Ser', 'Free Ticket for the Cart', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7062, 'Broken_Turtle_Shell', 'Broken Turtle Shell', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7063, 'Soft_Feather', 'Soft Feather', 3, 280, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7064, 'Wing_of_Dragonfly', 'Wing of Dragonfly', 3, 520, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7065, 'Sea-otter_Fur', 'Sea Otter Fur', 3, 820, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7066, 'Ice_Cubic', 'Ice Cubic', 3, 660, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7067, 'Stone_Fragment', 'Stone Fragment', 3, 640, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7068, 'Burnt_Tree', 'Burnt Tree', 3, 722, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7069, 'Destroyed_Armor', 'Destroyed Armor', 3, 1042, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7070, 'Broken_Shell', 'Broken Shell', 3, 900, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7071, 'Tattered_Clothes', 'Tattered Clothes', 3, 640, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7072, 'Old_Shuriken', 'Old Shuriken', 3, 1780, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7073, 'Freya\'s_Jewel', 'Freya\'s Jewel', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7074, 'Thor\'s_Gauntlet', 'Thor\'s Gauntlet', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7075, 'Iron_Maiden', 'Iron Maiden', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7076, 'Wheel_of_the_Unknown', 'Wheel of the Unknown', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7077, 'Silver_Ornament', 'Silver Ornament', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7078, 'Wrath_of_Valkyrie', 'Wrath of Valkyrie', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7079, 'Feather_of_Angel_Wing', 'Feather of Angel Wing', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7080, 'Cat_Tread', 'Footprints of Cat', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7081, 'Woman\'s_Moustache', 'Woman\'s Moustache', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7082, 'Root_of_Stone', 'Root of Stone', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7083, 'Spirit_of_Fish', 'Spirit of Fish', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7084, 'Sputum_of_Bird', 'Sputum of Bird', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7085, 'Sinew_of_Bear', 'Sinew of Bear', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7086, 'Emblem_of_the_Sun_God', 'Emblem of the Sun God', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7087, 'Breath_of_Spirit', 'Breath of Soul', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7088, 'Snow_Crystal', 'Snow Crystal', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7089, 'Omen_of_Tempest', 'Omen of Tempest', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7090, 'Ripple', 'Ripple', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7091, 'Billow', 'Billow', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7092, 'Drifting_Air', 'Drifting Air', 3, NULL, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7093, 'Cogwheel', 'Metal Wheel', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7094, 'Fragment', 'Cabinet Chip', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7095, 'Metal_Fragment', 'Tooth Fragment', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7096, 'Lava', 'Hardened Lava', 3, 1108, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7097, 'Burning_Heart', 'Burning Heart', 3, 924, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7098, 'Live_Coal', 'Fire Seed', 3, 638, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7099, 'Worn-out_Magic_Scroll', 'Old Magical Circle', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7100, 'Sharp_Leaf', 'Sharpened Leaf', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7101, 'PecoPeco_Feather', 'Peco\'s Feather', 3, 454, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7102, 'Nightmare', 'Nightmare', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7103, 'Unknown_Liquid_Bottle', 'Yellow Liquid Bottle', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7104, 'Fake_Angel\'s_Wing', 'Fake Angel\'s Wing', 3, 756, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7105, 'Fake_Heaven_Ring', 'Imitation Soul\'s Band', 3, 924, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7106, 'Antelope_Horn', 'Antelope Horn', 3, 672, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7107, 'Antelope_Skin', 'Antelope Skin', 3, 756, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7108, 'Piece_of_Shield', 'Broken Shield', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7109, 'Shining_Spear_Blade', 'Shiny Spear Tip', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7110, 'Broken_Sword', 'Sharp Sword', 3, 588, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7111, 'Slick_Paper', 'String Paper', 3, 706, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7112, 'Sharp_Paper', 'Transparent Paper', 3, 906, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7113, 'Broken_Symbol_of_Pharaoh', 'Broken Symbol of Pharaoh', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7114, 'Masque_of_Tutankhamen', 'Sphinx Mask', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7115, 'Harpy_Feather', 'Blood Feather', 3, 1142, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7116, 'Harpy_Talon', 'Tooth of Lowblood', 3, 1210, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7117, 'Torn_Magic_Book', 'Torn Spell Book', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7118, 'Torn_Scroll', 'Torn Scroll', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7119, 'Bacillus', 'Hypha Body', 3, 1024, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7120, 'Burning_Horseshoe', 'Burning Horseshoe', 3, 822, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7121, 'Honey_Pot', 'Honey Jar', 3, 622, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7122, 'Burning_Hair', 'Hot Feather', 3, 974, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7123, 'Dragon_Skin', 'Dragon\'s Skin', 3, 1024, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7124, 'Sand_Clump', 'Sand Lump', 3, 706, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7125, 'Scorpion_Claw', 'Crab Shot', 3, 706, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7126, 'Large_Jellopy', 'Large Jellopy', 3, 840, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7127, 'Alcohol_Creation_Book', 'Alcohol Creation Book', 3, 100000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7128, 'Bottle_Grenade_Creation_Book', 'Fire Bottle Creation Book', 3, 100000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7129, 'Acid_Bottle_Creation_Book', 'Acid Bottle Creation Book', 3, 100000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7130, 'Plant_Bottle_Creation_Book', 'Plant Bottle Creation Book', 3, 100000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7131, 'Mine_Bottle_Creation_Book', 'Mine Bottle Creation Book', 3, 100000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7132, 'Glistening_Coat_Creation_Boo', 'Glistening Coat Creation Boo', 3, 100000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7133, 'Condensed_Potion_Creation_Bo', 'Condensed Potion Creation Bo', 3, 240000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7134, 'Medicine_Bowl', 'Medicine Bowl', 3, 8, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7135, 'Bottle_Grenade', 'Fire Bottle', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7136, 'Acid_Bottle', 'Hydrobolic Acid Bottle', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7137, 'Plant_Bottle', 'Water Bottle', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7138, 'Marine_Sphere_Bottle', 'Mine Bottle', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7139, 'Glistening_Coat', 'Coating Wax', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7140, 'Seed_of_Life', 'Seed of Life', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7141, 'Morning_Dew_of_Yggdrasil', 'Water Flow', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7142, 'Ancient_Life', 'Ancient Life', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7143, 'Glass_Tube', 'Seperation Tubes', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7144, 'Potion_Creation_Gude', 'Potion Making Book', 3, 100000, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7145, 'Ragnarok_T-shirt', 'Ragnarok T-Shirt', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7146, 'Vacation_Ticket', 'Vacation Ticket', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7147, 'Jasmine', 'Jasmine', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7148, 'Mother\'s_Letter', 'Mother\'s Letter', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7149, 'Yellow_Plate', 'Yellow Plate', 3, 220, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7150, 'A_piece_of_Bamboo', 'Bamboo Trunk', 3, 310, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7151, 'Oil_Paper', 'Oiled Paper', 3, 310, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7152, 'Glossy_Hair', 'Glossy Hair', 3, 340, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7153, 'Worn-out_Kimono', 'Old Kimono', 3, 590, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7154, 'Poisonous_Powder', 'Poison Powder', 3, 160, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7155, 'Skin_of_Poisonous_Toad', 'Poisonous Toad\'s Skin', 3, 280, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7156, 'Broken_Shuriken', 'Broken Shuriken', 3, 470, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7157, 'Black_Mask', 'Black Mask', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7158, 'Broken_Liquor_Bottle', 'Broken Liquor Bottle', 3, 160, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7159, 'Demon\'s_Nose', 'Demon\'s Nose', 3, 400, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7160, 'Passport_From_King', 'Passport From King', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7161, 'Skin_of_the_Black_Bear', 'Skin of the Black Bear', 3, 384, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7162, 'Piece_of_Cloud', 'Piece of Cloud', 3, 390, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7163, 'Hard_Antennae', 'Hard Antennae', 3, 570, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7164, 'Very_Hard_Peach', 'Very Hard Peach', 3, 400, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7165, 'Etherial_Winged_Clothing', 'Etherial Winged Clothing', 3, 650, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7166, 'Soft_Silk_Fabric', 'Soft Silk Fabric', 3, 1200, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7167, 'Strange_Piece_of_Iron', 'Strange Piece of Iron', 3, 430, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7168, 'Big_Wing_of_Butterfly', 'Big Wing of Butterfly', 3, 614, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7169, 'Tae_Guk_Tablet', 'Tae Guk Tablet', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7170, 'Tuxedo', 'Tuxedo', 5, 2, NULL, 10, NULL, 0, NULL, 0, 2088958, 1, 16, NULL, 0, 0, NULL, 'changebase 22;');
-INSERT INTO `item_db` VALUES (7171, 'Skin of Panther', 'Skin of Panther', 3, 282, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7172, 'Claw of Panther', 'Claw of Panther', 3, 290, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7173, 'Bun Buster Bag', 'Bun Buster Bag', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7174, 'Wrapping Thread', 'Wrapping Thread', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7175, 'Wrapper', 'Wrapper', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7176, 'King\'s Proof Document', 'King\'s Proof Document', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7177, 'Piece_of_Starlight\'s_Sorrow', 'Piece of Starlight\'s Sorrow', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7178, 'Starlight\'s_Sorrow', 'Starlight\'s Sorrow', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7179, 'Donation_Ticket', 'Donation Ticket', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7180, 'Letter_of_Introduction', 'Letter of Introduction', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7181, 'Commodity_Receipt', 'Commodity Receipt', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7182, 'Cacao', 'Cacao', 3, 200, NULL, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7183, 'Letter_of_Younger_Sister', 'Letter of Younger Sister', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7184, 'Piano_Key', 'Piano Key', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7185, 'Quiz_Participation_Volume', 'Quiz Participation Volume', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7186, 'Slender_Stem', 'Slender Stem', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7187, 'Cultish_Mask', 'Cultish Mask', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7188, 'Brown_Root', 'Brown_Root', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7189, 'Wooden_Heart', 'Wooden Heart', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7190, 'Hard_Back_Shell', 'Hard Back Shell', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7191, 'Paper_Lantern', 'Paper Lantern', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7192, 'Pin_Wheel', 'Pin Wheel', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7193, 'Unknown_Item', '?????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7194, 'Unknown_Item', '????????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7195, 'Unknown_Item', '????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7196, 'Unknown_Item', '????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7197, 'Unknown_Item', '????????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7198, 'Unknown_Item', '??????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7199, 'Hieroglyphic', 'Hieroglyphic', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7200, 'Unknown_Item', '???', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7201, 'Unknown_Item', '??', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7202, 'Unknown_Item', '????????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7203, 'Unknown_Item', '?????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7204, 'Unknown_Item', '??', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7205, 'Unknown_Item', '?????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7206, 'Unknown_Item', '?????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7207, 'Unknown_Item', '?????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7208, 'Unknown_Item', '?????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7209, 'Unknown_Item', '???????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7210, 'Unknown_Item', '??????????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7211, 'Unknown_Item', '???????????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7212, 'Unknown_Item', '?????????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7213, 'Unknown_Item', '???', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7214, 'Unknown_Item', '?????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7215, 'Unknown_Item', '????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7216, 'Unknown_Item', '??????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7217, 'Unknown_Item', '??', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7218, 'Unknown_Item', '????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7219, 'Unknown_Item', '??????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7220, 'Unknown_Item', '?????????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7221, 'Unknown_Item', '?????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7222, 'Unknown_Item', '????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7223, 'Unknown_Item', '??????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7224, 'Unknown_Item', '????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7225, 'Unknown_Item', '???????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7226, 'Unknown_Item', '??', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7227, 'Unknown_Item', 'TCG???', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7228, 'Unknown_Item', '??', 3, NULL, NULL, 300, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7229, 'Unknown_Item', '??', 3, NULL, NULL, 300, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7230, 'Unknown_Item', '????', 3, NULL, NULL, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7231, 'Unknown_Item', '???', 3, NULL, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7232, 'Unknown_Item', '???', 3, NULL, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7233, 'Unknown_Item', '??????', 3, NULL, NULL, 150, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7234, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7235, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7236, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7237, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7238, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7239, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7240, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7241, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7242, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7243, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7244, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7245, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7246, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7247, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7248, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7249, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7250, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7251, 'Coupon', 'Coupon', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7252, 'Unknown_Item', '???', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7253, 'Unknown_Item', '??????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7254, 'Unknown_Item', '???????', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7262, 'Grave_Lump', 'Grave Lump', 3, 233, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT 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);
-INSERT 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);
-INSERT 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);
-INSERT INTO `item_db` VALUES (7266, 'Dragon_Teeth', 'Dragon Teeth', 3, 218, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT 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);
-INSERT 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);
-INSERT INTO `item_db` VALUES (7269, 'Baby_Bib', 'Baby Bib', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7270, 'Baby_Bottle', 'Baby Bottle', 3, NULL, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (7271, 'Novice_Statue', 'Novice Statue', 3, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT 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);
-INSERT INTO `item_db` VALUES (9001, 'Poring_Egg', 'Poring Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9002, 'Drops_Egg', 'Drops Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9003, 'Poporing_Egg', 'Poporing Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9004, 'Lunatic_Egg', 'Lunatic Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9005, 'Picky_Egg', 'Picky Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9006, 'Chonchon_Egg', 'Chonchon Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9007, 'Steel_Chonchon_Egg', 'Steel Chonchon Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9008, 'Hunter_Fly_Egg', 'Hunter Fly Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9009, 'Savage_Babe_Egg', 'Savage Babe Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9010, 'Baby_Desert_Wolf_Egg', 'Baby Desert Wolf Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9011, 'Rocker_Egg', 'Rocker Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9012, 'Spore_Egg', 'Spore Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9013, 'Poison_Spore_Egg', 'Poison Spore Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9014, 'PecoPeco_Egg', 'PecoPeco Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9015, 'Smokie_Egg', 'Smokie Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9016, 'Yoyo_Egg', 'Yoyo Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9017, 'Orc_Warrior_Egg', 'Orc Warrior Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9018, 'Munak_Egg', 'Munak Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9019, 'Dokkaebi_Egg', 'Dokkaebi Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9020, 'Sohee_Egg', 'Sohee Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9021, 'Isis_Egg', 'Isis Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9022, 'Green_Petite_Egg', 'Green Petite Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9023, 'Deviruchi_Egg', 'Deviruchi Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9024, 'Bapho_Jr._Egg', 'Bapho Jr. Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9025, 'Bongun_Egg', 'Bongun Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9026, 'Alice_Egg', 'Alice Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9027, 'Zherlthsh_Egg', 'Zherlthsh Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9028, 'test_Egg', 'Test Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (9029, 'test_Egg', 'Test Egg', 7, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10001, 'Skull_Helm', 'Skull Helm', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10002, 'Monster_Oxygen_Mask', 'Monster Oxygen Mask', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10003, 'Transparent_Head_Protector', 'Transparent Headgear', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10004, 'Pacifier', 'Pacifier', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10005, 'Wig', 'Wig', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10006, 'Queen\'s_Hair_Ornament', 'Queen\'s Hair Ornament', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10007, 'Silk_Ribbon', 'Silk Ribbon', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10008, 'Punisher', 'Punisher', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10009, 'Wild_Flower', 'Wild Flower', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10010, 'Battered_Pot', 'Battered Pot', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10011, 'Stellar_Hairpin', 'Stellar Hairpin', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10012, 'Tiny_Egg_Shell', 'Tiny Egg Shell', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10013, 'Backpack', 'Backpack', 8, 1500, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT 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);
-INSERT INTO `item_db` VALUES (10015, 'Green_Lace', 'Green Lace', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10016, 'Golden_Bell', 'Golden Bell', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10017, 'Bark_Shorts', 'Bark Shorts', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10018, 'Monkey_Circlet', 'Monkey Circlet', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10019, 'Red_Muffler', 'Red Muffler', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `item_db` VALUES (10020, 'Sword_of_Chinese_Exorcist', 'Sword of Chinese Exorcist', 8, 20, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-
-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 `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, 149, 200, 1564, 864, 576, 990, 70, 904, 5500, 757, 57, 943, 210, 7041, 100, 508, 200, 625, 20, 4068, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1002, 'PORING', 'Poring', 1, 50, 0, 2, 1, 1, 7, 10, 0, 5, 1, 1, 1, 0, 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, 4001, 20, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1003, 'TESTEGG', 'Test Egg', 2, 10, 0, 10000, 10000, 0, 3, 9, 99, 0, 1, 99, 1, 1, 1, 1, 10, 12, 0, 4, 22, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1004, 'HORNET', 'Hornet', 8, 169, 0, 19, 15, 1, 22, 27, 5, 5, 6, 20, 8, 10, 17, 5, 10, 12, 0, 4, 24, 145, 150, 1292, 792, 216, 992, 50, 939, 5500, 909, 3500, 1208, 15, 511, 350, 518, 100, 512, 0, 4019, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1005, 'FARMILIAR', 'Familiar', 8, 155, 0, 28, 15, 1, 20, 28, 0, 0, 1, 12, 8, 5, 28, 0, 10, 12, 0, 2, 27, 133, 150, 1276, 576, 384, 913, 5500, 1105, 20, 2209, 15, 601, 50, 514, 100, 507, 700, 645, 50, 4020, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1006, 'THIEF_BUG_LARVA', 'Thief Bug Larva', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1007, 'FABRE', 'Fabre', 2, 63, 0, 3, 2, 1, 7, 10, 0, 0, 1, 2, 4, 0, 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, 4002, 15, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1008, 'PUPA', 'Pupa', 2, 427, 0, 2, 4, 0, 1, 2, 0, 20, 1, 1, 1, 0, 1, 20, 10, 12, 0, 4, 22, 128, 1000, 1001, 1, 1, 1010, 80, 915, 5500, 938, 600, 2102, 2, 935, 1000, 938, 600, 1002, 200, 4003, 7, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1009, 'CONDOR', 'Condor', 5, 92, 0, 6, 5, 1, 11, 14, 0, 0, 1, 13, 5, 0, 13, 10, 10, 12, 1, 2, 24, 145, 150, 1148, 648, 480, 917, 6500, 1702, 150, 715, 80, 1750, 5500, 517, 400, 916, 2000, 512, 0, 4015, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1010, 'WILLOW', '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, 1019, 100, 907, 600, 516, 700, 1068, 3500, 512, 0, 1066, 2000, 4010, 7, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4009, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 512, 0, 4014, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 145, 200, 1054, 54, 432, 1011, 20, 920, 5500, 2308, 10, 517, 650, 528, 1050, 919, 5500, 512, 0, 4029, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1014, 'SPORE', 'Spore', 9, 327, 0, 22, 17, 1, 24, 29, 0, 5, 1, 9, 9, 0, 14, 5, 10, 12, 1, 3, 21, 129, 200, 1872, 672, 288, 921, 5000, 507, 800, 510, 50, 743, 5, 2220, 40, 921, 5, 512, 0, 4022, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1015, 'ZOMBIE', 'Zombie', 15, 534, 0, 50, 33, 1, 67, 79, 0, 10, 1, 8, 7, 0, 15, 0, 10, 12, 1, 1, 29, 133, 400, 2612, 912, 288, 957, 5500, 724, 5, 938, 1000, 958, 50, 727, 55, 512, 0, 512, 0, 4038, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4094, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 200, 988, 288, 768, 955, 3500, 910, 250, 1108, 15, 928, 200, 507, 400, 716, 50, 1002, 400, 4026, 7, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4040, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 145, 200, 1564, 864, 576, 925, 5500, 2402, 20, 508, 50, 507, 900, 1604, 100, 512, 0, 512, 0, 4031, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1020, 'MANDRAGORA', 'Mandragora', 12, 405, 0, 45, 32, 4, 26, 35, 0, 25, 1, 12, 24, 0, 36, 15, 10, 12, 1, 3, 62, 132, 1000, 1768, 768, 576, 993, 50, 905, 5500, 1405, 30, 511, 350, 711, 300, 706, 1, 512, 0, 4030, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 0, 10, 12, 1, 4, 27, 141, 300, 988, 288, 768, 1011, 40, 928, 5500, 955, 1500, 1152, 10, 508, 90, 729, 5, 1116, 50, 4050, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1022, 'WEREWOLF', 'Werewolf', 80, 28600, 0, 11813, 7289, 1, 2560, 3280, 65, 35, 1, 97, 60, 1, 135, 52, 10, 10, 2, 0, 40, 181, 200, 1500, 768, 652, 999, 500, 1034, 4000, 984, 500, 985, 500, 7017, 800, 714, 380, 1912, 300, 4091, 50, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 200, 1864, 864, 288, 998, 210, 931, 5500, 756, 40, 2267, 3, 1352, 10, 1304, 5, 1301, 100, 4066, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4034, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1025, 'SNAKE', 'Snake', 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, 512, 0, 4037, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 200, 2468, 768, 288, 901, 5500, 2264, 1, 2404, 15, 609, 20, 2337, 1, 2305, 100, 1558, 5, 4090, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1027, 'RAPTICE', 'Raptice', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 200, 2276, 576, 432, 932, 5500, 756, 60, 1214, 12, 501, 700, 934, 10, 1201, 150, 1216, 50, 4086, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1029, 'ISIS', 'Isis', 43, 4828, 0, 2396, 993, 1, 423, 507, 10, 35, 38, 65, 43, 30, 72, 15, 10, 12, 2, 6, 27, 149, 200, 1384, 768, 336, 936, 5500, 2233, 5, 2603, 1, 733, 150, 732, 20, 954, 1000, 731, 5, 4116, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4062, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1031, 'POPORING', 'Poporing', 14, 344, 0, 81, 44, 1, 59, 72, 0, 10, 1, 14, 14, 0, 19, 15, 10, 12, 1, 3, 25, 131, 300, 1672, 672, 480, 938, 5500, 910, 1500, 511, 500, 514, 200, 729, 5, 512, 0, 512, 0, 4033, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1032, 'VERIT', 'Verit', 38, 5272, 0, 835, 517, 1, 389, 469, 0, 5, 1, 19, 38, 0, 38, 20, 10, 12, 1, 1, 29, 131, 250, 2468, 768, 480, 929, 5500, 912, 700, 930, 1100, 509, 550, 512, 0, 2612, 200, 639, 20, 4107, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1033, 'ELDER_WILLOW', 'Elder Willow', 20, 693, 0, 163, 101, 1, 58, 70, 10, 30, 1, 20, 25, 35, 38, 30, 10, 12, 1, 3, 43, 133, 200, 1372, 672, 432, 990, 50, 907, 5500, 1019, 3500, 757, 37, 2329, 30, 516, 1000, 512, 0, 4052, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4058, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1035, 'HUNTER_FLY', 'Hunter Fly', 42, 5242, 0, 1517, 952, 1, 246, 333, 25, 15, 33, 105, 32, 15, 72, 30, 10, 12, 0, 4, 44, 133, 150, 676, 576, 480, 996, 30, 999, 100, 943, 5500, 912, 1300, 756, 129, 2259, 1, 1226, 2, 4115, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1036, 'GHOUL', 'Ghoul', 39, 5118, 0, 882, 541, 1, 420, 500, 5, 20, 1, 20, 29, 0, 33, 20, 10, 12, 1, 1, 49, 133, 250, 2456, 912, 504, 958, 5500, 756, 110, 509, 670, 506, 800, 2609, 60, 934, 150, 1260, 1, 4110, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1037, 'SIDEWINDER', 'Sidewinder', 43, 4929, 0, 1996, 993, 1, 240, 320, 5, 10, 38, 43, 40, 15, 115, 20, 10, 12, 1, 2, 25, 149, 200, 1576, 576, 576, 954, 5500, 912, 1400, 756, 134, 1120, 2, 937, 2500, 926, 5000, 509, 1000, 4117, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 100, 1072, 672, 384, 617, 2000, 1232, 150, 2235, 200, 1255, 600, 1009, 1000, 985, 3500, 984, 3900, 4144, 1, 7710, 0, 603, 4000, 608, 1000, 751, 200);
-INSERT 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, 181, 100, 1068, 768, 576, 1466, 200, 2256, 200, 2607, 800, 714, 500, 617, 3000, 984, 4300, 985, 5600, 4147, 1, 13000, 0, 608, 1000, 750, 400, 923, 3800);
-INSERT 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, 4072, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1041, 'MUMMY', 'Mummy', 37, 5176, 0, 488, 314, 1, 305, 360, 0, 10, 28, 19, 32, 0, 63, 20, 10, 12, 1, 1, 49, 133, 300, 1772, 72, 384, 930, 5500, 756, 100, 934, 550, 2604, 1, 2611, 10, 525, 250, 502, 450, 4106, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 150, 1076, 576, 480, 992, 70, 999, 30, 910, 2400, 935, 3500, 943, 30, 998, 200, 1002, 500, 4042, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1043, 'SEAHORES', 'Seahorse', 18, 1372, 0, 122, 78, 3, 100, 150, 15, 7, 20, 1, 1, 1, 1, 1, 10, 10, 0, 5, 22, 129, 200, 1500, 800, 600, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1872, 672, 288, 995, 13, 950, 5500, 5014, 1, 2326, 10, 720, 10, 951, 500, 748, 25, 4093, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 150, 1272, 72, 480, 995, 18, 956, 5500, 756, 95, 951, 1000, 720, 10, 717, 200, 509, 600, 4105, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1046, 'DOPPELGANGER', 'Doppelganger', 72, 249000, 0, 51480, 10725, 1, 1340, 1590, 60, 35, 88, 90, 90, 35, 125, 65, 10, 10, 1, 6, 67, 181, 100, 480, 480, 288, 2258, 350, 2317, 250, 1162, 220, 1168, 150, 1411, 550, 985, 3800, 984, 2400, 4142, 1, 5340, 0, 724, 1500, 505, 5100, 724, 4000);
-INSERT 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, 128, 1000, 1001, 1, 1, 1010, 250, 935, 1500, 2102, 2, 501, 400, 501, 400, 713, 1800, 736, 10, 4007, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 128, 1000, 701, 1, 1, 1010, 300, 915, 5000, 2102, 2, 938, 600, 716, 100, 737, 10, 1002, 350, 4012, 7, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4008, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1050, 'PICKY_', 'Super 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, 4011, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1051, 'THIEF_BUG', 'Thief Bug', 6, 126, 0, 17, 5, 1, 18, 24, 5, 0, 1, 6, 6, 0, 11, 0, 10, 12, 0, 0, 60, 139, 150, 1288, 288, 768, 955, 2500, 2304, 80, 507, 350, 909, 2000, 2303, 120, 1002, 350, 512, 0, 4016, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4021, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 200, 988, 288, 768, 955, 3500, 910, 250, 1108, 15, 928, 200, 507, 400, 716, 50, 1002, 400, 4026, 7, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 0, 10, 12, 1, 4, 27, 141, 300, 988, 288, 768, 1011, 40, 928, 5500, 955, 1500, 1152, 10, 508, 90, 729, 5, 1116, 50, 4050, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1055, 'MUKA', 'Muka', 15, 570, 0, 72, 48, 1, 40, 49, 5, 5, 15, 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, 4036, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4044, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 200, 1054, 54, 384, 942, 5500, 513, 1500, 508, 100, 919, 5000, 753, 5, 756, 24, 512, 0, 4051, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 200, 1708, 1008, 540, 990, 60, 940, 6500, 911, 400, 757, 49, 707, 20, 935, 3000, 512, 0, 4057, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1059, 'MISTRESS', 'Mistress', 74, 212000, 0, 39325, 27170, 1, 880, 1110, 40, 60, 50, 165, 60, 95, 70, 130, 10, 12, 0, 4, 84, 181, 100, 1148, 648, 300, 1413, 150, 518, 10000, 2249, 250, 616, 1000, 7018, 10, 985, 4400, 984, 3300, 4132, 1, 2569, 5000, 996, 1500, 526, 4000, 722, 3000);
-INSERT 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, 4074, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 1816, 816, 432, 944, 5500, 510, 500, 2608, 2, 603, 30, 505, 100, 1261, 1, 984, 60, 4127, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4005, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4006, 15, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4067, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 150, 1872, 672, 384, 951, 5500, 756, 115, 2241, 2, 1461, 2, 949, 3000, 720, 20, 956, 1500, 4111, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4049, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4061, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4035, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 200, 1968, 768, 384, 995, 10, 963, 5500, 756, 33, 2257, 2, 757, 45, 1117, 25, 956, 600, 4089, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4027, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1071, 'PIRATE_SKEL', 'Pirate Skeleton', 25, 1676, 0, 233, 142, 1, 145, 178, 10, 15, 25, 13, 25, 5, 25, 10, 10, 12, 1, 1, 29, 133, 200, 1754, 554, 288, 932, 3000, 2287, 15, 1125, 25, 2211, 250, 1104, 250, 756, 43, 628, 20, 4073, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1072, 'KAHO', 'Kaho', 24, 1141, 0, 287, 176, 1, 128, 156, 0, 50, 1, 24, 24, 25, 44, 5, 10, 12, 1, 6, 83, 133, 200, 1700, 1000, 500, 994, 30, 1003, 100, 953, 3000, 911, 1000, 757, 10, 716, 100, 970, 5, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1073, 'CRAB', 'Crab', 20, 2451, 0, 163, 101, 1, 71, 81, 35, 0, 18, 20, 15, 0, 36, 15, 7, 12, 0, 5, 21, 129, 200, 992, 792, 360, 964, 5500, 960, 1500, 7049, 700, 1001, 13, 512, 0, 512, 0, 757, 37, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1074, 'SHELLFISH', 'Shellfish', 15, 920, 0, 66, 44, 1, 35, 42, 35, 0, 1, 12, 8, 0, 32, 5, 10, 12, 0, 5, 21, 145, 200, 864, 864, 384, 965, 5500, 966, 1000, 7049, 500, 1056, 1000, 1001, 10, 512, 0, 757, 18, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1075, 'TURTLE', 'Turtle', 3, 77, 0, 0, 0, 1, 1, 2, 35, 0, 0, 0, 0, 0, 0, 0, 7, 12, 0, 5, 22, 129, 200, 500, 500, 500, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1076, 'SKELETON', 'Skeleton', 10, 234, 0, 18, 14, 1, 39, 47, 10, 5, 1, 5, 10, 0, 12, 0, 10, 12, 1, 1, 29, 145, 200, 2228, 528, 576, 1010, 90, 932, 800, 1505, 80, 909, 3000, 507, 850, 2609, 30, 512, 0, 4025, 7, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1077, 'POISON_SPORE', 'Poison Spore', 19, 665, 0, 186, 93, 1, 89, 101, 0, 0, 1, 19, 25, 0, 24, 0, 10, 12, 1, 3, 25, 133, 200, 1672, 672, 288, 7033, 5500, 2221, 20, 511, 550, 510, 50, 972, 30, 921, 1200, 912, 6, 4048, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1078, 'RED_PLANT', 'Red Plant', 1, 10, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 0, 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);
-INSERT INTO `mob_db` VALUES (1079, 'BLUE_PLANT', 'Blue Plant', 1, 10, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 0, 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);
-INSERT INTO `mob_db` VALUES (1080, 'GREEN_PLANT', 'Green Plant', 1, 10, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 0, 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);
-INSERT INTO `mob_db` VALUES (1081, 'YELLOW_PLANT', 'Yellow Plant', 1, 10, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 0, 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);
-INSERT INTO `mob_db` VALUES (1082, 'WHITE_PLANT', 'White Plant', 1, 10, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 0, 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);
-INSERT INTO `mob_db` VALUES (1083, 'SHINING_PLANT', 'Shining Plant', 1, 20, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 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);
-INSERT INTO `mob_db` VALUES (1084, 'BLACK_MUSHROOM', 'Black Mushroom', 1, 15, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 0, 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);
-INSERT INTO `mob_db` VALUES (1085, 'RED_MUSHROOM', 'Red Mushroom', 1, 15, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 0, 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);
-INSERT INTO `mob_db` VALUES (1086, 'GOLDEN_BUG', 'Golden Thief Bug', 64, 126000, 0, 14300, 7150, 1, 870, 1145, 60, 45, 65, 75, 35, 45, 85, 150, 10, 12, 2, 4, 43, 171, 100, 768, 768, 480, 969, 1000, 1524, 150, 2246, 250, 10016, 500, 714, 300, 984, 2000, 985, 2000, 4128, 1, 25, 5000, 2610, 2000, 701, 1000, 512, 0);
-INSERT INTO `mob_db` VALUES (1087, 'ORC_HERO', 'Orc Hero', 77, 295700, 0, 58630, 32890, 1, 2257, 2542, 40, 45, 1, 91, 99, 70, 105, 90, 10, 10, 2, 7, 42, 181, 150, 1678, 780, 648, 968, 10000, 10018, 500, 1366, 150, 2106, 250, 1124, 10, 984, 3700, 985, 4700, 4143, 1, 4500, 5000, 725, 2000, 607, 1200, 999, 3400);
-INSERT INTO `mob_db` VALUES (1088, 'VOCAL', 'Vocal', 18, 3016, 0, 110, 88, 1, 71, 82, 10, 30, 77, 28, 26, 30, 53, 40, 10, 10, 1, 4, 22, 181, 200, 1080, 648, 480, 2247, 50, 940, 8000, 721, 1000, 752, 1500, 912, 700, 645, 3000, 532, 60, 4021, 60, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1236, 336, 432, 2244, 50, 518, 2000, 729, 1000, 746, 1500, 970, 100, 971, 100, 512, 0, 4014, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 300, 1072, 672, 480, 2257, 200, 619, 50, 722, 1000, 741, 1500, 512, 8000, 512, 8000, 531, 4000, 4001, 100, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1091, 'DRAGONFLY', 'Dragonfly', 8, 2400, 0, 88, 44, 1, 22, 27, 40, 0, 1, 20, 8, 15, 17, 5, 10, 10, 0, 4, 24, 181, 100, 1076, 576, 480, 2245, 200, 501, 8000, 719, 1500, 742, 2000, 2607, 200, 625, 50, 533, 3000, 4009, 40, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1092, 'VAGABOND_WOLF', 'Vagabond Wolf', 24, 12240, 0, 247, 176, 1, 135, 159, 10, 0, 57, 45, 48, 20, 50, 65, 10, 10, 1, 2, 22, 181, 150, 1048, 648, 432, 2248, 200, 920, 8000, 728, 1500, 919, 5500, 725, 11, 517, 8000, 626, 50, 4029, 40, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1456, 456, 336, 2250, 200, 515, 8000, 727, 1200, 746, 1500, 706, 30, 622, 50, 534, 5000, 4006, 70, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4032, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 300, 1288, 288, 384, 955, 5500, 910, 1000, 938, 500, 993, 40, 1001, 4, 1002, 450, 757, 28, 4043, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1272, 672, 672, 2254, 100, 2324, 60, 610, 500, 2282, 1, 504, 1000, 512, 250, 714, 40, 4054, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1097, '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, 128, 1000, 1001, 1, 1, 1010, 320, 935, 2500, 909, 2000, 938, 650, 713, 2000, 1002, 300, 512, 0, 4013, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 2000, 1000, 500, 2602, 5, 504, 600, 2601, 5, 1007, 15, 512, 0, 512, 0, 512, 0, 4138, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1792, 792, 336, 1042, 5500, 912, 1200, 757, 175, 2406, 5, 511, 1500, 719, 10, 512, 0, 4114, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1468, 468, 768, 1025, 5500, 911, 1200, 1042, 500, 757, 61, 511, 670, 508, 250, 10017, 15, 4075, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 868, 480, 120, 923, 500, 984, 63, 1464, 2, 607, 50, 610, 100, 503, 300, 2405, 50, 4129, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 1504, 840, 900, 1001, 200, 1061, 5500, 2252, 3, 1611, 5, 1000, 30, 1006, 15, 637, 20, 4119, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1103, 'CARAMEL', 'Caramel', 23, 1424, 0, 264, 162, 1, 90, 112, 5, 5, 35, 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, 512, 0, 4063, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1104, 'COCO', 'Coco', 17, 817, 0, 120, 78, 1, 56, 67, 0, 0, 24, 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, 512, 0, 4041, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 150, 1288, 288, 576, 955, 6000, 910, 3000, 938, 1200, 990, 45, 1001, 8, 1002, 550, 757, 34, 4043, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1106, 'DESERT_WOLF', 'Desert Wolf', 27, 1716, 0, 427, 266, 1, 169, 208, 0, 10, 56, 27, 45, 15, 56, 10, 10, 12, 1, 2, 23, 141, 200, 1120, 420, 288, 1253, 5, 7030, 5500, 2311, 1, 517, 1200, 920, 2000, 756, 53, 1217, 140, 4082, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1107, 'DESERT_WOLF_B', 'Desert Wolf Puppy', 9, 164, 0, 20, 16, 1, 30, 36, 0, 0, 1, 9, 9, 5, 21, 40, 10, 12, 0, 2, 23, 145, 300, 1600, 900, 240, 1010, 85, 919, 5500, 2306, 60, 517, 600, 2301, 200, 512, 0, 512, 0, 4023, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4125, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 980, 600, 384, 1038, 5500, 1039, 400, 2255, 2, 1458, 2, 1009, 5, 912, 1500, 756, 154, 4122, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1110, 'DOKEBI', 'Dokebi', 33, 2697, 0, 889, 455, 1, 197, 249, 0, 10, 50, 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, 4098, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1111, 'DRAINLIAR', 'Drainliar', 24, 1162, 0, 431, 176, 1, 74, 84, 0, 0, 1, 36, 24, 0, 78, 0, 10, 12, 0, 2, 47, 149, 250, 1276, 576, 384, 1011, 60, 913, 3000, 725, 20, 507, 1000, 7006, 5500, 7006, 1500, 756, 40, 4069, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1112, 'DRAKE', 'Drake', 70, 326666, 0, 28600, 22880, 1, 1800, 2100, 20, 35, 85, 80, 49, 75, 79, 50, 10, 12, 1, 1, 29, 181, 400, 620, 420, 360, 1127, 600, 1125, 950, 1135, 150, 1128, 400, 5019, 300, 985, 3200, 984, 2300, 4137, 1, 4300, 5000, 504, 5000, 719, 250, 512, 0);
-INSERT INTO `mob_db` VALUES (1113, 'DROPS', 'Drops', 3, 55, 0, 4, 3, 1, 10, 13, 0, 0, 1, 3, 3, 0, 12, 15, 10, 12, 1, 3, 23, 131, 400, 1372, 672, 480, 909, 7500, 1602, 80, 938, 500, 512, 1100, 713, 1700, 741, 5, 620, 20, 4004, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1114, 'DUSTINESS', 'Dustiness', 21, 1044, 0, 218, 140, 1, 80, 102, 0, 10, 1, 53, 17, 0, 38, 5, 10, 12, 0, 4, 44, 145, 150, 1004, 504, 384, 1057, 5500, 1058, 500, 2291, 4, 928, 2000, 1001, 10, 507, 1200, 512, 0, 4056, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1115, 'EDDGA', 'Eddga', 65, 152000, 0, 25025, 12870, 1, 1215, 1565, 15, 15, 78, 70, 85, 66, 90, 85, 10, 12, 2, 2, 23, 181, 300, 872, 1344, 432, 1133, 150, 2268, 250, 518, 10000, 1258, 500, 1030, 250, 985, 2300, 984, 1700, 4123, 1, 6179, 5000, 1029, 5000, 1030, 500, 994, 1350);
-INSERT INTO `mob_db` VALUES (1116, 'EGGYRA', 'Eggyra', 24, 633, 0, 215, 220, 1, 85, 107, 20, 25, 1, 36, 24, 0, 32, 0, 10, 12, 1, 0, 48, 145, 200, 1816, 816, 288, 911, 1000, 5015, 20, 7032, 550, 507, 1000, 643, 300, 645, 250, 757, 57, 4070, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 2276, 576, 336, 2217, 10, 1615, 1, 2508, 2, 1551, 10, 610, 200, 609, 10, 509, 2000, 4141, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4080, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1119, 'FRILLDORA', 'Frilldora', 30, 2023, 0, 529, 319, 1, 200, 239, 0, 10, 35, 30, 38, 15, 53, 30, 10, 12, 1, 2, 23, 145, 300, 1540, 720, 432, 1012, 5500, 757, 90, 903, 1500, 721, 15, 715, 200, 501, 800, 912, 120, 4088, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1120, 'GHOSTRING', 'Ghostring', 18, 73300, 0, 101, 108, 1, 82, 122, 0, 60, 40, 27, 18, 45, 72, 30, 10, 12, 1, 6, 88, 181, 300, 1220, 1080, 648, 1059, 5500, 2274, 100, 2336, 50, 604, 500, 603, 10, 714, 30, 2335, 150, 4047, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1121, 'GIEARTH', 'Giearth', 29, 2252, 0, 495, 301, 1, 154, 185, 10, 50, 25, 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, 512, 0, 4087, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 1120, 620, 240, 998, 270, 911, 1200, 756, 43, 2297, 3, 1211, 10, 2104, 5, 501, 800, 4060, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 1320, 620, 240, 998, 250, 911, 1000, 5010, 3, 1511, 10, 2104, 1, 501, 550, 508, 120, 4060, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 250, 1624, 624, 240, 998, 230, 911, 1000, 2275, 3, 512, 0, 2104, 1, 501, 550, 508, 120, 4060, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 200, 1624, 624, 240, 993, 100, 998, 170, 911, 800, 2263, 3, 1508, 10, 2104, 1, 501, 500, 4060, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 300, 3074, 1874, 480, 998, 150, 911, 800, 1605, 15, 2104, 1, 508, 100, 501, 500, 508, 120, 4060, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4081, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1128, 'HORN', 'Horn', 18, 659, 0, 134, 86, 1, 58, 69, 10, 0, 22, 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, 512, 0, 4045, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1129, 'HORONG', 'Horong', 34, 1939, 0, 786, 479, 1, 275, 327, 99, 50, 1, 34, 10, 0, 50, 0, 10, 12, 0, 0, 83, 141, 400, 1888, 1152, 828, 953, 6500, 912, 500, 2279, 5, 1752, 10000, 757, 118, 633, 20, 970, 50, 4103, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1180, 480, 648, 1062, 5500, 912, 900, 985, 31, 2331, 5, 1008, 5, 535, 1000, 512, 0, 4109, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 1364, 864, 432, 912, 2000, 616, 2, 641, 20, 502, 1000, 1259, 1, 984, 100, 512, 0, 4139, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1132, 'KHALITZBURG', 'Khalitzburg', 63, 19276, 0, 4378, 2750, 1, 875, 1025, 45, 10, 58, 65, 48, 5, 73, 40, 10, 12, 2, 1, 29, 149, 350, 528, 1000, 396, 932, 8000, 985, 191, 5017, 1, 2108, 2, 1004, 10, 504, 1000, 1127, 2, 4136, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 150, 1028, 528, 360, 999, 100, 1034, 5500, 912, 700, 985, 25, 1220, 2, 2104, 5, 512, 0, 4091, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 200, 1528, 528, 360, 999, 100, 1034, 5500, 912, 200, 2104, 3, 502, 100, 2101, 100, 512, 0, 4091, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 300, 1228, 528, 360, 990, 35, 999, 100, 1034, 5500, 912, 200, 512, 0, 2104, 3, 502, 100, 4091, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 200, 2200, 1000, 500, 999, 50, 1034, 5500, 912, 100, 1355, 5, 2104, 3, 502, 100, 1301, 150, 4091, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 200, 2000, 1000, 500, 999, 40, 1034, 5500, 912, 100, 1514, 5, 2104, 3, 502, 100, 1501, 150, 4091, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4076, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1528, 660, 432, 993, 110, 1031, 5500, 911, 1400, 757, 70, 943, 250, 721, 10, 501, 650, 4079, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1540, 840, 504, 994, 35, 1045, 4500, 1608, 10, 2617, 1, 1614, 3, 1006, 8, 642, 20, 4112, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1141, 'MARINA', 'Marina', 21, 2087, 0, 218, 140, 1, 84, 106, 0, 5, 1, 21, 21, 0, 36, 10, 10, 12, 0, 3, 41, 129, 400, 2280, 1080, 864, 1052, 5000, 938, 1500, 991, 45, 995, 2, 717, 200, 631, 20, 512, 0, 4055, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1142, 'MARINE_SPHERE', 'Marine Sphere', 28, 3518, 0, 461, 284, 1, 120, 320, 0, 40, 1, 28, 28, 0, 33, 50, 10, 12, 0, 3, 21, 0, 800, 1201, 1, 1, 1050, 5500, 1051, 500, 1520, 10, 720, 10, 717, 150, 10003, 10, 512, 0, 4084, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1480, 480, 1056, 1060, 5500, 2294, 5, 2605, 1, 1008, 10, 1520, 15, 2407, 1, 656, 200, 4113, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1144, 'MARSE', 'Mars', 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, 4095, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1145, 'MARTIN', 'Martin', 18, 1109, 0, 134, 86, 1, 52, 63, 0, 5, 12, 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, 4046, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 432, 432, 360, 2618, 10, 528, 5000, 919, 5500, 537, 400, 757, 100, 656, 200, 512, 0, 4097, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1147, 'MAYA', 'Maya', 81, 169000, 0, 42900, 17875, 1, 1800, 2070, 60, 25, 95, 97, 76, 95, 82, 105, 10, 12, 2, 4, 82, 181, 100, 864, 1000, 480, 10006, 500, 2615, 200, 2234, 200, 639, 500, 7020, 10, 985, 3500, 984, 2500, 4146, 1, 10500, 5000, 730, 2000, 603, 3000, 617, 2000);
-INSERT 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, 149, 180, 2000, 1000, 500, 1048, 6000, 522, 2500, 702, 200, 2610, 150, 722, 250, 7062, 3500, 1007, 3, 4124, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1149, 'MINOROUS', 'Minorous', 52, 7431, 0, 2750, 1379, 1, 590, 770, 15, 5, 65, 42, 61, 66, 52, 25, 10, 12, 2, 2, 43, 149, 200, 1360, 960, 432, 941, 5500, 756, 196, 1361, 2, 1005, 10, 516, 1500, 1301, 200, 657, 150, 4126, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1150, 'MOONLIGHT', 'Moonlight', 67, 120000, 0, 27500, 14300, 1, 1200, 1700, 10, 55, 55, 99, 55, 82, 95, 120, 10, 10, 1, 6, 63, 181, 150, 1276, 576, 288, 5008, 1000, 1234, 100, 1525, 150, 10008, 500, 985, 2600, 984, 1900, 638, 500, 4131, 1, 1250, 0, 1022, 5000, 504, 750, 728, 210);
-INSERT INTO `mob_db` VALUES (1151, 'MYST', 'Myst', 38, 3745, 0, 1391, 688, 1, 365, 445, 0, 40, 1, 38, 18, 0, 53, 10, 10, 12, 2, 0, 25, 149, 200, 1576, 576, 384, 5005, 2, 1019, 800, 10005, 10, 756, 65, 757, 97, 605, 20, 512, 0, 4108, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1152, 'ORC_SKELETON', 'Orc Skeleton', 28, 2278, 0, 315, 194, 1, 190, 236, 10, 10, 1, 14, 18, 0, 30, 15, 10, 12, 1, 1, 29, 133, 200, 2420, 720, 648, 922, 5500, 932, 3500, 757, 80, 2299, 2, 1358, 10, 506, 50, 512, 0, 4085, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1153, 'ORC_ZOMBIE', 'Orc Zombie', 24, 1568, 0, 196, 120, 1, 151, 184, 5, 10, 1, 12, 24, 0, 24, 5, 10, 12, 1, 1, 29, 133, 400, 2852, 1152, 840, 1043, 5500, 938, 3000, 714, 1, 512, 0, 512, 0, 512, 0, 512, 0, 4071, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 165, 1700, 1000, 500, 7110, 4500, 7121, 2500, 757, 20, 1105, 500, 1217, 150, 512, 0, 512, 0, 4099, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1155, 'PETIT', 'Petit', 44, 6881, 0, 1677, 1034, 1, 360, 427, 30, 30, 1, 44, 62, 69, 79, 60, 10, 12, 1, 9, 22, 149, 200, 1624, 620, 384, 1035, 5500, 1037, 300, 756, 140, 509, 1000, 1510, 150, 912, 1500, 606, 15, 4118, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1156, 'PETIT_', 'Sky Petit', 45, 5747, 0, 1758, 1075, 1, 300, 355, 20, 45, 1, 113, 45, 69, 73, 80, 10, 12, 1, 9, 24, 149, 150, 1420, 1080, 528, 1036, 5500, 1037, 300, 985, 61, 509, 1000, 602, 500, 912, 1500, 606, 15, 4120, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 125, 2000, 1000, 500, 7113, 6000, 7114, 2500, 1136, 100, 2327, 150, 5002, 500, 1552, 300, 984, 4500, 4148, 1, 1, 5000, 1009, 5500, 526, 2250, 732, 1125);
-INSERT INTO `mob_db` VALUES (1158, 'PHEN', 'Phen', 26, 3347, 0, 357, 226, 1, 138, 150, 0, 15, 1, 26, 26, 0, 88, 75, 10, 12, 1, 5, 41, 145, 150, 2544, 1344, 1152, 1023, 5500, 963, 2000, 720, 5, 517, 1000, 951, 500, 756, 25, 512, 0, 4077, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1020, 1020, 288, 1015, 10000, 1223, 500, 1236, 150, 1014, 5000, 2288, 300, 985, 2900, 984, 2100, 4121, 1, 2700, 0, 1008, 500, 730, 2000, 1000, 3400);
-INSERT 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, 139, 200, 1288, 288, 576, 955, 5700, 910, 1100, 938, 600, 992, 15, 1001, 5, 1002, 500, 757, 31, 4043, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1161, 'PLANKTON', 'Plankton', 10, 354, 0, 23, 18, 1, 26, 31, 0, 5, 1, 10, 10, 0, 15, 0, 10, 12, 0, 3, 61, 129, 400, 2208, 1008, 324, 1052, 5500, 910, 300, 938, 700, 970, 2, 713, 1000, 630, 20, 645, 50, 4024, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1162, 'RAFFLESIA', 'Rafflesia', 27, 1950, 0, 388, 242, 1, 105, 120, 20, 10, 1, 27, 54, 1, 76, 27, 10, 10, 0, 3, 22, 133, 200, 1000, 2652, 1056, 1033, 5500, 911, 1600, 706, 2, 708, 10, 703, 10, 711, 550, 509, 30, 4083, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1163, 'RAYDRIC', 'Raydric', 52, 8613, 0, 3410, 1795, 1, 830, 930, 40, 15, 58, 47, 42, 5, 69, 26, 10, 12, 2, 7, 47, 149, 150, 824, 780, 420, 985, 106, 2266, 1, 2315, 2, 1158, 2, 1116, 100, 1004, 10, 7054, 5500, 4133, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 400, 1516, 816, 432, 603, 35, 714, 1, 912, 2500, 958, 3500, 934, 1500, 2308, 10, 512, 0, 4104, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1165, 'SAND_MAN', 'Sandman', 34, 3413, 0, 810, 492, 1, 180, 205, 10, 25, 24, 34, 58, 38, 60, 5, 10, 12, 1, 0, 62, 133, 250, 1672, 720, 288, 997, 35, 1056, 5500, 757, 118, 7043, 200, 1001, 200, 1257, 2, 728, 2, 4101, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4078, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4017, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4130, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 400, 2420, 720, 384, 998, 400, 1041, 5500, 757, 90, 5009, 2, 999, 100, 1003, 200, 1002, 800, 4092, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4100, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1001, 1, 1, 1014, 2700, 911, 800, 757, 10, 1111, 15, 1001, 30, 943, 150, 512, 0, 4059, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 2000, 1000, 500, 1014, 5500, 911, 2000, 757, 15, 1111, 20, 943, 270, 1001, 50, 512, 0, 4059, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1001, 1, 1, 1014, 3100, 911, 800, 911, 10, 1114, 15, 1001, 35, 943, 200, 512, 0, 4059, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4039, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 512, 0, 4028, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4053, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1177, 'ZENORC', 'Zenorc', 31, 2585, 0, 967, 407, 1, 188, 223, 0, 15, 1, 77, 15, 0, 76, 10, 10, 12, 1, 7, 27, 131, 150, 1180, 480, 360, 1044, 5500, 756, 70, 938, 2500, 1006, 5, 503, 50, 640, 20, 512, 0, 4096, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1178, 'ZEROM', 'Zerom', 23, 1109, 0, 240, 149, 1, 127, 155, 0, 10, 1, 23, 23, 5, 42, 0, 10, 12, 1, 7, 23, 133, 200, 1780, 1080, 432, 1011, 55, 998, 190, 2339, 200, 2265, 3, 2408, 10, 1002, 400, 1002, 400, 4064, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1179, 'WHISPER', 'Whisper', 34, 1796, 0, 591, 599, 1, 180, 221, 0, 45, 1, 51, 14, 0, 60, 0, 10, 12, 0, 6, 68, 149, 150, 1960, 960, 504, 1001, 150, 1059, 5500, 2282, 1, 2333, 10, 512, 0, 512, 0, 512, 0, 4102, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 840, 540, 480, 1022, 5500, 919, 7000, 603, 100, 604, 100, 526, 250, 525, 350, 756, 100, 746, 200, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1181, 'ZOMBIE_DRAGON', 'Zombie Dragon', 1, 1000, 0, 49500, 1650, 9, 7900, 9140, 0, 0, 120, 145, 145, 145, 130, 120, 10, 12, 2, 9, 89, 181, 400, 2700, 1000, 500, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1182, 'THIEF_MUSHROOM', 'Thief Mushroom', 1, 15, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 0, 0, 7, 12, 0, 3, 22, 64, 2000, 1, 1, 1, 1069, 1500, 1070, 3000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1076, 576, 480, 998, 50, 935, 6500, 909, 1500, 1205, 55, 601, 100, 742, 5, 1002, 150, 4009, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 400, 1672, 672, 480, 914, 2000, 949, 250, 1502, 80, 721, 2, 511, 350, 705, 500, 1501, 200, 4002, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1185, 'WHISPER_', 'Whisper', 34, 1796, 0, 537, 545, 1, 198, 239, 0, 45, 1, 51, 14, 0, 60, 0, 10, 12, 0, 1, 28, 0, 150, 1960, 960, 504, 1001, 10, 1059, 100, 2282, 0, 2333, 1, 512, 0, 512, 0, 512, 0, 4102, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1186, 'WHISPER_BOSS', 'Giant Whisper', 34, 5040, 0, 537, 545, 1, 198, 239, 0, 45, 1, 51, 14, 0, 60, 0, 10, 12, 0, 6, 48, 149, 250, 2536, 1536, 672, 1001, 150, 1059, 5500, 2282, 1, 2333, 10, 512, 0, 512, 0, 512, 0, 4102, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1187, 'SWITCH', 'Switch', 1, 2, 0, 1, 1, 1, 1, 2, 0, 0, 1, 1, 1, 0, 1, 0, 1, 12, 1, 0, 20, 0, 1, 1, 1, 1, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1188, 'BON_GUN', 'Bon Gun', 32, 3520, 0, 424, 242, 1, 220, 260, 0, 0, 45, 15, 36, 10, 48, 15, 10, 12, 1, 1, 29, 149, 200, 1720, 500, 420, 1094, 5500, 7014, 40, 618, 60, 2337, 2, 609, 15, 508, 1000, 502, 250, 5046, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1960, 620, 480, 1063, 5500, 1753, 1000, 1756, 2500, 1755, 2500, 1716, 2, 501, 1400, 509, 900, 2330, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1190, 'ORC_LORD', 'Orc Lord', 74, 393000, 0, 62205, 8580, 1, 2700, 3150, 40, 5, 85, 82, 149, 70, 110, 85, 10, 12, 2, 7, 82, 181, 100, 1248, 500, 360, 1363, 200, 2601, 500, 5007, 150, 2627, 1000, 512, 0, 985, 4400, 984, 3100, 512, 0, 12800, 5000, 968, 5500, 617, 900, 512, 0);
-INSERT INTO `mob_db` VALUES (1191, 'MIMIC', 'Mimic', 51, 6120, 0, 165, 165, 1, 150, 900, 10, 40, 44, 121, 1, 60, 75, 110, 10, 12, 1, 0, 60, 149, 100, 972, 500, 288, 617, 5, 603, 45, 1065, 1200, 611, 3000, 714, 3, 2626, 1, 757, 270, 2205, 120, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1816, 576, 240, 1059, 6500, 2206, 10, 2506, 2, 716, 650, 602, 1300, 2505, 10, 731, 5, 735, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1020, 500, 768, 1095, 5500, 2607, 20, 7005, 1500, 611, 1300, 984, 105, 7026, 20, 912, 1500, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 960, 500, 480, 1096, 3500, 938, 3000, 943, 800, 912, 450, 716, 300, 997, 20, 912, 2500, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1195, 'RIDEWORD', 'Rideword', 59, 11638, 0, 2007, 3106, 1, 584, 804, 5, 35, 48, 75, 10, 20, 120, 45, 10, 12, 0, 0, 60, 149, 150, 864, 500, 192, 1097, 5500, 1553, 4, 1554, 4, 1555, 3, 1556, 2, 7015, 300, 1006, 20, 722, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1196, 'SKEL_PRISONER', 'Skeleton Prisoner', 52, 8691, 0, 2466, 1562, 1, 660, 890, 10, 20, 55, 20, 36, 0, 76, 25, 10, 12, 1, 1, 69, 141, 350, 1848, 500, 576, 1098, 3500, 7016, 100, 2320, 1, 716, 600, 930, 3500, 2408, 35, 934, 1500, 2282, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1197, 'ZOMBIE_PRISONER', 'Zombie Prisoner', 53, 11280, 0, 2635, 1724, 1, 780, 930, 10, 20, 1, 24, 39, 0, 72, 25, 10, 12, 1, 1, 69, 141, 350, 1768, 500, 192, 1099, 3500, 7016, 105, 2266, 1, 716, 600, 930, 3500, 2408, 3, 985, 112, 1093, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1500, 500, 1000, 1557, 2, 2608, 30, 505, 100, 716, 450, 1009, 50, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1500, 500, 1000, 7001, 5500, 715, 800, 1001, 300, 1061, 1000, 1057, 3000, 601, 1100, 10004, 10, 2502, 15, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1200, 'ZHERLTHSH', 'Zherlthsh', 63, 18300, 0, 3608, 2304, 1, 700, 850, 10, 15, 70, 85, 40, 30, 125, 60, 10, 12, 1, 7, 60, 141, 200, 800, 792, 384, 7017, 5, 504, 800, 503, 1200, 2331, 8, 2622, 1, 984, 134, 2291, 3, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1500, 500, 1000, 1015, 4000, 7017, 3, 504, 800, 731, 30, 1008, 10, 984, 100, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 175, 1500, 500, 1000, 1015, 4000, 7017, 4, 504, 800, 512, 0, 984, 150, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1203, 'MYSTELTAINN', 'Mysteltainn', 76, 33350, 0, 6457, 5159, 2, 1160, 1440, 30, 30, 77, 139, 80, 35, 159, 65, 10, 12, 2, 0, 87, 181, 250, 1152, 500, 240, 7019, 1, 1117, 100, 1152, 70, 1155, 40, 1163, 2, 999, 120, 984, 243, 985, 210, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1204, 'TIRFING', 'Tyrfing', 71, 29900, 0, 5412, 4235, 1, 950, 1146, 30, 35, 58, 87, 55, 35, 132, 65, 10, 12, 1, 0, 67, 181, 100, 816, 500, 240, 7022, 1, 638, 50, 1211, 100, 1214, 70, 1217, 40, 999, 120, 984, 189, 1157, 25, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1205, 'EXECUTIONER', 'Executioner', 65, 28980, 0, 4730, 3536, 2, 570, 950, 35, 35, 64, 85, 40, 25, 88, 60, 10, 12, 2, 0, 47, 181, 200, 768, 500, 384, 7024, 5, 1108, 100, 1111, 80, 1114, 60, 1125, 40, 999, 120, 984, 145, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 900, 500, 864, 7003, 5500, 1754, 2000, 504, 650, 10019, 10, 943, 5500, 2625, 1, 984, 134, 526, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1207, 'STING', 'Sting', 61, 9500, 0, 4081, 2970, 1, 850, 1032, 5, 30, 57, 45, 55, 5, 120, 85, 10, 12, 1, 0, 62, 149, 300, 528, 500, 240, 7004, 5500, 1756, 1500, 2624, 2, 1003, 130, 997, 25, 10007, 10, 2209, 350, 719, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 672, 500, 192, 7005, 5500, 616, 1, 1164, 1, 2270, 5, 610, 650, 984, 217, 608, 3, 732, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 1000, 500, 1000, 7007, 5500, 528, 1000, 726, 80, 746, 110, 657, 150, 510, 70, 984, 95, 4028, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1500, 500, 1000, 7008, 5500, 947, 8000, 943, 4000, 993, 200, 1451, 40, 757, 18, 509, 1600, 4045, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1500, 500, 1000, 7009, 5500, 992, 200, 912, 1200, 602, 1000, 757, 220, 610, 250, 509, 1600, 4039, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1500, 500, 1000, 7010, 5500, 757, 229, 757, 22, 1002, 850, 999, 180, 998, 300, 512, 0, 4068, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1213, 'HIGH_ORC', 'High Orc', 52, 6890, 0, 3618, 1639, 1, 428, 533, 15, 5, 55, 46, 55, 35, 82, 40, 10, 12, 2, 7, 43, 149, 150, 1500, 500, 1000, 7002, 2500, 1304, 10, 999, 90, 931, 7500, 912, 1300, 756, 196, 502, 900, 4066, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1214, 'CHOCO', 'Choco', 43, 4278, 0, 1265, 1265, 1, 315, 402, 5, 5, 65, 68, 55, 45, 65, 25, 10, 12, 0, 2, 23, 149, 200, 1500, 500, 1000, 7011, 5500, 942, 7000, 985, 53, 513, 5000, 634, 20, 532, 1000, 607, 25, 4051, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1500, 500, 1000, 7012, 5500, 509, 1800, 912, 1200, 756, 115, 997, 5, 1454, 20, 608, 45, 4034, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 400, 832, 500, 600, 7013, 5500, 962, 8000, 938, 7000, 525, 200, 719, 15, 1258, 1, 716, 550, 4035, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1219, 'KNIGHT_OF_ABYSS', 'Abyss Knight', 79, 36140, 0, 8469, 6268, 1, 1600, 2150, 55, 50, 66, 68, 64, 25, 135, 50, 10, 12, 2, 7, 87, 149, 300, 1500, 500, 1000, 1064, 5500, 7023, 5, 2318, 1, 1410, 25, 1162, 1, 985, 369, 984, 259, 1162, 15, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1120, 420, 288, 1253, 5, 7030, 5500, 2311, 1, 517, 1200, 920, 2000, 756, 53, 1217, 140, 4082, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 150, 1960, 960, 384, 1028, 6000, 656, 150, 702, 3, 2276, 2, 605, 15, 757, 70, 512, 0, 4078, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1500, 500, 1000, 7002, 2500, 1304, 10, 999, 120, 931, 8000, 912, 1600, 756, 196, 502, 1100, 4066, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1864, 864, 288, 998, 210, 931, 5500, 756, 40, 2267, 3, 1352, 10, 1304, 5, 1301, 100, 4066, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1224, 'L_POISON_SPORE', 'Poison Spore', 19, 665, 0, 169, 85, 1, 89, 101, 0, 0, 1, 19, 25, 0, 24, 0, 10, 12, 1, 3, 25, 181, 200, 1672, 672, 288, 921, 8000, 2221, 20, 511, 650, 510, 55, 972, 35, 512, 0, 512, 0, 4048, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1500, 500, 1000, 7011, 5500, 942, 7000, 508, 1900, 513, 5000, 2311, 2, 532, 1000, 607, 25, 4051, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 1028, 528, 360, 999, 90, 1034, 6000, 912, 750, 985, 25, 1220, 2, 2104, 5, 512, 0, 4091, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 100, 1120, 620, 240, 998, 270, 911, 1200, 756, 43, 2297, 3, 1211, 10, 2104, 5, 501, 800, 4060, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1228, 'L_PHEN', 'Phen', 26, 3347, 0, 357, 226, 1, 138, 150, 0, 15, 1, 26, 26, 0, 88, 75, 10, 12, 1, 5, 41, 181, 150, 2544, 1344, 1152, 1023, 6000, 963, 2300, 720, 8, 517, 1100, 951, 550, 756, 25, 512, 0, 4077, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1229, 'META_FABRE', 'Fabre', 2, 63, 0, 3, 2, 1, 8, 11, 0, 0, 1, 2, 4, 0, 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, 4002, 15, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1230, 'META_PUPA', 'Pupa', 2, 427, 0, 2, 4, 0, 1, 2, 20, 20, 1, 1, 1, 0, 1, 20, 10, 12, 0, 4, 22, 128, 1000, 1001, 1, 1, 1010, 300, 915, 6000, 938, 700, 2102, 2, 935, 1300, 938, 700, 1002, 400, 4003, 7, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 4040, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1232, 'META_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, 128, 1000, 1001, 1, 1, 1010, 120, 935, 1500, 2102, 2, 501, 450, 501, 450, 713, 2000, 736, 15, 4007, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 145, 200, 1564, 864, 576, 925, 6000, 2402, 20, 508, 55, 507, 950, 1604, 100, 512, 0, 512, 0, 4031, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 200, 1054, 54, 384, 942, 6000, 513, 2000, 508, 130, 919, 5500, 753, 7, 512, 0, 512, 0, 4051, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1235, 'SMOKING_ORC', 'Smoking Orc', 24, 1400, 0, 261, 160, 1, 114, 136, 10, 20, 1, 24, 48, 20, 34, 0, 10, 12, 1, 7, 22, 141, 200, 1864, 864, 288, 998, 210, 931, 5500, 756, 40, 2267, 3, 1352, 10, 1304, 5, 1301, 100, 4066, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 128, 1000, 1001, 1, 1, 1010, 135, 935, 2740, 909, 3000, 938, 750, 713, 2000, 1002, 320, 512, 0, 4013, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 300, 1288, 288, 576, 955, 6000, 910, 3000, 938, 1000, 935, 3000, 1001, 6, 1002, 450, 757, 28, 4043, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 200, 1288, 288, 576, 955, 5700, 910, 1100, 938, 600, 992, 15, 1001, 5, 1002, 500, 757, 31, 4043, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 139, 150, 1288, 288, 576, 955, 6000, 910, 3000, 938, 1200, 990, 45, 1001, 8, 1002, 550, 757, 34, 4043, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1240, 'META_PICKY', 'Picky', 3, 80, 0, 4, 3, 1, 9, 12, 0, 0, 1, 3, 3, 0, 10, 30, 10, 12, 0, 2, 23, 129, 200, 988, 288, 168, 916, 6500, 949, 850, 2302, 150, 507, 650, 519, 350, 715, 60, 512, 0, 4008, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1241, 'META_PICKY_', 'Super Picky', 4, 83, 0, 5, 4, 1, 8, 11, 20, 0, 1, 3, 3, 0, 11, 20, 10, 12, 0, 2, 23, 129, 200, 988, 288, 168, 916, 6500, 949, 850, 5015, 7, 507, 750, 519, 350, 715, 60, 512, 0, 4011, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4001, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1243, 'SASQUATCH', 'Sasquatch', 30, 3163, 0, 529, 319, 1, 250, 280, 5, 0, 75, 25, 60, 10, 34, 20, 10, 12, 2, 2, 60, 149, 300, 1260, 192, 192, 912, 750, 509, 800, 949, 1000, 5030, 1, 948, 5000, 727, 30, 757, 90, 4074, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1180, 480, 648, 1062, 5500, 912, 900, 985, 31, 2331, 5, 1008, 5, 535, 1000, 2236, 70, 4109, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 1120, 620, 240, 998, 270, 911, 1200, 756, 43, 2297, 3, 1211, 10, 2104, 5, 2236, 40, 4060, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1247, 'ANTONIO', 'Antonio', 10, 10, 0, 3, 2, 1, 13, 20, 100, 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, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 400, 1296, 1296, 432, 1098, 900, 2251, 2, 998, 320, 996, 5, 911, 3500, 719, 35, 756, 87, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1249, 'MYSTCASE', 'Myst Case', 38, 3450, 0, 1113, 688, 1, 160, 360, 5, 10, 65, 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, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 400, 672, 672, 288, 7035, 2500, 912, 750, 512, 5500, 619, 40, 10019, 5, 502, 300, 2508, 5, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1251, 'KNIGHT_OF_WINDSTORM', 'Stormy Knight', 77, 240000, 0, 64350, 21450, 2, 1425, 1585, 35, 60, 75, 185, 83, 55, 130, 79, 10, 12, 2, 0, 84, 181, 200, 468, 468, 288, 1468, 150, 603, 3000, 617, 4000, 2621, 200, 2506, 500, 985, 4700, 984, 3500, 5007, 1, 1, 5000, 720, 4500, 2406, 270, 995, 3000);
-INSERT INTO `mob_db` VALUES (1252, 'GARM', 'Garm', 73, 197000, 0, 50050, 20020, 3, 1700, 1900, 40, 45, 85, 126, 82, 65, 95, 60, 10, 12, 2, 2, 81, 181, 400, 608, 408, 336, 7036, 5500, 1131, 150, 1256, 500, 512, 0, 512, 0, 985, 4100, 984, 2900, 512, 0, 28473, 5000, 7036, 1000, 603, 3000, 995, 3000);
-INSERT INTO `mob_db` VALUES (1253, 'GARGOYLE', 'Gargoyle', 48, 3950, 0, 1650, 1650, 9, 290, 360, 10, 10, 15, 61, 20, 20, 126, 40, 10, 12, 1, 6, 64, 133, 200, 1020, 720, 384, 912, 4000, 1039, 500, 512, 0, 512, 0, 2619, 1, 1769, 2000, 757, 238, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1254, 'RAGGLER', 'Raggler', 21, 1020, 0, 218, 140, 1, 102, 113, 0, 5, 18, 10, 32, 20, 39, 35, 10, 12, 0, 2, 24, 149, 200, 1000, 900, 384, 7053, 3000, 916, 5000, 645, 200, 656, 100, 992, 90, 2225, 7, 756, 32, 7054, 1500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 776, 576, 288, 1055, 5500, 7053, 1000, 510, 230, 717, 250, 656, 250, 757, 180, 985, 37, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 700, 648, 480, 1055, 5500, 7054, 200, 702, 10, 605, 60, 716, 230, 512, 0, 756, 115, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1257, 'INJUSTICE', 'Injustice', 51, 7600, 0, 2118, 1488, 1, 480, 600, 0, 0, 84, 42, 39, 0, 71, 35, 10, 12, 1, 1, 47, 149, 400, 770, 720, 336, 999, 300, 7054, 5500, 7053, 3500, 2313, 5, 2316, 2, 512, 0, 1255, 2, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1258, 'GOBLIN_ARCHER', 'Goblin Archer', 28, 1750, 0, 461, 284, 9, 89, 113, 0, 0, 10, 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, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1259, 'GRYPHON', 'Gryphon', 72, 27800, 0, 5896, 4400, 1, 880, 1260, 35, 35, 68, 95, 78, 65, 115, 75, 10, 12, 2, 2, 84, 181, 100, 704, 504, 432, 7048, 2500, 7054, 5500, 7063, 120, 1452, 1500, 757, 150, 984, 185, 996, 150, 1417, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 920, 720, 200, 7054, 5500, 734, 1000, 2505, 30, 512, 0, 512, 0, 1000, 80, 747, 3, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1261, 'WILD_ROSE', 'Wild Rose', 38, 2980, 0, 1113, 688, 1, 315, 360, 0, 15, 65, 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, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1262, 'MUTANT_DRAGON', 'Mutant Dragon', 65, 62600, 0, 4730, 3536, 4, 2400, 3400, 15, 20, 75, 47, 30, 68, 45, 35, 10, 12, 2, 9, 43, 181, 250, 1280, 1080, 240, 7054, 5500, 1035, 500, 1036, 500, 930, 500, 2627, 30, 522, 150, 505, 150, 504, 250, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 1056, 1056, 336, 912, 5000, 932, 6000, 7005, 500, 1610, 25, 1611, 8, 996, 100, 1615, 1, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1264, 'MERMAN', 'Merman', 53, 12300, 0, 3345, 2054, 2, 482, 603, 10, 35, 72, 45, 46, 15, 85, 55, 10, 12, 1, 7, 41, 149, 200, 916, 816, 336, 1054, 1300, 523, 300, 657, 200, 720, 40, 995, 35, 1460, 3, 756, 203, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 145, 200, 1036, 936, 240, 538, 1000, 530, 150, 979, 1, 645, 280, 2402, 30, 1001, 40, 2502, 20, 529, 320, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1266, 'ASTER', 'Aster', 18, 1372, 0, 122, 78, 1, 56, 64, 0, 10, 1, 19, 15, 0, 34, 5, 10, 12, 0, 5, 22, 145, 400, 1264, 864, 216, 938, 500, 7013, 40, 1052, 1200, 508, 200, 912, 60, 512, 100, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1078, 768, 384, 7054, 3200, 536, 1000, 2409, 5, 5003, 1, 512, 0, 512, 0, 504, 450, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1268, 'BLOODY_KNIGHT', 'Blood Knight', 82, 57870, 0, 10120, 6820, 3, 2150, 3030, 60, 50, 88, 75, 70, 77, 125, 55, 10, 12, 2, 0, 87, 149, 250, 828, 528, 192, 7054, 5500, 2229, 45, 2317, 5, 2106, 65, 1170, 1, 984, 304, 985, 433, 1417, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1270, 'C_TOWER_MANAGER', 'Clock Tower Manager', 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, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 512, 0, 756, 129, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 100, 868, 768, 480, 1615, 800, 5017, 500, 1237, 300, 2334, 300, 2507, 100, 985, 5300, 984, 4100, 2609, 140, 1, 5000, 7005, 6000, 512, 0, 617, 2000);
-INSERT INTO `mob_db` VALUES (1273, 'ORC_LADY', 'Orc Lady', 31, 2000, 0, 644, 407, 1, 135, 170, 10, 10, 35, 42, 25, 15, 69, 55, 10, 12, 1, 7, 42, 149, 200, 1050, 900, 288, 7053, 5500, 998, 300, 2602, 1, 756, 40, 1352, 10, 508, 900, 2338, 1, 2206, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 512, 0, 985, 61, 757, 207, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1275, 'ALICE', 'Alice', 62, 10000, 0, 3583, 2400, 1, 550, 700, 5, 5, 64, 64, 42, 85, 100, 130, 10, 12, 1, 7, 60, 145, 200, 1152, 1152, 480, 7047, 2500, 637, 40, 2407, 3, 739, 30, 512, 100, 503, 400, 2215, 5, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1276, 'RAYDRIC_ARCHER', 'Raydric Archer', 52, 5250, 0, 3025, 2125, 9, 415, 500, 35, 5, 15, 25, 22, 5, 145, 35, 10, 12, 1, 6, 47, 133, 200, 1152, 1152, 480, 7054, 5500, 512, 0, 2315, 2, 1701, 150, 1764, 2000, 1715, 3, 985, 106, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 512, 0, 2272, 1, 503, 150, 609, 35, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1278, 'STALACTIC_GOLEM', 'Stalactite Golem', 60, 18700, 0, 3872, 2695, 1, 950, 1130, 50, 5, 73, 45, 85, 5, 75, 25, 10, 12, 2, 0, 80, 145, 200, 1264, 864, 288, 7004, 2000, 7054, 5500, 1000, 250, 997, 30, 512, 0, 757, 250, 985, 163, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 860, 660, 624, 7053, 100, 943, 380, 606, 200, 993, 160, 1001, 140, 512, 0, 757, 106, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1280, 'STEAM_GOBLIN', 'Steam Goblin', 35, 2490, 0, 864, 495, 1, 234, 269, 20, 5, 58, 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, 1003, 320, 757, 124, 744, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1281, 'SAGEWORM', 'Sageworm', 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, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1282, 'KOBOLD_ARCHER', 'Kobold Archer', 33, 2560, 0, 739, 455, 9, 155, 185, 10, 5, 10, 20, 15, 30, 100, 25, 10, 12, 0, 7, 23, 133, 200, 1008, 1008, 384, 912, 250, 999, 60, 1034, 5000, 512, 0, 1763, 2000, 1711, 5, 756, 79, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 772, 672, 360, 7054, 5500, 1048, 2500, 657, 500, 1306, 1, 504, 560, 1364, 1, 984, 160, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1284, 'HUGELING', 'Hugeling', 1, 5000, 0, 2, 1, 4, 7, 10, 0, 0, 1, 1, 1, 1, 6, 0, 10, 12, 2, 3, 21, 145, 200, 1872, 672, 480, 512, 100, 512, 100, 512, 100, 512, 100, 512, 100, 512, 100, 512, 100, 512, 100, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1285, 'ARCHER_GUARDIAN', 'Guardian Archer', 74, 28634, 0, 1, 1, 12, 1120, 1600, 35, 60, 95, 80, 80, 90, 165, 55, 14, 16, 2, 7, 80, 133, 265, 1200, 1200, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1286, 'KNIGHT_GUARDIAN', 'Guardian Knight', 86, 30214, 0, 1, 1, 2, 1280, 1560, 55, 30, 110, 40, 140, 65, 125, 65, 14, 16, 2, 7, 80, 133, 275, 1200, 1200, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1287, 'SOLDIER_GUARDIAN', 'Guardian Soldier', 56, 15670, 0, 1, 1, 1, 873, 1036, 35, 0, 85, 56, 100, 45, 103, 43, 10, 12, 0, 4, 22, 133, 265, 1288, 288, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 4, 22, 0, 300, 1288, 288, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1289, 'MAYA_PURPLE', 'Maya Purple', 81, 54331, 0, 10496, 3893, 2, 1446, 1999, 68, 48, 95, 90, 80, 95, 90, 119, 10, 12, 2, 4, 82, 181, 100, 1024, 1000, 480, 7053, 4550, 757, 250, 756, 300, 969, 100, 984, 150, 985, 100, 639, 50, 10006, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1290, 'SKELETON_GENERAL', 'Skeleton General', 73, 17043, 0, 8170, 3370, 1, 910, 1089, 25, 25, 90, 25, 40, 20, 77, 25, 10, 12, 1, 1, 29, 149, 150, 2276, 576, 432, 7068, 2550, 756, 160, 503, 800, 1220, 35, 1219, 80, 1222, 3, 512, 0, 2274, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1291, 'WRAITH_DEAD', 'Wraith Dead', 74, 42131, 0, 10341, 3618, 2, 1366, 1626, 25, 30, 5, 99, 55, 95, 115, 45, 10, 12, 2, 1, 89, 149, 175, 1816, 576, 240, 1059, 4550, 2206, 10, 2506, 8, 716, 700, 732, 5, 717, 850, 657, 150, 603, 100, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1292, 'MINI_DEMON', 'Mini Demon', 68, 31865, 0, 8396, 3722, 1, 1073, 1415, 30, 25, 5, 75, 40, 55, 89, 42, 10, 12, 0, 6, 27, 149, 150, 1000, 600, 384, 1038, 4550, 1039, 450, 2255, 6, 757, 160, 912, 2500, 1009, 10, 1410, 3, 7054, 2500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1293, 'CREMY_FEAR', 'Creamy Fear', 62, 13109, 0, 7365, 2691, 2, 667, 830, 45, 30, 5, 40, 16, 15, 68, 55, 10, 12, 0, 4, 24, 149, 155, 1136, 720, 840, 924, 4550, 2333, 10, 518, 550, 602, 200, 1550, 8, 1611, 8, 522, 50, 7053, 1800, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1294, 'KILLER_MANTIS', 'Killer Mantis', 56, 12911, 0, 6509, 2366, 1, 764, 927, 35, 20, 5, 26, 24, 5, 75, 40, 10, 12, 1, 4, 22, 149, 175, 1528, 660, 432, 1031, 4550, 943, 2500, 721, 10, 504, 5, 656, 25, 2224, 3, 2108, 1, 7053, 2500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1295, 'OWL_BARON', 'Owl Baron', 75, 59489, 0, 10967, 4811, 2, 1252, 1609, 65, 25, 25, 25, 80, 95, 95, 55, 10, 12, 2, 6, 60, 181, 175, 1345, 824, 440, 7071, 3500, 7063, 2500, 1716, 2, 1472, 1, 1402, 25, 1514, 10, 5045, 5, 7054, 2500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1296, 'KOBOLD_LEADER', 'Kobold Leader', 65, 17935, 0, 7432, 2713, 1, 649, 957, 37, 37, 5, 90, 36, 30, 77, 59, 10, 12, 1, 7, 44, 149, 150, 1028, 528, 360, 999, 450, 1034, 6500, 912, 1200, 1511, 6, 1613, 2, 525, 150, 526, 100, 7053, 1500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1297, 'ANCIENT_MUMMY', 'Ancient Mummy', 64, 39760, 0, 8040, 3499, 1, 836, 1129, 27, 27, 28, 19, 32, 5, 83, 35, 10, 12, 1, 1, 49, 149, 175, 1772, 120, 384, 930, 4550, 934, 1800, 2624, 1, 2611, 150, 503, 350, 756, 150, 757, 100, 7053, 2500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1298, 'ZOMBIE_MASTER', 'Zombie Master', 62, 13917, 0, 7610, 2826, 1, 824, 1084, 37, 26, 25, 20, 30, 5, 77, 35, 10, 12, 1, 1, 29, 149, 175, 2612, 912, 288, 7071, 4550, 938, 1500, 958, 1500, 723, 200, 727, 100, 1260, 1, 2324, 2, 2627, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1299, 'GOBLIN_LEADER', 'Goblin Leader', 64, 19735, 0, 6036, 2184, 1, 663, 753, 48, 16, 5, 55, 37, 30, 69, 58, 10, 12, 1, 7, 24, 149, 120, 1120, 620, 240, 998, 1200, 999, 800, 756, 120, 2297, 5, 2106, 2, 503, 650, 2611, 240, 7054, 1500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1300, 'CATERPILLAR', 'Caterpillar', 64, 14140, 0, 6272, 3107, 1, 895, 1448, 47, 29, 35, 25, 85, 15, 69, 45, 10, 12, 0, 4, 22, 149, 300, 1672, 672, 480, 949, 3000, 7054, 5500, 2227, 20, 1000, 100, 997, 50, 501, 1000, 502, 500, 505, 12, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1301, 'AM_MUT', 'Am Mut', 61, 11848, 0, 7709, 2690, 1, 1041, 1123, 50, 10, 50, 65, 40, 35, 83, 45, 10, 12, 0, 6, 27, 149, 200, 1156, 456, 384, 1021, 4550, 757, 250, 1517, 3, 969, 5, 2282, 1, 912, 1200, 746, 250, 616, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1302, 'DARK_ILLUSION', 'Dark Illusion', 77, 101487, 0, 11163, 4181, 2, 1300, 1982, 64, 70, 5, 100, 40, 100, 97, 40, 10, 12, 2, 6, 89, 181, 145, 1024, 768, 480, 1615, 3, 5017, 2, 2508, 3, 7054, 5500, 522, 120, 504, 550, 1162, 2, 7053, 2500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1303, 'GIANT_HONET', 'Giant Hornet', 56, 12834, 0, 5785, 2006, 1, 650, 851, 38, 43, 35, 38, 32, 10, 71, 64, 10, 12, 0, 4, 24, 149, 155, 1292, 792, 340, 526, 550, 518, 1200, 522, 12, 610, 15, 1608, 3, 722, 20, 2627, 1, 516, 3500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1304, 'GIANT_SPIDER', 'Giant Spider', 55, 11628, 0, 6211, 2146, 1, 625, 802, 41, 28, 5, 36, 43, 5, 73, 69, 10, 12, 2, 4, 25, 149, 165, 1468, 468, 768, 1025, 4550, 1042, 1200, 757, 140, 525, 450, 943, 1200, 1096, 680, 7053, 800, 7054, 800, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1305, 'ANCIENT_WORM', 'Ancient Worm', 67, 22131, 0, 8174, 3782, 1, 947, 1115, 35, 30, 5, 35, 56, 55, 81, 72, 10, 12, 2, 4, 25, 149, 165, 1792, 792, 336, 1042, 4550, 912, 2500, 2406, 1, 719, 15, 1096, 680, 938, 3500, 7054, 2500, 7053, 2500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1306, 'LEIB_OLMAI', 'Leib Olmai', 58, 23731, 0, 6011, 2171, 1, 740, 1390, 27, 31, 5, 35, 95, 5, 64, 85, 10, 12, 2, 2, 22, 149, 175, 1260, 230, 192, 948, 4550, 2289, 8, 740, 120, 518, 500, 526, 1, 969, 5, 7053, 800, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1307, 'CAT_O_NINE_TAIL', 'Cat\'o\'Nine Tails', 76, 63177, 0, 10869, 4283, 1, 1112, 1275, 61, 55, 55, 75, 55, 82, 86, 120, 10, 12, 1, 6, 63, 181, 155, 1276, 576, 288, 5008, 1, 638, 150, 10008, 5, 985, 600, 984, 800, 969, 6, 617, 1, 7054, 5500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1308, 'PANZER_GOBLIN', 'Panzer Goblin', 59, 13838, 0, 7212, 2697, 1, 682, 877, 41, 28, 60, 60, 40, 20, 81, 160, 10, 12, 1, 7, 44, 149, 200, 960, 1008, 840, 7053, 4550, 7054, 3500, 999, 180, 998, 360, 1003, 580, 744, 800, 994, 160, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1309, 'GAJOMART', 'Gajomart', 63, 13386, 0, 6625, 2900, 1, 916, 948, 85, 50, 5, 34, 10, 5, 75, 140, 10, 12, 0, 0, 83, 149, 300, 1000, 1152, 828, 953, 6500, 912, 2300, 503, 870, 2279, 8, 1752, 10000, 999, 640, 994, 180, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1310, 'MAJORUROS', 'Majoruros', 66, 56791, 0, 8525, 3799, 1, 780, 1300, 10, 25, 65, 50, 75, 50, 85, 48, 10, 12, 2, 2, 43, 149, 250, 1100, 960, 780, 941, 4550, 1361, 4, 657, 300, 984, 16, 504, 850, 2611, 160, 2607, 1, 1000, 250, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1311, 'GULLINBURSTI', 'Gullinbursti', 62, 20890, 0, 5814, 2376, 1, 699, 1431, 10, 15, 55, 25, 60, 5, 70, 45, 10, 12, 2, 2, 42, 149, 150, 1960, 960, 384, 1028, 3500, 656, 290, 702, 6, 2276, 1, 605, 15, 2627, 1, 912, 160, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1312, 'TURTLE_GENERAL', 'Turtle General', 97, 320700, 0, 18202, 9800, 2, 2438, 3479, 50, 54, 100, 45, 55, 65, 105, 164, 10, 12, 2, 2, 42, 181, 200, 900, 1000, 500, 1529, 8, 1306, 5, 512, 0, 1417, 1, 7070, 5500, 512, 0, 912, 5500, 658, 1, 1, 5000, 967, 5500, 607, 1500, 617, 2000);
-INSERT INTO `mob_db` VALUES (1313, 'MOBSTER', 'Mobster', 61, 11347, 0, 4424, 1688, 1, 910, 1128, 41, 37, 76, 46, 20, 35, 76, 55, 10, 12, 1, 7, 20, 149, 250, 1100, 560, 580, 1239, 3, 2601, 2, 2621, 1, 716, 600, 912, 2500, 525, 450, 505, 60, 726, 4700, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1314, 'PERMETER', 'Perimeter', 63, 11684, 0, 3756, 1955, 2, 943, 1212, 46, 45, 69, 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, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1315, 'ASSULTER', 'Assaulter', 71, 15861, 0, 4854, 2654, 2, 764, 1499, 35, 28, 85, 74, 10, 35, 100, 100, 10, 12, 1, 7, 44, 149, 155, 1000, 900, 432, 967, 4550, 7069, 1200, 7072, 840, 503, 1280, 912, 1240, 522, 45, 603, 1, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1316, 'SOLIDER', 'Soldier', 70, 17181, 0, 4458, 1951, 2, 796, 978, 57, 43, 69, 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, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1317, 'FUR_SEAL', 'Fur Seal', 63, 9114, 0, 4501, 2035, 1, 845, 1202, 25, 33, 5, 28, 22, 15, 69, 84, 10, 12, 1, 2, 21, 133, 250, 1612, 622, 583, 912, 4500, 510, 250, 2310, 5, 7053, 1200, 1452, 1, 525, 200, 746, 120, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1318, 'HEATER', 'Heater', 68, 15648, 0, 3766, 2359, 2, 682, 1007, 40, 42, 69, 47, 25, 5, 71, 100, 10, 12, 1, 2, 43, 149, 250, 1452, 483, 528, 967, 4550, 7070, 750, 501, 2400, 912, 1640, 526, 140, 7054, 600, 1505, 2, 7068, 1250, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1319, 'FREEZER', 'Freezer', 72, 12263, 0, 3665, 2197, 2, 672, 984, 55, 43, 69, 41, 59, 5, 67, 100, 10, 12, 1, 2, 41, 149, 250, 1452, 483, 528, 967, 4550, 7070, 850, 7066, 1250, 912, 1800, 526, 160, 7053, 600, 1504, 5, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1320, 'OWL_DUKE', 'Owl Duke', 75, 26623, 0, 7217, 3474, 1, 715, 910, 27, 49, 15, 45, 40, 75, 79, 88, 10, 12, 2, 6, 60, 181, 195, 1345, 824, 440, 7071, 4550, 7063, 1500, 1714, 1, 747, 1, 1451, 3, 1513, 2, 5045, 1, 7054, 1500, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1321, 'DRAGON_TAIL', 'Dragon Tail', 61, 11883, 0, 3587, 1453, 1, 520, 715, 25, 19, 10, 68, 15, 5, 67, 67, 10, 12, 1, 4, 44, 149, 175, 862, 534, 312, 7064, 4550, 1096, 400, 943, 800, 2207, 8, 2226, 2, 601, 300, 602, 150, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1322, 'SPRING_RABBIT', 'Spring Rabbit', 58, 12844, 0, 3982, 1766, 1, 585, 813, 29, 21, 45, 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, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1323, 'SEE_OTTER', 'Sea Otter', 59, 9999, 0, 4267, 2040, 1, 650, 813, 33, 35, 5, 36, 40, 25, 82, 65, 10, 12, 1, 2, 61, 133, 190, 1132, 583, 532, 722, 150, 965, 5500, 7065, 4500, 725, 50, 726, 50, 746, 650, 7053, 1200, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1324, 'TREASURE_BOX1', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1325, 'TREASURE_BOX2', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7073, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 1239, 1500, 2252, 75, 1165, 8, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1326, 'TREASURE_BOX3', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1327, 'TREASURE_BOX4', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7074, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2108, 1000, 1306, 75, 5022, 8, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1328, 'TREASURE_BOX5', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1329, 'TREASURE_BOX6', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7075, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2102, 834, 5019, 100, 5002, 9, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1330, 'TREASURE_BOX7', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1331, 'TREASURE_BOX8', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7076, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2616, 500, 2334, 125, 2622, 9, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1332, 'TREASURE_BOX9', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1333, 'TREASURE_BOX10', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7077, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2104, 500, 2331, 150, 2623, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1334, 'TREASURE_BOX11', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1335, 'TREASURE_BOX12', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7078, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2270, 500, 1716, 150, 2256, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1336, 'TREASURE_BOX13', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1337, 'TREASURE_BOX14', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7079, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 1238, 375, 1531, 150, 2318, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1338, 'TREASURE_BOX15', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1339, 'TREASURE_BOX16', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7080, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2626, 300, 1472, 167, 2327, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1340, 'TREASURE_BOX17', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1341, 'TREASURE_BOX18', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7081, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 1143, 250, 1237, 188, 2235, 12, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1342, 'TREASURE_BOX19', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1343, 'TREASURE_BOX20', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7082, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 617, 250, 1229, 188, 5007, 19, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1344, 'TREASURE_BOX21', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1345, 'TREASURE_BOX22', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7083, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2508, 1000, 2336, 69, 2621, 20, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1346, 'TREASURE_BOX23', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1347, 'TREASURE_BOX24', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7084, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2106, 1000, 1164, 50, 5025, 24, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1348, 'TREASURE_BOX25', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1349, 'TREASURE_BOX26', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7085, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2231, 750, 2624, 46, 2286, 25, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1350, 'TREASURE_BOX27', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1351, 'TREASURE_BOX28', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7086, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2283, 500, 2615, 41, 2234, 32, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1352, 'TREASURE_BOX29', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1353, 'TREASURE_BOX30', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7087, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2507, 500, 2625, 38, 5027, 34, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1354, 'TREASURE_BOX31', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1355, 'TREASURE_BOX32', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7088, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2407, 429, 2269, 250, 2317, 35, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1356, 'TREASURE_BOX33', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1357, 'TREASURE_BOX34', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7089, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2109, 300, 2406, 273, 2258, 38, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1358, 'TREASURE_BOX35', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1359, 'TREASURE_BOX36', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7090, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 1142, 215, 2255, 60, 5017, 38, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1360, 'TREASURE_BOX37', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1361, 'TREASURE_BOX38', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7091, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 1417, 50, 5053, 50, 2229, 50, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1362, 'TREASURE_BOX39', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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);
-INSERT INTO `mob_db` VALUES (1363, 'TREASURE_BOX40', 'Treasure Chest', 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 7092, 80, 658, 500, 604, 10000, 984, 5000, 985, 7500, 2506, 43, 2254, 43, 1529, 38, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1364, 'G_ASSULTER', 'Assaulter', 59, 18251, 0, 1, 1, 2, 195, 227, 35, 36, 85, 55, 10, 35, 145, 100, 10, 12, 1, 7, 44, 149, 155, 1000, 900, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1365, 'APOCALIPS', 'Apocalypse', 66, 22680, 0, 6540, 4935, 2, 1030, 1370, 62, 49, 1, 48, 120, 108, 66, 85, 10, 12, 2, 0, 60, 133, 400, 1564, 864, 576, 7095, 5500, 7094, 2400, 7093, 2200, 985, 5, 757, 15, 2506, 20, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1366, 'LAVA_GOLEM', 'Lava Golem', 77, 24324, 0, 6470, 3879, 1, 1541, 2049, 65, 50, 1, 57, 115, 127, 76, 68, 10, 12, 2, 0, 83, 133, 400, 1564, 864, 576, 7096, 5000, 7097, 3800, 2317, 1, 2316, 2, 504, 2500, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1367, 'BLAZZER', 'Blazer', 43, 8252, 0, 3173, 1871, 2, 533, 709, 50, 40, 1, 52, 50, 64, 69, 40, 10, 12, 0, 6, 43, 133, 180, 1564, 864, 576, 7097, 5500, 7098, 3700, 504, 4000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1368, 'GEOGRAPHER', 'Geographer', 56, 8071, 0, 2715, 2000, 3, 467, 621, 28, 26, 1, 67, 47, 83, 68, 44, 10, 12, 0, 3, 62, 132, 2000, 1564, 864, 576, 1032, 7500, 1033, 5500, 2253, 30, 2207, 50, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1369, 'GRAND_PECO', 'Grand Peco', 58, 8054, 0, 2387, 1361, 2, 444, 565, 37, 30, 1, 67, 66, 83, 71, 51, 10, 12, 2, 2, 43, 145, 165, 1564, 864, 576, 7101, 5000, 522, 300, 992, 1000, 969, 1, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 155, 1564, 864, 576, 522, 1500, 2407, 3, 2611, 500, 2613, 150, 2601, 2, 1472, 1, 505, 1000, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1371, 'FAKE_ANGEL', 'Fake Angel', 65, 16845, 0, 3371, 1949, 2, 513, 682, 50, 35, 1, 64, 57, 98, 61, 88, 10, 12, 0, 8, 66, 133, 160, 1564, 864, 576, 7104, 5500, 7105, 3500, 717, 1000, 715, 1000, 716, 1000, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1372, 'GOAT', 'Goat', 69, 11077, 0, 3357, 2015, 1, 457, 608, 44, 25, 1, 58, 66, 95, 67, 43, 10, 12, 2, 2, 63, 145, 165, 1564, 864, 576, 7106, 5000, 7107, 2500, 713, 5000, 507, 500, 510, 1000, 508, 2500, 511, 5500, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1373, 'LORD_OF_DEATH', 'Lord of Death', 94, 303383, 0, 10000, 5000, 3, 2430, 3232, 77, 73, 1, 99, 120, 169, 100, 106, 10, 12, 2, 6, 67, 181, 300, 1564, 864, 576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10000, 1000, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1374, 'INCUBUS', 'Incubus', 75, 17281, 0, 5254, 4212, 2, 1408, 1873, 58, 46, 1, 97, 95, 150, 89, 87, 10, 12, 1, 6, 67, 133, 165, 1564, 864, 576, 522, 1500, 504, 5500, 1306, 2, 2621, 1, 2610, 500, 2613, 150, 504, 1200, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1375, 'THE_PAPER', 'The Paper', 56, 18557, 0, 2849, 1998, 1, 845, 1124, 25, 24, 1, 66, 52, 102, 71, 79, 10, 12, 1, 0, 60, 133, 170, 1564, 864, 576, 7111, 5500, 7112, 3200, 503, 800, 511, 2000, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 155, 1564, 864, 576, 7115, 5500, 7116, 2500, 502, 1500, 503, 800, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1377, 'ELDER', 'Elder', 64, 21592, 0, 4650, 3408, 3, 421, 560, 45, 68, 1, 76, 68, 142, 72, 86, 10, 12, 2, 7, 80, 133, 165, 1564, 864, 576, 7099, 4500, 7117, 1500, 7118, 1500, 1472, 4, 1473, 1, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1378, 'DEMON_PUNGUS', 'Demon Pungus', 56, 7259, 0, 3148, 1817, 1, 360, 479, 48, 31, 1, 83, 55, 86, 63, 34, 10, 12, 0, 6, 65, 133, 170, 1564, 864, 576, 7119, 4200, 7001, 4700, 715, 4000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1379, 'NIGHTMARE_TERROR', 'Nightmare Terror', 78, 22605, 0, 6683, 4359, 1, 757, 1007, 37, 37, 1, 76, 55, 87, 77, 54, 10, 12, 2, 6, 67, 133, 165, 1564, 864, 576, 7120, 5500, 2626, 1, 2608, 30, 505, 50, 510, 150, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1380, 'DRILLER', 'Driller', 52, 7452, 0, 3215, 1860, 1, 666, 886, 48, 31, 1, 66, 58, 79, 60, 47, 10, 12, 1, 2, 22, 133, 165, 1564, 864, 576, 1012, 7500, 715, 4000, 716, 3500, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1381, 'GRIZZLY', 'Grizzly', 68, 11733, 0, 3341, 2012, 1, 809, 1076, 44, 32, 1, 54, 68, 92, 70, 61, 10, 12, 2, 2, 63, 133, 165, 1564, 864, 576, 948, 7500, 919, 7500, 549, 2500, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1382, 'DIABOLIC', 'Diabolic', 67, 9642, 0, 3662, 2223, 1, 796, 1059, 64, 36, 1, 84, 53, 93, 71, 69, 10, 12, 0, 6, 47, 133, 150, 1564, 864, 576, 1038, 6800, 1039, 5700, 2605, 3, 984, 20, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1383, 'EXPLOSION', 'Explosion', 46, 8054, 0, 2404, 1642, 1, 336, 447, 35, 27, 1, 61, 56, 78, 66, 38, 10, 12, 0, 2, 63, 133, 165, 1564, 864, 576, 7006, 6500, 7097, 2500, 7122, 3500, 756, 1000, 522, 500, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1384, 'DELETER', 'Sky Deleter', 66, 17292, 0, 3403, 2066, 1, 446, 593, 45, 53, 1, 105, 40, 85, 72, 54, 10, 12, 1, 9, 44, 133, 175, 1564, 864, 576, 7123, 4200, 1035, 5500, 1037, 4000, 1036, 3700, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1385, 'DELETER_', 'Earth Deleter', 65, 15168, 0, 3403, 2066, 1, 446, 593, 52, 53, 1, 67, 40, 85, 72, 68, 10, 12, 1, 9, 42, 133, 175, 1564, 864, 576, 7123, 4200, 1035, 5500, 1037, 4000, 1036, 3700, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1386, 'SLEEPER', 'Sleeper', 67, 8237, 0, 3603, 2144, 1, 593, 789, 49, 35, 1, 48, 100, 107, 75, 28, 10, 12, 1, 0, 42, 133, 195, 1564, 864, 576, 7124, 5500, 1056, 5500, 997, 4500, 756, 300, 1226, 5, 1222, 20, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1387, 'GIG', 'Gig', 60, 8409, 0, 3934, 2039, 1, 360, 479, 60, 28, 1, 61, 80, 93, 59, 46, 10, 12, 0, 2, 41, 133, 170, 1564, 864, 576, 7125, 5000, 904, 7500, 716, 150, 525, 2500, 994, 850, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1388, 'ARCHANGELING', 'Archangeling', 60, 79523, 0, 4152, 2173, 1, 669, 890, 54, 58, 1, 65, 80, 114, 65, 105, 10, 12, 1, 8, 66, 181, 180, 1564, 864, 576, 2255, 5, 610, 1800, 608, 150, 985, 15, 984, 55, 2317, 3, 512, 500, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 145, 1564, 864, 576, 607, 4700, 1473, 5, 1722, 5, 2507, 15, 2621, 4, 1557, 4, 512, 0, 4134, 1, 500, 5000, 607, 5500, 732, 2250, 522, 1125);
-INSERT 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, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1391, 'GALAPAGO', 'Galapago', 63, 9940, 0, 3204, 1966, 1, 457, 608, 33, 33, 1, 56, 56, 45, 66, 57, 10, 12, 1, 2, 22, 131, 165, 1564, 864, 576, 7053, 6700, 610, 1500, 503, 2500, 606, 100, 605, 100, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1392, 'ROTAR_ZAIRO', 'Rotar Zairo', 25, 1209, 0, 351, 215, 10, 109, 137, 4, 34, 1, 62, 45, 48, 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, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1393, 'G_MUMMY', 'G Mummy', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1394, 'G_ZOMBIE', 'G Zombie', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1395, 'CRYSTAL_1', 'Wind Crystal', 1, 15, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 999, 0, 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);
-INSERT INTO `mob_db` VALUES (1396, 'CRYSTAL_2', 'Earth Crystal', 1, 15, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 999, 0, 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);
-INSERT INTO `mob_db` VALUES (1397, 'CRYSTAL_3', 'Fire Crystal', 1, 15, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 999, 0, 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);
-INSERT INTO `mob_db` VALUES (1398, 'CRYSTAL_4', 'Water Crystal', 1, 15, 0, 0, 0, 1, 1, 2, 100, 99, 0, 0, 0, 0, 999, 0, 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);
-INSERT INTO `mob_db` VALUES (1399, 'EVENT_BAPHO', 'Baphomet', 99, 864960, 0, 562340, 87895, 2, 3220, 4040, 35, 45, 1, 152, 96, 85, 120, 95, 10, 10, 2, 6, 67, 181, 100, 1068, 768, 576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 608, 0, 0, 0, 923, 3800, 0, 0);
-INSERT INTO `mob_db` VALUES (1400, 'KARAKASA', 'Karakasa', 30, 3092, 0, 489, 322, 1, 140, 183, 1, 20, 1, 40, 12, 5, 52, 45, 10, 12, 1, 0, 60, 129, 300, 1480, 480, 1056, 7150, 4501, 7151, 5000, 912, 4001, 1019, 3501, 7111, 2501, 746, 51, 512, 1, 512, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1401, 'SHINOBI', 'Shinobi', 69, 12700, 0, 4970, 3010, 1, 460, 1410, 30, 21, 1, 91, 25, 25, 89, 40, 10, 12, 1, 7, 67, 133, 200, 1480, 480, 720, 7156, 7000, 1011, 4000, 7053, 3000, 739, 200, 2337, 50, 2335, 150, 2336, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1402, 'POISON_TOAD', 'Poison Toad', 46, 6629, 0, 1929, 1457, 1, 288, 408, 5, 10, 1, 45, 19, 1, 66, 43, 10, 12, 1, 2, 45, 129, 165, 976, 576, 288, 7154, 6000, 7155, 4000, 724, 5, 526, 1500, 506, 1000, 2610, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 1501, 549, 351, 525, 301, 503, 21, 7157, 0, 2285, 2, 512, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1404, 'MIYABI_NINGYO', 'Miyabi Ningyo', 33, 6300, 0, 795, 493, 1, 250, 305, 1, 2, 45, 31, 15, 10, 47, 15, 10, 12, 1, 6, 27, 145, 200, 1720, 500, 420, 7153, 2501, 7152, 5500, 1000, 1301, 7005, 101, 504, 501, 2613, 2, 512, 1, 512, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 150, 1056, 1056, 336, 7159, 5000, 7158, 4000, 999, 2500, 7063, 1500, 522, 1000, 2278, 800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1406, 'KAPHA', 'Kappa', 41, 7982, 0, 2278, 1552, 3, 399, 719, 20, 38, 1, 65, 49, 22, 73, 140, 10, 12, 1, 5, 21, 133, 200, 1152, 1152, 384, 7149, 6500, 7053, 4001, 912, 601, 521, 2301, 520, 2000, 640, 11, 708, 101, 512, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1407, 'DOKEBI_', 'Dokebi', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1408, 'BLOOD_BUTTERFLY', 'Blood Butterfly', 57, 8082, 0, 2298, 1896, 2, 354, 575, 5, 23, 1, 65, 35, 37, 116, 30, 10, 13, 1, 4, 44, 133, 150, 872, 500, 300, 7163, 5000, 7168, 2501, 602, 1501, 924, 5000, 512, 1, 1802, 16, 512, 1, 512, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1409, 'RICE_CAKE_BOY', 'Rice Cake Boy', 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, 5000, 7151, 4000, 512, 1500, 2262, 800, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1410, 'LIVE_PEACH_TREE', 'Live Peach Tree', 55, 10050, 0, 2965, 1999, 8, 482, 603, 10, 38, 1, 45, 120, 39, 120, 55, 10, 13, 1, 3, 42, 132, 400, 1288, 576, 288, 7164, 4000, 522, 2500, 526, 1500, 604, 1000, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1410, 'LIVE_PEACH_TREE', 'Live Peach Tree', 55, 10050, 0, 2965, 1999, 8, 482, 603, 10, 38, 1, 45, 120, 39, 120, 55, 10, 13, 1, 3, 42, 132, 400, 1288, 576, 288, 7164, 4000, 522, 2500, 526, 1500, 604, 1000, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1412, 'EVIL_CLOUD_HERMIT', 'Evil Cloud 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, 5500, 553, 5000, 548, 5500, 550, 5000, 1908, 1, 512, 1, 512, 1, 512, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1413, 'WILD_GINSENG', 'Wild Ginseng', 46, 6900, 0, 1038, 692, 5, 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, 10, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1413, 'WILD_GINSENG', 'Wild Ginseng', 46, 6900, 0, 1038, 692, 5, 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, 10, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1415, 'BABY_LEOPARD', 'Baby Leopard', 32, 2590, 0, 352, 201, 2, 155, 207, 0, 5, 1, 44, 20, 4, 49, 10, 10, 13, 0, 2, 28, 133, 150, 988, 288, 168, 7171, 4501, 7172, 4501, 512, 1, 512, 1, 512, 1, 512, 1, 512, 1, 512, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1416, 'WICKED_NYMPH', 'Wicked Nymph', 63, 18029, 0, 3945, 2599, 1, 691, 1382, 12, 75, 1, 64, 12, 69, 100, 80, 10, 13, 1, 6, 67, 133, 200, 1672, 672, 288, 7165, 4000, 7166, 4000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 137, 200, 976, 576, 288, 7161, 4501, 7167, 4501, 512, 1, 512, 1, 512, 1, 512, 1, 512, 1, 512, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1418, 'DARK_SNAKE_LORD', 'Dark Snake Lord', 73, 254993, 0, 34288, 17950, 1, 1433, 2033, 25, 55, 1, 83, 62, 80, 164, 88, 10, 12, 2, 2, 68, 181, 200, 976, 500, 400, 7169, 1500, 10020, 2500, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 524, 0, 985, 2000, 607, 3600, 608, 0);
-INSERT INTO `mob_db` VALUES (1419, 'G_FARMILIAR', 'Farmoloar', 8, 155, 0, 0, 0, 1, 20, 28, 0, 0, 1, 12, 8, 5, 28, 0, 10, 12, 0, 2, 27, 133, 150, 1276, 576, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 300, 2864, 864, 576, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1421, 'G_ISIS', 'Isis', 43, 4828, 0, 0, 0, 1, 423, 507, 10, 35, 38, 65, 43, 30, 72, 15, 10, 12, 2, 6, 27, 149, 200, 1384, 768, 336, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1422, 'G_HUNTER_FLY', 'Hunter Fly', 42, 5242, 0, 0, 0, 1, 246, 333, 25, 15, 33, 105, 32, 15, 72, 30, 10, 12, 0, 4, 44, 133, 150, 676, 576, 480, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 250, 2456, 912, 504, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1424, 'G_SIDE_WINDER', 'Sidewinder', 43, 4929, 0, 0, 0, 1, 240, 320, 5, 10, 38, 43, 40, 15, 115, 20, 10, 12, 1, 2, 25, 149, 200, 1576, 576, 576, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1872, 672, 288, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 150, 1272, 72, 480, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 1816, 816, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1428, 'G_POISON_SPORE', 'Poison Spore', 19, 665, 0, 0, 0, 1, 89, 101, 0, 0, 1, 19, 25, 0, 24, 0, 10, 12, 1, 3, 25, 133, 200, 1672, 672, 288, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1792, 792, 336, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1430, 'G_ARGOS', 'Argor', 25, 1117, 0, 0, 0, 1, 158, 191, 15, 0, 1, 25, 25, 5, 32, 15, 10, 12, 2, 4, 25, 149, 300, 1468, 468, 768, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1431, 'G_BAPHOMET_', 'Baphomet', 50, 8578, 0, 0, 0, 1, 487, 590, 15, 25, 1, 75, 55, 1, 93, 45, 10, 12, 0, 6, 27, 149, 100, 868, 480, 120, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1432, 'G_DESERT_WOLF', 'Desert Wolf', 27, 1716, 0, 0, 0, 1, 169, 208, 0, 10, 56, 27, 45, 15, 56, 10, 10, 12, 1, 2, 23, 141, 200, 1120, 420, 288, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 980, 600, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1434, 'G_DRAINLIAR', 'Drainliar', 24, 1162, 0, 0, 0, 1, 74, 84, 0, 0, 1, 36, 24, 0, 78, 0, 10, 12, 0, 2, 47, 149, 250, 1276, 576, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 2276, 576, 336, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1180, 480, 648, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 1364, 864, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1438, 'G_KHALITZBURG', 'Khalitzburg', 63, 19276, 0, 0, 0, 1, 875, 1025, 45, 10, 58, 65, 48, 5, 73, 40, 10, 12, 2, 1, 29, 149, 350, 528, 1000, 396, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1439, 'G_HIGH_ORC', 'High Orc', 52, 6890, 0, 0, 0, 1, 428, 533, 15, 5, 55, 46, 55, 35, 82, 40, 10, 12, 2, 7, 43, 149, 150, 1500, 500, 1000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1500, 500, 1000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 400, 832, 500, 600, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1442, 'G_SASQUATCH', 'Sasquatch', 30, 3163, 0, 0, 0, 1, 250, 280, 5, 0, 75, 25, 60, 10, 34, 20, 10, 12, 2, 2, 60, 149, 300, 1260, 192, 192, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 400, 1296, 1296, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 400, 672, 672, 288, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1445, 'G_RAGGLER', 'Raggler', 21, 1020, 0, 0, 0, 1, 102, 113, 0, 5, 18, 10, 32, 20, 39, 35, 10, 12, 0, 2, 24, 149, 200, 1000, 900, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1446, 'G_INJUSTICE', 'Injustice', 51, 7600, 0, 0, 0, 1, 480, 600, 0, 0, 84, 42, 39, 0, 71, 35, 10, 12, 1, 1, 47, 149, 400, 770, 720, 336, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1447, 'G_GRYPHON', 'Gryphon', 72, 27800, 0, 0, 0, 1, 880, 1260, 35, 35, 68, 95, 78, 65, 115, 75, 10, 12, 2, 2, 84, 181, 100, 704, 504, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 920, 720, 200, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1449, 'G_MUTANT_DRAGON', 'Muntant Dragon', 65, 62600, 0, 0, 0, 4, 2400, 3400, 15, 20, 75, 47, 30, 68, 45, 35, 10, 12, 2, 9, 43, 181, 250, 1280, 1080, 240, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 1056, 1056, 336, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1451, 'G_MERMAN', 'Merman', 53, 12300, 0, 0, 0, 2, 482, 603, 10, 35, 72, 45, 46, 15, 85, 55, 10, 12, 1, 7, 41, 149, 200, 916, 816, 336, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1452, 'G_ORC_LADY', 'Orc Lady', 31, 2000, 0, 0, 0, 1, 135, 170, 10, 10, 35, 42, 25, 15, 69, 55, 10, 12, 1, 7, 42, 149, 200, 1050, 900, 288, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1453, 'G_RAYDRIC_ARCHER', 'Raydric Archer', 52, 5250, 0, 0, 0, 9, 415, 500, 35, 5, 15, 25, 22, 5, 145, 35, 10, 12, 1, 6, 47, 133, 200, 1152, 1152, 480, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 860, 660, 624, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1455, 'G_KOBOLD_ARCHER', 'Kobold Archer', 33, 2560, 0, 0, 0, 9, 155, 185, 10, 5, 10, 20, 15, 30, 100, 25, 10, 12, 0, 7, 23, 133, 200, 1008, 1008, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 181, 200, 772, 672, 360, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1528, 660, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1540, 840, 504, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1480, 480, 1056, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 432, 432, 360, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1461, 'G_MINOROUS', 'Minorous', 52, 7431, 0, 0, 0, 1, 590, 770, 15, 5, 65, 42, 61, 66, 52, 25, 10, 12, 2, 2, 43, 149, 200, 1360, 960, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 200, 2420, 720, 648, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 400, 2852, 1152, 840, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 165, 1700, 1000, 500, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1624, 620, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 150, 1420, 1080, 528, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1467, 'G_RAYDRIC', 'Raydric', 52, 8613, 0, 0, 0, 1, 830, 930, 40, 15, 58, 47, 42, 5, 69, 26, 10, 12, 2, 7, 47, 149, 150, 824, 780, 420, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 400, 1516, 816, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 400, 2420, 720, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1470, 'G_ZEROM', 'Zerom', 23, 1109, 0, 0, 0, 1, 127, 155, 0, 10, 1, 23, 23, 5, 42, 0, 10, 12, 1, 7, 23, 133, 200, 1780, 1080, 432, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1471, 'G_NINE_TAIL', 'NineTail', 51, 9466, 0, 0, 0, 1, 610, 734, 10, 25, 1, 80, 46, 1, 89, 85, 10, 12, 1, 2, 63, 149, 150, 840, 540, 480, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1472, 'G_BON_GUN', 'Bon Gun', 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, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1960, 620, 480, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1474, 'G_MIMIC', 'Mimic', 51, 6120, 0, 0, 0, 1, 150, 900, 10, 40, 44, 121, 1, 60, 75, 110, 10, 12, 1, 0, 60, 149, 100, 972, 500, 288, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1816, 576, 240, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1020, 500, 768, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 960, 500, 480, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1478, 'G_RIDEWORD', 'Rideword', 59, 11638, 0, 0, 0, 1, 584, 804, 5, 35, 48, 75, 10, 20, 120, 45, 10, 12, 0, 0, 60, 149, 150, 864, 500, 192, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1479, 'G_SKEL_PRISONER', 'Skeleton Prisoner', 52, 8691, 0, 0, 0, 1, 660, 890, 10, 20, 55, 20, 36, 0, 76, 25, 10, 12, 1, 1, 69, 141, 350, 1848, 500, 576, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 141, 350, 1768, 500, 192, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 300, 1500, 500, 1000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1482, 'G_ZHERLTHSH', 'Zherlthsh', 63, 18300, 0, 0, 0, 1, 700, 850, 10, 15, 70, 85, 40, 30, 125, 60, 10, 12, 1, 7, 60, 141, 200, 800, 792, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1500, 500, 1000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 175, 1500, 500, 1000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1485, 'G_MYSTELTAINN', 'Mysteltainn', 76, 33350, 0, 0, 0, 2, 1160, 1440, 30, 30, 77, 139, 80, 35, 159, 65, 10, 12, 2, 0, 87, 181, 250, 1152, 500, 240, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1486, 'G_TIRFING', 'Trifing', 71, 29900, 0, 0, 0, 1, 950, 1146, 30, 35, 58, 87, 55, 35, 132, 65, 10, 12, 1, 0, 67, 181, 100, 816, 500, 240, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1487, 'G_EXECUTIONER', 'Executioner', 65, 28980, 0, 0, 0, 2, 570, 950, 35, 35, 64, 85, 40, 25, 88, 60, 10, 12, 2, 0, 47, 181, 200, 768, 500, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 900, 500, 864, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1489, 'G_STING', 'Sting', 61, 9500, 0, 0, 0, 1, 850, 1032, 5, 30, 57, 45, 55, 5, 120, 85, 10, 12, 1, 0, 62, 149, 300, 528, 500, 240, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 100, 672, 500, 192, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1491, 'G_DOKEBI', 'Dokebi', 33, 2697, 0, 0, 0, 1, 197, 249, 0, 10, 50, 50, 40, 35, 69, 40, 10, 12, 0, 6, 27, 145, 250, 1156, 456, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1492, 'INCANTATION_SAMURAI', 'Incantation Samurai', 75, 218652, 0, 33095, 18214, 1, 1219, 2169, 10, 51, 64, 85, 78, 85, 150, 60, 10, 12, 2, 7, 67, 181, 200, 1152, 1152, 480, 1164, 2, 1165, 2, 999, 500, 984, 1000, 985, 1000, 607, 500, 7151, 2000, 504, 500, 5000, 1000, 607, 500, 608, 500, 985, 500);
-INSERT 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, 149, 200, 1152, 1152, 384, 7203, 1000, 7198, 1000, 7197, 1000, 1951, 10, 2269, 100, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1494, 'KIND_OF_BEETLE', 'Kind of Beetle', 34, 1874, 0, 679, 442, 3, 191, 243, 14, 12, 1, 34, 10, 0, 50, 0, 10, 12, 0, 4, 22, 149, 200, 1152, 1152, 384, 7190, 1000, 7202, 1000, 928, 100, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1495, 'STONE_SHOOTER', 'Stone Shooter', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1495, 'STONE_SHOOTER', 'Stone Shooter', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1497, 'WOODEN_GOLEM', 'Wooden Golem', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 133, 200, 1152, 1152, 384, 517, 5000, 513, 5000, 7195, 1000, 7200, 1000, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1499, 'WOOTAN_FIGHTER', 'Wootan Fighter', 41, 4457, 0, 1790, 833, 3, 395, 480, 30, 19, 1, 41, 31, 10, 67, 30, 10, 12, 1, 7, 43, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1152, 1152, 384, 7194, 1000, 7186, 1000, 7193, 1000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 149, 200, 1152, 1152, 384, 7194, 1000, 7186, 1000, 7193, 1000, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1502, 'FIRE_PORING', 'Fire Poring', 1, 50, 0, 2, 1, 1, 7, 10, 0, 5, 1, 1, 1, 0, 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, 4001, 20, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1503, 'GIBBET', 'Gibbet', 58, 6841, 0, 8011, 1824, 3, 238, 418, 28, 41, 1, 20, 60, 55, 182, 140, 10, 12, 2, 6, 27, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1504, 'DULLAHAN', 'Dullahan', 62, 12437, 0, 8517, 2963, 3, 418, 647, 47, 38, 1, 20, 60, 55, 282, 140, 10, 12, 1, 1, 29, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 617, 10, 2614, 5, 616, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1505, 'LOLI_RURI', 'Loli Ruri', 71, 23470, 0, 16641, 4314, 3, 841, 1476, 39, 44, 1, 20, 60, 55, 132, 140, 10, 12, 2, 6, 82, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1506, 'DISGUISE', 'Disguise', 55, 7543, 0, 3615, 1919, 3, 267, 279, 18, 29, 1, 20, 60, 55, 102, 140, 10, 12, 1, 6, 82, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1507, 'BLOODY_MURDERER', 'Bloody Murderer', 72, 27521, 0, 18742, 3559, 3, 217, 864, 15, 15, 1, 20, 60, 55, 282, 140, 10, 12, 2, 7, 67, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 617, 10, 1305, 15, 616, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1508, 'QUVE', 'Quve', 40, 4559, 0, 792, 247, 3, 170, 299, 12, 10, 1, 20, 60, 55, 102, 140, 10, 12, 0, 1, 29, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1509, 'LUDE', 'Lude', 36, 3214, 0, 814, 306, 3, 164, 287, 14, 12, 1, 20, 60, 55, 122, 140, 10, 12, 0, 1, 29, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1510, 'HYLOZOIST', 'Hylozoist', 40, 7186, 0, 4614, 1297, 3, 181, 317, 16, 51, 1, 20, 60, 55, 82, 140, 10, 12, 0, 1, 27, 149, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1511, 'AMON_RA', 'Amon Ra', 88, 1214138, 0, 87264, 35891, 5, 929, 1647, 26, 52, 1, 1, 90, 124, 74, 45, 10, 12, 2, 7, 62, 181, 200, 1872, 672, 480, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1512, 'HYEGUN', 'Hyegun', 56, 9981, 0, 2199, 1032, 3, 1, 1, 36, 28, 1, 1, 1, 1, 1, 1, 10, 12, 1, 1, 49, 133, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 617, 10, 2614, 5, 616, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1513, 'CIVIL_SERVANT', 'Civil Servant', 62, 14390, 0, 4023, 2750, 3, 1, 1, 20, 70, 1, 1, 1, 1, 1, 1, 10, 12, 1, 2, 44, 133, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1514, 'DANCING_DRAGON', 'Dancing Dragon', 54, 5472, 0, 3030, 769, 3, 1, 1, 55, 52, 1, 1, 1, 1, 1, 1, 10, 12, 1, 9, 44, 131, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1515, 'GARM_BABY', 'Hatii Baby', 1, 1, 0, 1022, 2980, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 12, 1, 2, 41, 133, 300, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 617, 10, 1305, 15, 616, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1516, 'INCREASE_SOIL', 'Increase Soil', 51, 8230, 0, 2760, 2110, 3, 1, 1, 23, 23, 1, 1, 1, 1, 1, 1, 10, 12, 1, 0, 62, 145, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1517, 'LI_ME_MANG_RYANG', 'Li Me Mang Ryang', 48, 5920, 0, 1643, 1643, 3, 1, 1, 19, 17, 1, 1, 1, 1, 1, 1, 10, 12, 1, 6, 62, 133, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1517, 'LI_ME_MANG_RYANG', 'Li Me Mang Ryang', 48, 5920, 0, 1643, 1643, 3, 1, 1, 19, 17, 1, 1, 1, 1, 1, 1, 10, 12, 1, 6, 62, 133, 200, 1152, 1152, 384, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1518, 'Bacsojin', 'Bacsojin', 75, 218652, 0, 33095, 18214, 1, 1219, 2169, 10, 51, 64, 85, 78, 85, 150, 60, 10, 12, 2, 1, 67, 181, 200, 1152, 1152, 480, 1164, 2, 1165, 2, 999, 500, 984, 1000, 985, 1000, 607, 500, 7151, 2000, 504, 500, 5000, 1000, 607, 500, 608, 500, 985, 500);
-INSERT INTO `mob_db` VALUES (1519, 'Chung_E', 'Chung E', 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, 512, 0, 4100, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT 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, 3, 25, 131, 300, 1672, 672, 480, 564, 5500, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1900, 'VALARIS', 'Valaris', 99, 668000, 0, 107250, 37895, 2, 3220, 4040, 35, 45, 1, 152, 96, 85, 120, 95, 10, 10, 2, 6, 67, 181, 100, 676, 1152, 768, 1466, 200, 2256, 200, 2607, 800, 714, 500, 617, 3000, 984, 4300, 985, 5600, 4147, 1, 13000, 0, 608, 1000, 750, 400, 923, 3800);
-INSERT INTO `mob_db` VALUES (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, 149, 100, 868, 480, 120, 923, 500, 984, 63, 1464, 2, 607, 50, 610, 100, 503, 300, 2405, 50, 4129, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1970, 'PORING_', 'Poring', 1, 50, 0, 2, 1, 1, 7, 10, 0, 5, 1, 1, 1, 0, 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, 4001, 20, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1971, '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, 4009, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1972, 'SPORE_', 'Spore', 9, 327, 0, 22, 17, 1, 24, 29, 0, 5, 1, 9, 9, 0, 14, 5, 10, 12, 1, 3, 21, 129, 200, 1872, 672, 288, 921, 5000, 507, 800, 510, 50, 743, 5, 2220, 40, 921, 5, 512, 0, 4022, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1973, 'PECOPECO_', 'PecoPeco', 13, 531, 0, 85, 36, 1, 35, 46, 0, 0, 1, 13, 13, 25, 27, 9, 10, 12, 2, 2, 23, 145, 200, 1564, 864, 576, 925, 5500, 2402, 20, 508, 50, 507, 900, 1604, 100, 512, 0, 512, 0, 4031, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1974, '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, 133, 200, 1864, 864, 288, 998, 210, 931, 5500, 756, 40, 2267, 3, 1352, 10, 1304, 5, 1301, 100, 4066, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1975, 'MUNAK_', 'Munak', 30, 2872, 0, 361, 218, 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, 609, 20, 2337, 1, 2305, 100, 1558, 5, 4090, 3, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1976, 'ISIS_', 'Isis', 43, 4828, 0, 2396, 993, 1, 423, 507, 10, 35, 38, 65, 43, 30, 72, 15, 10, 12, 2, 6, 27, 149, 200, 1384, 768, 336, 936, 5500, 2233, 5, 2603, 1, 733, 150, 732, 20, 954, 1000, 731, 5, 4116, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1977, 'POPORING_', 'Poporing', 14, 344, 0, 81, 44, 1, 59, 72, 0, 10, 1, 14, 14, 0, 19, 15, 10, 12, 1, 3, 25, 131, 300, 1672, 672, 480, 938, 5500, 910, 1500, 511, 500, 514, 200, 729, 5, 512, 0, 512, 0, 4033, 5, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1978, 'HUNTER_FLY_', 'Hunter Fly', 42, 5242, 0, 1517, 952, 1, 246, 333, 25, 15, 33, 105, 32, 15, 72, 30, 10, 12, 0, 4, 44, 133, 150, 676, 576, 480, 996, 30, 999, 100, 943, 5500, 912, 1300, 756, 129, 2259, 1, 1226, 2, 4115, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1979, '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, 139, 150, 1076, 576, 480, 992, 70, 999, 30, 910, 2400, 935, 3500, 943, 30, 998, 200, 1002, 500, 4042, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1980, '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, 512, 0, 4008, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1981, '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, 4021, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1982, '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, 4044, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1983, 'YOYO_', 'Yoyo', 19, 879, 0, 148, 93, 1, 71, 82, 0, 0, 1, 24, 30, 35, 32, 55, 10, 12, 0, 2, 22, 139, 200, 1054, 54, 384, 942, 5500, 513, 1500, 508, 100, 919, 5000, 753, 5, 756, 24, 512, 0, 4051, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1984, 'METALLER_', 'Metaller', 22, 926, 0, 241, 152, 1, 131, 159, 15, 30, 1, 22, 22, 20, 49, 50, 10, 12, 1, 4, 23, 139, 200, 1708, 1008, 540, 990, 60, 940, 6500, 911, 400, 757, 49, 707, 20, 935, 3000, 512, 0, 4057, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1985, '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, 4006, 15, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1986, 'POISON_SPORE_', 'Poison Spore', 19, 665, 0, 186, 93, 1, 89, 101, 0, 0, 1, 19, 25, 0, 24, 0, 10, 12, 1, 3, 25, 133, 200, 1672, 672, 288, 7033, 5500, 2221, 20, 511, 550, 510, 50, 972, 30, 921, 1200, 912, 6, 4048, 2, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1987, 'BAPHOMET__', 'Baphomet Jr.', 50, 8578, 0, 2706, 1480, 1, 487, 590, 15, 25, 1, 75, 55, 1, 93, 45, 10, 12, 0, 6, 27, 149, 100, 868, 480, 120, 923, 500, 984, 63, 1464, 2, 607, 50, 610, 100, 503, 300, 2405, 50, 4129, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1988, 'DESERT_WOLF_B_', 'Desert Wolf Puppy', 9, 164, 0, 20, 16, 1, 30, 36, 0, 0, 1, 9, 9, 5, 21, 40, 10, 12, 0, 2, 23, 145, 300, 1600, 900, 240, 1010, 85, 919, 5500, 2306, 60, 517, 600, 2301, 200, 512, 0, 512, 0, 4023, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1989, 'DEVIRUCHI_', 'Deviruchi', 46, 7360, 0, 2662, 1278, 1, 475, 560, 10, 25, 1, 69, 40, 55, 87, 30, 10, 12, 0, 6, 27, 149, 150, 980, 600, 384, 1038, 5500, 1039, 400, 2255, 2, 1458, 2, 1009, 5, 912, 1500, 756, 154, 4122, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1990, 'DOKEBI__', 'Dokebi', 33, 2697, 0, 889, 455, 1, 197, 249, 0, 10, 50, 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, 4098, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1991, 'DROPS_', 'Drops', 3, 55, 0, 4, 3, 1, 10, 13, 0, 0, 1, 3, 3, 0, 12, 15, 10, 12, 1, 3, 23, 131, 400, 1372, 672, 480, 909, 7500, 1602, 80, 938, 500, 512, 1100, 713, 1700, 741, 5, 620, 20, 4004, 10, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1992, 'PETIT__', 'Petit', 44, 6881, 0, 1677, 1034, 1, 360, 427, 30, 30, 1, 44, 62, 69, 79, 60, 10, 12, 1, 9, 22, 149, 200, 1624, 620, 384, 1035, 5500, 1037, 300, 756, 140, 509, 1000, 1510, 150, 912, 1500, 606, 15, 4118, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1993, '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, 4017, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1994, '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, 512, 0, 4100, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-INSERT INTO `mob_db` VALUES (1995, 'BON_GUN_', 'Bon Gun', 32, 3520, 0, 424, 242, 1, 220, 260, 0, 0, 45, 15, 36, 10, 48, 15, 10, 12, 1, 1, 29, 149, 200, 1720, 500, 420, 1094, 5500, 7014, 40, 618, 60, 2337, 2, 609, 15, 508, 1000, 502, 250, 5046, 1, 0, 0, 0, 0, 0, 0, 0, 0);
diff --git a/sql-files/db_tables.sql b/sql-files/db_tables.sql
index 2d202f49a..aedc28995 100644
--- a/sql-files/db_tables.sql
+++ b/sql-files/db_tables.sql
@@ -332,12 +332,14 @@ CREATE TABLE `mob_db2` (
`Drop5per` mediumint(9) NOT NULL default '0',
`Drop6id` mediumint(9) NOT NULL default '0',
`Drop6per` mediumint(9) NOT NULL default '0',
- `Drop7d` 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',
- `Item1` tinyint(4) NOT NULL default '0',
- `Item2` tinyint(4) 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',
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
new file mode 100644
index 000000000..e027980c1
--- /dev/null
+++ b/sql-files/item_db.sql
@@ -0,0 +1,1835 @@
+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(2) unsigned default NULL,
+ `equip_jobs` mediumint(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,
+ `view` tinyint(3) unsigned default NULL,
+ `script_use` text,
+ `script_equip` text,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM;
+
+INSERT INTO `item_db` VALUES (501,'Red_Potion','Red Potion',0,50,NULL,70,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;',NULL);
+INSERT INTO `item_db` VALUES (502,'Orange_Potion','Orange Potion',0,200,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0;',NULL);
+INSERT INTO `item_db` VALUES (503,'Yellow_Potion','Yellow Potion',0,550,NULL,130,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(175,234),0;',NULL);
+INSERT INTO `item_db` VALUES (504,'White_Potion','White Potion',0,1200,NULL,150,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;',NULL);
+INSERT INTO `item_db` VALUES (505,'Blue_Potion','Blue Potion',0,5000,NULL,150,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 0,rand(40,59);',NULL);
+INSERT INTO `item_db` VALUES (506,'Green_Potion','Green Potion',0,40,NULL,70,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion;',NULL);
+INSERT INTO `item_db` VALUES (507,'Red_Herb','Red Herb',0,18,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(18,27),0;',NULL);
+INSERT INTO `item_db` VALUES (508,'Yellow_Herb','Yellow Herb',0,40,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(38,57),0;',NULL);
+INSERT INTO `item_db` VALUES (509,'White_Herb','White Herb',0,120,NULL,70,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(75,114),0;',NULL);
+INSERT INTO `item_db` VALUES (510,'Blue_Herb','Blue Herb',0,60,NULL,70,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 0,rand(15,29);',NULL);
+INSERT INTO `item_db` VALUES (511,'Green_Herb','Green Herb',0,10,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_end SC_Poison;',NULL);
+INSERT INTO `item_db` VALUES (512,'Apple','Apple',0,15,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(16,21),0;',NULL);
+INSERT INTO `item_db` VALUES (513,'Banana','Banana',0,15,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(17,20),0;',NULL);
+INSERT INTO `item_db` VALUES (514,'Grape','Grape',0,200,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 0,rand(10,14);',NULL);
+INSERT INTO `item_db` VALUES (515,'Carrot','Carrot',0,15,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(18,19),0;',NULL);
+INSERT INTO `item_db` VALUES (516,'Sweet_Potato','Sweet Potato',0,15,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_start SC_Stan,10000,0;',NULL);
+INSERT INTO `item_db` VALUES (517,'Meat','Meat',0,50,NULL,150,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(70,99),0;',NULL);
+INSERT INTO `item_db` VALUES (518,'Honey','Honey',0,500,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(70,99),rand(20,39);',NULL);
+INSERT INTO `item_db` VALUES (519,'Milk','Milk',0,25,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(27,36),0;',NULL);
+INSERT INTO `item_db` VALUES (520,'Hinalle_Leaflet','Hinalle Leaflet',0,150,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(175,234),0;',NULL);
+INSERT INTO `item_db` VALUES (521,'Aloe_Leaflet','Aloe Leaflet',0,360,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;',NULL);
+INSERT INTO `item_db` VALUES (522,'Mastela_Fruit','Mastela Fruit',0,840,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(400,599),0;',NULL);
+INSERT INTO `item_db` VALUES (523,'Holy_Water','Holy Water',0,20,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_end SC_Curse;',NULL);
+INSERT INTO `item_db` VALUES (525,'Panacea','Panacea',0,500,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse;',NULL);
+INSERT INTO `item_db` VALUES (526,'Royal_Jelly','Royal Jelly',0,7000,NULL,150,NULL,NULL,NULL,NULL,10477567,2,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;',NULL);
+INSERT INTO `item_db` VALUES (528,'Monsters_Feed','Monster Food',0,60,NULL,150,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(72,107),0;',NULL);
+INSERT INTO `item_db` VALUES (529,'Candy','Candy',0,10,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;',NULL);
+INSERT INTO `item_db` VALUES (530,'Candy_Cane','Candy Cane',0,20,NULL,40,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0;',NULL);
+INSERT INTO `item_db` VALUES (531,'Apple_Juice','Apple Juice',0,20,NULL,40,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(25,34),0;',NULL);
+INSERT INTO `item_db` VALUES (532,'Banana_Juice','Banana Juice',0,20,NULL,40,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(26,33),0;',NULL);
+INSERT INTO `item_db` VALUES (533,'Grape_Juice','Grape Juice',0,250,NULL,40,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 0,rand(15,24);',NULL);
+INSERT INTO `item_db` VALUES (534,'Carrot_Juice','Carrot Juice',0,20,NULL,40,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(27,32),0;',NULL);
+INSERT INTO `item_db` VALUES (535,'Pumkin','Pumpkin',0,15,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 19,0;',NULL);
+INSERT INTO `item_db` VALUES (536,'Ice_Cream','Ice Cream',0,150,NULL,80,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'if(rand(100)>24) end; sc_start SC_Freeze,10000,0;',NULL);
+INSERT INTO `item_db` VALUES (537,'Pet_Food','Pet Food',0,1000,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(50,89),0;',NULL);
+INSERT INTO `item_db` VALUES (538,'Well-baked_Cookie','Well-baked Cookie',0,1000,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(160,199),0;',NULL);
+INSERT INTO `item_db` VALUES (539,'Piece_of_Cake','Piece of Cake',0,3000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(270,329),0;',NULL);
+INSERT INTO `item_db` VALUES (540,'Falcon_food','Falcon food',0,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (541,'Pecopeco_food','Pecopeco food',0,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (542,'Festive_Cookie','Festive Cookie',0,10,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;',NULL);
+INSERT INTO `item_db` VALUES (543,'Festive_Rainbow_Cake','Festive Rainbow Cake',0,20,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;',NULL);
+INSERT INTO `item_db` VALUES (544,'Raw_Fish','Raw Fish',0,20,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(25,59),0;',NULL);
+INSERT INTO `item_db` VALUES (545,'Condensed_Red_Potion','Condensed Red Potion',0,20,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;',NULL);
+INSERT INTO `item_db` VALUES (546,'Condensed_Yellow_Potion','Condensed Yellow Potion',0,20,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(175,234),0;',NULL);
+INSERT INTO `item_db` VALUES (547,'Condensed_White_Potion','Condensed White Potion',0,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;',NULL);
+INSERT INTO `item_db` VALUES (548,'Cheese','Cheese',0,2800,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 0,rand(10,14);',NULL);
+INSERT INTO `item_db` VALUES (549,'Yam','Hot Potato',0,180,NULL,80,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(50,99),0;',NULL);
+INSERT INTO `item_db` VALUES (550,'Rice_Cake','Rice Popper',0,20,5,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 10,0;',NULL);
+INSERT INTO `item_db` VALUES (551,'Sushi','Sushi',0,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(50,60),0;',NULL);
+INSERT INTO `item_db` VALUES (552,'Ketupat','Ketupat',0,100,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;',NULL);
+INSERT INTO `item_db` VALUES (553,'Dumpling','Dumpling',0,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(39,68),0;',NULL);
+INSERT INTO `item_db` VALUES (554,'Mochi','Mochi',0,100,NULL,80,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_start SC_Stan,10000,0; sc_start SC_Blind,10000,0;',NULL);
+INSERT INTO `item_db` VALUES (556,'Rolled_Rice','Rolled Rice',0,20,NULL,10,NULL,NULL,NULL,NULL,10477567,3,NULL,NULL,NULL,NULL,'itemheal rand(10,50),0;',NULL);
+INSERT INTO `item_db` VALUES (557,'Cut_Rice_Rolls','Cut Rice Rolls',0,20,NULL,10,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,'itemheal rand(10,200),0;',NULL);
+INSERT INTO `item_db` VALUES (558,'Chocolate','Chocolate',0,500,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 1,1;',NULL);
+INSERT INTO `item_db` VALUES (559,'Hand-made_Chocolate','Hand-made Chocolate',0,5000,NULL,80,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 50,50;',NULL);
+INSERT INTO `item_db` VALUES (560,'White_Chocolate','White Chocolate',0,NULL,NULL,80,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;',NULL);
+INSERT INTO `item_db` VALUES (561,'Milk_Chocolate_Bar','Milk Chocolate',0,NULL,NULL,80,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;',NULL);
+INSERT INTO `item_db` VALUES (562,'Pizza','Pizza',0,20,NULL,150,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;',NULL);
+INSERT INTO `item_db` VALUES (563,'Double_Growing_Swiss_Pong_Tyu_','Doublecrust Swiss Fondue',0,20,NULL,150,NULL,NULL,NULL,NULL,10477567,3,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;',NULL);
+INSERT INTO `item_db` VALUES (564,'Meat_Dumpling','Meat Dumpling',0,20,NULL,30,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'itemheal rand(175,234),0;',NULL);
+INSERT INTO `item_db` VALUES (565,'Vita_500_Bottle','Vita 500',0,2000,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal 500,0;',NULL);
+INSERT INTO `item_db` VALUES (566,'Tom_Yum_Goong','Tom Yum Goong',0,20,150,0,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;',NULL);
+INSERT INTO `item_db` VALUES (567,'Prawn','Prawn',0,20,NULL,20,NULL,NULL,NULL,NULL,10477567,3,NULL,NULL,NULL,NULL,'itemheal rand(50,100),0;',NULL);
+INSERT INTO `item_db` VALUES (568,'Lemon','Lemon',0,20,NULL,20,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (569,'Novices_Red_Potion','Novices Red Potion',0,50,NULL,70,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;',NULL);
+INSERT INTO `item_db` VALUES (570,'Fortune_Candy','Fortune Candy',0,10,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;',NULL);
+INSERT INTO `item_db` VALUES (571,'Fortune_Candy_Cane','Fortune Candy Cane',0,20,NULL,40,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0;',NULL);
+INSERT INTO `item_db` VALUES (572,'Fortune_Cookie','Fortune Cookie',0,15,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;',NULL);
+INSERT INTO `item_db` VALUES (573,'Chocolate_Drink','Chocolate Drink',0,20,NULL,150,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0;',NULL);
+INSERT INTO `item_db` VALUES (574,'Egg','Egg',0,NULL,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemheal rand(16,21),0;',NULL);
+INSERT INTO `item_db` VALUES (601,'Fly_Wing','Fly Wing',2,60,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'warp "Random",0,0;',NULL);
+INSERT INTO `item_db` VALUES (602,'Butterfly_Wing','Butterfly Wing',2,300,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'warp "SavePoint",0,0;',NULL);
+INSERT INTO `item_db` VALUES (603,'Old_Blue_Box','Old Blue Box',2,10000,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -1,1;',NULL);
+INSERT INTO `item_db` VALUES (604,'Dead_Branch','Dead Branch',2,50,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'monster "this",0,0,"--ja--",-1,1,;',NULL);
+INSERT INTO `item_db` VALUES (605,'Anodyne','Anodyne',2,2000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 8,1,"Endure";',NULL);
+INSERT INTO `item_db` VALUES (606,'Aloevera','Aloevera',2,1500,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 6,1,"Provoke";',NULL);
+INSERT INTO `item_db` VALUES (607,'Yggdrasilberry','Yggdrasilberry',0,2,NULL,300,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'percentheal 100,100;',NULL);
+INSERT INTO `item_db` VALUES (608,'Yggdrasil_Seed','Yggdrasil Seed',0,5000,NULL,300,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'percentheal 50,50;',NULL);
+INSERT INTO `item_db` VALUES (609,'Amulet','Amulet',2,100,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (610,'Yggdrasil_Leaf','Yggdrasil Leaf',2,4000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 54,1,"Resurrection";',NULL);
+INSERT INTO `item_db` VALUES (611,'Magnifier','Magnifier',2,40,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 40,1,"Identify";',NULL);
+INSERT INTO `item_db` VALUES (612,'Mini_Furnace','Mini Furnace',2,150,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'produce 16;',NULL);
+INSERT INTO `item_db` VALUES (613,'Iron_Hammer','Iron Hammer',2,1000,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'produce 1;',NULL);
+INSERT INTO `item_db` VALUES (614,'Golden_Hammer','Golden Hammer',2,3000,NULL,300,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'produce 2;',NULL);
+INSERT INTO `item_db` VALUES (615,'Oridecon_Hammer','Oridecon Hammer',2,5000,NULL,400,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'produce 3;',NULL);
+INSERT INTO `item_db` VALUES (616,'Old_Card_Album','Old Card Album',2,10000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -3,1;',NULL);
+INSERT INTO `item_db` VALUES (617,'Old_Violet_Box','Old Violet Box',2,10000,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -2,1;',NULL);
+INSERT INTO `item_db` VALUES (618,'Worn_Out_Scroll','Worn Out Scroll',2,50,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -5,1;',NULL);
+INSERT INTO `item_db` VALUES (619,'Unripe_Apple','Unripe Apple',2,1000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1002;',NULL);
+INSERT INTO `item_db` VALUES (620,'Orange_Juice','Orange Juice',2,1500,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1113;',NULL);
+INSERT INTO `item_db` VALUES (621,'Bitter_Herb','Bitter Herb',2,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1031;',NULL);
+INSERT INTO `item_db` VALUES (622,'Rainbow_Carrot','Rainbow Carrot',2,2500,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1063;',NULL);
+INSERT INTO `item_db` VALUES (623,'Earthworm_the_Dude','Earthworm the Dude',2,4000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1049;',NULL);
+INSERT INTO `item_db` VALUES (624,'Rotten_Fish','Rotten Fish',2,2500,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1011;',NULL);
+INSERT INTO `item_db` VALUES (625,'Rusty_Iron','Rusty Iron',2,100,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1042;',NULL);
+INSERT INTO `item_db` VALUES (626,'Monster_Juice','Monster Juice',2,1500,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1035;',NULL);
+INSERT INTO `item_db` VALUES (627,'Sweet_Milk','Sweet Milk',2,7000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1167;',NULL);
+INSERT INTO `item_db` VALUES (628,'Well_Dried_Bone','Well Dried Bone',2,10000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1107;',NULL);
+INSERT INTO `item_db` VALUES (629,'Singing_Flower','Singing Flower',2,300,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1052;',NULL);
+INSERT INTO `item_db` VALUES (630,'Dew_Laden_Moss','Dew Laden Moss',2,10,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1014;',NULL);
+INSERT INTO `item_db` VALUES (631,'Deadly_Noxious_Herb','Deadly Noxious Herb',2,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1077;',NULL);
+INSERT INTO `item_db` VALUES (632,'Fatty_Chubby_Earthworm','Fatty Chubby Earthworm',2,5000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1019;',NULL);
+INSERT INTO `item_db` VALUES (633,'Baked_Yam','Baked Yam',2,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1056;',NULL);
+INSERT INTO `item_db` VALUES (634,'Tropical_Banana','Tropical Banana',2,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1057;',NULL);
+INSERT INTO `item_db` VALUES (635,'Horror_of_Tribe','Horror of Tribe',2,300,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1023;',NULL);
+INSERT INTO `item_db` VALUES (636,'No_Recipient','No Recipient',2,100,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1026;',NULL);
+INSERT INTO `item_db` VALUES (637,'Old_Broom','Old Broom',2,350,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1110;',NULL);
+INSERT INTO `item_db` VALUES (638,'Silver_Knife_of_Chastity','Silver Knife of Chastity',2,12000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1170;',NULL);
+INSERT INTO `item_db` VALUES (639,'Armlet_of_Obedience','Armlet of Obedience',2,18000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1029;',NULL);
+INSERT INTO `item_db` VALUES (640,'Shining_Stone','Shining Stone',2,3000,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1155;',NULL);
+INSERT INTO `item_db` VALUES (641,'Contract_in_Shadow','Contracts in Shadow',2,100,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1109;',NULL);
+INSERT INTO `item_db` VALUES (642,'Book_of_Devil','Book of Devil',2,1800,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1101;',NULL);
+INSERT INTO `item_db` VALUES (643,'Pet_Incubator','Pet Incubator',2,3000,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'bpet;',NULL);
+INSERT INTO `item_db` VALUES (644,'Gift_Box','Gift Box',2,2,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -4,1;',NULL);
+INSERT INTO `item_db` VALUES (645,'Concentration_Potion','Concentration Potion',2,800,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_start SC_SpeedPot0,1800,0;',NULL);
+INSERT INTO `item_db` VALUES (656,'Awakening_Potion','Awakening Potion',2,1500,NULL,150,NULL,NULL,NULL,NULL,8904431,2,NULL,NULL,40,NULL,'sc_start SC_SpeedPot1,1800,0;',NULL);
+INSERT INTO `item_db` VALUES (657,'Berserk_Potion','Berserk Potion',2,3000,NULL,200,NULL,NULL,NULL,NULL,411302,2,NULL,NULL,85,NULL,'sc_start SC_SpeedPot2,1800,0;',NULL);
+INSERT INTO `item_db` VALUES (658,'Tribal_Solidarity','Tribal Solidarity',2,1000,NULL,500,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'guildgetexp rand(1,10000);',NULL);
+INSERT INTO `item_db` VALUES (659,'Her_Heart','Her Heart',2,500,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1188;',NULL);
+INSERT INTO `item_db` VALUES (660,'Forbidden_Red_Candle','Red Candle',2,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1200;',NULL);
+INSERT INTO `item_db` VALUES (661,'Sky_Apron','Soft Apron',2,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'pet 1275;',NULL);
+INSERT INTO `item_db` VALUES (662,'Horse_Crest','Crest of the Horse',2,3000,NULL,30,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'skilleffect 507,5; sc_start SC_SpeedUp0,240000,0;',NULL);
+INSERT INTO `item_db` VALUES (664,'Gift_Box_','Gift Box',2,20,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -4,1;',NULL);
+INSERT INTO `item_db` VALUES (665,'Gift_Box__','Gift Box',2,20,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -4,1;',NULL);
+INSERT INTO `item_db` VALUES (666,'Gift_Box___','Gift Box',2,20,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -4,1;',NULL);
+INSERT INTO `item_db` VALUES (667,'Gift_Box____','Gift Box',2,20,NULL,200,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem -4,1;',NULL);
+INSERT INTO `item_db` VALUES (668,'Angpow','Angpow',0,1,NULL,2,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'set Zeny,Zeny+rand(1000,10000);',NULL);
+INSERT INTO `item_db` VALUES (669,'Rice_Cake_Soup','Rice Cake Soup',2,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (670,'Gold_Coin_Pouch','Gold Coin Pouch',2,20,NULL,400,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (671,'Gold_Coin','Gold Coin',2,20,NULL,40,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'set Zeny,Zeny+rand(100,1000);',NULL);
+INSERT INTO `item_db` VALUES (672,'Copper_Coin_Pouch','Copper Coin Pouch',2,20,NULL,400,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (673,'Copper_Coin','Copper Coin',2,20,NULL,40,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (674,'Mysterious_Ore_Coin','Mysterious Ore Coin',2,20,NULL,40,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (675,'Silver_Coin','Silver Coin',2,20,NULL,40,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (676,'Silver_Coin_Pouch','Silver Coin Pouch',2,20,NULL,400,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (677,'Platinum_Coin','Platinum Coin',2,20,NULL,40,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (678,'Deadly_Poison_Bottle','Deadly Poison Bottle',2,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'if(Class!=4013) goto Not_ASC; sc_start SC_Poison,600000,0; sc_start SC_SpeedPot0,30,0; end; Not_ASC: percentheal -100,0;',NULL);
+INSERT INTO `item_db` VALUES (679,'Recall_Pills','Golden Pill',2,20,NULL,300,NULL,NULL,NULL,NULL,10477567,3,NULL,NULL,NULL,NULL,'itemheal 50,50;',NULL);
+INSERT INTO `item_db` VALUES (680,'Carnation','Magical Carnation',2,20,NULL,1000,NULL,NULL,NULL,NULL,10477567,3,NULL,NULL,NULL,NULL,'itemheal 25,0;',NULL);
+INSERT INTO `item_db` VALUES (681,'Wedding_Photo_Album','Wedding Photo Album',2,20,NULL,10,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (682,'Realgar_Wine','Realgar Wine',2,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_start SC_ATKPOT,60,30;',NULL);
+INSERT INTO `item_db` VALUES (683,'Exorcize_Herb','Exorcize Herb',2,20,NULL,50,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'sc_start SC_MATKPOT,60,30;',NULL);
+INSERT INTO `item_db` VALUES (684,'Durian','Durian',2,20,NULL,30,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ATKPOT,60,10; sc_start SC_MATKPOT,60,10;');
+INSERT INTO `item_db` VALUES (685,'Ramadan','Ramadan',2,20,10,300,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (686,'Earth_Spike_3','Earth Spike Level 3',2,650,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 90,3,"Earth Spike Level 3";',NULL);
+INSERT INTO `item_db` VALUES (687,'Earth_Spike_5','Earth Spike Level 5',2,1300,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 90,5,"Earth Spike Level 5";',NULL);
+INSERT INTO `item_db` VALUES (688,'Cold_Bolt_3','Cold Bolt Level 3',2,500,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 14,3,"Cold Bolt Level 3";',NULL);
+INSERT INTO `item_db` VALUES (689,'Cold_Bolt_5','Cold Bolt Level 5',2,1000,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 14,5,"Cold Bolt Level 5";',NULL);
+INSERT INTO `item_db` VALUES (690,'Fire_Bolt_3','Fire Bolt Level 3',2,500,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 19,3,"Fire Bolt Level 3";',NULL);
+INSERT INTO `item_db` VALUES (691,'Fire_Bolt_5','Fire Bolt Level 5',2,1000,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 19,5,"Fire bolt Level 5";',NULL);
+INSERT INTO `item_db` VALUES (692,'Lightning_Bolt_3','Lightning Bolt Level 3',2,500,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 20,3,"Lightning Bolt Level 3";',NULL);
+INSERT INTO `item_db` VALUES (693,'Lightning_Bolt_5','Lightning Bolt Level 5',2,1000,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 20,5,"Lightning Bolt Level 5";',NULL);
+INSERT INTO `item_db` VALUES (694,'Soul_Strike_3','Soul Strike Level 3',2,500,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 13,3,"Soul Strike Level 3";',NULL);
+INSERT INTO `item_db` VALUES (695,'Soul_Strike_5','Soul Strike Level 5',2,1000,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 13,5,"Soul Strike Level 5";',NULL);
+INSERT INTO `item_db` VALUES (696,'Fire_Ball_1','Fire Ball Level 1',2,500,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 17,1,"Fire Ball Level 1";',NULL);
+INSERT INTO `item_db` VALUES (697,'Fire_Ball_5','Fire Ball Level 5',2,1000,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 17,5,"Fire Ball Level 5";',NULL);
+INSERT INTO `item_db` VALUES (698,'Fire_Wall_1','Fire Wall Level 1',2,350,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 18,1,"Fire Wall Level 1";',NULL);
+INSERT INTO `item_db` VALUES (699,'Fire_Wall_5','Fire Wall Level 5',2,700,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 18,5,"Fire Wall Level 5";',NULL);
+INSERT INTO `item_db` VALUES (700,'Frost_Diver_1','Frost Diver Level 1',2,350,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 15,1,"Frost Diver Level 1";',NULL);
+INSERT INTO `item_db` VALUES (701,'Ora_Ora','Ora Ora',3,55000,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (702,'Animal_Gore','Animal Gore',3,2,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (703,'Hinalle','Hinalle',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (704,'Aloe','Aloe',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (705,'Clover','Clover',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (706,'Four_Leaf_Clover','Four-Leaf Clover',3,80000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (707,'Singing_Plant','Singing Plant',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (708,'Ment','Ment',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (709,'Izidor','Izidor',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (710,'Illusion_Flower','Illusion Flower',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (711,'Shoot','Shoot',3,16,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (712,'Flower','Flower',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (713,'Empty_Bottle','Empty Bottle',3,6,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (714,'Emperium','Emperium',3,2,NULL,1000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (715,'Yellow_Gemstone','Yellow Gemstone',3,600,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (716,'Red_Gemstone','Red Gemstone',3,600,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (717,'Blue_Gemstone','Blue Gemstone',3,600,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (718,'Garnet','Garnet',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (719,'Amethyst','Amethyst',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (720,'Aquamarine','Aquamarine',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (721,'Emerald','Emerald',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (722,'Pearl','Pearl',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (723,'Ruby','Ruby',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (724,'Cursed_Ruby','Cursed Ruby',3,1000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (725,'Sardonyx','Sardonyx',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (726,'Sapphire','Sapphire',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (727,'Opal','Opal',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (728,'Topaz','Topaz',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (729,'Zircon','Zircon',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (730,'1_Carat_Diamond','1 Carat Diamond',3,10000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (731,'2_Carat_Diamond','2 Carat Diamond',3,25000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (732,'3_Carat_Diamond','3 Carat Diamond',3,55000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (733,'Cracked_Diamond','Cracked Diamond',3,2,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (734,'Red_Frame','Red Frame',3,3000,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (735,'Chung_Jah','Chung Jah',3,5000,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (736,'China','China',3,1000,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (737,'Black_Ladle','Black Ladle',3,400,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (738,'Pencil_Case','Pencil Case',3,300,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (739,'Rouge','Rouge',3,10000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (740,'Puppet','Puppet',3,1000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (741,'Poring_Doll','Poring Doll',3,1800,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (742,'Chonchon_Doll','Chonchon Doll',3,3000,1000,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (743,'Spore_Doll','Spore Doll',3,5500,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (744,'Bouquet','Bouquet',3,2000,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (745,'Wedding_Bouquet','Wedding Bouquet',3,10000,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (746,'Glass_Bead','Glass Bead',3,1400,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (747,'Crystal_Mirror','Crystal Mirror',3,15000,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (748,'Witherless_Rose','Witherless Rose',3,55000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (749,'Frozen_Rose','Frozen Rose',3,35000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (750,'Baphomet_Doll','Baphomet Doll',3,18000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (751,'Osiris_Doll','Osiris Doll',3,14000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (752,'Rocker_Doll','Grasshopper Doll',3,4000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (753,'Yoyo_Doll','Yoyo Doll',3,6000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (754,'Raccoon_Doll','Raccoon Doll',3,5000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (756,'Rough_Oridecon','Rough Oridecon',3,548,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (757,'Rough_Elunium','Rough Elunium',3,648,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (901,'Danggie','Danggie',3,250,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (902,'Tree_Root','Tree Root',3,12,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (903,'Reptile_Tongue','Reptile Tongue',3,50,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (904,'Scorpion_Tail','Scorpion Tail',3,124,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (905,'Stem','Stem',3,58,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (906,'Pointed_Scale','Pointed Scale',3,70,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (907,'Resin','Resin',3,120,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (908,'Spawn','Spawn',3,148,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (909,'Jellopy','Jellopy',3,6,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (910,'Garlet','Garlet',3,40,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (911,'Scell','Scell',3,160,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (912,'Zargon','Zargon',3,480,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (913,'Tooth_of_Bat','Tooth of Bat',3,34,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (914,'Fluff','Fluff',3,8,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (915,'Chrysalis','Chrysalis',3,8,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (916,'Feather_of_Birds','Feather of Birds',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (917,'Talon','Talon',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (918,'Sticky_Webfoot','Sticky Webfoot',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (919,'Animal_Skin','Animal Skin',3,36,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (920,'Wolf_Claw','Wolf Claw',3,58,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (921,'Mushroom_Spore','Mushroom Spore',3,36,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (922,'Orcs_Fang','Orcish Fang',3,220,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (923,'Evil_Horn','Evil Horn',3,1020,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (924,'Powder_of_Butterfly','Powder of Butterfly',3,90,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (925,'Bill_of_Birds','Bill of Birds',3,64,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (926,'Snake_Scale','Snake Scale',3,82,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (928,'Insect_Feeler','Insect Feeler',3,114,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (929,'Immortal_Heart','Immortal Heart',3,374,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (930,'Rotten_Bandage','Rotten Bandage',3,358,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (931,'Orcish_Voucher','Orcish Voucher',3,168,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (932,'Skel-Bone','Skel-Bone',3,232,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (934,'Memento','Memento',3,600,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (935,'Shell','Shell',3,14,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (936,'Scale_Shell','Scale Shell',3,466,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (937,'Venom_Canine','Venom Canine',3,148,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (938,'Sticky_Mucus','Sticky Mucus',3,70,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (939,'Bee_Sting','Bee Sting',3,32,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (940,'Grasshoppers_Leg','Grasshoppers Leg',3,36,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (941,'Nose_Ring','Nose Ring',3,568,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (942,'Yoyo_Tail','Yoyo Tail',3,114,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (943,'Solid_Shell','Solid Shell',3,448,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (944,'Horseshoe','Horseshoe',3,588,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (945,'Raccoon_Leaf','Raccoon Leaf',3,106,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (946,'Snails_Shell','Snails Shell',3,64,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (947,'Horn','Horn',3,116,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (948,'Bears_Footskin','Bears Footskin',3,174,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (949,'Feather','Feather',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (950,'Heart_of_Mermaid','Heart of Mermaid',3,264,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (951,'Fin','Fin',3,412,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (952,'Cactus_Needle','Cactus Needle',3,82,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (953,'Stone_Heart','Stone Heart',3,184,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (954,'Shining_Scale','Shining Scale',3,466,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (955,'Worm_Peeling','Worm Peeling',3,52,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (956,'Gill','Gill',3,342,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (957,'Decayed_Nail','Decayed Nail',3,82,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (958,'Horrendous_Mouth','Horrendous Mouth',3,390,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (959,'Stinky_Scale','Stinky Scale',3,168,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (960,'Nipper','Nipper',3,114,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (961,'Conch','Conch',3,158,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (962,'Tentacle','Tentacle',3,70,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (963,'Sharp_scale','Sharp Scale',3,250,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (964,'Crab_Shell','Crab Shell',3,90,5,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (965,'Clam_Shell','Clam Shell',3,56,5,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (966,'Clam_Flesh','Clam Flesh',3,158,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (967,'Turtle_Shell','Turtle Shell',3,680,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (968,'Heroic_Emblem','Heroic Emblem',3,3000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (969,'Gold','Gold',3,200000,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (970,'Alcohol','Alcohol',3,400,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (971,'Detrimindexta','Detrimindexta',3,400,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (972,'Karvodailnirol','Karvodailnirol',3,400,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (973,'Counteragent','Counteragent',3,200,NULL,70,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (974,'Mixture','Mixture',3,200,NULL,70,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (975,'Scarlet_Dyestuffs','Scarlet Dyestuffs',3,1000,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (976,'Lemon_Dyestuffs','Lemon Dyestuffs',3,1000,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (978,'Cobaltblue_Dyestuff','Cobaltblue Dyestuff',3,1000,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (979,'Darkgreen_Dyestuff','Darkgreen Dyestuff',3,1000,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (980,'Orange_Dyestuff','Orange Dyestuff',3,1000,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (981,'Violet_Dyestuff','Violet Dyestuff',3,1000,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (982,'White_Dyestuff','White Dyestuff',3,1000,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (983,'Black_Dyestuff','Black Dyestuff',3,1000,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (984,'Oridecon','Oridecon',3,1100,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (985,'Elunium','Elunium',3,1100,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (986,'Anvil','Anvil',3,30000,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (987,'Oridecon_Anvil','Oridecon Anvil',3,120000,NULL,700,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (988,'Golden_Anvil','Golden Anvil',3,300000,NULL,900,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (989,'Emperium_Anvil','Emperium Anvil',3,600000,NULL,1000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (990,'Red_Blood','Red Blood',3,1000,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (991,'Crystal_Blue','Crystal Blue',3,1000,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (992,'Wind_of_Verdure','Wind of Verdure',3,1000,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (993,'Green_Live','Green Live',3,1000,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (994,'Flame_Heart','Flame Heart',3,3000,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (995,'Mystic_Frozen','Mystic Frozen',3,3000,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (996,'Rough_Wind','Rough Wind',3,3000,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (997,'Great_Nature','Great Nature',3,3000,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (998,'Iron','Iron',3,100,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (999,'Steel','Steel',3,1000,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1000,'Star_Crumb','Star Crumb',3,4500,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1001,'Star_Dust','Star Dust',3,1500,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1002,'Iron_Ore','Iron Ore',3,50,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1003,'Coal','Coal',3,500,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1004,'Chivalry_Emblem','Chivalry Emblem',3,2,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1005,'Hammer_of_Blacksmith','Hammer of Blacksmith',3,2,NULL,800,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1006,'Old_Magic_Book','Old Magic Book',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1007,'Necklace_of_Wisdom','Necklace of Wisdom',3,2,NULL,40,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1008,'Necklace_of_Oblivion','Necklace of Oblivion',3,2,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1009,'Hand_of_God','Hand of God',3,2,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1010,'Phracon','Phracon',3,200,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1011,'Emveretarcon','Emveretarcon',3,1000,NULL,200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1012,'Frill','Frill',3,250,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1013,'Rainbow_Shell','Rainbow Shell',3,90,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1014,'Ant_Jaw','Ant Jaw',3,232,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1015,'Tongue','Tongue',3,528,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1016,'Rat_Tail','Rat Tail',3,52,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1017,'Mole_Whiskers','Mole Whiskers',3,106,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1018,'Mole_Claw','Mole Claw',3,210,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1019,'Trunk','Trunk',3,60,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1020,'Black_Hair','Black Hair',3,292,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1021,'Dokkaebi_Horn','Dokkaebi Horn',3,292,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1022,'Nine_Tails','Nine Tails',3,650,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1023,'Fish_Tail','Fish Tail',3,196,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1024,'Squid_Ink','Squid Ink',3,264,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1025,'Cobweb','Cobweb',3,184,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1026,'Acorn','Acorn',3,98,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1027,'Porcupine_Quill','Porcupine Quill',3,158,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1028,'Mane','Mane',3,196,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1029,'Tiger_Skin','Tiger Skin',3,548,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1030,'Tigers_Footskin','Tigers Footskin',3,1500,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1031,'Mantis_Scythe','Mantis Scythe',3,196,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1032,'Maneater_Blossom','Maneater Blossom',3,196,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1033,'Maneater_Root','Maneater Root',3,208,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1034,'Blue_Hair','Blue Hair',3,342,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1035,'Dragon_Canine','Dragon Canine',3,484,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1036,'Dragon_Scale','Dragon Scale',3,500,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1037,'Dragon_Tail','Dragon Tail',3,1200,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1038,'Little_Evil_Horn','Little Evil Horn',3,528,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1039,'Little_Evil_Wing','Little Evil Wing',3,2000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1040,'Elder_Pixies_Moustache','Elder Pixies Moustache',3,232,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1041,'Lantern','Lantern',3,250,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1042,'Bug_Leg','Bug Leg',3,430,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1043,'Orc_Claw','Orc Claw',3,168,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1044,'Zenorcs_Fang','Zenorcs Fang',3,264,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1045,'Cultish_Masque','Cultish Masque',3,412,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1046,'Scorpion_Nipper','Scorpion Nipper',3,614,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1047,'Dead_Medusa','Dead Medusa',3,548,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1048,'Horrendous_Hair','Horrendous Hair',3,800,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1049,'Skirt_of_Virgin','Skirt of Virgin',3,1700,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1050,'Tendon','Tendon',3,220,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1051,'Detonator','Detonator',3,450,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1052,'Single_Cell','Single Cell',3,46,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1053,'Ancient_Tooth','Ancient Tooth',3,548,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1054,'Ancient_Lips','Ancient Lips',3,1000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1055,'Earthworm_Peeling','Earthworm Peeling',3,196,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1056,'Grit','Grit',3,306,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1057,'Moth_Dust','Moth Dust',3,138,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1058,'Moth_Wings','Moth Wings',3,200,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1059,'Fabric','Fabric',3,306,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1060,'Golden_Hair','Golden Hair',3,430,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1061,'Witched_Starsand','Witched Starsand',3,484,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1062,'Jack_o_Pumpkin','Jack o Pumpkin',3,374,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1063,'Fang','Fang',3,680,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1064,'Reins','Reins',3,802,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1065,'Trap','Trap',3,100,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1066,'Fine-grained_Trunk','Fine-grained Trunk',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1067,'Solid_Trunk','Solid Trunk',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1068,'Barren_Trunk','Barren Trunk',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1069,'Orange_Net_Mushroom','Orange Net Mushroom',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1070,'Orange_Gooey_Mushroom_','Orange Gooey Mushroom',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1071,'Unknown_Test_Tube','Unknown Testtube',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1072,'Delivery_Message','DEL Message',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1073,'Voucher','Voucher',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1074,'Voucher_','Voucher',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1075,'Voucher__','Voucher',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1076,'Voucher___','Voucher',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1077,'Voucher____','Voucher',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1078,'Voucher_____','Voucher',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1079,'Voucher______','Voucher',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1080,'Voucher_______','Voucher',3,2,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1081,'Delivery_Box','DEL Box',3,2,NULL,1200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1082,'Delivery_Box_','DEL Box',3,2,NULL,1200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1083,'Delivery_Box__','DEL Box',3,2,NULL,1200,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1084,'Kafra_Pass','Kafra Pass',3,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1085,'Unknown_Test_Tube_','Unknown Testtube',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1086,'Unknown_Test_Tube__','Unknown Testtube',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1087,'Unknown_Test_Tube___','Unknown Testtube',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1088,'Morroc_Solution','Morocc Solution',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1089,'Payon_Solution','Payon Solution',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1090,'Unknown_Test_Tube____','Unknown Testtube',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1092,'Empty_Test_Tube','Empty Testtube',3,3,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1093,'Empty_Potion_Bottle','Empty Potion Bottle',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1094,'Short_Daenggie','Short Daenggie',3,278,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1095,'Clock_Hand','Needle of Alarm',3,546,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1096,'Round_Shell','Round Shell',3,954,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1097,'Worn_Out_Page','Worn Out Page',3,820,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1098,'Manacles','Manacles',3,658,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1099,'Worn-out_Prison_Uniform','Worn-out Prison Uniform',3,680,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1101,'Sword','Sword',4,100,NULL,500,25,NULL,1,3,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1102,'Sword_','Sword',4,100,NULL,500,25,NULL,1,4,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1103,'Sword__','Sword',4,100,NULL,500,25,NULL,1,NULL,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1104,'Falchion','Falchion',4,1500,NULL,600,39,NULL,1,3,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1105,'Falchion_','Falchion',4,1500,NULL,600,39,NULL,1,4,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1106,'Falchion__','Falchion',4,1500,NULL,600,39,NULL,1,NULL,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1107,'Blade','Blade',4,2900,NULL,700,53,NULL,1,3,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1108,'Blade_','Blade',4,2900,NULL,700,53,NULL,1,4,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1109,'Blade__','Blade',4,2900,NULL,700,53,NULL,1,NULL,8803555,2,2,1,2,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1110,'Rapier','Rapier',4,10000,NULL,500,70,NULL,1,2,8803555,2,2,2,14,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1111,'Rapier_','Rapier',4,10000,NULL,500,70,NULL,1,3,8803555,2,2,2,14,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1112,'Rapier__','Rapier',4,10000,NULL,500,70,NULL,1,NULL,8803555,2,2,2,14,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1113,'Scimiter','Scimiter',4,17000,NULL,700,85,NULL,1,2,8803555,2,2,2,14,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1114,'Scimiter_','Scimiter',4,17000,NULL,700,85,NULL,1,3,8803555,2,2,2,14,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1115,'Scimiter__','Scimiter',4,17000,NULL,700,85,NULL,1,NULL,8803555,2,2,2,14,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1116,'Katana','Katana',4,2000,NULL,1000,60,NULL,1,3,16514,2,34,1,4,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1117,'Katana_','Katana',4,2000,NULL,1000,60,NULL,1,4,16514,2,34,1,4,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1118,'Katana__','Katana',4,2000,NULL,1000,60,NULL,1,NULL,16514,2,34,1,4,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1119,'Tsurugi','Tsurugi',4,51000,NULL,1200,130,NULL,1,1,414946,2,2,3,27,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1120,'Tsurugi_','Tsurugi',4,51000,NULL,1200,130,NULL,1,2,414946,2,2,3,27,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1121,'Tsurugi__','Tsurugi',4,51000,NULL,1200,130,NULL,1,NULL,414946,2,2,3,27,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1122,'Ring_Pommel_Saber','Ring Pommel Saber',4,24000,NULL,900,100,NULL,1,2,414946,2,2,2,14,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1123,'Haedonggum','Haedonggum',4,50000,NULL,900,120,NULL,1,1,414946,2,2,3,27,2,NULL,'bonus bInt,3;');
+INSERT INTO `item_db` VALUES (1124,'Orcish_Sword','Orcish sword',4,20,NULL,800,90,NULL,1,NULL,8803555,2,2,3,5,2,NULL,'bonus bUnbreakableWeapon,0;');
+INSERT INTO `item_db` VALUES (1125,'Ring_Pommel_Saber_','Ring Pommel Saber',4,24000,NULL,900,100,NULL,1,3,414946,2,2,2,14,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1126,'Saber','Saber',4,49000,NULL,1000,115,NULL,1,2,414946,2,2,3,27,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1127,'Saber_','Saber',4,49000,NULL,1000,115,NULL,1,3,414946,2,2,3,27,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1128,'Haedonggum_','Haedonggum',4,50000,NULL,900,120,NULL,1,2,414946,2,2,3,27,2,NULL,'bonus bInt,3;');
+INSERT INTO `item_db` VALUES (1129,'Flamberge','Flamberge',4,60000,NULL,1500,150,NULL,1,NULL,16512,2,2,3,27,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1130,'Nagan','Nagan',4,20,NULL,500,120,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus bDoubleRate,25; bonus2 bAddRace,7,5;');
+INSERT INTO `item_db` VALUES (1131,'Ice_Falchion','Ice Falchion',4,20,NULL,600,100,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus bAtkEle,1; skill 14,3; bonus2 bAddEff,Eff_Freeze,500; bonus3 bAutoSpell,14,3,25;');
+INSERT INTO `item_db` VALUES (1132,'Edge','Edge',4,20,NULL,700,115,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus2 bAddEff,Eff_Curse,300; bonus2 bWeaponComaRace,11,10;');
+INSERT INTO `item_db` VALUES (1133,'Fire_Brand','Fire Brand',4,20,NULL,500,100,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus bAtkEle,3; skill 19,3; bonus3 bAutoSpell,19,3,25;');
+INSERT INTO `item_db` VALUES (1134,'Caesars_Sword','Caesars Sword',4,20,NULL,700,140,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus2 bAddRace,3,25; bonus bIgnoreDefRace,3;');
+INSERT INTO `item_db` VALUES (1135,'Cutlas','Cutlas',4,20,NULL,900,150,NULL,1,NULL,414946,2,2,4,40,2,NULL,'skill 5,5; bonus bStr,2; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (1136,'Solar_Sword','Solar Sword',4,20,NULL,1200,85,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus bAtkEle,3; bonus2 bHPDrainRate,100,1; bonus2 bSPDrainRate,5,-15;');
+INSERT INTO `item_db` VALUES (1137,'Excalibur','Excalibur',4,20,NULL,1200,150,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus bInt,5; bonus bLuk,10; bonus bDex,-1; bonus bAtkEle,6;');
+INSERT INTO `item_db` VALUES (1138,'Mysteltainn_','Mysteltainn',4,20,NULL,1000,170,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus bAtkEle,7; bonus2 bAddEle,8,15; bonus2 bAddEff,Eff_Stone,100; bonus bDex,3;');
+INSERT INTO `item_db` VALUES (1139,'Talefing_','Talefing',4,20,NULL,1000,200,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus bAtkEle,7; bonus2 bSPDrainRate,5,-35;');
+INSERT INTO `item_db` VALUES (1140,'Byeollungum','Byeollungum',4,20,NULL,900,150,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus2 bSubRace,11,-10; bonus2 bAddRace,10,50; bonus bAllStats,2;');
+INSERT INTO `item_db` VALUES (1141,'Immaterial_Sword','Immaterial Sword',4,20,NULL,900,140,NULL,1,NULL,414946,2,2,4,40,2,NULL,'bonus bAtkEle,8; bonus2 bSPDrainRate,1,30; bonus2 bSPDrainRate,100,-1; bonus bUnbreakableWeapon,0;');
+INSERT INTO `item_db` VALUES (1142,'Jewel_Sword','Crystal Sword',4,20,NULL,2200,104,NULL,1,NULL,414946,2,2,3,68,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (1143,'Gaia_Sword','Gaia Sword',4,20,NULL,2500,115,NULL,1,NULL,414946,2,2,3,74,2,NULL,'bonus3 bAddMonsterDropItem,1002,50,25000;');
+INSERT INTO `item_db` VALUES (1144,'Sashimi','Sashimi',4,20,NULL,1400,75,NULL,1,NULL,414946,2,2,3,48,2,NULL,'bonus bAtkEle,4; bonus3 bAddMonsterDropItem,544,5,4000;');
+INSERT INTO `item_db` VALUES (1145,'Holy_Avenger','Holy Avenger',4,20,NULL,1350,125,NULL,1,NULL,16384,2,2,3,75,2,NULL,'bonus bAtkEle,6;');
+INSERT INTO `item_db` VALUES (1151,'Slayer','Slayer',4,15000,NULL,1300,90,NULL,1,2,16514,2,34,2,18,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1152,'Slayer_','Slayer',4,15000,NULL,1300,90,NULL,1,3,16514,2,34,2,18,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1153,'Slayer__','Slayer',4,15000,NULL,1300,90,NULL,1,NULL,16514,2,34,2,18,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1154,'Bastard_Sword','Bastard Sword',4,22500,NULL,1600,115,NULL,1,2,16514,2,34,2,18,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1155,'Bastard_Sword_','Bastard Sword',4,22500,NULL,1600,115,NULL,1,3,16514,2,34,2,18,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1156,'Bastard_Sword__','Bastard Sword',4,22500,NULL,1600,115,NULL,1,NULL,16514,2,34,2,18,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1157,'Two_handed_Sword','Two-handed Sword',4,60000,NULL,2200,160,NULL,1,1,16514,2,34,3,33,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1158,'Two_handed_Sword_','Two-handed Sword',4,60000,NULL,2200,160,NULL,1,2,16514,2,34,3,33,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1159,'Two_handed_Sword__','Two-handed Sword',4,60000,NULL,2200,160,NULL,1,NULL,16514,2,34,3,33,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1160,'Broad_Sword','Broad Sword',4,65000,NULL,2000,140,NULL,1,1,16514,2,34,3,33,3,NULL,'bonus bDef,5;');
+INSERT INTO `item_db` VALUES (1161,'Balmung','Balmung',4,20,NULL,1000,250,NULL,2,NULL,2088959,2,2,4,48,1,NULL,'bonus bInt,20; bonus bLuk,20;');
+INSERT INTO `item_db` VALUES (1162,'Broad_Sword_','Broad Sword',4,65000,NULL,2000,140,NULL,1,2,16514,2,34,3,33,3,NULL,'bonus bDef,5;');
+INSERT INTO `item_db` VALUES (1163,'Claymore','Claymore',4,74000,NULL,2500,180,NULL,1,NULL,16512,2,34,3,33,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (1164,'Muramasa','Muramasa',4,20,NULL,1000,155,NULL,1,NULL,16514,2,34,4,48,3,NULL,'bonus bCritical,30; bonus bAspdAddRate,8; bonus2 bAddEff2,Eff_Curse,200;');
+INSERT INTO `item_db` VALUES (1165,'Masamune','Masamune',4,20,NULL,1000,200,NULL,1,NULL,16514,2,34,4,48,3,NULL,'bonus bFlee,30; bonus bStr,-5; bonus bAspd,2; bonus bDefRate,-50; bonus bDef2Rate,-50;');
+INSERT INTO `item_db` VALUES (1166,'Dragon_Slayer','Dragon Slayer',4,20,NULL,1300,150,NULL,1,NULL,16514,2,34,4,48,3,NULL,'bonus bIgnoreDefRace,9; bonus2 bAddRace,9,15;');
+INSERT INTO `item_db` VALUES (1167,'Schweizersabel','Schweizersabel',4,20,NULL,1600,160,NULL,1,NULL,16514,2,34,4,48,3,NULL,'bonus bAtkEle,4; skill 20,3; bonus bDef,1; bonus3 bAutoSpell,20,3,25;');
+INSERT INTO `item_db` VALUES (1168,'Zweihander','Zweihander',4,20,NULL,2200,200,NULL,1,NULL,16514,2,34,4,48,3,NULL,'bonus bUnbreakableWeapon,0;');
+INSERT INTO `item_db` VALUES (1169,'Executioner_','Executioner',4,20,NULL,2200,155,NULL,1,NULL,16514,2,34,4,48,3,NULL,'bonus bIgnoreDefRace,7; bonus2 bAddRace,7,20; bonus2 bSubRace,7,-10; bonus bAtkEle,7;');
+INSERT INTO `item_db` VALUES (1170,'Katzbalger','Katzbalger',4,20,NULL,2000,175,NULL,1,NULL,16514,2,34,4,48,3,NULL,'bonus bVit,10; bonus bDef,10;');
+INSERT INTO `item_db` VALUES (1201,'Knife','Knife',4,50,NULL,400,17,NULL,1,3,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1202,'Knife_','Knife',4,50,NULL,400,17,NULL,1,4,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1203,'Knife__','Knife',4,50,NULL,400,17,NULL,1,NULL,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1204,'Cutter','Cutter',4,1250,NULL,500,30,NULL,1,3,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1205,'Cutter_','Cutter',4,1250,NULL,500,30,NULL,1,4,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1206,'Cutter__','Cutter',4,1250,NULL,500,30,NULL,1,NULL,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1207,'Main_Gauche','Main Gauche',4,2400,NULL,600,43,NULL,1,3,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1208,'Main_Gauche_','Main Gauche',4,2400,NULL,600,43,NULL,1,4,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1209,'Main_Gauche__','Main Gauche',4,2400,NULL,600,43,NULL,1,NULL,10444527,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1210,'Dirk','Dirk',4,8500,NULL,500,59,NULL,1,2,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1211,'Dirk_','Dirk',4,8500,NULL,500,59,NULL,1,3,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1212,'Dirk__','Dirk',4,8500,NULL,500,59,NULL,1,NULL,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1213,'Dagger','Dagger',4,14000,NULL,600,73,NULL,1,2,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1214,'Dagger_','Dagger',4,14000,NULL,600,73,NULL,1,3,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1215,'Dagger__','Dagger',4,14000,NULL,600,73,NULL,1,NULL,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1216,'Stiletto','Stiletto',4,19500,NULL,700,87,NULL,1,2,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1217,'Stiletto_','Stiletto',4,19500,NULL,700,87,NULL,1,3,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1218,'Stiletto__','Stiletto',4,19500,NULL,700,87,NULL,1,NULL,10444527,2,2,2,12,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1219,'Gladius','Gladius',4,43000,NULL,700,105,NULL,1,2,2055918,2,2,3,24,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1220,'Gladius_','Gladius',4,43000,NULL,700,105,NULL,1,3,2055918,2,2,3,24,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1221,'Gladius__','Gladius',4,43000,NULL,700,105,NULL,1,NULL,2055918,2,2,3,24,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1222,'Damascus','Damascus',4,49000,NULL,800,118,NULL,1,1,2055918,2,2,3,24,1,NULL,'bonus bUnbreakableWeapon,0;');
+INSERT INTO `item_db` VALUES (1223,'Fortune_Sword','Fortune Sword',4,20,NULL,500,90,NULL,1,NULL,2055918,2,2,4,24,1,NULL,'bonus bLuk,5; bonus bFlee2,20;');
+INSERT INTO `item_db` VALUES (1224,'Sword_Breaker','Swordbreaker',4,20,NULL,1000,70,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bBreakWeaponRate,500;');
+INSERT INTO `item_db` VALUES (1225,'Mail_Breaker','Mailbreaker',4,20,NULL,1000,70,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bBreakArmorRate,500;');
+INSERT INTO `item_db` VALUES (1226,'Damascus_','Damascus',4,49000,NULL,800,118,NULL,1,2,2055918,2,2,3,24,1,NULL,'bonus bUnbreakableWeapon,0;');
+INSERT INTO `item_db` VALUES (1227,'Weeder_Knife','Weeder Knife',4,20,NULL,400,80,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bIgnoreDefRace,3; bonus2 bAddRace,3,15; bonus2 bSubRace,3,15;');
+INSERT INTO `item_db` VALUES (1228,'Combat_Knife','Combat Knife',4,20,NULL,400,80,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bIgnoreDefRace,7; bonus2 bSubRace,7,10; bonus2 bSubRace,6,-10;');
+INSERT INTO `item_db` VALUES (1229,'Mamas_Knife','Mamas Knife',4,20,NULL,500,75,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bCritical,30; bonus2 bAddRace,7,3; bonus3 bAddMonsterDropItem,517,2,5000;');
+INSERT INTO `item_db` VALUES (1230,'House_Auger','House Auger',4,20,NULL,600,80,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bDefRatioAtkRace,10; bonus bDefRatioAtkRace,11;');
+INSERT INTO `item_db` VALUES (1231,'Bazerald','Bazerald',4,20,NULL,500,70,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bAtkEle,3; bonus bInt,5; bonus bMatkRate,10;');
+INSERT INTO `item_db` VALUES (1232,'Assassin_Dagger','Assasin Dagger',4,20,NULL,600,140,NULL,1,NULL,4096,2,2,4,36,1,NULL,'bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdAddRate,2;');
+INSERT INTO `item_db` VALUES (1233,'Exercise','Excorcise',4,20,NULL,700,90,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bIgnoreDefRace,6; bonus2 bSubRace,6,5; bonus2 bSubRace,7,-10;');
+INSERT INTO `item_db` VALUES (1234,'Moonlight_Sword','Walgwanggum',4,20,NULL,700,50,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bMaxSPrate,10; bonus2 bSPDrainRate,100,3;');
+INSERT INTO `item_db` VALUES (1235,'Azoth','Azoth',4,20,NULL,700,110,NULL,1,NULL,262144,2,2,4,36,1,NULL,'bonus bClassChange,300;');
+INSERT INTO `item_db` VALUES (1236,'Sucsamad','Sucsamad',4,20,NULL,800,140,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus2 bAddEle,2,10; bonus2 bAddEle,4,10; bonus bUnbreakableWeapon,0;');
+INSERT INTO `item_db` VALUES (1237,'Grimtooth_','Grimtooth',4,20,NULL,800,180,NULL,1,NULL,2055918,2,2,4,36,1,NULL,'bonus bFlee,10; bonus bFlee2,5; bonus bDefRate,-50; bonus bDef2Rate,-50;');
+INSERT INTO `item_db` VALUES (1238,'Zeny_Knife','Zeny Knife',4,20,NULL,1200,64,NULL,1,NULL,2055918,2,2,3,40,1,NULL,'bonus bGetZenyNum,100;');
+INSERT INTO `item_db` VALUES (1239,'Poison_Knife','Poison Knife',4,20,NULL,800,64,NULL,1,NULL,2055918,2,2,3,65,1,NULL,'bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,3000;');
+INSERT INTO `item_db` VALUES (1240,'Princess_Knife','Princess Knife',4,20,NULL,400,84,NULL,1,NULL,2055918,2,2,4,1,1,NULL,'bonus bAllStats,1;');
+INSERT INTO `item_db` VALUES (1241,'Cursed_Dagger','Cursed Dagger',4,20,NULL,400,55,NULL,1,NULL,66052,2,2,4,85,1,NULL,'bonus2 bAddEff,Eff_Curse,500;');
+INSERT INTO `item_db` VALUES (1242,'Counter_Dagger','Counter Dagger',4,20,NULL,550,140,NULL,1,NULL,66052,2,2,4,55,1,NULL,'bonus bCritical,90; bonus3 bAutoSpell,61,1,25;');
+INSERT INTO `item_db` VALUES (1243,'Main_Gauche_For_Novice','Novice Main Gauche',4,20,NULL,1,45,NULL,1,NULL,8388609,2,2,1,1,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (1250,'Jur','Jur',4,19500,NULL,800,125,NULL,1,2,4096,2,34,2,18,16,NULL,NULL);
+INSERT INTO `item_db` VALUES (1251,'Jur_','Jur',4,19500,NULL,800,125,NULL,1,3,4096,2,34,2,18,16,NULL,NULL);
+INSERT INTO `item_db` VALUES (1252,'Katar','Katar',4,41000,NULL,1200,148,NULL,1,1,4096,2,34,3,33,16,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (1253,'Katar_','Katar',4,41000,NULL,1200,148,NULL,1,2,4096,2,34,3,33,16,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (1254,'Jamadhar','Jamadhar',4,37200,NULL,1500,165,NULL,1,NULL,4096,2,34,3,33,16,NULL,NULL);
+INSERT INTO `item_db` VALUES (1255,'Jamadhar_','Jamadhar',4,37200,NULL,1500,165,NULL,1,1,4096,2,34,3,33,16,NULL,NULL);
+INSERT INTO `item_db` VALUES (1256,'Katar_of_Cold_Icicle','Katar of Cold Icicle',4,45000,NULL,1200,105,NULL,1,NULL,4096,2,34,3,55,16,NULL,'bonus bAtkEle,1; bonus2 bAddEff,Eff_Freeze,500;');
+INSERT INTO `item_db` VALUES (1257,'Katar_of_Thornbush','Katar of Dusty Thornbush',4,45000,NULL,1200,105,NULL,1,NULL,4096,2,34,3,55,16,NULL,'bonus bAtkEle,2; bonus2 bAddEff,Eff_Blind,500;');
+INSERT INTO `item_db` VALUES (1258,'Katar_of_Raging_Blaze','Katar of Raging Blaze',4,45000,NULL,1200,105,NULL,1,NULL,4096,2,34,3,55,16,NULL,'bonus bAtkEle,3; bonus2 bAddEff,Eff_Silence,500;');
+INSERT INTO `item_db` VALUES (1259,'Katar_of_Piercing_Wind','Katar of Piercing Wind',4,45000,NULL,1200,105,NULL,1,NULL,4096,2,34,3,55,16,NULL,'bonus bAtkEle,4; bonus2 bAddEff,Eff_Sleep,500;');
+INSERT INTO `item_db` VALUES (1260,'Sharpened_Legbone_of_Ghoul','Sharpened Legbone of Ghoul',4,52500,NULL,1700,150,NULL,1,NULL,4096,2,34,3,65,16,NULL,'bonus bAtkEle,9;');
+INSERT INTO `item_db` VALUES (1261,'Infiltrator','Infiltrator',4,57000,NULL,1500,140,NULL,1,NULL,4096,2,34,4,75,16,NULL,'bonus2 bAddRace,7,50; bonus bDef,3; bonus bFlee,5; bonus bFlee2,2;');
+INSERT INTO `item_db` VALUES (1301,'Axe','Axe',4,500,NULL,800,38,NULL,1,3,8803555,2,2,1,3,6,NULL,NULL);
+INSERT INTO `item_db` VALUES (1302,'Axe_','Axe',4,500,NULL,800,38,NULL,1,4,8803555,2,2,1,3,6,NULL,NULL);
+INSERT INTO `item_db` VALUES (1303,'Axe__','Axe',4,500,NULL,800,38,NULL,1,NULL,8803555,2,2,1,3,6,NULL,NULL);
+INSERT INTO `item_db` VALUES (1304,'Orcish_Axe','Orcish Axe',4,20,NULL,1500,75,NULL,1,NULL,8803555,2,2,3,3,6,NULL,NULL);
+INSERT INTO `item_db` VALUES (1305,'Cleaver','Cleaver',4,20,NULL,1200,140,NULL,1,NULL,279714,2,2,4,44,6,NULL,'bonus2 bAddRace,7,5; bonus3 bAddMonsterDropItem,517,2,3000;');
+INSERT INTO `item_db` VALUES (1306,'War_Axe','War Axe',4,20,NULL,4200,145,NULL,1,1,263168,2,2,3,76,6,NULL,'bonus bDex,2; bonus bLuk,2;');
+INSERT INTO `item_db` VALUES (1351,'Battle_Axe','Battle Axe',4,5400,NULL,1500,80,NULL,1,3,279714,2,34,1,3,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1352,'Battle_Axe_','Battle Axe',4,5400,NULL,1500,80,NULL,1,4,279714,2,34,1,3,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1353,'Battle_Axe__','Battle Axe',4,5400,NULL,1500,80,NULL,1,NULL,279714,2,34,1,3,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1354,'Hammer','Hammer',4,15500,NULL,2000,120,NULL,1,2,279714,2,34,2,16,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1355,'Hammer_','Hammer',4,15500,NULL,2000,120,NULL,1,3,279714,2,34,2,16,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1356,'Hammer__','Hammer',4,15500,NULL,2200,120,NULL,1,NULL,279714,2,34,2,16,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1357,'Buster','Buster',4,34000,NULL,2200,155,NULL,1,1,279714,2,34,3,30,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1358,'Buster_','Buster',4,34000,NULL,2200,155,NULL,1,2,279714,2,34,3,30,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1359,'Buster__','Buster',4,34000,NULL,2200,155,NULL,1,NULL,279714,2,34,3,30,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1360,'Two_handed_Axe','Two-handed Axe',4,55000,NULL,2500,185,NULL,1,1,279714,2,34,3,30,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1361,'Two_handed_Axe_','Two-handed Axe',4,55000,NULL,2500,185,NULL,1,2,279714,2,34,3,30,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1362,'Two_handed_Axe__','Two-handed Axe',4,55000,NULL,2500,185,NULL,1,NULL,279714,2,34,3,30,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (1363,'Blood_Axe','Bloody Axe',4,20,NULL,4000,170,NULL,1,NULL,279714,2,34,4,44,7,NULL,'bonus bStr,10; bonus bSpeedRate,25;');
+INSERT INTO `item_db` VALUES (1364,'Great_Axe','Great Axe',4,20,NULL,1800,187,NULL,1,NULL,279714,2,34,4,44,7,NULL,'bonus2 bAddEff,Eff_Stan,1500;');
+INSERT INTO `item_db` VALUES (1365,'Sabbath','Sabbath',4,20,NULL,2300,120,NULL,1,NULL,279714,2,34,4,44,7,NULL,'bonus2 bWeaponComaRace,6,50; bonus bAtkEle,7;');
+INSERT INTO `item_db` VALUES (1366,'Light_Epsilon','Light Epsilon',4,20,NULL,2300,180,NULL,1,NULL,279714,2,34,4,44,7,NULL,'bonus bAtkEle,6; skill 28,3; bonus2 bAddRace,6,3;');
+INSERT INTO `item_db` VALUES (1367,'Slaughter','Slaughter',4,20,NULL,2500,120,NULL,1,NULL,279714,2,34,4,44,7,NULL,'bonus bIgnoreDefRace,2; bonus2 bWeaponComaRace,2,50;');
+INSERT INTO `item_db` VALUES (1368,'Tomahawk','Tomahawk',4,20,NULL,2500,165,NULL,1,NULL,279714,2,34,4,44,7,NULL,'bonus bAtkEle,4; skill 337,1;');
+INSERT INTO `item_db` VALUES (1369,'Guillotine','Guillotine',4,20,NULL,3000,215,NULL,1,NULL,279714,2,34,4,44,7,NULL,'bonus2 bWeaponComaRace,7,30; bonus2 bSPDrainRate,5,2;');
+INSERT INTO `item_db` VALUES (1401,'Javelin','Javelin',4,150,NULL,700,28,NULL,3,3,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1402,'Javelin_','Javelin',4,150,NULL,700,28,NULL,3,4,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1403,'Javelin__','Javelin',4,150,NULL,700,28,NULL,3,NULL,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1404,'Spear','Spear',4,1700,NULL,850,44,NULL,3,3,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1405,'Spear_','Spear',4,1700,NULL,850,44,NULL,3,4,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1406,'Spear__','Spear',4,1700,NULL,850,44,NULL,3,NULL,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1407,'Pike','Pike',4,3450,NULL,1000,60,NULL,3,3,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1408,'Pike_','Pike',4,3450,NULL,1000,60,NULL,3,4,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1409,'Pike__','Pike',4,3450,NULL,1000,60,NULL,3,NULL,16514,2,2,1,4,4,NULL,NULL);
+INSERT INTO `item_db` VALUES (1410,'Lance','Lance',4,60000,NULL,2500,185,NULL,3,NULL,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1411,'Lance_','Lance',4,60000,NULL,2500,185,NULL,3,NULL,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1412,'Lance__','Lance',4,60000,NULL,2500,185,NULL,3,NULL,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1413,'Gungnir','Gungnir',4,20,NULL,500,120,NULL,3,NULL,16514,2,2,4,4,4,NULL,'bonus bAtkEle,4; bonus bPerfectHitRate,25; bonus bHit,30;');
+INSERT INTO `item_db` VALUES (1414,'Gelerdria','Gelerdria',4,20,NULL,700,145,NULL,3,NULL,16514,2,2,4,48,4,NULL,'bonus bAtkEle,2; bonus bMaxHP,500; bonus bMaxSP,-50;');
+INSERT INTO `item_db` VALUES (1415,'Skewer','Brocca',4,20,NULL,850,100,NULL,3,NULL,16514,2,2,4,48,4,NULL,'bonus bIgnoreDefRace,11; bonus2 bAddEle,0,25;');
+INSERT INTO `item_db` VALUES (1416,'Tjungkuletti','Tjungkuletti',4,20,NULL,1000,95,NULL,3,NULL,16514,2,2,4,48,4,NULL,'bonus2 bSPDrainRate,100,1; bonus2 bSPDrainRate,1,5;');
+INSERT INTO `item_db` VALUES (1417,'Pole_Axe','Pole Axe',4,20,NULL,3800,160,NULL,3,1,16514,2,2,3,71,4,NULL,'bonus bStr,1; bonus bInt,2; bonus bDex,1;');
+INSERT INTO `item_db` VALUES (1451,'Guisarme','Guisarme',4,13000,NULL,1000,84,NULL,3,2,16514,2,34,2,18,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1452,'Guisarme_','Guisarme',4,13000,NULL,1000,84,NULL,3,3,16514,2,34,2,18,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1453,'Guisarme__','Guisarme',4,13000,NULL,1000,84,NULL,3,NULL,16514,2,34,2,18,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1454,'Glaive','Glaive',4,20000,NULL,1200,104,NULL,3,2,16514,2,34,2,18,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1455,'Glaive_','Glaive',4,20000,NULL,1200,104,NULL,3,3,16514,2,34,2,18,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1456,'Glaive__','Glaive',4,20000,NULL,1200,104,NULL,3,NULL,16514,2,34,2,18,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1457,'Partizan','Partizan',4,27000,NULL,2000,124,NULL,3,1,16514,2,34,2,18,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1458,'Partizan_','Partizan',4,27000,NULL,2000,124,NULL,3,2,16514,2,34,2,18,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1459,'Partizan__','Partizan',4,27000,NULL,2000,124,NULL,3,NULL,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1460,'Trident','Trident',4,51000,NULL,1200,150,NULL,3,2,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1461,'Trident_','Trident',4,51000,NULL,1200,150,NULL,3,3,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1462,'Trident__','Trident',4,51000,NULL,1200,150,NULL,3,NULL,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1463,'Halberd','Halberd',4,54000,NULL,2500,165,NULL,3,1,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1464,'Halberd_','Halberd',4,54000,NULL,2500,165,NULL,3,2,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1465,'Halberd__','Halberd',4,54000,NULL,2500,165,NULL,3,NULL,16514,2,34,3,33,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (1466,'Crescent_Scythe','Crescent Scythe',4,20,NULL,2500,180,NULL,3,NULL,16514,2,34,4,48,5,NULL,'bonus bCritical,30; bonus bHit,10;');
+INSERT INTO `item_db` VALUES (1467,'Bill_Guisarme','Bill Guisarme',4,20,NULL,1000,183,NULL,3,NULL,16514,2,34,4,48,5,NULL,'bonus2 bAddRace,2,10; bonus2 bAddRace,7,5;');
+INSERT INTO `item_db` VALUES (1468,'Zephyrus','Zephyrus',4,20,NULL,2000,170,NULL,3,NULL,16514,2,34,4,48,5,NULL,'bonus bAtkEle,4; skill 21,3; bonus2 bAddEff,Eff_Silence,200; bonus3 bAutoSpell,21,3,25;');
+INSERT INTO `item_db` VALUES (1469,'Longinuss_Spear','Longinuss Spear',4,20,NULL,2500,180,NULL,3,NULL,16514,2,34,4,48,5,NULL,'bonus bAtkEle,7; bonus2 bAddRace,7,10; bonus2 bAddRace,8,10;');
+INSERT INTO `item_db` VALUES (1470,'Brionac','Brionac',4,20,NULL,3000,190,NULL,3,NULL,16514,2,34,4,48,5,NULL,'bonus bAtkEle,6; skill 28,5; skill 13,3; bonus3 bAutoSpell,13,3,25; bonus2 bAddRace,10,5;');
+INSERT INTO `item_db` VALUES (1471,'Hellfire','Hellfire',4,20,NULL,3500,200,NULL,3,NULL,16514,2,34,4,48,5,NULL,'bonus bAtkEle,3; skill 17,3; bonus3 bAutoSpell,17,3,25; bonus bStr,3;');
+INSERT INTO `item_db` VALUES (1472,'Staff_of_Soul','Soul Staff',4,20,NULL,1400,25,NULL,1,NULL,66052,2,34,3,73,10,NULL,'bonus bInt,5; bonus bAgi,2; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1473,'Wizardy_Staff','Wizardy Staff',4,20,NULL,2400,120,NULL,1,NULL,66052,2,34,4,90,10,NULL,'bonus bInt,6; bonus bDex,2; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1501,'Club','Club',4,120,NULL,700,23,NULL,1,3,8701363,2,2,1,2,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1502,'Club_','Club',4,120,NULL,700,23,NULL,1,4,8701363,2,2,1,2,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1503,'Club__','Club',4,120,NULL,700,23,NULL,1,NULL,8701363,2,2,1,2,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1504,'Mace','Mace',4,1600,NULL,800,37,NULL,1,3,8701363,2,2,1,2,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1505,'Mace_','Mace',4,1600,NULL,800,37,NULL,1,4,8701363,2,2,1,2,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1506,'Mace__','Mace',4,1600,NULL,800,37,NULL,1,NULL,8701363,2,2,1,2,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1507,'Smasher','Smasher',4,9000,NULL,1000,54,NULL,1,2,8701363,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1508,'Smasher_','Smasher',4,9000,NULL,1000,54,NULL,1,3,8701363,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1509,'Smasher__','Smasher',4,9000,NULL,1000,54,NULL,1,3,8701363,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1510,'Flail','Flail',4,16000,NULL,900,69,NULL,1,2,312754,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1511,'Flail_','Flail',4,16000,NULL,900,69,NULL,1,3,312754,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1512,'Flail__','Flail',4,16000,NULL,900,69,NULL,1,3,312754,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1513,'Morning_Star','Morning Star',4,41000,NULL,1500,110,NULL,1,1,312754,2,2,3,27,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1514,'Morning_Star_','Morning Star',4,41000,NULL,1500,110,NULL,1,2,312754,2,2,3,27,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1515,'Morning_Star__','Morning Star',4,41000,NULL,1500,110,NULL,1,2,312754,2,2,3,27,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1516,'Sword_Mace','Sword Mace',4,50000,NULL,1200,130,NULL,1,NULL,312754,2,2,3,27,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1517,'Sword_Mace_','Sword Mace',4,50000,NULL,1200,130,NULL,1,1,312754,2,2,3,27,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1518,'Sword_Mace__','Sword Mace',4,50000,NULL,1200,130,NULL,1,1,312754,2,2,3,27,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1519,'Chain','Chain',4,23000,NULL,800,84,NULL,1,2,312754,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1520,'Chain_','Chain',4,23000,NULL,800,84,NULL,1,3,312754,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1521,'Chain__','Chain',4,23000,NULL,800,84,NULL,1,3,312754,2,2,2,14,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1522,'Stunner','Stunner',4,60000,NULL,2000,140,NULL,1,NULL,33040,2,2,3,27,8,NULL,'bonus2 bAddEff,Eff_Stan,1000;');
+INSERT INTO `item_db` VALUES (1523,'Spike','Spike',4,20,NULL,700,85,NULL,1,NULL,33040,2,2,4,40,8,NULL,'bonus bCritical,40; bonus bDefRate,-67; bonus bDef2Rate,-67;');
+INSERT INTO `item_db` VALUES (1524,'Golden_Mace','Golden Mace',4,20,NULL,800,110,NULL,1,1,33040,2,2,4,40,8,NULL,'bonus2 bAddRace,1,10; bonus bUnbreakableWeapon,0;');
+INSERT INTO `item_db` VALUES (1525,'Long_Mace','Long Mace',4,20,NULL,800,135,NULL,3,NULL,33040,2,2,4,40,8,NULL,'bonus bLongAtkDef,10;');
+INSERT INTO `item_db` VALUES (1526,'Slash','Slash',4,20,NULL,1000,145,NULL,1,NULL,33040,2,2,4,40,8,NULL,'bonus2 bAddRace,1,15; bonus2 bWeaponComaRace,1,50;');
+INSERT INTO `item_db` VALUES (1527,'Quadrille','Quadrille',4,20,NULL,900,165,NULL,1,NULL,33040,2,2,4,40,8,NULL,'bonus2 bAddRace,1,10; bonus2 bAddRace,7,10; bonus2 bAddEle,2,10;');
+INSERT INTO `item_db` VALUES (1528,'Grand_Cross','Grand Cross',4,20,NULL,1500,140,NULL,1,NULL,33040,2,2,4,40,8,NULL,'bonus bAtkEle,6; skill 77,3; bonus3 bAutoSpell,77,3,25; bonus2 bHPDrainRate,100,1;');
+INSERT INTO `item_db` VALUES (1529,'Iron_Driver','Iron Driver',4,20,NULL,3000,155,NULL,1,NULL,33024,2,2,3,78,8,NULL,NULL);
+INSERT INTO `item_db` VALUES (1530,'Mjolnir','Mjolnir',4,20,NULL,6000,250,NULL,1,NULL,8701363,2,2,4,95,8,NULL,'bonus bAtkEle,4; bonus bDex,40; bonus bStr,15; bonus bAspdRate,30;');
+INSERT INTO `item_db` VALUES (1531,'Spanner','Spanner',4,20,NULL,2500,115,NULL,1,NULL,33040,2,2,3,55,8,NULL,'bonus2 bAddEff,Eff_Blind,100; bonus2 bAddEff,Eff_Stan,100; bonus2 bAddEff,Eff_Poison,100; bonus2 bAddEff,Eff_Freeze,100;');
+INSERT INTO `item_db` VALUES (1550,'Book','Book',4,30000,NULL,600,85,NULL,1,3,65792,2,2,2,14,15,NULL,NULL);
+INSERT INTO `item_db` VALUES (1551,'Bible','Bible',4,60000,NULL,1000,115,NULL,1,2,65792,2,2,3,27,15,NULL,'bonus bInt,2;');
+INSERT INTO `item_db` VALUES (1552,'Tablet','Tablet',4,51000,NULL,800,125,NULL,1,1,65792,2,2,3,27,15,NULL,NULL);
+INSERT INTO `item_db` VALUES (1553,'Book_of_Billows','Book of Billows',4,35000,NULL,750,90,NULL,1,NULL,65792,2,2,3,27,15,NULL,'bonus bAtkEle,1;');
+INSERT INTO `item_db` VALUES (1554,'Book_of_Mother_Earth','Book of Mother Earth',4,35000,NULL,750,90,NULL,1,NULL,65792,2,2,3,27,15,NULL,'bonus bAtkEle,2;');
+INSERT INTO `item_db` VALUES (1555,'Book_of_Blazing_Sun','Book of Blazing Sun',4,35000,NULL,750,90,NULL,1,NULL,65792,2,2,3,27,15,NULL,'bonus bAtkEle,3;');
+INSERT INTO `item_db` VALUES (1556,'Book_of_Gust_of_Wind','Book of Gust of Wind',4,35000,NULL,750,90,NULL,1,NULL,65792,2,2,3,27,15,NULL,'bonus bAtkEle,4;');
+INSERT INTO `item_db` VALUES (1557,'Book_of_the_Apocalypse','Book of the Apocalypse',4,35000,NULL,800,120,NULL,1,NULL,65792,2,2,4,40,15,NULL,'bonus bAtkEle,7; bonus2 bSubEle,6,-5; bonus2 bAddEle,1,7; bonus2 bAddEle,2,7; bonus2 bAddEle,3,7; bonus2 bAddEle,4,7;');
+INSERT INTO `item_db` VALUES (1558,'Girls_Diary','Girls Diary',4,20,NULL,300,60,NULL,1,1,65792,2,2,4,40,15,NULL,'bonus2 bAddDamageClass,1188,150;');
+INSERT INTO `item_db` VALUES (1599,'Angra_Manyu','Angra Manyu',4,120,NULL,10,1,NULL,1,5,10477567,2,2,4,2,8,NULL,'bonus bBaseAtk,3800; bonus2 bHPDrainRate,100,100;');
+INSERT INTO `item_db` VALUES (1601,'Rod','Rod',4,50,NULL,400,15,NULL,1,3,8487701,2,2,1,1,10,NULL,'bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1602,'Rod_','Rod',4,50,NULL,400,15,NULL,1,4,8487701,2,2,1,1,10,NULL,'bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1603,'Rod__','Rod',4,50,NULL,400,15,NULL,1,NULL,8487701,2,2,1,1,10,NULL,'bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1604,'Wand','Wand',4,2500,NULL,400,25,NULL,1,2,8487701,2,2,2,12,10,NULL,'bonus bInt,1; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1605,'Wand_','Wand',4,2500,NULL,400,25,NULL,1,3,8487701,2,2,2,12,10,NULL,'bonus bInt,1; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1606,'Wand__','Wand',4,2500,NULL,400,25,NULL,1,NULL,8487701,2,2,2,12,10,NULL,'bonus bInt,1; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1607,'Staff','Staff',4,9500,NULL,400,40,NULL,1,2,99092,2,2,2,12,10,NULL,'bonus bInt,2; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1608,'Staff_','Staff',4,9500,NULL,400,40,NULL,1,3,99092,2,2,2,12,10,NULL,'bonus bInt,2; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1609,'Staff__','Staff',4,9500,NULL,400,40,NULL,1,NULL,99092,2,2,2,12,10,NULL,'bonus bInt,2; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1610,'Arc_Wand','Arc Wand',4,45000,NULL,400,60,NULL,1,1,99092,2,2,3,24,10,NULL,'bonus bInt,3; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1611,'Arc_Wand_','Arc Wand',4,45000,NULL,400,60,NULL,1,2,99092,2,2,3,24,10,NULL,'bonus bInt,3; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1612,'Arc_Wand__','Arc Wand',4,45000,NULL,400,60,NULL,1,NULL,99092,2,2,3,24,10,NULL,'bonus bInt,3; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1613,'Mighty_Staff','Mighty Staff',4,20,NULL,700,130,NULL,1,NULL,99092,2,2,3,24,10,NULL,'bonus bStr,10; bonus bMatkRate,15; bonus2 bSpDrainRate,100,-2;');
+INSERT INTO `item_db` VALUES (1614,'Blessed_Wand','Wand of Occult',4,20,NULL,700,75,NULL,1,NULL,99092,2,2,3,24,10,NULL,'bonus bInt,3; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1615,'Bone_Wand','Bone Wand',4,20,NULL,700,40,NULL,1,NULL,99092,2,2,3,24,10,NULL,'bonus bInt,4; bonus bAtkEle,9; bonus bMatkRate,15;');
+INSERT INTO `item_db` VALUES (1701,'Bow','Bow',4,1000,NULL,500,15,NULL,5,3,1706056,2,34,1,4,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1702,'Bow_','Bow',4,1000,NULL,500,15,NULL,5,4,1706056,2,34,1,4,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1703,'Bow__','Bow',4,1000,NULL,500,15,NULL,5,NULL,1706056,2,34,1,4,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1704,'Composite_Bow','Composite Bow',4,2500,NULL,600,29,NULL,5,3,1706056,2,34,1,4,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1705,'Composite_Bow_','Composite Bow',4,2500,NULL,600,29,NULL,5,4,1706056,2,34,1,4,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1706,'Composite_Bow__','Composite Bow',4,2500,NULL,600,29,NULL,5,NULL,1706056,2,34,1,4,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1707,'Great_Bow','Great Bow',4,10000,NULL,1000,50,NULL,5,2,1706056,2,34,2,18,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1708,'Great_Bow_','Great Bow',4,10000,NULL,1000,50,NULL,5,3,1706056,2,34,2,18,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1709,'Great_Bow__','Great Bow',4,10000,NULL,1000,50,NULL,5,NULL,1706056,2,34,2,18,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1710,'CrossBow','Cross Bow',4,17000,NULL,900,65,NULL,5,2,1706056,2,34,2,18,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1711,'CrossBow_','Cross Bow',4,17000,NULL,900,65,NULL,5,3,1706056,2,34,2,18,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1712,'CrossBow__','Cross Bow',4,17000,NULL,900,65,NULL,5,NULL,1706056,2,34,2,18,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1713,'Arbalest','Arbalest',4,48000,NULL,1000,90,NULL,5,1,1706056,2,34,3,33,11,NULL,'bonus bDex,2;');
+INSERT INTO `item_db` VALUES (1714,'Gakkung','Gakkung',4,42000,NULL,1100,100,NULL,5,1,1706056,2,34,3,33,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1715,'Arbalest_','Arbalest',4,48000,NULL,1000,90,NULL,5,2,1706056,2,34,3,33,11,NULL,'bonus bDex,2;');
+INSERT INTO `item_db` VALUES (1716,'Gakkung_','Gakkung',4,42000,NULL,1100,100,NULL,5,2,1706056,2,34,3,33,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1718,'Hunter_Bow','Hunter Bow',4,64000,NULL,1500,125,NULL,5,NULL,2048,2,34,3,33,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1719,'Bow_of_Roguemaster','Roguemasters Bow',4,20,NULL,500,75,NULL,11,NULL,131136,2,34,4,48,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1720,'Bow_of_Rudra','Rudras Bow',4,20,NULL,1200,150,NULL,5,NULL,1705992,2,34,4,48,11,NULL,'bonus bAtkEle,6; 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;');
+INSERT INTO `item_db` VALUES (1721,'Repeating_Crossbow','Repeating Crossbow',4,89000,NULL,2000,95,NULL,9,1,133184,2,34,3,65,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1722,'Ballista','Ballista',4,20,NULL,3500,145,NULL,5,NULL,1574912,2,34,4,77,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (1750,'Arrow','Arrow',10,1,NULL,1,25,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1751,'Silver_Arrow','Silver Arrow',10,3,NULL,2,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,6;');
+INSERT INTO `item_db` VALUES (1752,'Fire_Arrow','Fire Arrow',10,3,NULL,2,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,3;');
+INSERT INTO `item_db` VALUES (1753,'Steel_Arrow','Steel Arrow',10,3,NULL,2,40,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1754,'Crystal_Arrow','Crystal Arrow',10,3,NULL,2,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,1;');
+INSERT INTO `item_db` VALUES (1755,'Arrow_of_Wind','Arrow of Wind',10,3,NULL,2,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,4;');
+INSERT INTO `item_db` VALUES (1756,'Stone_Arrow','Stone Arrow',10,3,NULL,2,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,2;');
+INSERT INTO `item_db` VALUES (1757,'Immaterial_Arrow','Immaterial Arrow',10,3,NULL,1,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,8;');
+INSERT INTO `item_db` VALUES (1758,'Stun_Arrow','Stun Arrow',10,3,NULL,3,1,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus2 bAddEff,Eff_Stan,500;');
+INSERT INTO `item_db` VALUES (1759,'Freezing_Arrow','Freeze Arrow',10,3,NULL,3,1,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,1; bonus2 bAddEff,Eff_Freeze,500;');
+INSERT INTO `item_db` VALUES (1760,'Flash_Arrow','Flash Arrow',10,3,NULL,3,1,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus2 bAddEff,Eff_Blind,500;');
+INSERT INTO `item_db` VALUES (1761,'Curse_Arrow','Curse Arrow',10,3,NULL,3,1,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus2 bAddEff,Eff_Curse,500;');
+INSERT INTO `item_db` VALUES (1762,'Rusty_Arrow','Rusted Arrow',10,3,NULL,2,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,5;');
+INSERT INTO `item_db` VALUES (1763,'Poison_Arrow','Poison Arrow',10,3,NULL,3,1,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,500;');
+INSERT INTO `item_db` VALUES (1764,'Incisive_Arrow','Sharp Arrow',10,3,NULL,3,10,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bCritical,10;');
+INSERT INTO `item_db` VALUES (1765,'Oridecon_Arrow','Oridecon Arrow',10,3,NULL,3,50,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1766,'Arrow_of_Counter_Evil','Arrow of Counter Evil',10,40,NULL,3,50,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,6;');
+INSERT INTO `item_db` VALUES (1767,'Arrow_of_Shadow','Shadow Arrow',10,3,NULL,2,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus bAtkEle,7;');
+INSERT INTO `item_db` VALUES (1768,'Sleep_Arrow','Sleep Arrow',10,3,NULL,3,1,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus2 bAddEff,Eff_Sleep,500;');
+INSERT INTO `item_db` VALUES (1769,'Silence_Arrow','Mute Arrow',10,3,NULL,3,1,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,'bonus2 bAddEff,Eff_Silence,500;');
+INSERT INTO `item_db` VALUES (1770,'Iron_Arrow','Iron Arrow',10,2,NULL,1,30,NULL,NULL,NULL,1706056,2,32768,NULL,1,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1801,'Waghnakh','Waghnakh',4,8000,NULL,400,30,NULL,1,3,33024,2,2,1,1,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1802,'Waghnakh_','Waghnakh',4,8000,NULL,400,30,NULL,1,4,33024,2,2,1,1,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1803,'Knuckle_Duster','Knuckle Duster',4,25000,NULL,450,50,NULL,1,2,33024,2,2,2,12,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1804,'Knuckle_Duster_','Knuckle Duster',4,25000,NULL,450,50,NULL,1,3,33024,2,2,2,12,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1805,'Hora','Hora',4,32000,NULL,450,65,NULL,1,2,33024,2,2,2,12,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1806,'Hora_','Hora',4,32000,NULL,450,65,NULL,1,3,33024,2,2,2,12,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1807,'Fist','Fist',4,53000,NULL,650,115,NULL,1,NULL,33024,2,2,3,24,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1808,'Fist_','Fist',4,53000,NULL,650,115,NULL,1,1,33024,2,2,3,24,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1809,'Claw','Claw',4,67000,NULL,500,86,NULL,1,1,33024,2,2,3,24,12,NULL,'bonus bStr,2;');
+INSERT INTO `item_db` VALUES (1810,'Claw_','Claw',4,67000,NULL,500,86,NULL,1,2,33024,2,2,3,24,12,NULL,'bonus bStr,2;');
+INSERT INTO `item_db` VALUES (1811,'Finger','Finger',4,58000,NULL,500,97,NULL,1,1,33024,2,2,3,24,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1812,'Finger_','Finger',4,58000,NULL,500,97,NULL,1,2,33024,2,2,3,24,12,NULL,NULL);
+INSERT INTO `item_db` VALUES (1813,'Kaiser_Knuckle','Kaiser Knuckle',4,20,NULL,450,110,NULL,1,NULL,33024,2,2,4,36,12,NULL,'bonus bAtkEle,4; bonus2 bAddRace,1,5; bonus2 bAddEle,1,10; bonus2 bAddEle,2,10; bonus2 bAddEle,3,10; bonus2 bAddEle,4,10;');
+INSERT INTO `item_db` VALUES (1814,'Berserk','Berserk',4,20,NULL,500,120,NULL,1,NULL,33024,2,2,4,36,12,NULL,'bonus bAspdRate,12;');
+INSERT INTO `item_db` VALUES (1901,'Violin','Violin',4,4000,NULL,700,50,NULL,1,3,524288,2,2,1,2,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1902,'Violin_','Violin',4,4000,NULL,700,50,NULL,1,4,524288,2,2,1,2,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1903,'Mandolin','Mandolin',4,18000,NULL,400,90,NULL,1,2,524288,2,2,2,14,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1904,'Mandolin_','Mandolin',4,18000,NULL,400,90,NULL,1,3,524288,2,2,2,14,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1905,'Lute','Lute',4,24500,NULL,500,105,NULL,1,2,524288,2,2,2,14,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1906,'Lute_','Lute',4,24500,NULL,500,105,NULL,1,3,524288,2,2,2,14,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1907,'Guitar','Guitar',4,47000,NULL,900,142,NULL,1,NULL,524288,2,2,3,27,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1908,'Guitar_','Guitar',4,47000,NULL,900,142,NULL,1,1,524288,2,2,3,27,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1909,'Harp','Harp',4,62000,NULL,900,114,NULL,1,1,524288,2,2,3,27,13,NULL,'bonus bInt,2;');
+INSERT INTO `item_db` VALUES (1910,'Harp_','Harp',4,62000,NULL,900,114,NULL,1,2,524288,2,2,3,27,13,NULL,'bonus bInt,2;');
+INSERT INTO `item_db` VALUES (1911,'Guh_Moon_Goh','Guhmoongoh',4,54000,NULL,1300,126,NULL,1,1,524288,2,2,3,27,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1912,'Guh_Moon_Goh_','Guhmoongoh',4,54000,NULL,1300,126,NULL,1,2,524288,2,2,3,27,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (1913,'Electric_Guitar','Electric Guitar',4,20,NULL,1800,110,NULL,1,NULL,524288,2,2,4,70,13,NULL,'bonus3 bAutoSpell,84,1,25; bonus bAtkEle,4; bonus bInt,2; bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (1950,'Rope','Rope',4,2500,NULL,400,45,NULL,2,3,1048576,2,2,1,3,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1951,'Rope_','Rope',4,2500,NULL,400,45,NULL,2,4,1048576,2,2,1,3,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1952,'Line','Line',4,12000,NULL,300,80,NULL,2,2,1048576,2,2,2,16,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1953,'Line_','Line',4,12000,NULL,300,80,NULL,2,3,1048576,2,2,2,16,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1954,'Wire','Wire',4,17500,NULL,1000,95,NULL,2,2,1048576,2,2,2,16,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1955,'Wire_','Wire',4,17500,NULL,1000,95,NULL,2,3,1048576,2,2,2,16,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1956,'Rante_Whip','Rante Whip',4,32000,NULL,900,135,NULL,2,NULL,1048576,2,2,3,30,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1957,'Rante_Whip_','Rante Whip',4,32000,NULL,900,135,NULL,2,1,1048576,2,2,3,30,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1958,'Tail','Tail',4,41000,NULL,700,105,NULL,2,1,1048576,2,2,3,30,14,NULL,'bonus bLuk,3;');
+INSERT INTO `item_db` VALUES (1959,'Tail_','Tail',4,41000,NULL,700,105,NULL,2,2,1048576,2,2,3,30,14,NULL,'bonus bLuk,3;');
+INSERT INTO `item_db` VALUES (1960,'Whip','Whip',4,38000,NULL,700,120,NULL,2,1,1048576,2,2,3,30,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1961,'Whip_','Whip',4,38000,NULL,700,120,NULL,2,2,1048576,2,2,3,30,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (1962,'Lariat','Lariat',4,20,NULL,400,100,NULL,2,NULL,1048576,2,2,4,44,14,NULL,'bonus bDex,5; bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (1963,'Rapture_Rose','Rapture Rose',4,20,NULL,300,115,NULL,2,NULL,1048576,2,2,4,44,14,NULL,'bonus bAtkEle,5; bonus2 bAddEff,Eff_Poison,5000;');
+INSERT INTO `item_db` VALUES (1964,'Chemeti','Chemeti',4,20,NULL,700,135,NULL,2,NULL,1048576,2,2,4,44,14,NULL,'bonus bCritical,5; bonus bFlee,10; bonus bFlee2,2;');
+INSERT INTO `item_db` VALUES (1998,'Jeramiahs_Jur','Jeramiahs Jur',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (1999,'Zeds_Staff','Zeds Staff',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2101,'Guard','Guard',5,500,NULL,300,NULL,3,NULL,NULL,10477567,2,32,NULL,NULL,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (2102,'Guard_','Guard',5,500,NULL,300,NULL,3,NULL,1,10477567,2,32,NULL,NULL,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (2103,'Buckler','Buckler',5,14000,NULL,600,NULL,4,NULL,NULL,2020850,2,32,NULL,NULL,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (2104,'Buckler_','Buckler',5,14000,NULL,600,NULL,4,NULL,1,2020850,2,32,NULL,NULL,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (2105,'Shield','Shield',5,56000,NULL,1300,NULL,6,NULL,NULL,16514,2,32,NULL,NULL,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (2106,'Shield_','Shield',5,56000,NULL,1300,NULL,6,NULL,1,16514,2,32,NULL,NULL,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (2107,'Mirror_Shield','Mirror Shield',5,60000,NULL,1000,NULL,4,NULL,NULL,16514,2,32,NULL,NULL,4,NULL,'bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (2108,'Mirror_Shield_','Mirror Shield',5,60000,NULL,1000,NULL,4,NULL,1,16514,2,32,NULL,NULL,4,NULL,'bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (2109,'Memorize_Book','Book of Summoning',5,20,NULL,1000,NULL,3,NULL,NULL,66052,2,32,NULL,NULL,NULL,NULL,'bonus bInt,1; bonus bMdef,2;');
+INSERT INTO `item_db` VALUES (2110,'Holy_Guard','Holy Guard',5,20,NULL,1400,NULL,5,NULL,NULL,16384,2,32,NULL,68,3,NULL,'bonus bVit,2; bonus bMdef,2;');
+INSERT INTO `item_db` VALUES (2111,'Evangelist','Evangelist',5,20,NULL,1400,NULL,5,NULL,NULL,16384,2,32,NULL,83,3,NULL,'bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;');
+INSERT INTO `item_db` VALUES (2112,'Novice_Guard','Novice Guard',5,20,NULL,1,NULL,3,NULL,NULL,8388609,2,32,NULL,NULL,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (2199,'Ahura_Mazda','Ahura Mazda',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,32,NULL,NULL,NULL,NULL,'bonus bMdef,1; bonus bDef,1; bonus bFlee2,1; bonus2 bSubEle,0,1;');
+INSERT INTO `item_db` VALUES (2201,'Sunglasses','Sunglasses',5,5000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,12,NULL,'bonus2 bResEff,Eff_Blind,500;');
+INSERT INTO `item_db` VALUES (2202,'Sunglasses_','Sunglasses',5,5000,NULL,100,NULL,NULL,NULL,1,10477567,2,512,NULL,NULL,12,NULL,'bonus2 bResEff,Eff_Blind,500;');
+INSERT INTO `item_db` VALUES (2203,'Glasses','Glasses',5,4000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (2204,'Glasses_','Glasses',5,4000,NULL,100,NULL,NULL,NULL,1,10477567,2,512,NULL,NULL,3,NULL,NULL);
+INSERT INTO `item_db` VALUES (2205,'Divers_Goggles','Diver Goggles',5,3500,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,10,NULL,NULL);
+INSERT INTO `item_db` VALUES (2206,'Wedding_Veil','Wedding Veil',5,23000,NULL,100,NULL,NULL,NULL,NULL,10477567,NULL,256,NULL,NULL,44,NULL,'bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (2207,'Fancy_Flower','Fancy Flower',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,4,NULL,'bonus2 bSubRace,3,10;');
+INSERT INTO `item_db` VALUES (2208,'Ribbon','Ribbon',5,800,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,17,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2209,'Ribbon_','Ribbon',5,800,NULL,100,NULL,1,NULL,1,10477567,2,256,NULL,NULL,17,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2210,'Hair_Band','Hair Band',5,500,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,9,NULL,NULL);
+INSERT INTO `item_db` VALUES (2211,'Bandana','Bandana',5,400,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,6,NULL,NULL);
+INSERT INTO `item_db` VALUES (2212,'Eye_Bandage','Eye Patch',5,1000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,13,NULL,NULL);
+INSERT INTO `item_db` VALUES (2213,'Kitty_Band','Kitty Band',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,2,NULL,NULL);
+INSERT INTO `item_db` VALUES (2214,'Bunny_Band','Bunny Band',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,15,NULL,'bonus bLuk,2;');
+INSERT INTO `item_db` VALUES (2215,'Flower_Hairband','Flower Band',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,5,NULL,NULL);
+INSERT INTO `item_db` VALUES (2216,'Biretta','Biretta',5,9000,NULL,100,NULL,4,NULL,NULL,33040,2,256,NULL,NULL,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (2217,'Biretta_','Biretta',5,9000,NULL,100,NULL,4,NULL,1,33040,2,256,NULL,NULL,11,NULL,NULL);
+INSERT INTO `item_db` VALUES (2218,'Flu_Mask','Flu Mask',5,300,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,8,NULL,'bonus2 bResEff,Eff_Silence,1000;');
+INSERT INTO `item_db` VALUES (2219,'Flu_Mask_','Flu Mask',5,300,NULL,100,NULL,NULL,NULL,1,10477567,2,1,NULL,NULL,8,NULL,'bonus2 bResEff,Eff_Silence,1000;');
+INSERT INTO `item_db` VALUES (2220,'Hat','Hat',5,1000,NULL,200,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,16,NULL,NULL);
+INSERT INTO `item_db` VALUES (2221,'Hat_','Hat',5,1000,NULL,200,NULL,2,NULL,1,10477567,2,256,NULL,NULL,16,NULL,NULL);
+INSERT INTO `item_db` VALUES (2222,'Turban','Turban',5,4500,NULL,300,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (2223,'Turban_','Turban',5,4500,NULL,300,NULL,3,NULL,1,10477567,2,256,NULL,NULL,7,NULL,NULL);
+INSERT INTO `item_db` VALUES (2224,'Goggles','Goggles',5,10000,NULL,300,NULL,5,NULL,NULL,1989866,2,768,NULL,NULL,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (2225,'Goggles_','Goggles',5,10000,NULL,300,NULL,5,NULL,1,1989866,2,768,NULL,NULL,1,NULL,NULL);
+INSERT INTO `item_db` VALUES (2226,'Cap','Cap',5,12000,NULL,400,NULL,4,NULL,NULL,1989866,2,256,NULL,NULL,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (2227,'Cap_','Cap',5,12000,NULL,400,NULL,4,NULL,1,1989866,2,256,NULL,NULL,14,NULL,NULL);
+INSERT INTO `item_db` VALUES (2228,'Helm','Helm',5,44000,NULL,600,NULL,6,NULL,NULL,16514,2,256,NULL,NULL,40,NULL,NULL);
+INSERT INTO `item_db` VALUES (2229,'Helm_','Helm',5,44000,NULL,600,NULL,6,NULL,1,16514,2,256,NULL,NULL,40,NULL,NULL);
+INSERT INTO `item_db` VALUES (2230,'Gemmed_Sallet','Gemmed Sallet',5,50000,NULL,500,NULL,4,NULL,NULL,414946,2,256,NULL,NULL,NULL,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2231,'Gemmed_Sallet_','Gemmed Sallet',5,50000,NULL,500,NULL,4,NULL,1,414946,2,256,NULL,NULL,NULL,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2232,'Circlet','Circlet',5,7500,NULL,300,NULL,3,NULL,NULL,99092,2,256,NULL,NULL,18,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2233,'Circlet_','Circlet',5,7500,NULL,300,NULL,3,NULL,1,99092,2,256,NULL,NULL,18,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2234,'Tiara','Tiara',5,20,NULL,400,NULL,4,NULL,NULL,10477567,NULL,256,NULL,45,19,NULL,'bonus bInt,2;');
+INSERT INTO `item_db` VALUES (2235,'Crown','Crown',5,20,NULL,400,NULL,4,NULL,NULL,10477567,1,256,NULL,45,45,NULL,'bonus bInt,2;');
+INSERT INTO `item_db` VALUES (2236,'Santas_Hat','Santas Hat',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,20,NULL,'bonus bMdef,1; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (2237,'Bandit_Beard','Bandit Beard',5,2,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,21,NULL,NULL);
+INSERT INTO `item_db` VALUES (2238,'Moustache','Moustache',5,2,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,22,NULL,NULL);
+INSERT INTO `item_db` VALUES (2239,'Single_Glass','Single Glass',5,10000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,23,NULL,NULL);
+INSERT INTO `item_db` VALUES (2240,'Beard','Beard',5,2,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,24,NULL,NULL);
+INSERT INTO `item_db` VALUES (2241,'Granpa_Beard','Granpa Beard',5,5000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,25,NULL,NULL);
+INSERT INTO `item_db` VALUES (2242,'Purple_Sunglasses','Purple Glasses',5,24000,NULL,100,NULL,1,NULL,NULL,10477567,2,512,NULL,NULL,26,NULL,'bonus2 bResEff,Eff_Blind,1000;');
+INSERT INTO `item_db` VALUES (2243,'Geek_Glasses','Geek Glasses',5,20000,NULL,100,NULL,1,NULL,NULL,10477567,2,512,NULL,NULL,27,NULL,'bonus2 bResEff,Eff_Blind,1500;');
+INSERT INTO `item_db` VALUES (2244,'Big_Ribbon','Big Ribbon',5,15000,NULL,200,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,28,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2245,'Sweet_Gent','Sweet Gent',5,15000,NULL,400,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,29,NULL,NULL);
+INSERT INTO `item_db` VALUES (2246,'Golden_Gear','Golden Gear',5,20,NULL,900,NULL,5,NULL,NULL,10477567,2,256,NULL,40,30,NULL,'bonus2 bSubEle,0,10;');
+INSERT INTO `item_db` VALUES (2247,'Romantic_Gent','Romantic Gent',5,15000,NULL,400,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,31,NULL,NULL);
+INSERT INTO `item_db` VALUES (2248,'Western_Grace','Western Grace',5,15000,NULL,400,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,32,NULL,NULL);
+INSERT INTO `item_db` VALUES (2249,'Coronet','Coronet',5,20,NULL,300,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,33,NULL,'bonus bInt,1;');
+INSERT INTO `item_db` VALUES (2250,'Fillet','Cute Ribbon',5,500,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,34,NULL,'bonus bMaxSP,20;');
+INSERT INTO `item_db` VALUES (2251,'Holy_Bonnet','Monk Hat',5,30000,NULL,100,NULL,5,NULL,NULL,33040,2,256,NULL,NULL,35,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2252,'Wizard_Hat','Wizard Hat',5,20,NULL,300,NULL,4,NULL,NULL,66052,2,256,NULL,NULL,36,NULL,'bonus bMaxSP,100;');
+INSERT INTO `item_db` VALUES (2253,'Sunflower','Sunflower',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,37,NULL,'bonus2 bSubRace,4,10;');
+INSERT INTO `item_db` VALUES (2254,'Angel_Wing','Angel Wing',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,38,NULL,'bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,6,3;');
+INSERT INTO `item_db` VALUES (2255,'Evil_Wing','Evil Wing',5,20,NULL,100,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,39,NULL,'bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,8,3;');
+INSERT INTO `item_db` VALUES (2256,'Majestic_Goat','Majestic Goat',5,20,NULL,800,NULL,5,NULL,NULL,279714,2,256,NULL,NULL,41,NULL,'bonus bStr,1;');
+INSERT INTO `item_db` VALUES (2257,'Snow_Horn','Snow Horn',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,42,NULL,NULL);
+INSERT INTO `item_db` VALUES (2258,'Spiky_Band','Spiky Band',5,20,NULL,1000,NULL,6,NULL,NULL,447986,2,256,NULL,50,43,NULL,NULL);
+INSERT INTO `item_db` VALUES (2259,'Mini_Propeller','Mini Propeller',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,46,NULL,NULL);
+INSERT INTO `item_db` VALUES (2260,'Mini_Glasses','Mini Glasses',5,28000,NULL,100,NULL,1,NULL,NULL,10477567,2,512,NULL,NULL,47,NULL,NULL);
+INSERT INTO `item_db` VALUES (2261,'Army_Cap','Army Cap',5,20,NULL,400,NULL,4,NULL,NULL,414946,2,256,NULL,NULL,48,NULL,NULL);
+INSERT INTO `item_db` VALUES (2262,'Pierrot_Nose','Pierrot Nose',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,49,NULL,NULL);
+INSERT INTO `item_db` VALUES (2263,'Zorro_Masque','Zorro Masque',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,50,NULL,NULL);
+INSERT INTO `item_db` VALUES (2264,'Munak_Hat','Munak Hat',5,20,NULL,300,NULL,5,NULL,NULL,10477567,2,769,NULL,NULL,51,NULL,'bonus2 bSubRace,1,10;');
+INSERT INTO `item_db` VALUES (2265,'Gangster_Mask','Gangster Mask',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,52,NULL,'bonus2 bResEff,Eff_Silence,1500;');
+INSERT INTO `item_db` VALUES (2266,'Iron_Cain','Iron Cain',5,20,NULL,300,NULL,1,NULL,NULL,16514,2,1,NULL,50,53,NULL,NULL);
+INSERT INTO `item_db` VALUES (2267,'Cigar','Cigar',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,54,NULL,'bonus2 bSubRace,4,3;');
+INSERT INTO `item_db` VALUES (2268,'Pipe','Pipe',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,55,NULL,'bonus2 bSubRace,4,3;');
+INSERT INTO `item_db` VALUES (2269,'Centimental_Flower','Romantic Flower',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,56,NULL,'bonus2 bSubRace,3,3;');
+INSERT INTO `item_db` VALUES (2270,'Centimental_Leaf','Romantic Leaf',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,57,NULL,'bonus2 bSubRace,3,3;');
+INSERT INTO `item_db` VALUES (2271,'Jack_a_Dandy','Jack a Dandy',5,45000,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,58,NULL,NULL);
+INSERT INTO `item_db` VALUES (2272,'Stop_Post','Stop Post',5,20,NULL,400,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,59,NULL,NULL);
+INSERT INTO `item_db` VALUES (2273,'Doctor_Cap','Doctor Band',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,60,NULL,'bonus bInt,1;');
+INSERT INTO `item_db` VALUES (2274,'Ghost_Bandana','Ghost Bandana',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,61,NULL,'bonus bAgi,2; bonus2 bSubEle,8,10;');
+INSERT INTO `item_db` VALUES (2275,'Red_Bandana','Red Bandana',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,62,NULL,NULL);
+INSERT INTO `item_db` VALUES (2276,'Eagle_Eyes','Eagle Eyes',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,512,NULL,NULL,63,NULL,NULL);
+INSERT INTO `item_db` VALUES (2277,'Nurse_Cap','Nurse Cap',5,20,NULL,100,NULL,1,NULL,NULL,33040,2,256,NULL,NULL,64,NULL,'bonus bInt,1; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (2278,'Mr_Smile','Mr. Smile',5,60,NULL,100,NULL,1,NULL,NULL,10477567,2,513,NULL,NULL,65,NULL,NULL);
+INSERT INTO `item_db` VALUES (2279,'Bomb_Wick','Bomb Wick',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,66,NULL,NULL);
+INSERT INTO `item_db` VALUES (2280,'Sakkat','Sakkat',5,20,NULL,300,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,67,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (2281,'Opera_Masque','Opera Masque',5,8000,NULL,200,NULL,2,NULL,NULL,10477567,2,513,NULL,NULL,68,NULL,NULL);
+INSERT INTO `item_db` VALUES (2282,'Heaven_Ring','Heaven Ring',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,69,NULL,'bonus2 bSubEle,6,10;');
+INSERT INTO `item_db` VALUES (2283,'Ear_Mufs','Ear Mufs',5,20,NULL,200,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,70,NULL,'bonus2 bResEff,Eff_Curse,1000;');
+INSERT INTO `item_db` VALUES (2284,'Antler','Antler',5,20,NULL,500,NULL,4,NULL,NULL,10477567,2,256,NULL,NULL,71,NULL,NULL);
+INSERT INTO `item_db` VALUES (2285,'Apple_o_Archer','Apple o Archer',5,20,NULL,200,NULL,NULL,NULL,NULL,10477567,2,256,NULL,30,72,NULL,'bonus bDex,3;');
+INSERT INTO `item_db` VALUES (2286,'Elven_Ears','Elven Ears',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,70,73,NULL,NULL);
+INSERT INTO `item_db` VALUES (2287,'Pirate_Bandana','Pirate Bandana',5,20,NULL,100,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,74,NULL,'bonus bStr,1;');
+INSERT INTO `item_db` VALUES (2288,'Mr_Scream','Mr. Scream',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,513,NULL,NULL,75,NULL,NULL);
+INSERT INTO `item_db` VALUES (2289,'Poo_Poo_Hat','Poo Poo Hat',5,20,NULL,700,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,76,NULL,'bonus2 bSubRace,7,10;');
+INSERT INTO `item_db` VALUES (2290,'Funeral_Hat','Funeral Hat',5,3000,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,77,NULL,NULL);
+INSERT INTO `item_db` VALUES (2291,'Masquerade','Masquerade',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,78,NULL,'bonus2 bAddRace,7,3;');
+INSERT INTO `item_db` VALUES (2292,'Welding_Mask','Welding Mask',5,20,NULL,300,NULL,2,NULL,NULL,263200,2,513,NULL,50,79,NULL,'bonus2 bSubEle,3,10;');
+INSERT INTO `item_db` VALUES (2293,'Pretend_Murdered','Pretend Murdered',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,80,NULL,NULL);
+INSERT INTO `item_db` VALUES (2294,'Stellar','Stellar',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,81,NULL,NULL);
+INSERT INTO `item_db` VALUES (2295,'Blinker','Blinker',5,1500,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,82,NULL,'bonus2 bResEff,Eff_Blind,10000;');
+INSERT INTO `item_db` VALUES (2296,'Binoculars','Binoculars',5,20,NULL,100,NULL,1,NULL,NULL,1574920,2,512,NULL,50,83,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (2297,'Goblini_Mask','Goblini Mask',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,513,NULL,NULL,84,NULL,NULL);
+INSERT INTO `item_db` VALUES (2298,'Green_Feeler','Green Feeler',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,85,NULL,NULL);
+INSERT INTO `item_db` VALUES (2299,'Viking_Helm','Viking Helm',5,20,NULL,500,NULL,5,NULL,NULL,414946,2,256,NULL,NULL,86,NULL,NULL);
+INSERT INTO `item_db` VALUES (2301,'Cotton_Shirt','Cotton Shirt',5,10,NULL,100,NULL,1,NULL,NULL,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2302,'Cotton_Shirt_','Cotton Shirt',5,10,NULL,100,NULL,1,NULL,1,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2303,'Leather_Jacket','Leather Jacket',5,200,NULL,200,NULL,2,NULL,NULL,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2304,'Leather_Jacket_','Leather Jacket',5,200,NULL,200,NULL,2,NULL,1,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2305,'Adventure_Suit','Adventurers Suit',5,1000,NULL,300,NULL,3,NULL,NULL,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2306,'Adventure_Suit_','Adventurers Suit',5,1000,NULL,300,NULL,3,NULL,1,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2307,'Mantle','Mantle',5,10000,NULL,600,NULL,4,NULL,NULL,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2308,'Mantle_','Mantle',5,10000,NULL,600,NULL,4,NULL,1,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2309,'Coat','Coat',5,22000,NULL,1200,NULL,5,NULL,NULL,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2310,'Coat_','Coat',5,22000,NULL,1200,NULL,5,NULL,1,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2311,'Mink_Coat','Mink Coat',5,50000,NULL,2300,NULL,6,NULL,1,10477567,2,16,NULL,30,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2312,'Padded_Armor','Padded Armor',5,48000,NULL,2800,NULL,7,NULL,NULL,414946,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2313,'Padded_Armor_','Padded Armor',5,48000,NULL,2800,NULL,7,NULL,1,414946,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2314,'Chain_Mail','Chain Mail',5,65000,NULL,3300,NULL,8,NULL,NULL,414946,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2315,'Chain_Mail_','Chain Mail',5,65000,NULL,3300,NULL,8,NULL,1,414946,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2316,'Full_Plate','Full Plate',5,80000,NULL,4500,NULL,10,NULL,NULL,16514,2,16,NULL,40,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2317,'Full_Plate_','Full Plate',5,80000,NULL,4500,NULL,10,NULL,1,16514,2,16,NULL,40,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2318,'Clothes_of_the_Lord','Lords Clothes',5,20,NULL,2500,NULL,8,NULL,1,263200,2,16,NULL,70,NULL,NULL,'bonus bMdef,5; bonus bInt,1;');
+INSERT INTO `item_db` VALUES (2319,'Glittering_Clothes','Glittering Jacket',5,20,NULL,2500,NULL,7,NULL,1,10477567,2,16,NULL,60,NULL,NULL,'bonus bMdef,5; bonus2 bAddEffect,Eff_Blind,500;');
+INSERT INTO `item_db` VALUES (2320,'Formal_Suit','Formal Suit',5,20,NULL,300,NULL,5,NULL,1,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2321,'Silk_Robe','Silk Robe',5,8000,NULL,400,NULL,3,NULL,NULL,378806,2,16,NULL,NULL,NULL,NULL,'bonus bMdef,10;');
+INSERT INTO `item_db` VALUES (2322,'Silk_Robe_','Silk Robe',5,8000,NULL,400,NULL,3,NULL,1,378806,2,16,NULL,NULL,NULL,NULL,'bonus bMdef,10;');
+INSERT INTO `item_db` VALUES (2323,'Scapulare','Scapulare',5,6500,NULL,400,NULL,4,NULL,NULL,33040,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2324,'Scapulare_','Scapulare',5,6500,NULL,400,NULL,4,NULL,1,33040,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2325,'Saint_Robe','Saints Robe',5,54000,NULL,600,NULL,6,NULL,NULL,296240,2,16,NULL,NULL,NULL,NULL,'bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (2326,'Saint_Robe_','Saints Robe',5,54000,NULL,600,NULL,6,NULL,1,296240,2,16,NULL,NULL,NULL,NULL,'bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (2327,'Holy_Robe','Holy Robe',5,20,NULL,1700,NULL,7,NULL,NULL,33040,2,16,NULL,60,NULL,NULL,'bonus bMdef,5; bonus2 bSubRace,6,15; bonus2 bSubEle,7,10;');
+INSERT INTO `item_db` VALUES (2328,'Wooden_Mail','Wooden Mail',5,5500,NULL,1000,NULL,4,NULL,NULL,279714,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2329,'Wooden_Mail_','Wooden Mail',5,5500,NULL,1000,NULL,4,NULL,1,279714,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2330,'Tights','Tights',5,71000,NULL,500,NULL,6,NULL,NULL,1574920,2,16,NULL,45,NULL,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (2331,'Tights_','Tights',5,71000,NULL,500,NULL,6,NULL,1,1574920,2,16,NULL,45,NULL,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (2332,'Silver_Robe','Silver Robe',5,7000,NULL,700,NULL,4,NULL,NULL,66052,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2333,'Silver_Robe_','Silver Robe',5,7000,NULL,700,NULL,4,NULL,1,66052,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2334,'Mage_Coat','Mage Coat',5,20,NULL,600,NULL,5,NULL,NULL,66052,2,16,NULL,50,NULL,NULL,'bonus bMdef,5; bonus bInt,1;');
+INSERT INTO `item_db` VALUES (2335,'Thief_Clothes','Thief Clothes',5,74000,NULL,100,NULL,6,NULL,NULL,135232,2,16,NULL,NULL,NULL,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (2336,'Thief_Clothes_','Thief Clothes',5,74000,NULL,100,NULL,6,NULL,1,135232,2,16,NULL,NULL,NULL,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (2337,'Ninja_Suit','Ninja Suit',5,20,NULL,1500,NULL,7,NULL,NULL,135232,2,16,NULL,50,NULL,NULL,'bonus bAgi,1; bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2338,'Wedding_Dress','Wedding Dress',5,43000,NULL,500,NULL,NULL,NULL,NULL,10477566,NULL,16,NULL,NULL,NULL,NULL,'bonus bMdef,15; changebase 22;');
+INSERT INTO `item_db` VALUES (2339,'Pantie','Pantie',5,1000,NULL,100,NULL,4,NULL,NULL,10477567,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2340,'Novice_Breastplate','Novice Breastplate',5,89000,NULL,500,NULL,4,NULL,1,8388609,2,16,NULL,10,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2341,'Legion_Plate_Armor','Legion Plate Armor',5,94000,NULL,5500,NULL,11,NULL,NULL,16384,2,16,NULL,70,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2342,'Legion_Plate_Armor_','Legion Plate Armor',5,94000,NULL,5500,NULL,11,NULL,1,16384,2,16,NULL,70,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2343,'Robe_of_Casting','Casting Robe',5,20,NULL,1100,NULL,5,NULL,NULL,66048,2,16,NULL,75,NULL,NULL,'bonus bCastrate,-3;');
+INSERT INTO `item_db` VALUES (2344,'Armor_of_Fire','Luciass Volcano Armor',5,20,NULL,2200,NULL,4,NULL,NULL,279714,2,16,NULL,45,NULL,NULL,'bonus bDefEle,3;');
+INSERT INTO `item_db` VALUES (2345,'Armor_of_Fire_','Luciass Volcano Armor',5,20,NULL,2200,NULL,4,NULL,1,279714,2,16,NULL,45,NULL,NULL,'bonus bDefEle,3;');
+INSERT INTO `item_db` VALUES (2346,'Armor_of_Water','Sapiens Ocean Armor',5,20,NULL,2200,NULL,4,NULL,NULL,279714,2,16,NULL,45,NULL,NULL,'bonus bDefEle,1;');
+INSERT INTO `item_db` VALUES (2347,'Armor_of_Water_','Sapiens Ocean Armor',5,20,NULL,2200,NULL,4,NULL,1,279714,2,16,NULL,45,NULL,NULL,'bonus bDefEle,1;');
+INSERT INTO `item_db` VALUES (2348,'Armor_of_Wind','Ebeshis Typhoon Armor',5,20,NULL,2200,NULL,4,NULL,NULL,279714,2,16,NULL,45,NULL,NULL,'bonus bDefEle,4;');
+INSERT INTO `item_db` VALUES (2349,'Armor_of_Wind_','Ebeshis Typhoon Armor',5,20,NULL,2200,NULL,4,NULL,1,279714,2,16,NULL,45,NULL,NULL,'bonus bDefEle,4;');
+INSERT INTO `item_db` VALUES (2350,'Armor_of_Land','Kreitoss Earth Armor',5,20,NULL,2200,NULL,4,NULL,NULL,279714,2,16,NULL,45,NULL,NULL,'bonus bDefEle,2;');
+INSERT INTO `item_db` VALUES (2351,'Armor_of_Land_','Kreitoss Earth Armor',5,20,NULL,2200,NULL,4,NULL,1,279714,2,16,NULL,45,NULL,NULL,'bonus bDefEle,2;');
+INSERT INTO `item_db` VALUES (2352,'Armor_For_Novice','Novice Ninja Suit',5,20,NULL,1,NULL,4,NULL,NULL,8388609,2,16,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2401,'Sandals','Sandals',5,400,NULL,200,NULL,1,NULL,NULL,10477567,2,64,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2402,'Sandals_','Sandals',5,400,NULL,200,NULL,1,NULL,1,10477567,2,64,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2403,'Shoes','Shoes',5,3500,NULL,400,NULL,2,NULL,NULL,10477567,2,64,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2404,'Shoes_','Shoes',5,3500,NULL,400,NULL,2,NULL,1,10477567,2,64,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2405,'Boots','Boots',5,18000,NULL,600,NULL,4,NULL,NULL,1989866,2,64,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2406,'Boots_','Boots',5,18000,NULL,600,NULL,4,NULL,1,1989866,2,64,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2407,'Crystal_Pumps','Crystal Pumps',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,NULL,64,NULL,NULL,NULL,NULL,'bonus bMdef,10; bonus bLuk,5;');
+INSERT INTO `item_db` VALUES (2408,'Cuffs','Cuffs',5,5000,NULL,3000,NULL,3,NULL,NULL,10477567,2,64,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2409,'Spiky_Heel','Spiky Heel',5,8500,NULL,600,NULL,2,NULL,NULL,10477567,2,64,NULL,NULL,NULL,NULL,'bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (2410,'Sleipnir','Sleipnir',5,20,NULL,3500,NULL,5,NULL,NULL,10477567,2,64,NULL,94,NULL,NULL,'bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25;');
+INSERT INTO `item_db` VALUES (2411,'Greaves','Greaves',5,48000,NULL,750,NULL,5,NULL,NULL,16512,2,64,NULL,65,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2412,'Greaves_','Greaves',5,48000,NULL,750,NULL,5,NULL,1,16512,2,64,NULL,65,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2413,'Safety_Shoes','Safety Shoes',5,20,NULL,350,NULL,6,NULL,NULL,16514,2,64,NULL,30,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2414,'Sandal_For_Novice','Novice Sandals',5,20,NULL,1,NULL,2,NULL,NULL,8388609,2,64,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2415,'Bunny_Slippers','Bunny Slippers',5,20,NULL,300,NULL,NULL,NULL,NULL,10477567,NULL,64,NULL,NULL,NULL,NULL,'bonus bLuk,3;');
+INSERT INTO `item_db` VALUES (2501,'Hood','Hood',5,1000,NULL,200,NULL,1,NULL,NULL,10477567,2,4,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2502,'Hood_','Hood',5,1000,NULL,200,NULL,1,NULL,1,10477567,2,4,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2503,'Muffler','Muffler',5,5000,NULL,400,NULL,2,NULL,NULL,2088958,2,4,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2504,'Muffler_','Muffler',5,5000,NULL,400,NULL,2,NULL,1,2088958,2,4,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2505,'Manteau','Manteau',5,32000,NULL,600,NULL,4,NULL,NULL,414946,2,4,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2506,'Manteau_','Manteau',5,32000,NULL,600,NULL,4,NULL,1,414946,2,4,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2507,'Cape_Of_Ancient_Lord','Cape of Old Marquess',5,20,NULL,600,NULL,2,NULL,NULL,2088958,2,4,NULL,40,NULL,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (2508,'Ragamuffin_Cape','Ragamuffin Manteau',5,20,NULL,500,NULL,1,NULL,NULL,2088958,2,4,NULL,NULL,NULL,NULL,'bonus bMdef,10; bonus bUnbreakableArmor,0;');
+INSERT INTO `item_db` VALUES (2509,'Manteau_of_Survival','Manteau of Life',5,20,NULL,550,NULL,NULL,NULL,NULL,66052,2,4,NULL,75,NULL,NULL,'bonus bVit,10;');
+INSERT INTO `item_db` VALUES (2510,'Hood_For_Novice','Novice Hood',5,20,NULL,1,NULL,2,NULL,NULL,8388609,2,4,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2511,'Skeleton_Manteau','Skeletons Manteau',5,20,NULL,700,NULL,1,NULL,NULL,2088958,2,4,NULL,75,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2601,'Ring','Ring',5,30000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,20,NULL,NULL,'bonus bStr,2;');
+INSERT INTO `item_db` VALUES (2602,'Earring','Earring',5,30000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,20,NULL,NULL,'bonus bInt,2;');
+INSERT INTO `item_db` VALUES (2603,'Necklace','Necklace',5,30000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,20,NULL,NULL,'bonus bVit,2;');
+INSERT INTO `item_db` VALUES (2604,'Glove','Glove',5,30000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,20,NULL,NULL,'bonus bDex,2;');
+INSERT INTO `item_db` VALUES (2605,'Brooch','Brooch',5,30000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,20,NULL,NULL,'bonus bAgi,2;');
+INSERT INTO `item_db` VALUES (2607,'Clip','Clip',5,30000,NULL,100,NULL,NULL,NULL,1,10477567,2,136,NULL,NULL,NULL,NULL,'bonus bMaxSP,10;');
+INSERT INTO `item_db` VALUES (2608,'Rosary','Rosary',5,15000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,20,NULL,NULL,'bonus bMdef,5; bonus bLuk,2;');
+INSERT INTO `item_db` VALUES (2609,'Skull_Ring','Skull Ring',5,10000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2610,'Gold_Ring','Gold Ring',5,30000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2611,'Silver_Ring','Silver Ring',5,20000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2612,'Flower_Ring','Flower Ring',5,1500,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2613,'Diamond_Ring','Diamond Ring',5,45000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2614,'Eye_of_Dullahan','Eye of Dullahan',5,90000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,50,NULL,NULL,'bonus2 bResEff,Eff_Poison,1000; bonus2 bResEff,Eff_Curse,1000; bonus2 bResEff,Eff_Silence,1000; bonus2 bResEff,Eff_Confusion,1000; bonus2 bResEff,Eff_Blind,1000;');
+INSERT INTO `item_db` VALUES (2615,'Safety_Ring','Safety Ring',5,75000,NULL,100,NULL,3,NULL,NULL,10477567,2,136,NULL,40,NULL,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (2616,'Critical_Ring','Critical Ring',5,75000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,40,NULL,NULL,'bonus bCritical,5;');
+INSERT INTO `item_db` VALUES (2617,'Celebrants_Mitten','Celebrants Mitten',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,136,NULL,35,NULL,NULL,'bonus bInt,1;');
+INSERT INTO `item_db` VALUES (2618,'Matyrs_Leash','Matyrs Leash',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,136,NULL,35,NULL,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (2619,'Thimble_Of_Archer','Bow Thimble',5,30000,NULL,100,NULL,NULL,NULL,NULL,1574920,2,136,NULL,65,NULL,NULL,'bonus bLongAtkRate,10;');
+INSERT INTO `item_db` VALUES (2620,'Ring_Of_Rogue','Rogues Treasure',5,30000,NULL,100,NULL,NULL,NULL,NULL,135232,2,136,NULL,70,NULL,NULL,'bonus bAddStealRate,100;');
+INSERT INTO `item_db` VALUES (2621,'Ring_','Ancient Ring',5,30000,NULL,200,NULL,NULL,NULL,1,10477567,2,136,NULL,90,NULL,NULL,'bonus bStr,1;');
+INSERT INTO `item_db` VALUES (2622,'Earring_','Ancient Earring',5,30000,NULL,200,NULL,NULL,NULL,1,10477567,2,136,NULL,90,NULL,NULL,'bonus bInt,1;');
+INSERT INTO `item_db` VALUES (2623,'Necklace_','Ancient Necklace',5,30000,NULL,200,NULL,NULL,NULL,1,10477567,2,136,NULL,90,NULL,NULL,'bonus bVit,1;');
+INSERT INTO `item_db` VALUES (2624,'Glove_','Ancient Glove',5,30000,NULL,200,NULL,NULL,NULL,1,10477567,2,136,NULL,90,NULL,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (2625,'Brooch_','Ancient Brooch',5,30000,NULL,200,NULL,NULL,NULL,1,10477567,2,136,NULL,90,NULL,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (2626,'Rosary_','Ancient Rosary',5,15000,NULL,200,NULL,NULL,NULL,1,10477567,2,136,NULL,90,NULL,NULL,'bonus bMdef,3; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (2627,'Belt','Ancient Belt',5,20000,NULL,1200,NULL,NULL,NULL,1,10477567,2,136,NULL,25,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2628,'Novice_Armlet','Novice Armlet',5,400,NULL,200,NULL,NULL,NULL,1,8388609,2,136,NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bInt,1; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (2629,'Megingjard','Megingjard',5,20,NULL,8000,NULL,2,NULL,NULL,10477567,2,136,NULL,94,NULL,NULL,'bonus bStr,40; bonus bMdef,7;');
+INSERT INTO `item_db` VALUES (2630,'Brisingamen','Brisingamen',5,20,NULL,1500,NULL,1,NULL,NULL,10477567,2,136,NULL,94,NULL,NULL,'bonus bStr,6; bonus bAgi,6; bonus bVit,6; bonus bInt,6; bonus bLuk,10; bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (2631,'Celebration_Ring','Celebration Ring',5,20,NULL,10,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,'bonus bStr,2; bonus bAgi,2; bonus bVit,2; bonus bInt,2; bonus bDex,2; bonus bLuk,2;');
+INSERT INTO `item_db` VALUES (2634,'Wedding_Ring_M','Wedding Ring',4,20,NULL,0,NULL,NULL,NULL,NULL,10477567,1,136,NULL,NULL,NULL,NULL,'skill 334,1; skill 335,1; skill 336,1;');
+INSERT INTO `item_db` VALUES (2635,'Wedding_Ring_F','Wedding Ring',4,20,NULL,0,NULL,NULL,NULL,NULL,10477567,NULL,136,NULL,NULL,NULL,NULL,'skill 334,1; skill 335,1; skill 336,1;');
+INSERT INTO `item_db` VALUES (2636,'Gold_Christmas_Ring','Gold Xmas Ring',5,20,NULL,0,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2637,'Silver_Christmas_Ring','Silver Xmas Ring',5,20,NULL,0,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2638,'Exorcize_Sachet','Sacred Incense',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (2639,'Purification_Sachet','Occult Incense',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus bInt,1;');
+INSERT INTO `item_db` VALUES (2640,'Kafra_Ring','Kafra Ring',5,20,NULL,200,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bAgi,1; bonus bInt,1; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (2641,'Fashion_Hip_Sack','Fashion Hip Sack',5,20,NULL,700,NULL,NULL,NULL,NULL,263200,2,136,NULL,50,NULL,NULL,'bonus bStr,2;');
+INSERT INTO `item_db` VALUES (2642,'Celines_Ring','Celines Ring',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2643,'Celines_Ring_','Celines Ring',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (2644,'The_Sign_','The Sign',5,20,NULL,0,NULL,NULL,NULL,NULL,10477567,2,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4001,'Poring_Card','Poring Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bLuk,2; bonus bFlee2,1;');
+INSERT INTO `item_db` VALUES (4002,'Fabre_Card','Fabre Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bVit,1; bonus bMaxHP,100;');
+INSERT INTO `item_db` VALUES (4003,'Pupa_Card','Pupa Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bMaxHP,700;');
+INSERT INTO `item_db` VALUES (4004,'Drops_Card','Drops Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bDex,1; bonus bHit,3;');
+INSERT INTO `item_db` VALUES (4005,'Santa_Poring_Card','Santa Poring Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,7,20;');
+INSERT INTO `item_db` VALUES (4006,'Lunatic_Card','Lunatic Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bLuk,1; bonus bCritical,1; bonus bFlee2,1;');
+INSERT INTO `item_db` VALUES (4007,'Pecopeco_Egg_Card','Pecopeco Egg Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,0,20;');
+INSERT INTO `item_db` VALUES (4008,'Picky_Card','Picky Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bBaseAtk,10;');
+INSERT INTO `item_db` VALUES (4009,'Chonchon_Card','Chonchon Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus bFlee,2;');
+INSERT INTO `item_db` VALUES (4010,'Wilow_Card','Wilow Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bMaxSP,80;');
+INSERT INTO `item_db` VALUES (4011,'Picky__Card','Picky Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bVit,1; bonus bMaxHP,100;');
+INSERT INTO `item_db` VALUES (4012,'Thief_Bug_Egg_Card','Thief Bug Egg Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bMaxHP,400;');
+INSERT INTO `item_db` VALUES (4013,'Andre_Egg_Card','Andre Egg Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bMaxHPrate,5;');
+INSERT INTO `item_db` VALUES (4014,'Roda_Frog_Card','Roda Frog Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bMaxHP,400; bonus bMaxSP,50;');
+INSERT INTO `item_db` VALUES (4015,'Condor_Card','Condor Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bFlee,10;');
+INSERT INTO `item_db` VALUES (4016,'Thief_Bug_Card','Thief Bug Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (4017,'Savage_Babe_Card','Savage Babe Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Stan,500;');
+INSERT INTO `item_db` VALUES (4018,'Andre_Larva_Card','Andre Larva Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bInt,1; bonus bMaxSP,10;');
+INSERT INTO `item_db` VALUES (4019,'Hornet_Card','Hornet Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bBaseAtk,3;');
+INSERT INTO `item_db` VALUES (4020,'Farmiliar_Card','Farmiliar Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Blind,500; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4021,'Rocker_Card','Rocker Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (4022,'Spore_Card','Spore Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bVit,2;');
+INSERT INTO `item_db` VALUES (4023,'Desert_Wolf_Babe_Card','Desert Wolf Babe Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bInt,1;');
+INSERT INTO `item_db` VALUES (4024,'Plankton_Card','Plankton Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Sleep,500; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4025,'Skeleton_Card','Skeleton Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bBaseAtk,10; bonus2 bAddEff,Eff_Stan,200;');
+INSERT INTO `item_db` VALUES (4026,'Thief_bug_Female_Card','Thief bug Female Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus bFlee,1;');
+INSERT INTO `item_db` VALUES (4027,'Kukre_Card','Kukre Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bAgi,2;');
+INSERT INTO `item_db` VALUES (4028,'Tarou_Card','Tarou Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bStr,2;');
+INSERT INTO `item_db` VALUES (4029,'Wolf_Card','Wolf Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bBaseAtk,15; bonus bCritical,1;');
+INSERT INTO `item_db` VALUES (4030,'Mandragora_Card','Mandragora Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,4,20;');
+INSERT INTO `item_db` VALUES (4031,'Pecopeco_Card','Pecopeco Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bMaxHPrate,10;');
+INSERT INTO `item_db` VALUES (4032,'Ambernite_Card','Ambernite Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bDef,2;');
+INSERT INTO `item_db` VALUES (4033,'Poporing_Card','Poporing Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 53,1;');
+INSERT INTO `item_db` VALUES (4034,'Worm_Tail_Card','Worm Tail Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bDex,2;');
+INSERT INTO `item_db` VALUES (4035,'Hydra_Card','Hydra Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,7,20;');
+INSERT INTO `item_db` VALUES (4036,'Muka_Card','Muka Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bHPrecovRate,10;');
+INSERT INTO `item_db` VALUES (4037,'Snake_Card','Snake Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Poison,500; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4038,'Zombie_Card','Zombie Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bHPrecovRate,20;');
+INSERT INTO `item_db` VALUES (4039,'Stainer_Card','Stainer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Silence,2000; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4040,'Creamy_Card','Creamy Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 26,1;');
+INSERT INTO `item_db` VALUES (4041,'Coco_Card','Coco Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Sleep,2000; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4042,'Steel_Chonchon_Card','Steel Chonchon Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bSubEle,4,10; bonus bDef,2;');
+INSERT INTO `item_db` VALUES (4043,'Andre_Card','Andre Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bBaseAtk,20;');
+INSERT INTO `item_db` VALUES (4044,'Smokie_Card','Smokie Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 51,1;');
+INSERT INTO `item_db` VALUES (4045,'Horn_Card','Horn Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bLongAtkDef,35;');
+INSERT INTO `item_db` VALUES (4046,'Martin_Card','Martin Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Blind,2000; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4047,'Ghostring_Card','Ghostring Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,8; bonus bHPrecovRate,-25;');
+INSERT INTO `item_db` VALUES (4048,'Poison_Spore_Card','Poison Spore Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 52,3;');
+INSERT INTO `item_db` VALUES (4049,'Vadon_Card','Vadon Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,3,20;');
+INSERT INTO `item_db` VALUES (4050,'Thief_bug_Male_Card','Thief bug Male Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bAgi,2;');
+INSERT INTO `item_db` VALUES (4051,'Yoyo_Card','Yoyo Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bFlee2,5; bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (4052,'Elder_Wilow_Card','Elder Wilow Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bInt,2;');
+INSERT INTO `item_db` VALUES (4053,'Vitata_Card','Vitata Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 28,1; bonus bUseSPrate,25;');
+INSERT INTO `item_db` VALUES (4054,'Angeling_Card','Angeling Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,6;');
+INSERT INTO `item_db` VALUES (4055,'Marina_Card','Marina Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Freeze,500; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4056,'Dustiness_Card','Dustiness Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,4,30; bonus bFlee,5;');
+INSERT INTO `item_db` VALUES (4057,'Metaller_Card','Metaller Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Silence,500; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4058,'Thara_Frog_Card','Thara Frog Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,7,30;');
+INSERT INTO `item_db` VALUES (4059,'Soldier_Andre_Card','Soldier Andre Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,3,30;');
+INSERT INTO `item_db` VALUES (4060,'Goblin_Card','Goblin Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,2,20;');
+INSERT INTO `item_db` VALUES (4061,'Cornutus_Card','Cornutus Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bUnbreakableWeapon,0; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4062,'Anacondaq_Card','Anacondaq Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,5,20;');
+INSERT INTO `item_db` VALUES (4063,'Caramel_Card','Caramel Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,4,20;');
+INSERT INTO `item_db` VALUES (4064,'Zerom_Card','Zerom Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bDex,3;');
+INSERT INTO `item_db` VALUES (4065,'Kaho_Card','Kaho Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,2,20;');
+INSERT INTO `item_db` VALUES (4066,'Orc_Warrior_Card','Orc Warrior Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,2,30;');
+INSERT INTO `item_db` VALUES (4067,'Megalodon_Card','Megalodon Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Freeze,2000; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4068,'Scorpion_Card','Scorpion Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,3,20;');
+INSERT INTO `item_db` VALUES (4069,'Drainliar_Card','Drainliar Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,1,20;');
+INSERT INTO `item_db` VALUES (4070,'Eggyra_Card','Eggyra Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bSPrecovRate,15;');
+INSERT INTO `item_db` VALUES (4071,'Orc_Zombie_Card','Orc Zombie Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,9,30; bonus bFlee,5;');
+INSERT INTO `item_db` VALUES (4072,'Golem_Card','Golem Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bUnbreakableWeapon,0; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4073,'Pirate_Skel_Card','Pirate Skel Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 37,5;');
+INSERT INTO `item_db` VALUES (4074,'BigFoot_Card','BigFoot Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,4,30;');
+INSERT INTO `item_db` VALUES (4075,'Argos_Card','Argos Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Stone,2000; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4076,'Magnolia_Card','Magnolia Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Curse,500; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4077,'Phen_Card','Phen Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bNoCastCancel,0; bonus bDelayrate,25;');
+INSERT INTO `item_db` VALUES (4078,'Savage_Card','Savage Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bVit,3;');
+INSERT INTO `item_db` VALUES (4079,'Mantis_Card','Mantis Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bStr,3;');
+INSERT INTO `item_db` VALUES (4080,'Flora_Card','Flora Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,5,20;');
+INSERT INTO `item_db` VALUES (4081,'Hode_Card','Hode Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,2,30; bonus bFlee,5;');
+INSERT INTO `item_db` VALUES (4082,'Desert_Wolf_Card','Desert Wolf Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddSize,0,15; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4083,'Rafflesia_Card','Rafflesia Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,5,30;');
+INSERT INTO `item_db` VALUES (4084,'Marine_Sphere_Card','Marine Sphere Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 7,3;');
+INSERT INTO `item_db` VALUES (4085,'Orc_Skeleton_Card','Orc Skeleton Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,6,20;');
+INSERT INTO `item_db` VALUES (4086,'Soldier_Skeleton_Card','Soldier Skeleton Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritical,9;');
+INSERT INTO `item_db` VALUES (4087,'Giearth_Card','Giearth Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Confusion,10000; bonus2 bSubEle,2,15;');
+INSERT INTO `item_db` VALUES (4088,'Frilldora_Card','Frilldora Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'skill 135,1;');
+INSERT INTO `item_db` VALUES (4089,'Sword_Fish_Card','Sword Fish Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,1; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4090,'Munak_Card','Munak Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Stone,1500; bonus2 bSubEle,2,5; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4091,'Kobold_Card','Kobold Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bCritical,4;');
+INSERT INTO `item_db` VALUES (4092,'Skel_Worker_Card','Skel Worker Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddSize,1,15; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4093,'Obeaune_Card','Obeaune Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 35,1;');
+INSERT INTO `item_db` VALUES (4094,'Archer_Skeleton_Card','Archer Skeleton Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bLongAtkRate,10;');
+INSERT INTO `item_db` VALUES (4095,'Marse_Card','Marse Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,1,30;');
+INSERT INTO `item_db` VALUES (4096,'Zenorc_Card','Zenorc Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Poison,400; bonus bBaseAtk,10;');
+INSERT INTO `item_db` VALUES (4097,'Matyr_Card','Matyr Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bMaxHPrate,10; bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (4098,'Dokebi_Card','Dokebi Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,4; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4099,'Pasana_Card','Pasana Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,3; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4100,'Sohee_Card','Sohee Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bMaxSPrate,15; bonus bSPrecovRate,3;');
+INSERT INTO `item_db` VALUES (4101,'Sand_Man_Card','Sand Man Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,2; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4102,'Whisper_Card','Whisper Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bFlee,20; bonus2 bSubEle,8,-50;');
+INSERT INTO `item_db` VALUES (4103,'Horong_Card','Horong Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 10,1;');
+INSERT INTO `item_db` VALUES (4104,'Requiem_Card','Requiem Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Confusion,500;');
+INSERT INTO `item_db` VALUES (4105,'Marc_Card','Marc Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bSubEle,1,5; bonus2 bResEff,Eff_Freeze,10000;');
+INSERT INTO `item_db` VALUES (4106,'Mummy_Card','Mummy Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bHit,20;');
+INSERT INTO `item_db` VALUES (4107,'Verit_Card','Verit Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bMaxHPrate,8; bonus bMaxSPrate,8;');
+INSERT INTO `item_db` VALUES (4108,'Myst_Card','Myst Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,5,30; bonus bFlee,5;');
+INSERT INTO `item_db` VALUES (4109,'Jakk_Card','Jakk Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,3,30; bonus bFlee,5;');
+INSERT INTO `item_db` VALUES (4110,'Ghoul_Card','Ghoul Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Poison,2000; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4111,'Strouf_Card','Strouf Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,6,20;');
+INSERT INTO `item_db` VALUES (4112,'Marduk_Card','Marduk Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Silence,10000; bonus bDelayrate,-5;');
+INSERT INTO `item_db` VALUES (4113,'Marionette_Card','Marionette Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,8,30; bonus bFlee,5;');
+INSERT INTO `item_db` VALUES (4114,'Argiope_Card','Argiope Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,5; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4115,'Hunter_Fly_Card','Hunter Fly Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bHpDrainRate,3,15;');
+INSERT INTO `item_db` VALUES (4116,'Isis_Card','Isis Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,7,30; bonus bFlee,5;');
+INSERT INTO `item_db` VALUES (4117,'Side_Winder_Card','Side Winder Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bDoubleRate,5;');
+INSERT INTO `item_db` VALUES (4118,'Petit_Card','Petit Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,9,20;');
+INSERT INTO `item_db` VALUES (4119,'Bathory_Card','Bathory Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,7;');
+INSERT INTO `item_db` VALUES (4120,'Petit__Card','Petit Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,9,30;');
+INSERT INTO `item_db` VALUES (4121,'Phreeoni_Card','Phreeoni Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bHit,100;');
+INSERT INTO `item_db` VALUES (4122,'Deviruchi_Card','Deviruchi Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bStr,1; bonus2 bResEff,Eff_Blind,10000;');
+INSERT INTO `item_db` VALUES (4123,'Eddga_Card','Eddga Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bInfiniteEndure,0; bonus bMaxHPrate,-25;');
+INSERT INTO `item_db` VALUES (4124,'Medusa_Card','Medusa Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,6,15; bonus2 bResEff,Eff_Stone,10000;');
+INSERT INTO `item_db` VALUES (4125,'Deviace_Card','Deviace Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,7,7; bonus2 bAddRace,2,7; bonus2 bAddRace,3,7; bonus2 bAddRace,4,7;');
+INSERT INTO `item_db` VALUES (4126,'Minorous_Card','Minorous Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddSize,2,15; bonus bBaseAtk,5;');
+INSERT INTO `item_db` VALUES (4127,'Nightmare_Card','Nightmare Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Sleep,10000; bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (4128,'Golden_Bug_Card','Golden Bug Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bNoMagicDamage,0; bonus bUseSPrate,100;');
+INSERT INTO `item_db` VALUES (4129,'Baphomet__Card','Baphomet Jr Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bAgi,3; bonus bCritical,1;');
+INSERT INTO `item_db` VALUES (4130,'Scorpion_King_Card','Scorpion King Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,9,20;');
+INSERT INTO `item_db` VALUES (4131,'Moonlight_Flower_Card','Moonlight Flower Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bSpeedRate,25;');
+INSERT INTO `item_db` VALUES (4132,'Mistress_Card','Mistress Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bNoGemStone,0; bonus bUseSPrate,25;');
+INSERT INTO `item_db` VALUES (4133,'Raydric_Card','Raydric Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,0,20;');
+INSERT INTO `item_db` VALUES (4134,'Dracula_Card','Dracula Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bSpDrainRate,1,5;');
+INSERT INTO `item_db` VALUES (4135,'Orc_Lord_Card','Orc Lord Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bShortWeaponDamageReturn,30;');
+INSERT INTO `item_db` VALUES (4136,'Khalitzburg_Card','Khalitzburg Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,6,30;');
+INSERT INTO `item_db` VALUES (4137,'Drake_Card','Drake Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bNoSizeFix,0;');
+INSERT INTO `item_db` VALUES (4138,'Anubis_Card','Anubis Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,8,30;');
+INSERT INTO `item_db` VALUES (4139,'Joker_Card','Joker Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'skill 50,1;');
+INSERT INTO `item_db` VALUES (4140,'Knight_Of_Abyss_Card','Knight Of Abyss Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace,10,25;');
+INSERT INTO `item_db` VALUES (4141,'Evil_Druid_Card','Evil Druid Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDefEle,9; bonus bInt,1; bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4142,'Doppelganger_Card','Doppelganger Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAspdRate,15;');
+INSERT INTO `item_db` VALUES (4143,'Orc_Hero_Card','Orc Hero Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bVit,3; bonus2 bResEff,Eff_Stan,10000;');
+INSERT INTO `item_db` VALUES (4144,'Osiris_Card','Osiris Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bRestartFullRecover,0;');
+INSERT INTO `item_db` VALUES (4145,'Berzebub_Card','Berzebub Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bDelayrate,-30; bonus bMaxSPrate,-15; bonus bMaxHPrate,-5;');
+INSERT INTO `item_db` VALUES (4146,'Maya_Card','Maya Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bMagicDamageReturn,30;');
+INSERT INTO `item_db` VALUES (4147,'Baphomet_Card','Baphomet Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bHit,-10; bonus bSplashRange,1;');
+INSERT INTO `item_db` VALUES (4148,'Pharaoh_Card','Pharaoh Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bUseSPrate,-30;');
+INSERT INTO `item_db` VALUES (4149,'Gargoyle_Card','Gargoyle Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4150,'Goat_Card','Goat Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDef,2; bonus bMdef,5+5*(getrefine>=6);');
+INSERT INTO `item_db` VALUES (4151,'Gajomart_Card','Gajomart Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,3,-20;');
+INSERT INTO `item_db` VALUES (4152,'Galapago_Card','Galapago Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4153,'Crab_Card','Crab Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAtk,5; bonus2 bAddDamageClass,1266,30; bonus2 bAddEle,4,30; if(cardscnt(4247)&&cardscnt(4273)) bonus3 bAddMonsterDropItem,544,5,3000;');
+INSERT INTO `item_db` VALUES (4154,'Dumpling_Child_Card','Dumpling Child Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4155,'Goblin_Leader_Card','Goblin Leader Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace2,1,30;');
+INSERT INTO `item_db` VALUES (4156,'Goblin_Rider_Card','Goblin Steam Rider Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,0,7;');
+INSERT INTO `item_db` VALUES (4157,'Goblin_Archer_Card','Goblin Archer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,1,7;');
+INSERT INTO `item_db` VALUES (4158,'Sky_Deleter_Card','Sky Deleter Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bNoRegen,1; bonus bHPGainValue,100;');
+INSERT INTO `item_db` VALUES (4159,'Nine_Tail_Card','Nine Tail Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bAgi,2; if(getrefine>8) bonus bFlee,20;');
+INSERT INTO `item_db` VALUES (4160,'Firelock_Soldier_Card','Firelock Soldier Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bStr,2; if(getrefine<=8) end; bonus bMaxHPrate,10; bonus bMaxSPrate,10;');
+INSERT INTO `item_db` VALUES (4161,'Grand_Peco_Card','Grand Peco Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,75,1,1,0; if(!isequipped(4031)) end; bonus bDef,3; bonus bVit,3;');
+INSERT INTO `item_db` VALUES (4162,'Grizzly_Card','Grizzly Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDef,2; if(isequipped(4074)) bonus2 bAddEffWhenHit,Eff_Blind,3000;');
+INSERT INTO `item_db` VALUES (4163,'Gryphon_Card','Gryphon Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bFlee,2; bonus bCritical,7; if (callfunc("Is_Sword_Class")!=0) bonus3 bAutoSpell,62,5,1;');
+INSERT INTO `item_db` VALUES (4164,'Gullinbursti_Card','Gullinbursti Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,5,-20;');
+INSERT INTO `item_db` VALUES (4165,'Gig_Card','Gig Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4166,'Nightmare_Terror_Card','Nightmare Terror Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDef,2; if(isequipped(4127)) bonus2 bAddEffWhenHit,Eff_Curse,3000;');
+INSERT INTO `item_db` VALUES (4167,'Nereid_Card','Neraid Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4168,'Dark_Lord_Card','Dark Lord Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,83,5,1,0; if(!isequipped(4169)) end; bonus bMaxHPrate,20; bonus bMaxSPrate,20;');
+INSERT INTO `item_db` VALUES (4169,'Dark_Illusion_Card','Dark Illusion Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bMaxHPrate,-10; bonus bMaxSPrate,-10; if(isequipped(4168)) goto D_LORD; bonus bDelayrate,-10; end; D_LORD: bonus bDelayrate,-20;');
+INSERT INTO `item_db` VALUES (4170,'Dark_Frame_Card','Dark Frame Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Stone,2000;');
+INSERT INTO `item_db` VALUES (4171,'Dark_Priest_Card','Dark Priest Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus3 bSPDrainRate,3,10,1; if(BaseJob==Job_Sage) bonus bSPGainValue,1;');
+INSERT INTO `item_db` VALUES (4172,'The_Paper_Card','The Paper Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,15; if(BaseJob==Job_Assassin) bonus bCritical,4;');
+INSERT INTO `item_db` VALUES (4173,'Demon_Pungus_Card','Demon Pungus Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Sleep,2000;');
+INSERT INTO `item_db` VALUES (4174,'Deviling_Card','Deviling Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,1,-50; bonus2 bSubEle,2,-50; bonus2 bSubEle,3,-50; bonus2 bSubEle,4,-50; bonus2 bSubEle,0,50;');
+INSERT INTO `item_db` VALUES (4175,'Poisonous_Toad_Card','Poisonous Toad Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,52,1,2;');
+INSERT INTO `item_db` VALUES (4176,'Dullahan_Card','Dullahan Card',6,20,10,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,9,7;');
+INSERT INTO `item_db` VALUES (4177,'Dryad_Card','Dryad Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bSubEle,2,10;');
+INSERT INTO `item_db` VALUES (4178,'Dragon_Tail_Card','Dragon Tail Card',6,20,NULL,10,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;');
+INSERT INTO `item_db` VALUES (4179,'Dragon_Fly_Card','Dragon Fly Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bAgi,1; if(isequipped(4009)) bonus bFlee,18;');
+INSERT INTO `item_db` VALUES (4180,'Driller_Card','Driller Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4181,'Disguise_Card','Disguise Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(readparam(bVit)<=77) bonus2 bAddEffWhenHit,Eff_Silence,1000; if(readparam(bVit)>77) bonus2 bAddEffWhenHit,Eff_Silence,3000;');
+INSERT INTO `item_db` VALUES (4182,'Diabolic_Card','Diabolic Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4183,'Vagabond_Wolf_Card','Vagabond Wolf Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bStr,1; if(isequipped(4029)) bonus bFlee,18;');
+INSERT INTO `item_db` VALUES (4184,'Lava_Golem_Card','Lava Golem Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace2,4,30;');
+INSERT INTO `item_db` VALUES (4185,'Rideword_Card','Rideword Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bInt,1; if(callfunc("Is_Holy_Class")) bonus bMdef,1;');
+INSERT INTO `item_db` VALUES (4186,'Raggler_Card','Raggler Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bVit,1;');
+INSERT INTO `item_db` VALUES (4187,'Raydric_Archer_Card','Raydric Archer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4188,'Leib_Olmai_Card','Leib Olmai Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bSubEle,3,10;');
+INSERT INTO `item_db` VALUES (4189,'Wraith_Dead_Card','Wraith Dead Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Curse,2000;');
+INSERT INTO `item_db` VALUES (4190,'Wraith_Card','Wraith Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4191,'Loli_Ruri_Card','Loli Ruri Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,28,3,5,0;');
+INSERT INTO `item_db` VALUES (4192,'Rotar_Zairo_Card','Rotar Zairo Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,5,7;');
+INSERT INTO `item_db` VALUES (4193,'Lude_Card','Lude Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'if(Class==Job_Novice||Class==Job_Super_Novice||Class==4001) bonus3 bAutoSpellWhenHit,8,1,20; if(isequipped(4294)) bonus bMaxHP,300;');
+INSERT INTO `item_db` VALUES (4194,'Rybio_Card','Rybio Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(readparam(bDex)<=77) bonus2 bAddEffWhenHit,Eff_Stan,1000; if(readparam(bDex)>77) bonus2 bAddEffWhenHit,Eff_Stan,3000;');
+INSERT INTO `item_db` VALUES (4195,'Leaf_Cat_Card','Leaf Cat Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bSubEle,1,10;');
+INSERT INTO `item_db` VALUES (4196,'Marin_Card','Marin Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4197,'Mastering_Card','Mastering Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bLuk,1; if(isequipped(4001)) bonus bFlee,18;');
+INSERT INTO `item_db` VALUES (4198,'Maya_Purple_Card','Maya Purple Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4199,'Merman_Card','Merman Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bHPrecovRate,10; bonus bSPrecovRate,10;');
+INSERT INTO `item_db` VALUES (4200,'Megalith_Card','Megalith Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'if(getrefine<6) bonus bMdef,7;');
+INSERT INTO `item_db` VALUES (4201,'Majoruros_Card','Majoruros Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Stan,2000;');
+INSERT INTO `item_db` VALUES (4202,'Civil_Servant_Card','Civil Servant Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddEle,8,20;');
+INSERT INTO `item_db` VALUES (4203,'Mutant_Dragonoid_Card','Mutant Dragonoid Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAtk,15; if(getskilllv(17)==10) goto FB_10; bonus3 bAutoSpell,17,3,1; end; FB_10: bonus3 bAutoSpell,17,10,25;');
+INSERT INTO `item_db` VALUES (4204,'Mini_Demon_Card','Mini Demon Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,2,-20;');
+INSERT INTO `item_db` VALUES (4205,'Mimic_Card','Mimic Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4206,'Myst_Case_Card','Mystcase Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4207,'Mysteltainn_Card','Mysteltainn Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubSize,0,30;');
+INSERT INTO `item_db` VALUES (4208,'Miyabi_Ningyo_Card','Miyabi Ningyo Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bMaxSPrate,10; bonus2 bSkillAtk,15,5;');
+INSERT INTO `item_db` VALUES (4209,'Violy_Card','Violy Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'if(getskilllv(318)==5) goto FJ_5; bonus3 bAutoSpell,318,1,1; end; FJ_5: bonus3 bAutoSpell,318,5,1;');
+INSERT INTO `item_db` VALUES (4210,'Wanderer_Card','Wanderer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,219,1,1; if(callfunc("Is_Thief_Class")) bonus bFlee,20;');
+INSERT INTO `item_db` VALUES (4211,'Vocal_Card','Vocal Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bMdef,3; if(isequipped(4021)) bonus bFlee,18;');
+INSERT INTO `item_db` VALUES (4212,'Bongun_Card','Bongun Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,5,1,1; bonus2 bAddDamageByClass,1026,100;');
+INSERT INTO `item_db` VALUES (4213,'Brilight_Card','Brilight Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Silence,2000;');
+INSERT INTO `item_db` VALUES (4214,'Bloody_Murderer_Card','Bloody Murderer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,4,7;');
+INSERT INTO `item_db` VALUES (4215,'Blazer_Card','Blazer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4216,'Sasquatch_Card','Sasquatch Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Freeze,2000;');
+INSERT INTO `item_db` VALUES (4217,'Enchanted_Peach_Tree_Card','Enchanted Peach Tree Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'if(getskilllv(28)==10) goto HE_10; bonus3 bAutoSpell,28,1,1; end; HE_10: bonus3 bAutoSpell,28,10,1;');
+INSERT INTO `item_db` VALUES (4218,'Succubus_Card','Succubus Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bMaxHP,1000; if(isequipped(4268)) goto L_INCUB; bonus bVit,-3; bonus bHPrecovRate,-20; end; L_INCUB: bonus bVit,4; bonus bHPrecovRate,30;');
+INSERT INTO `item_db` VALUES (4219,'Sage_Worm_Card','Sage Worm Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4220,'Solider_Card','Solider Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDef,2; bonus bMdef,2;');
+INSERT INTO `item_db` VALUES (4221,'Skeleton_General_Card','Skeleton General Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,4,-20;');
+INSERT INTO `item_db` VALUES (4222,'Skeleton_Prisoner_Card','Skel Prisoner Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDef,2; if(isequipped(4025)) bonus2 bAddEffWhenHit,Eff_Sleep,3000;');
+INSERT INTO `item_db` VALUES (4223,'Stalactic_Golem_Card','Stalactic Golem Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bDef,1; bonus2 bResEff,Eff_Stan,2000;');
+INSERT INTO `item_db` VALUES (4224,'Stem_Worm_Card','Stem Worm Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4225,'Stone_Shooter_Card','Stone Shooter Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAtk,10; bonus bHit,10;');
+INSERT INTO `item_db` VALUES (4226,'Sting_Card','Sting Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bDef,2; if(getrefine>8) bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (4227,'Spring_Rabbit_Card','Spring Rabbit Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4228,'Sleeper_Card','Sleeper Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4229,'Clock_Tower_Manager_Card','Clock Tower Manager Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bInt,1; bonus bDelayrate,-5; if(!isequipped(4244,4299,4313)) end; bonus bDef,3; bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (4230,'Shinobi_Card','Shinobi Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus4 bAutoSpellWhenHit,135,5,1,0;');
+INSERT INTO `item_db` VALUES (4231,'Increase_Soil_Card','Increase Soil Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4232,'Hermit_Plant_Card','Hermit Plant Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4233,'Baby_Leopard_Card','Baby Leopard Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bLuk,3; if(!callfunc("Is_Merc_Class")) end; bonus bUnbreakableArmor,0; bonus bUnstrippable,0;');
+INSERT INTO `item_db` VALUES (4234,'Anolian_Card','Anolian Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(getskilllv(45)==10) goto IC_10; bonus4 bAutoSpellWhenHit,45,1,1,0; end; IC_10: bonus4 bAutoSpellWhenHit,45,10,1,0;');
+INSERT INTO `item_db` VALUES (4235,'Cookie_Xmas_Card','Cookie Xmas Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,8,-20;');
+INSERT INTO `item_db` VALUES (4236,'Amon_Ra_Card','Amon Ra Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bAllStats,1; bonus bDef,1; bonus bMdef,1; bonus4 bAutoSpellWhenHit,73,10,1+(readparam(bInt)>=99),0;');
+INSERT INTO `item_db` VALUES (4237,'Owl_Duke_Card','Owl Duke Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,66,3,1; if(isequipped(4238)) bonus3 bAutoSpell,20,5,1;');
+INSERT INTO `item_db` VALUES (4238,'Owl_Baron_Card','Owl Baron Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,78,1,1;');
+INSERT INTO `item_db` VALUES (4239,'Iron_Fist_Card','Iron Fist Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,0,-20;');
+INSERT INTO `item_db` VALUES (4240,'Arclouze_Card','Arclouze Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bDef,2; bonus bMdef,3+2*(getrefine>=6);');
+INSERT INTO `item_db` VALUES (4241,'Archangeling_Card','Archangeling Card',6,20,NULL,10,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;');
+INSERT INTO `item_db` VALUES (4242,'Apocalipse_Card','Apocalipse Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bVit,2; if(getrefine>8) bonus bMaxHP,800;');
+INSERT INTO `item_db` VALUES (4243,'Antonio_Card','Antonio Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,26,1,1,0;');
+INSERT INTO `item_db` VALUES (4244,'Alarm_Card','Alarm Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,10,1,1,0; bonus bMaxHP,300; bonus bVit,1;');
+INSERT INTO `item_db` VALUES (4245,'Am_Mut_Card','Am Mut Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,7,-20;');
+INSERT INTO `item_db` VALUES (4246,'Assulter_Card','Assulter Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4247,'Aster_Card','Aster Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAtk,5; bonus2 bAddDamageClass,1074,30;');
+INSERT INTO `item_db` VALUES (4248,'Ancient_Mummy_Card','Ancient Mummy Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,32,5,1,0;');
+INSERT INTO `item_db` VALUES (4249,'Ancient_Worm_Card','Ancient Worm Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,6,-20;');
+INSERT INTO `item_db` VALUES (4250,'Executioner_Card','Executioner Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubSize,2,30;');
+INSERT INTO `item_db` VALUES (4251,'Elder_Card','Elder Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace2,5,40;');
+INSERT INTO `item_db` VALUES (4252,'Alligator_Card','Alligator Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bLongAtkDef,5;');
+INSERT INTO `item_db` VALUES (4253,'Alice_Card','Alice Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,10,40; bonus2 bSubRace,11,-40;');
+INSERT INTO `item_db` VALUES (4254,'Tirfing_Card','Tirfing Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubSize,1,30;');
+INSERT INTO `item_db` VALUES (4255,'Orc_Lady_Card','Orc Lady Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace2,3,30;');
+INSERT INTO `item_db` VALUES (4256,'Orc_Archer_Card','Orc Archer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4257,'Wild_Rose_Card','Wild Rose Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bAgi,1; if(callfunc("Is_Thief_Class")) bonus bFlee2,5;');
+INSERT INTO `item_db` VALUES (4258,'Evil_Nymph_Card','Evil Nymph Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bInt,1; bonus bMaxSP,50;');
+INSERT INTO `item_db` VALUES (4259,'Wooden_Golem_Card','Wooden Golem Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bDef,1; bonus bHPrecovRate,30;');
+INSERT INTO `item_db` VALUES (4260,'Wootan_Shooter_Card','Wootan Shooter Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bDef,1; bonus2 bResEff,Eff_Confusion,2000;');
+INSERT INTO `item_db` VALUES (4261,'Wootan_Fighter_Card','Wootan Fighter Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bDef,1; bonus2 bResEff,Eff_Bleeding,2000;');
+INSERT INTO `item_db` VALUES (4262,'Taoist_Hermit_Card','Taoist Hermit Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4263,'Incantation_Samurai_Card','Incantation Samurai Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bIgnoreDefMob,0; bonus2 bHPLossRate,300,10000; bonus bDamageWhenUnequip,1000;');
+INSERT INTO `item_db` VALUES (4264,'Wind_Ghost_Card','Wind Ghost Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'if(getskilllv(84)==10) goto JT_10; bonus3 bAutoSpell,84,3,1; end; JT_10: bonus3 bAutoSpell,66,10,1;');
+INSERT INTO `item_db` VALUES (4265,'Li_Me_Mang_Ryang_Card','Li Me Mang Ryang Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4266,'Eclipse_Card','Eclipse Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bVit,1; if(isequipped(4006)) bonus bFlee,18;');
+INSERT INTO `item_db` VALUES (4267,'Explosion_Card','Explosion Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,9,-20;');
+INSERT INTO `item_db` VALUES (4268,'Incubus_Card','Incubus Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bMaxSP,150; if(isequipped(4218)) goto L_SUC; bonus bInt,-3; bonus bSPrecovRate,-20; end; L_SUC: bonus bInt,3; bonus bSPrecovRate,30;');
+INSERT INTO `item_db` VALUES (4269,'Injustice_Card','Injustice Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,136,1,1; if(!isequipped(4277)) end; bonus bAtk,20; bonus bLuk,3;');
+INSERT INTO `item_db` VALUES (4270,'Giant_Spider_Card','Giant Spider Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Poison,2000;');
+INSERT INTO `item_db` VALUES (4271,'Giant_Hornet_Card','Giant Hornet Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bSubEle,4,10;');
+INSERT INTO `item_db` VALUES (4272,'Dancing_Dragon_Card','Dancing Dragon Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus bCritical,3;');
+INSERT INTO `item_db` VALUES (4273,'Shellfish_Card','Shellfish Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAtk,5; bonus2 bAddDamageClass,1073,30;');
+INSERT INTO `item_db` VALUES (4274,'Zombie_Master_Card','Zombie Master Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4275,'Zombie_Prisoner_Card','Zombie Prisoner Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,1,-20;');
+INSERT INTO `item_db` VALUES (4276,'Lord_of_Death_Card','Lord of Death Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4277,'Zherlthsh_Card','Zherlthsh Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bLuk,2; bonus2 bSkillAtk,316,10; bonus2 bSkillAtk,324,10;');
+INSERT INTO `item_db` VALUES (4278,'Gibbet_Card','Gibbet Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'if(getrefine<6) bonus bMdef,5;');
+INSERT INTO `item_db` VALUES (4279,'Earth_Deleter_Card','Earth Deleter Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bNoRegen,2; bonus bSPGainValue,15;');
+INSERT INTO `item_db` VALUES (4280,'Geographer_Card','Geographer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(getskilllv(34)==10) goto BL_10; bonus4 bAutoSpellWhenHit,34,2,1,0; end; BL_10: bonus4 bAutoSpellWhenHit,34,10,1,0;');
+INSERT INTO `item_db` VALUES (4281,'Zipper_Bear_Card','Zipper Bear Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAtk,30; bonus3 bSPDrainValue,100,-1,0; if(!callfunc("Is_Merc_Class")) end; bonus bUnbreakableWeapon,0; bonus bUnstrippable,0;');
+INSERT INTO `item_db` VALUES (4282,'Tengu_Card','Tengu Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4283,'Test_Card','Test Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'dispbottom "Test Card OK:"; dispbottom isequipped(4149)+" "+isequippedcnt(4149)+" "+cardscnt(4149)+" "+getrefine;');
+INSERT INTO `item_db` VALUES (4284,'Chepet_Card','Chepet Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,28,5,5;');
+INSERT INTO `item_db` VALUES (4285,'Choco_Card','Choco Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bFlee2,5; bonus bFlee,10;');
+INSERT INTO `item_db` VALUES (4286,'Karakasa_Card','Karakasa Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(readparam(bStr)<=77) bonus2 bAddEffWhenHit,Eff_Confusion,1000; if(readparam(bStr)>77) bonus2 bAddEffWhenHit,Eff_Confusion,3000;');
+INSERT INTO `item_db` VALUES (4287,'Kapha_Card','Kapha Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'if(getrefine<6) bonus bMdef,8;');
+INSERT INTO `item_db` VALUES (4288,'Carat_Card','Carat Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bInt,2; if(getrefine>8) bonus bMaxSP,150;');
+INSERT INTO `item_db` VALUES (4289,'Caterpillar_Card','Caterpillar Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4290,'Cat_o_Nine_Tail_Card','Cat o Nine Tail Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bMdef,3; bonus bMagicDamageReturn,5;');
+INSERT INTO `item_db` VALUES (4291,'Kobold_Leader_Card','Kobold Leader Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace2,2,30;');
+INSERT INTO `item_db` VALUES (4292,'Kobold_Archer_Card','Kobold Archer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,3,7;');
+INSERT INTO `item_db` VALUES (4293,'Cookie_Card','Cookie Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bLuk,2; bonus2 bSkillAtk,156,10;');
+INSERT INTO `item_db` VALUES (4294,'Quve_Card','Quve Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'if((Class==Job_Novice)||(Class==Job_Super_Novice)) bonus4 bAutoSpellWhenHit,29,1,20,0; if(isequipped(4193)) bonus bMaxSP,60;');
+INSERT INTO `item_db` VALUES (4295,'Kraben_Card','Kraben Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Blind,2000;');
+INSERT INTO `item_db` VALUES (4296,'Cramp_Card','Cramp Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'if(isequipped(4028)) bonus bStr,3;');
+INSERT INTO `item_db` VALUES (4297,'Cruiser_Card','Cruiser Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,2,7;');
+INSERT INTO `item_db` VALUES (4298,'Creamy_Fear_Card','Creamy Fear Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Confusion,2000;');
+INSERT INTO `item_db` VALUES (4299,'Clock_Card','Clock Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(getskilllv(249)==10) goto AG_10; bonus4 bAutoSpellWhenHit,249,3,1,0; end; AG_10: bonus4 bAutoSpellWhenHit,249,10,1,0;');
+INSERT INTO `item_db` VALUES (4300,'Chimera_Card','Chimera Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(BaseJob!=Job_Assassin) bonus2 bAddEffWhenHit,Eff_Poison,1000; if(BaseJob==Job_Assassin) bonus2 bAddEffWhenHit,Eff_Poison,3000;');
+INSERT INTO `item_db` VALUES (4301,'Killer_Mantis_Card','Killer Mantis Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Bleeding,2000;');
+INSERT INTO `item_db` VALUES (4302,'Tao_Gunka_Card','Tao Gunka Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus bMaxHPrate,100; bonus bDefRate,-50;');
+INSERT INTO `item_db` VALUES (4304,'Tamruan_Card','Tamruan Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bDef,2; bonus2 bSkillAtk,250,10; bonus2 bSkillAtk,251,10;');
+INSERT INTO `item_db` VALUES (4305,'Turtle_General_Card','Turtle General Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bAtkRate,20; if(callfunc("Is_Sword_Class")!=0) bonus3 bAutoSpell,7,10,1;');
+INSERT INTO `item_db` VALUES (4306,'Toad_Card','Toad Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bFlee2,1; if(isequipped(4014)) bonus bFlee,18;');
+INSERT INTO `item_db` VALUES (4307,'Beetle_King_Card','Beetle King Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4308,'Tri_Joint_Card','Tri Joint Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4309,'Parasite_Card','Parasite Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bDef,1; bonus2 bSubEle,0,5;');
+INSERT INTO `item_db` VALUES (4310,'Panzer_Goblin_Card','Panzer Goblin Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,6,7;');
+INSERT INTO `item_db` VALUES (4311,'Permeter_Card','Permeter Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus2 bSubEle,7,15; bonus2 bSubEle,9,15;');
+INSERT INTO `item_db` VALUES (4312,'Seal_Card','Seal Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bFlee,3; bonus bHit,10; if(!callfunc("Is_Holy_Class")) end; bonus2 bCriticalAddRace,1,9; bonus2 bCriticalAddRace,6,9;');
+INSERT INTO `item_db` VALUES (4313,'Punk_Card','Punk Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'if(getskilllv(92)==5) goto QU_5; bonus4 bAutoSpellWhenHit,92,1,1,0; end; QU_5: bonus4 bAutoSpellWhenHit,10,5,1,0;');
+INSERT INTO `item_db` VALUES (4314,'Penomena_Card','Penomena Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus2 bSubRace,0,30;');
+INSERT INTO `item_db` VALUES (4315,'Pest_Card','Pest Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(readparam(bInt)<=77) bonus2 bAddEffWhenHit,Eff_Stone,1000; if(readparam(bInt)>77) bonus2 bAddEffWhenHit,Eff_Stone,3000;');
+INSERT INTO `item_db` VALUES (4316,'False_Angel_Card','False Angel Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4317,'Mobster_Card','Mobster Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bCritAtkRate,20; bonus3 bSPDrainValue,100,-1,0;');
+INSERT INTO `item_db` VALUES (4318,'Stormy_Knight_Card','Stormy Knight Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,89,1,2; bonus2 bAddEffWhenHit,Eff_Freeze,2000;');
+INSERT INTO `item_db` VALUES (4319,'Freezer_Card','Freezer Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus bMaxHP,300; if(getrefine>7) bonus2 bSkillAtk,5,10;');
+INSERT INTO `item_db` VALUES (4320,'Bloody_Knight_Card','Bloody Knight Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,83,1,2;');
+INSERT INTO `item_db` VALUES (4321,'Heirozoist_Card','Heirozoist Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bClassChange,1;');
+INSERT INTO `item_db` VALUES (4322,'High_Orc_Card','High Orc Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,32,NULL,NULL,NULL,NULL,'bonus bDef,1;');
+INSERT INTO `item_db` VALUES (4323,'Garm_Baby_Card','Garm Baby Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'if(isequipped(4324)) goto GARM; bonus3 bAutoSpell,15,3,1; end; GARM: bonus3 bAutoSpell,15,3,2;');
+INSERT INTO `item_db` VALUES (4324,'Garm_Card','Garm Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Freeze,5000;');
+INSERT INTO `item_db` VALUES (4325,'Harpy_Card','Harpy Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus2 bSubEle,0,15; bonus2 bSkillAtk,11,5;');
+INSERT INTO `item_db` VALUES (4326,'Sea_Otter_Card','Sea Otter Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4327,'Bloody_Butterfly_Card','Bloody Butterfly Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus bCastrate,30; bonus bNoCastCancel2,0; bonus2 bSkillAtk,18,5;');
+INSERT INTO `item_db` VALUES (4328,'Hyegun_Card','Hyegun Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,'bonus bFlee,15; bonus bCritical,1; if(isequipped(4090,4212)) bonus bAllStats,1;');
+INSERT INTO `item_db` VALUES (4329,'Phendark_Card','Phendark Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (4330,'Evil_Snake_Lord_Card','Evil Snake Lord Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,769,NULL,NULL,NULL,NULL,'bonus bInt,3; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Curse,10000;');
+INSERT INTO `item_db` VALUES (4331,'Heater_Card','Heater Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus bCritical,3; if(callfunc("Is_Sword_Class")) bonus bFlee2,3;');
+INSERT INTO `item_db` VALUES (5001,'Headset','Headset',5,20,NULL,200,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,87,NULL,'bonus2 bResEff,Eff_Curse,1000;');
+INSERT INTO `item_db` VALUES (5002,'Jewel_Crown','Jewel Crown',5,20,NULL,600,NULL,4,NULL,NULL,414946,2,256,NULL,60,88,NULL,'bonus bMdef,3; bonus bInt,2; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (5003,'Joker_Jester','Joker Jester',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,89,NULL,'bonus bMdef,5; bonus bLuk,2;');
+INSERT INTO `item_db` VALUES (5004,'Oxygen_Mask','Oxygen Mask',5,20,NULL,200,NULL,NULL,NULL,NULL,10477567,2,1,NULL,NULL,90,NULL,'bonus2 bResEff,Eff_Poison,2000;');
+INSERT INTO `item_db` VALUES (5005,'Gas_Mask','Gas Mask',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,513,NULL,NULL,91,NULL,'bonus2 bResEff,Eff_Poison,3000;');
+INSERT INTO `item_db` VALUES (5006,'Machoman_Glasses','Machomans Glasses',5,36000,NULL,100,NULL,1,NULL,NULL,10477567,2,512,NULL,NULL,92,NULL,NULL);
+INSERT INTO `item_db` VALUES (5007,'Grand_Circlet','Grand Circlet',5,20,NULL,200,NULL,3,NULL,NULL,10477567,2,256,NULL,55,93,NULL,'bonus bMdef,4; bonus bStr,1; bonus bInt,1; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (5008,'Puppy_Love','Puppy Love',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,94,NULL,NULL);
+INSERT INTO `item_db` VALUES (5009,'Safety_Helmet','Safety Helmet',5,20,NULL,500,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,95,NULL,'bonus bMdef,3; bonus bUnbreakableHelm,0;');
+INSERT INTO `item_db` VALUES (5010,'Indian_Hair_Piece','Indian Fillet',5,20,NULL,100,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,96,NULL,NULL);
+INSERT INTO `item_db` VALUES (5011,'Aerial','Aerial',5,20,NULL,100,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,97,NULL,NULL);
+INSERT INTO `item_db` VALUES (5012,'Ph.D_Hat','Ph.D Hat',5,20,NULL,200,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,98,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (5013,'Horn_Of_Lord_Kaho','Lord Kahos Horn',5,20,NULL,100,NULL,5,NULL,NULL,10477567,2,256,NULL,NULL,99,NULL,'bonus bMdef,10; bonus bStr,5; bonus bAgi,10; bonus bVit,10; bonus bInt,5; bonus bLuk,20;');
+INSERT INTO `item_db` VALUES (5014,'Fin_Helm','Fin Helm',5,20,NULL,300,NULL,2,NULL,NULL,16514,2,512,NULL,65,100,NULL,NULL);
+INSERT INTO `item_db` VALUES (5015,'Egg_Shell','Egg Shell',5,20,NULL,200,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,101,NULL,NULL);
+INSERT INTO `item_db` VALUES (5016,'Boys_Cap','Boys Cap',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,102,NULL,NULL);
+INSERT INTO `item_db` VALUES (5017,'Bone_Helm','Bone Helm',5,20,NULL,800,NULL,7,NULL,NULL,279714,2,256,NULL,70,103,NULL,'bonus2 bSubEle,7,-15;');
+INSERT INTO `item_db` VALUES (5018,'Feather_Bonnet','Feather Bonnet',5,20,NULL,300,NULL,4,NULL,NULL,1574920,2,256,NULL,NULL,104,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (5019,'Corsair','Corsair',5,20,NULL,500,NULL,5,NULL,NULL,10477567,2,256,NULL,NULL,105,NULL,'bonus bVit,1;');
+INSERT INTO `item_db` VALUES (5020,'Kafra_Band','Kafras Band',5,20,NULL,500,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,106,NULL,'bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (5021,'Bankruptcy_of_Heart','Money Losers Grief',5,20,NULL,1200,NULL,4,NULL,NULL,263200,2,256,NULL,38,107,NULL,'bonus bInt,1; bonus bDex,1;');
+INSERT INTO `item_db` VALUES (5022,'Solar_God_Helm','Solar God Helm',5,20,NULL,2400,NULL,4,NULL,NULL,2088832,2,768,NULL,NULL,138,NULL,'bonus bStr,3; bonus bInt,2;');
+INSERT INTO `item_db` VALUES (5023,'Parcel_Hat','Parcel Hat',5,20,NULL,1000,NULL,NULL,NULL,NULL,263200,2,256,NULL,NULL,108,NULL,NULL);
+INSERT INTO `item_db` VALUES (5024,'Cake_Hat','Cake Hat',5,20,NULL,1500,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,109,NULL,NULL);
+INSERT INTO `item_db` VALUES (5025,'Angel_Helm','Angel Helm',5,20,NULL,1600,NULL,5,NULL,NULL,2088832,2,256,NULL,74,110,NULL,'bonus bAgi,1; bonus bLuk,1; bonus bMdef,3;');
+INSERT INTO `item_db` VALUES (5026,'Chef_Hat','Chefs Hat',5,20,NULL,300,NULL,1,NULL,NULL,10477567,2,256,NULL,50,111,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (5027,'Mage_Hat','Mage Hat',5,20,NULL,300,NULL,1,NULL,NULL,66052,2,256,NULL,NULL,112,NULL,'bonus bInt,2; bonus bMaxSP,150;');
+INSERT INTO `item_db` VALUES (5028,'Candle','Candle',5,20,NULL,150,NULL,5,NULL,NULL,10477567,2,256,NULL,NULL,113,NULL,NULL);
+INSERT INTO `item_db` VALUES (5029,'Spore_Hat','Spore Hat',5,20,NULL,900,NULL,3,NULL,NULL,10477567,2,256,NULL,20,114,NULL,NULL);
+INSERT INTO `item_db` VALUES (5030,'Panda_Hat','Panda Hat',5,20,NULL,800,NULL,3,NULL,NULL,10477567,2,256,NULL,40,115,NULL,NULL);
+INSERT INTO `item_db` VALUES (5031,'Miners_Helmet','Miners Helmet',5,20,NULL,1500,NULL,4,NULL,NULL,447986,2,256,NULL,55,116,NULL,'bonus bDex,2;');
+INSERT INTO `item_db` VALUES (5032,'Sunday_Hat','Sunday Hat',5,20,NULL,800,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,117,NULL,NULL);
+INSERT INTO `item_db` VALUES (5033,'Smokie_Hat','Smokie Hat',5,20,NULL,900,NULL,3,NULL,NULL,10477567,2,256,NULL,50,118,NULL,NULL);
+INSERT INTO `item_db` VALUES (5034,'Lightbulb_Hairband','Lightbulb Hairband',5,20,NULL,500,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,119,NULL,NULL);
+INSERT INTO `item_db` VALUES (5035,'Poring_Hat','Poring Hat',5,20,NULL,700,NULL,2,NULL,NULL,10477567,2,256,NULL,38,120,NULL,NULL);
+INSERT INTO `item_db` VALUES (5036,'Cross_Hairband','Cross Hairband',5,20,NULL,250,NULL,1,NULL,NULL,10477567,2,256,NULL,10,121,NULL,NULL);
+INSERT INTO `item_db` VALUES (5037,'Fruit_Shell','Apple Hat',5,20,NULL,150,NULL,4,NULL,NULL,10477567,2,256,NULL,5,122,NULL,NULL);
+INSERT INTO `item_db` VALUES (5038,'Deviruchi_Hat','Deviruchi Hat',5,20,NULL,800,NULL,2,NULL,NULL,10477567,2,256,NULL,64,123,NULL,'bonus bStr,1; bonus bInt,1;');
+INSERT INTO `item_db` VALUES (5039,'Rainbow_Eggshell','Rainbow Eggshell',5,20,NULL,400,NULL,4,NULL,NULL,10477567,2,256,NULL,19,124,NULL,NULL);
+INSERT INTO `item_db` VALUES (5040,'Blush','Blush',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,125,NULL,NULL);
+INSERT INTO `item_db` VALUES (5041,'Heart_Hairpin','Heart Hairpin',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,126,NULL,NULL);
+INSERT INTO `item_db` VALUES (5042,'Hair_Protector','Dumpling Decoration',5,20,NULL,150,NULL,NULL,NULL,NULL,10477567,2,256,NULL,14,127,NULL,NULL);
+INSERT INTO `item_db` VALUES (5043,'Opera_Ghost_Mask','Opera Ghost Mask',5,20,NULL,200,NULL,1,NULL,NULL,10477567,2,512,NULL,20,128,NULL,NULL);
+INSERT INTO `item_db` VALUES (5044,'Wing_Of_Demon','Wings of Demon',5,20,NULL,350,NULL,2,NULL,NULL,10477567,2,256,NULL,45,129,NULL,NULL);
+INSERT INTO `item_db` VALUES (5045,'Magician_Hat','Magic Hat',5,20,NULL,500,NULL,3,NULL,NULL,554319315732,2,256,NULL,50,130,NULL,'bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50;');
+INSERT INTO `item_db` VALUES (5046,'Bongun_Hat','Bongun Hat',5,20,NULL,300,NULL,5,NULL,NULL,10477567,2,769,NULL,NULL,139,NULL,NULL);
+INSERT INTO `item_db` VALUES (5047,'Fashion_Sunglasses','Fashion Sunglasses',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,131,NULL,NULL);
+INSERT INTO `item_db` VALUES (5048,'Cresent_Hairpin','Cresent Hairpin',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,132,NULL,NULL);
+INSERT INTO `item_db` VALUES (5049,'Striped_Bandana','Striped Bandana',5,20,NULL,150,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,133,NULL,NULL);
+INSERT INTO `item_db` VALUES (5050,'Mysterious_Fruit_Shell','Mysterious Fruit Shell',5,20,NULL,300,NULL,5,NULL,NULL,10477567,2,256,NULL,30,134,NULL,NULL);
+INSERT INTO `item_db` VALUES (5051,'Bell_of_Pussycat','Bell of Pussycat',5,20,NULL,100,NULL,5,NULL,NULL,10477567,2,1,NULL,NULL,135,NULL,NULL);
+INSERT INTO `item_db` VALUES (5052,'Blue_Bandana','Blue Bandana',5,20,NULL,150,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,136,NULL,NULL);
+INSERT INTO `item_db` VALUES (5053,'Sphinx_Hat','Sphinx Hat',5,20,NULL,3000,NULL,5,NULL,NULL,16514,2,256,NULL,65,137,NULL,'bonus bStr,2;');
+INSERT INTO `item_db` VALUES (5054,'Assassin_Mask','Assassin Mask',5,20,NULL,100,NULL,NULL,NULL,NULL,4096,2,1,NULL,70,180,NULL,NULL);
+INSERT INTO `item_db` VALUES (5055,'Novice_Eggshell','Novice Eggshell',5,20,NULL,10,NULL,3,NULL,NULL,8388609,2,256,NULL,NULL,101,NULL,NULL);
+INSERT INTO `item_db` VALUES (5056,'Seed_Of_Love','Seed Of Love',5,20,NULL,200,NULL,NULL,NULL,NULL,10477567,2,256,NULL,NULL,140,NULL,NULL);
+INSERT INTO `item_db` VALUES (5057,'Black_Cat_Ears','Black Cat Ears',5,20,NULL,200,NULL,2,NULL,NULL,10477567,2,256,NULL,45,141,NULL,NULL);
+INSERT INTO `item_db` VALUES (5058,'Resting_Cat','Resting Cat',5,20,NULL,500,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,142,NULL,'bonus2 bResEff,Eff_Curse,3000;');
+INSERT INTO `item_db` VALUES (5059,'Bear_Hat','Bear Hat',5,20,NULL,800,NULL,3,NULL,NULL,10477567,2,256,NULL,50,143,NULL,NULL);
+INSERT INTO `item_db` VALUES (5060,'Pointy_Cap','Pointy Cap',5,20,NULL,300,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,144,NULL,'bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (5061,'Flower_Hairpin','Flower Hairpin',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,145,NULL,NULL);
+INSERT INTO `item_db` VALUES (5062,'Straw_Hat','Straw Hat',5,20,NULL,200,NULL,3,NULL,NULL,10477567,2,256,NULL,50,146,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (5063,'Bandage','Bandage',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,147,NULL,NULL);
+INSERT INTO `item_db` VALUES (5064,'Transformation_Leaf','Transformation Leaf',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,148,NULL,NULL);
+INSERT INTO `item_db` VALUES (5065,'Fresh_Blueish_Fish','Fresh Blueish Fish',5,20,NULL,500,NULL,2,NULL,NULL,10477567,2,256,NULL,50,149,NULL,'bonus2 bAddRace,5,10;');
+INSERT INTO `item_db` VALUES (5066,'Horns_Of_Succubus','Horns of Succubus',5,20,NULL,800,NULL,4,NULL,NULL,10477567,2,256,NULL,70,150,NULL,'bonus bInt,1; bonus bMdef,10;');
+INSERT INTO `item_db` VALUES (5067,'Sombrero','Sombrero',5,20,NULL,350,NULL,4,NULL,NULL,10477567,2,256,NULL,NULL,151,NULL,'bonus bAgi,1;');
+INSERT INTO `item_db` VALUES (5068,'Ears_of_Demon','Ears Of Demon',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,512,NULL,70,152,NULL,'bonus bStr,1;');
+INSERT INTO `item_db` VALUES (5069,'Fox_Mask','Fox Mask',5,20,NULL,300,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,153,NULL,'bonus bAgi,1; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (5070,'Burning_Blood_Bandana','Burning Blood Bandana',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,154,NULL,'bonus bStr,2;');
+INSERT INTO `item_db` VALUES (5071,'Indian_Headband','Indian Headband',5,20,NULL,200,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,155,NULL,'bonus bDex,1;');
+INSERT INTO `item_db` VALUES (5072,'Horns_Of_Incubus','Horns Of Incubus',5,20,NULL,800,NULL,4,NULL,NULL,10477567,2,256,NULL,70,156,NULL,'bonus bAgi,1; bonus bMdef,10;');
+INSERT INTO `item_db` VALUES (5073,'Posture_Fix_Hat','Posture Fix Hat',5,20,NULL,700,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,157,NULL,'bonus bDex,2;');
+INSERT INTO `item_db` VALUES (5074,'Ears_of_Angel','Ears of Angel',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,512,NULL,70,158,NULL,'bonus bStr,1;');
+INSERT INTO `item_db` VALUES (5075,'Cowboy_Hat','Cowboy Hat',5,20,NULL,500,NULL,4,NULL,NULL,10477567,2,256,NULL,NULL,159,NULL,NULL);
+INSERT INTO `item_db` VALUES (5076,'Wool_Hat','Wool Hat',5,20,NULL,350,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,160,NULL,'bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (5077,'Tulip_Hairpin','Tulip Hairpin',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,161,NULL,NULL);
+INSERT INTO `item_db` VALUES (5078,'Sea_Otter_Hat','Sea Otter Hat',5,20,NULL,800,NULL,3,NULL,NULL,10477567,2,256,NULL,50,162,NULL,'bonus bVit,1;');
+INSERT INTO `item_db` VALUES (5079,'X_Hairpin','X Hairpin',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,163,NULL,NULL);
+INSERT INTO `item_db` VALUES (5080,'Crown_of_the_Ancient_Queen','Crown of The Ancient Queen',5,20,NULL,400,NULL,4,NULL,NULL,10477567,2,256,NULL,45,164,NULL,NULL);
+INSERT INTO `item_db` VALUES (5081,'Crown_of_Mistress','Crown of Mistress',5,20,NULL,100,NULL,1,NULL,NULL,10477567,NULL,256,NULL,75,165,NULL,'bonus bMaxSP,100;');
+INSERT INTO `item_db` VALUES (5082,'Mushroom_Hairband','Mushroom Hairband',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,256,NULL,NULL,166,NULL,NULL);
+INSERT INTO `item_db` VALUES (5083,'Back_Ribbon','Back Ribbon',5,20,NULL,200,NULL,1,NULL,NULL,10477567,NULL,256,NULL,45,167,NULL,'bonus bMdef,10;');
+INSERT INTO `item_db` VALUES (5084,'Lazy_Raccoon_Hat','Lazy Racoon Hat',5,20,NULL,500,NULL,1,NULL,NULL,10477567,2,256,NULL,NULL,168,NULL,'bonus2 bResEff,Eff_Sleep,2000;');
+INSERT INTO `item_db` VALUES (5085,'Small_Twin_Ribbons','Small Twin Ribbons',5,20,NULL,100,NULL,1,NULL,NULL,10477567,NULL,512,NULL,45,169,NULL,NULL);
+INSERT INTO `item_db` VALUES (5086,'Alarm_Mask','Alarm Mask',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,513,NULL,NULL,170,NULL,'bonus2 bResEff,Eff_Blind,5000;');
+INSERT INTO `item_db` VALUES (5087,'Expressionless_Mask','Expressionless Mask',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,513,NULL,NULL,171,NULL,NULL);
+INSERT INTO `item_db` VALUES (5088,'Surprised_Mask','Surprised Mask',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,513,NULL,NULL,172,NULL,NULL);
+INSERT INTO `item_db` VALUES (5089,'Annoyed_Mask','Annoyed Mask',5,20,NULL,100,NULL,1,NULL,NULL,10477567,2,513,NULL,NULL,173,NULL,NULL);
+INSERT INTO `item_db` VALUES (5090,'Goblin_Leader_Mask','Goblin Leader Mask',5,20,NULL,100,NULL,2,NULL,NULL,10477567,2,513,NULL,NULL,174,NULL,NULL);
+INSERT INTO `item_db` VALUES (5091,'Golden_Bells','Golden Bells',5,20,NULL,200,NULL,2,NULL,NULL,10477567,2,768,NULL,35,175,NULL,NULL);
+INSERT INTO `item_db` VALUES (5092,'Nun_Hat','Nun Hat',5,20,NULL,300,NULL,5,NULL,NULL,33024,NULL,768,NULL,65,176,NULL,NULL);
+INSERT INTO `item_db` VALUES (5093,'Nun_Hat_','Nun Hat',5,20,NULL,300,NULL,5,NULL,NULL,33024,NULL,768,NULL,65,177,NULL,'bonus bMaxSP,100;');
+INSERT INTO `item_db` VALUES (5094,'Orc_Hero_Helm','Orc Hero Helm',5,20,NULL,900,NULL,5,NULL,NULL,10477567,2,768,NULL,55,178,NULL,'bonus bStr,2; bonus bVit,1;');
+INSERT INTO `item_db` VALUES (5096,'Assassin_Mask_','Assassin Mask',5,20,NULL,100,NULL,NULL,NULL,NULL,4096,2,1,NULL,70,180,NULL,NULL);
+INSERT INTO `item_db` VALUES (5097,'Annual_Commemoration_Hat','Annual Commemoration Hat',5,20,NULL,30,NULL,3,NULL,NULL,10477567,2,256,NULL,NULL,166,NULL,'bonus bAllStats,3;');
+INSERT INTO `item_db` VALUES (5098,'Tiger_Mask','Tiger Mask',5,20,NULL,400,NULL,2,NULL,NULL,10477567,2,768,NULL,NULL,181,NULL,'bonus bStr,3; bonus bMaxHP,100;');
+INSERT INTO `item_db` VALUES (5100,'Sale_Sign','Sale Sign',5,20,NULL,800,NULL,1,NULL,NULL,10477567,2,256,NULL,75,183,NULL,'bonus bStr,1; bonus bAgi,1; bonus bLuk,1;');
+INSERT INTO `item_db` VALUES (5101,'Takius_Blindfold','Takius Blindfold',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,184,NULL,NULL);
+INSERT INTO `item_db` VALUES (5102,'Round_Eyes','Round Eyes',5,20,NULL,100,NULL,NULL,NULL,NULL,10477567,2,512,NULL,NULL,185,NULL,NULL);
+INSERT INTO `item_db` VALUES (7001,'Mold_Powder','Mould Powder',3,680,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7002,'Ogre_Tooth','Ogre Tooth',3,658,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7003,'Anolian_Skin','Anolian Skin',3,928,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7004,'Mud_Lump','Mud Lump',3,876,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7005,'Skull','Skull',3,1044,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7006,'Wing_of_Red_Bat','Wing of Red Bat',3,168,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7007,'Claw_of_Rat','Claw of Rat',3,748,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7008,'Stiff_Horn','Stiff Horn',3,636,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7009,'Glitter_Shell','Glitter Shell',3,528,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7010,'Tail_of_Steel_Scorpion','Tail of Steel Scorpion',3,548,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7011,'Claw_of_Monkey','Claw of Monkey',3,466,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7012,'Tough_Scalelike_Stem','Tough Scalelike Stem',3,412,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7013,'Coral_Reef','Coral Reef',3,772,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7014,'Old_Portrait','Old Portrait',3,1500,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7015,'Bookclip_in_Memory','Bookclip in Memory',3,3000,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7016,'Spoon_Stub','Spoon Stub',3,2500,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7017,'Executioners_Mitten','Executioners Mitten',3,4500,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7018,'Young_Twig','Young Twig',3,50,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7019,'Lokis_Whispers','Lokis Whispers',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7020,'Mothers_Nightmare','Mothers Nightmare',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7021,'Foolishness_of_the_Blind','Foolishness of the Blind',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7022,'Old_Hilt','Old Hilt',3,150,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7023,'Blade_Lost_in_Darkness','Blade Lost in Darkness',3,12000,NULL,40,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7024,'Bloody_Edge','Bloody Edge',3,10000,NULL,40,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7025,'Lucifers_Lament','Lucifers Lament',3,30000,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7026,'Key_of_Clock_Tower','Key of Clock Tower',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7027,'Key_of_Underground','Key of Underground',3,2,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7028,'Invite_for_Duel','Invite for Duel',3,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7029,'Admission_for_Duel','Admission for Duel',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7030,'Claw_of_Desert_Wolf','Claw of Desert Wolf',3,208,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7031,'Old_Frying_Pan','Old Frying Pan',3,196,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7032,'Piece_of_Egg_Shell','Piece of Egg Shell',3,168,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7033,'Poison_Spore','Poison Spore',3,114,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7034,'Red_Socks_with_Holes','Red Socks with Holes',3,100,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7035,'Matchstick','Matchstick',3,100,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7036,'Fang_of_Garm','Fang of Garm',3,100,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7037,'Coupon','Coupon',3,2000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7038,'Yarn','Yarn',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7039,'Novice_Nametag','Novice Nametag',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7040,'Megaphone','Megaphone',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7041,'Fine_Grit','Fine Grit',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7042,'Leather_Bag_of_Infinity','Leather Bag of Infinity',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7043,'Fine_Sand','Fine Sand',3,100,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7044,'Vigorgra','Vigorgra',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7045,'Magic_Paint','Magic Paint',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7046,'Cart_Parts','Cart Parts',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7047,'Alices_Apron','Alices Apron',3,2424,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7048,'Talon_of_Griffon','Talon of Griffon',3,100,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7049,'Stone','Stone',3,NULL,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7050,'Cotton_Mat','Cotton Mat',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7051,'Silk_Mat','Silk Mat',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7052,'Wasted_Magazine','Wasted Magazine',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7053,'Cyfar','Cyfar',3,772,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7054,'Brigan','Brigan',3,746,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7055,'Animal_Poop','Animal Poop',3,20,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7056,'Payment_Statement_for_Kafra_Employee','Payment Statement for Ka',3,20,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7057,'Gjallar','Gjallar',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7058,'Gleipnir','Gleipnir',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7059,'Free_Ticket_for_Kafra_Storage','Free Ticket for Kafra St',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7060,'Free_Ticket_for_Kafra_Transportation','Free Ticket for Kafra Tr',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7061,'Free_Ticket_for_the_Cart_Service','Free Ticket for the Cart',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7062,'Broken_Turtle_Shell','Broken Turtle Shell',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7063,'Soft_Feather','Soft Feather',3,280,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7064,'Wing_of_Dragonfly','Wing of Dragonfly',3,520,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7065,'Sea-otter_Fur','Sea Otter Fur',3,820,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7066,'Ice_Cubic','Ice Cubic',3,660,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7067,'Stone_Fragment','Stone Fragment',3,640,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7068,'Burnt_Tree','Burnt Tree',3,722,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7069,'Destroyed_Armor','Destroyed Armor',3,1042,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7070,'Broken_Shell','Broken Shell',3,900,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7071,'Tattered_Clothes','Tattered Clothes',3,640,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7072,'Old_Shuriken','Old Shuriken',3,1780,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7073,'Freyas_Jewel','Freyas Jewel',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7074,'Thors_Gauntlet','Thors Gauntlet',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7075,'Iron_Maiden','Iron Maiden',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7076,'Wheel_of_the_Unknown','Wheel of the Unknown',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7077,'Silver_Ornament','Silver Ornament',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7078,'Wrath_of_Valkyrie','Wrath of Valkyrie',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7079,'Feather_of_Angel_Wing','Feather of Angel Wing',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7080,'Cat_Tread','Footprints of Cat',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7081,'Womans_Moustache','Womans Moustache',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7082,'Root_of_Stone','Root of Stone',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7083,'Spirit_of_Fish','Spirit of Fish',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7084,'Sputum_of_Bird','Sputum of Bird',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7085,'Sinew_of_Bear','Sinew of Bear',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7086,'Emblem_of_the_Sun_God','Emblem of the Sun God',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7087,'Breath_of_Spirit','Breath of Soul',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7088,'Snow_Crystal','Snow Crystal',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7089,'Omen_of_Tempest','Omen of Tempest',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7090,'Ripple','Ripple',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7091,'Billow','Billow',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7092,'Drifting_Air','Drifting Air',3,20,NULL,500,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7093,'Cogwheel','Metal Wheel',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7094,'Fragment','Cabinet Chip',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7095,'Metal_Fragment','Tooth Fragment',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7096,'Lava','Hardened Lava',3,1108,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7097,'Burning_Heart','Burning Heart',3,924,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7098,'Live_Coal','Fire Seed',3,638,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7099,'Worn-out_Magic_Scroll','Old Magical Circle',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7100,'Sharp_Leaf','Sharpened Leaf',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7101,'PecoPeco_Feather','Peco Feather',3,454,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7102,'Nightmare','Nightmare',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7103,'Unknown_Liquid_Bottle','Yellow Liquid Bottle',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7104,'Fake_Angels_Wing','Fake Angels Wing',3,756,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7105,'Fake_Heaven_Ring','Imitation Souls Band',3,924,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7106,'Antelope_Horn','Antelope Horn',3,672,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7107,'Antelope_Skin','Antelope Skin',3,756,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7108,'Piece_of_Shield','Broken Shield',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7109,'Shining_Spear_Blade','Shiny Spear Tip',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7110,'Broken_Sword','Broken Sword',3,588,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7111,'Slick_Paper','Slick Paper',3,706,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7112,'Sharp_Paper','Transparent Paper',3,906,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7113,'Broken_Symbol_of_Pharaoh','Broken Symbol of Pharaoh',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7114,'Masque_of_Tutankhamen','Sphinx Mask',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7115,'Harpy_Feather','Blood Feather',3,1142,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7116,'Harpy_Talon','Tooth of Lowblood',3,1210,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7117,'Torn_Magic_Book','Torn Spell Book',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7118,'Torn_Scroll','Torn Scroll',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7119,'Bacillus','Hypha Body',3,1024,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7120,'Burning_Horseshoe','Burning Horseshoe',3,822,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7121,'Honey_Pot','Honey Jar',3,622,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7122,'Burning_Hair','Hot Feather',3,974,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7123,'Dragon_Skin','Dragon Skin',3,1024,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7124,'Sand_Clump','Sand Lump',3,706,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7125,'Scorpion_Claw','Crab Shot',3,706,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7126,'Large_Jellopy','Large Jellopy',3,840,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7127,'Alcohol_Creation_Book','Alcohol Creation Book',3,100000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7128,'Bottle_Grenade_Creation_Book','Fire Bottle Creation Book',3,100000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7129,'Acid_Bottle_Creation_Book','Acid Bottle Creation Book',3,100000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7130,'Plant_Bottle_Creation_Book','Plant Bottle Creation Book',3,100000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7131,'Mine_Bottle_Creation_Book','Mine Bottle Creation Book',3,100000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7132,'Glistening_Coat_Creation_Book','Glistening Coat Creation Book',3,100000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7133,'Condensed_Potion_Creation_Book','Condensed Potion Creation Book',3,240000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7134,'Medicine_Bowl','Medicine Bowl',3,8,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7135,'Bottle_Grenade','Fire Bottle',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7136,'Acid_Bottle','Hydrobolic Acid Bottle',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7137,'Plant_Bottle','Water Bottle',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7138,'Marine_Sphere_Bottle','Mine Bottle',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7139,'Glistening_Coat','Coating Wax',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7140,'Seed_of_Life','Seed of Life',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7141,'Morning_Dew_of_Yggdrasil','Water Flow',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7142,'Ancient_Life','Embryo',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7143,'Glass_Tube','Seperation Tubes',2,50000,NULL,1000,NULL,NULL,NULL,NULL,262144,2,NULL,NULL,NULL,NULL,'bpet;',NULL);
+INSERT INTO `item_db` VALUES (7144,'Potion_Creation_Gude','Potion Making Book',3,100000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7145,'Ragnarok_T-shirt','Ragnarok T-Shirt',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7146,'Vacation_Ticket','Vacation Ticket',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7147,'Jasmine','Jasmine',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7148,'Mothers_Letter','Mothers Letter',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7149,'Yellow_Plate','Yellow Plate',3,220,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7150,'A_piece_of_Bamboo','Bamboo Trunk',3,310,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7151,'Oil_Paper','Oiled Paper',3,310,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7152,'Glossy_Hair','Glossy Hair',3,340,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7153,'Worn-out_Kimono','Old Kimono',3,590,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7154,'Poisonous_Powder','Poison Powder',3,160,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7155,'Skin_of_Poisonous_Toad','Poisonous Toad Skin',3,280,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7156,'Broken_Shuriken','Broken Shuriken',3,470,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7157,'Black_Mask','Black Mask',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7158,'Broken_Liquor_Bottle','Broken Liquor Bottle',3,160,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7159,'Demons_Nose','Demons Nose',3,400,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7160,'Passport_From_King','Passport From King',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7161,'Bear_Skin','Bear Skin',3,384,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7162,'Piece_of_Cloud','Piece of Cloud',3,390,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7163,'Hard_Antennae','Hard Antennae',3,570,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7164,'Very_Hard_Peach','Very Hard Peach',3,400,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7165,'Etherial_Winged_Clothing','Etherial Winged Clothing',3,650,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7166,'Soft_Silk_Fabric','Soft Silk Fabric',3,1200,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7167,'Strange_Piece_of_Iron','Strange Piece of Iron',3,430,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7168,'Big_Wing_of_Butterfly','Big Wing of Butterfly',3,614,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7169,'Tae_Guk_Tablet','Tae Guk Tablet',3,280,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7170,'Tuxedo','Tuxedo',5,43000,NULL,10,NULL,NULL,NULL,NULL,10477566,1,16,NULL,NULL,NULL,NULL,'changebase 22;');
+INSERT INTO `item_db` VALUES (7171,'Skin_of_Panther','Skin of Panther',3,282,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7172,'Claw_of_Panther','Claw of Panther',3,290,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7173,'Bun_Buster_Bag','Bun Buster Bag',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7174,'Wrapping_Thread','Wrapping Thread',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7175,'Wrapper','Wrapper',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7176,'Kings_Proof_Document','Kings Proof Document',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7177,'Piece_of_Starlights_Sorrow','Piece of Starlights Sorrow',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7178,'Starlights_Sorrow','Starlights Sorrow',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7179,'Donation_Ticket','Donation Ticket',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7180,'Letter_of_Introduction','Letter of Introduction',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7181,'Commodity_Receipt','Commodity Receipt',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7182,'Cacao','Cacao',3,200,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7183,'Letter_of_Younger_Sister','Letter of Younger Sister',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7184,'Piano_Key','Piano Key',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7185,'Quiz_Participation_Ticket','Quiz Participation Ticket',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7186,'Thin_Trunk','Thin Trunk',3,218,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7187,'Festival_Mask','Festival Mask',3,100,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7188,'Brown_Root','Brown_Root',3,560,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7189,'Wooden_Heart','Wooden Heart',3,680,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7190,'Hard_Back_Shell','Hard Back Shell',3,140,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7191,'Paper_Lantern','Paper Lantern',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7192,'Pin_Wheel','Pin Wheel',3,160,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7193,'Sprout','Sprout',3,230,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7194,'Soft_Grass_Leaf','Soft Grass Leaf',3,400,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7195,'Slingshot','Slingshot',3,210,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7196,'Shoulder_Guard','Shoulder Guard',3,230,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7197,'Durable_Vine','Durable Vine',3,500,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7198,'Huge_Leaf','Huge Leaf',3,610,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7199,'Hieroglyphic','Hieroglyphic',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7200,'Elastic_Band','Elastic Band',3,380,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7201,'Log','Log',3,250,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7202,'Insect_Pinchers','Insect Pinchers',3,290,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7203,'Healthy_Branch','Healthy Branch',3,190,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7204,'Gun_Powder','Gun Powder',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7205,'Black_Piece_of_Cloth','Black Piece of Cloth',3,526,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7206,'Cat_Doll','Black Cat Doll',3,1440,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7207,'Old_Mantle','Old Mantle',3,1050,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7208,'Rusted_Knife','Rusted Knife',3,1780,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7209,'Dullahans_Helm','Dullahans Helm',3,1350,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7210,'Piece_of_Dullahans_Armor','Dullahans Armor Piece',3,750,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7211,'Rosetta_Stone_Fragment','Rosetta Stone Fragment',3,2600,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7212,'Hanging_Doll','Hanging Doll',3,1020,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7213,'Pin_Cusion','Pin Cusion',3,832,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7214,'Bat_Cage','Bat Cage',3,880,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7215,'Broken_Needle','Broken Needle',3,690,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7216,'Red_Scarf','Red Scarf',3,660,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7217,'Spool_of_Thread','Spool of Thread',3,424,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7218,'Rotted_Rope','Rotted Rope',3,390,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7219,'Striped_Socks','Striped Socks',3,920,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7220,'Ectoplasm','Ectoplasm',3,332,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7221,'Chains','Chains',3,740,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7222,'Old_Tree_Branch','Old Tree Branch',3,468,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7223,'Ruined_Self_Portrait','Ruined Self Portrait',3,2032,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7224,'Philosophers_Stone','Philosophers Stone',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7225,'Silk_Lantern','Silk Lantern',3,486,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7226,'Hallucination_Pill','Hallucination Pill',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7227,'TCG_Card','TCG Card',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7228,'Gold_Nugget','Gold Nugget',3,20,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7229,'Iron_Nugget','Iron Nugget',3,20,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7230,'Silver_Nugget','Silver Nugget',3,20,NULL,30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7231,'Gold_Ore','Gold Ore',3,20,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7232,'Silver_Ore','Silver Ore',3,20,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7233,'Mysterious_Ore','Mysterious Ore',3,20,NULL,150,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7234,'Spirit_of_Guild','Spirit of Guild',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7235,'Spirit_of_Assault','Spirit of Assault',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7236,'Spirit_of_Defense','Spirit of Defense',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7237,'Spirit_of_Cooperation','Spirit of Cooperation',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7238,'Spirit_of_Harmony','Spirit of Harmony',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7239,'Spirit_of_Advancement','Spirit of Advancement',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7240,'Spirit_of_Trust','Spirit of Trust',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7241,'Spirit_of_Concentration','Spirit of Concentration',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7242,'Spirit_of_Unity','Spirit of Unity',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7243,'Spirit_of_Integrity','Spirit of Integrity',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7244,'Spirit_of_Communion','Spirit of Communion',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7245,'Spirit_of_Friendship','Spirit of Friendship',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7246,'Spirit_of_Peace','Spirit of Peace',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7247,'Spirit_of_Nature','Spirit of Nature',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7248,'Spirit_of_Fame','Spirit of Fame',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7249,'Spirit_of_Contribution','Spirit of Contribution',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7250,'Spirit_of_Glory','Spirit of Glory',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7251,'Spirit_of_Victory','Spirit of Victory',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7252,'Chinese_Medicine','Chinese Medicine',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7253,'Golden_Flag','Golden Flag',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7254,'Digitally_Printed_Ticket','Digitally Printed Ticket',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7262,'Paper_Fan','Paper Fan',3,233,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7263,'Cats_Eye','Cats-Eye',3,20,477,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7264,'Dried_Sand','Dried Sand',3,20,161,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7265,'Dragon_Horn','Dragon Horn',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7266,'Dragon_Teeth','Dragon Teeth',3,218,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7267,'Tigerskin_Underwear','Tigerskin Underwear',3,20,107,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7268,'Ghost_Doll','Ghost Doll',3,20,605,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7269,'Baby_Bib','Baby Bib',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7270,'Baby_Bottle','Baby Bottle',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7271,'Novice_Statue','Novice Statue',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7272,'Dumpling_Doll','Dumpling Doll',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7273,'RWC_Necklace','RWC Necklace',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7274,'Ancient_Language_Book','Translated Ancient Language',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7275,'Ancient_Language_Document','Record of Ancient Language',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7276,'Picture_Letter','Doodled Message',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7277,'Munak_Doll','Munak Doll',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7278,'Welfare_Letter','Welfare Letter',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7279,'Vita_500_Bottlecap','Vita 500 Bottlecap',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7280,'Quiz_Participation_Certificate_1','1st Quiz Entry',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7281,'Quiz_Participation_Certificate_2','2nd Quiz Entry',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7282,'Quiz_Participation_Certificate_3','3rd Quiz Entry',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7283,'Quiz_Participation_Certificate_4','4th Quiz Entry',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7284,'Quiz_Participation_Certificate_5','5th Quiz Entry',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7285,'Sacred_Wool_Charm','Sacred Siltarae',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7286,'Red_Chili','Red Chili',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7287,'Sacred_Wool_Charm_2','Sacred Siltarae 2',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7288,'Engagement_Ring','Engagement Ring',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7289,'Olivite','Olivite',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7290,'Gold_Mica','Gold Mica',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7291,'Agate','Agate',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7292,'White_Mica','White Mica',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7293,'Rose_Quartz','Rose Quartz',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7294,'Turquoise','Turquoise',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7295,'Citrine','Citrine',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7296,'Augite','Augite',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7297,'Black_Mica','Black Mica',3,20,NULL,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7298,'Leaf_Cloth','Leaf Cloth',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7299,'Bamboo_Basket','Bamboo Basket',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7300,'Jeweled_Ore','Jeweled Ore',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7301,'Knife_Decoration','Knife Decoration',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7302,'Krathong','Krathong',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7303,'Rice_Bag','Rice Straw Bag',3,20,NULL,800,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7304,'Witchs_Spellbook','Witchs Spellbook',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7305,'Unknown_item','Authority of 9 worlds',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7306,'Piece_of_Soul','Piece of Soul',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7307,'Whisper_of_Soul','Whisper of Soul',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7308,'Witchs_Potion','Witchs Potion',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7309,'Crows_Wing','Crows Wing',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7310,'Peco_Coupon','Pecopeco Free Coupon',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7311,'Airship_Coupon','Airship Free Coupon',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7312,'Jubile','Jubilaeum',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7313,'Witchs_Voucher','Witchs Voucher',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7314,'The_Sign','The Sign',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7315,'Black_Quartz_Piece','Piece of Black Quartz',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7316,'Insect_Long_leg','Insects Long Leg',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7317,'Rusted_Bolt','Rusted Bolt',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7318,'Old_Pick','Old Pick',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7319,'Old_Iron_Plate','Old Iron Plate',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7320,'Dust','Dust',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7321,'Quartz_Piece','Piece of Quartz',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7322,'Poison_Gas','Poison Gas',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7323,'Battered_Kettle','Battered Kettle',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7324,'Toothed_Wheel','Gear',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7325,'Tube','Tube',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7326,'Fluorescent_Colored_Liquid','Fluorescent Liquid',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7327,'Flashlight','Flashlight',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7500,'THG_Membership','THG Membership',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (7501,'Token_Bag','Token Bag',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9001,'Poring_Egg','Poring Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9002,'Drops_Egg','Drops Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9003,'Poporing_Egg','Poporing Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9004,'Lunatic_Egg','Lunatic Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9005,'Picky_Egg','Picky Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9006,'Chonchon_Egg','Chonchon Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9007,'Steel_Chonchon_Egg','Steel Chonchon Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9008,'Hunter_Fly_Egg','Hunter Fly Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9009,'Savage_Babe_Egg','Savage Babe Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9010,'Baby_Desert_Wolf_Egg','Baby Desert Wolf Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9011,'Rocker_Egg','Rocker Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9012,'Spore_Egg','Spore Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9013,'Poison_Spore_Egg','Poison Spore Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9014,'PecoPeco_Egg','PecoPeco Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9015,'Smokie_Egg','Smokie Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9016,'Yoyo_Egg','Yoyo Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9017,'Orc_Warrior_Egg','Orc Warrior Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9018,'Munak_Egg','Munak Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9019,'Dokkaebi_Egg','Dokkaebi Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9020,'Sohee_Egg','Sohee Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9021,'Isis_Egg','Isis Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9022,'Green_Petite_Egg','Green Petite Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9023,'Deviruchi_Egg','Deviruchi Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9024,'Bapho_Jr._Egg','Bapho Jr. Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9025,'Bongun_Egg','Bongun Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9026,'Alice_Egg','Alice Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9027,'Zherlthsh_Egg','Zherlthsh Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9028,'test_Egg','Test Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (9029,'test_Egg_','Test Egg',7,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10001,'Skull_Helm','Skull Helm',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10002,'Monster_Oxygen_Mask','Monster Oxygen Mask',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10003,'Transparent_Head_Protector','Transparent Headgear',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10004,'Pacifier','Pacifier',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10005,'Wig','Wig',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10006,'Queens_Hair_Ornament','Queens Hair Ornament',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10007,'Silk_Ribbon','Silk Ribbon',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10008,'Punisher','Punisher',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10009,'Wild_Flower','Wild Flower',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10010,'Battered_Pot','Battered Pot',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10011,'Stellar_Hairpin','Stellar Hairpin',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10012,'Tiny_Egg_Shell','Tiny Egg Shell',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10013,'Backpack','Backpack',8,1500,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT 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);
+INSERT INTO `item_db` VALUES (10015,'Green_Lace','Green Lace',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10016,'Golden_Bell','Golden Bell',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10017,'Bark_Shorts','Bark Shorts',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10018,'Monkey_Circlet','Monkey Circlet',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10019,'Red_Muffler','Red Muffler',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (10020,'Sword_of_Chinese_Exorcist','Sword of Chinese Exorcist',8,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11000,'Prontera_History_Book','Prontera History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11001,'Izlude_History_Book','Izlude History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11002,'Yuno_History_Book','Yuno History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11003,'Geffen_History_Book','Geffen History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11004,'Aldebaran_History_Book','Aldebaran History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11005,'Alberta_History_Book','Alberta History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11006,'Payon_History_Book','Payon History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11007,'History_Book','Unknown Item',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11009,'History_Book','Unknown Item',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11010,'Archer_Village_History_Book','Unknown Item',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11011,'Lutie_History_Book','Luite History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11012,'Jawaii_History_Book','Jawaii History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11013,'Gonryun_History_Book','Gonryun History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11014,'Mjolnir_History_Book','Mjolnir History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11015,'Amatsu_History_Book','Amatsu History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11016,'Umbala_History_Book','Umbala History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11017,'Nifleheim_History_Book','Nifflheim History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11018,'Morroc_History_Book','Morroc History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11019,'Comodo_History_Book','Comodo History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (11020,'Louyang_History_Book','Louyang History Book',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (12000,'Frost_Diver_5','Frost Diver Level 5',2,700,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 15,5,"Frost Diver Level 5";',NULL);
+INSERT INTO `item_db` VALUES (12001,'Heal_3','Heal Level 3',2,1000,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 28,3,"Heal Level 3";',NULL);
+INSERT INTO `item_db` VALUES (12002,'Heal_5','Heal Level 5',2,2000,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 28,5,"Heal Level 5";',NULL);
+INSERT INTO `item_db` VALUES (12003,'Teleport_1','Teleport Level 1',2,100,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'itemskill 26,1,"Teleport Level 1";',NULL);
+INSERT INTO `item_db` VALUES (12004,'Arrow_Quiver','Arrow Quiver',2,500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1750,500;',NULL);
+INSERT INTO `item_db` VALUES (12005,'Iron_Arrow_Quiver','Iron Arrow Quiver',2,1000,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1770,500;',NULL);
+INSERT INTO `item_db` VALUES (12006,'Steel_Arrow_Quiver','Steel Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1753,500;',NULL);
+INSERT INTO `item_db` VALUES (12007,'Oridecon_Arrow_Quiver','Oridecon Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1765,500;',NULL);
+INSERT INTO `item_db` VALUES (12008,'Fire_Arrow_Quiver','Fire Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1752,500;',NULL);
+INSERT INTO `item_db` VALUES (12009,'Silver_Arrow_Quiver','Silver Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1751,500;',NULL);
+INSERT INTO `item_db` VALUES (12010,'Arrow_of_Wind_Quiver','Arrow of Wind Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1755,500;',NULL);
+INSERT INTO `item_db` VALUES (12011,'Stone_Arrow_Quiver','Stone Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1756,500;',NULL);
+INSERT INTO `item_db` VALUES (12012,'Crystal_Arrow_Quiver','Crystal Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1754,500;',NULL);
+INSERT INTO `item_db` VALUES (12013,'Shadow_Arrow_Quiver','Shadow Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1767,500;',NULL);
+INSERT INTO `item_db` VALUES (12014,'Immaterial_Arrow_Quiver','Immaterial Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1757,500;',NULL);
+INSERT INTO `item_db` VALUES (12015,'Rusty_Arrow_Quiver','Rusty Arrow Quiver',2,1500,NULL,250,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'getitem 1762,500;',NULL);
+INSERT INTO `item_db` VALUES (12016,'Speed_Increasing_Potion','Speed Potion',2,1000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (12017,'Speed_Decreasing_Potion','Speed Potion',2,1000,NULL,100,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (12018,'Fire_Cracker','Fire Cracker',2,250,NULL,20,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,'misceffect(256);',NULL);
+INSERT INTO `item_db` VALUES (12019,'Sacred_Egg','Sacred Egg',2,20,NULL,150,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `item_db` VALUES (12020,'Dark_Water','Dark Water',2,20,NULL,10,NULL,NULL,NULL,NULL,10477567,2,NULL,NULL,NULL,NULL,NULL,NULL);
+
diff --git a/sql-files/logs.sql b/sql-files/logs.sql
index 332873648..8dc764ec5 100644
--- a/sql-files/logs.sql
+++ b/sql-files/logs.sql
@@ -25,6 +25,8 @@ CREATE TABLE `droplog` (
`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 '',
PRIMARY KEY (`drop_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
@@ -151,4 +153,17 @@ CREATE TABLE `atcommandlog` (
`map` varchar(20) NOT NULL default '',
`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 '',
+ `mes` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`npc_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ; \ No newline at end of file
diff --git a/sql-files/mail.sql b/sql-files/mail.sql
index 201142d59..62cc9d65d 100644
--- a/sql-files/mail.sql
+++ b/sql-files/mail.sql
@@ -1,5 +1,3 @@
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `ragnarok`;
-USE `ragnarok`;
CREATE TABLE `mail` (
`message_id` int(11) NOT NULL auto_increment,
`to_account_id` int(11) NOT NULL default '0',
diff --git a/sql-files/main-new.sql b/sql-files/main-new.sql
deleted file mode 100644
index c0293755a..000000000
--- a/sql-files/main-new.sql
+++ /dev/null
@@ -1,560 +0,0 @@
-#-------------------------
-#
-# LOGIN SERVER DATABASE
-#
-#-------------------------
-
-# Database: Ragnarok
-# Table: 'login'
-#
-
-CREATE TABLE `login` (
- `account_id` mediumint(7) UNSIGNED NOT NULL AUTO_INCREMENT,
- `userid` varchar(32) NOT NULL default '',
- `user_pass` varchar(32) NOT NULL default '',
- `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00',
- `logincount` smallint(4) UNSIGNED NOT NULL default '0',
- `sex` CHAR NOT NULL default 'M',
- `email` varchar(60) NOT NULL default '',
- `level` tinyint(2) UNSIGNED NOT NULL default '0',
- `connect_until` int(11) UNSIGNED NOT NULL default '0',
- `last_ip` varchar(15) NOT NULL default '',
- `ban_until` int(11) UNSIGNED NOT NULL default '0',
- `state` tinyint(2) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`account_id`),
- INDEX (`account_id`,`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');
-
-# Database: Ragnarok
-# Table: 'login_error'
-#
-CREATE TABLE `login_error` (
- `err_id` tinyint(2) UNSIGNED NOT NULL default '0',
- `reason` varchar(100) NOT NULL default 'Unknown',
- PRIMARY KEY (`err_id`),
- INDEX (`err_id`)
-) TYPE=MyISAM;
-
-# Database: Ragnarok
-# Table: 'loginlog'
-#
-CREATE TABLE `loginlog` (
- `time` datetime NOT NULL default '0000-00-00 00:00:00',
- `ip` varchar(15) NOT NULL default '',
- `user` varchar(32) NOT NULL default '',
- `rcode` tinyint(4) NOT NULL default '0',
- `log` varchar(255) NOT NULL default ''
-) TYPE=MyISAM;
-
-
-# Database: Ragnarok
-# Table: 'ragsrvinfo'
-#
-CREATE TABLE `ragsrvinfo` (
- `index` tinyint(2) UNSIGNED NOT NULL default '0',
- `name` varchar(16) NOT NULL default '',
- `exp` smallint(4) UNSIGNED NOT NULL default '0',
- `jexp` smallint(4) UNSIGNED NOT NULL default '0',
- `drop` tinyint(2) UNSIGNED NOT NULL default '0',
- `motd` varchar(255) NOT NULL default ''
-) TYPE=MyISAM;
-
-# Database: Ragnarok
-# Table: 'sstatus'
-#
-CREATE TABLE `sstatus` (
- `index` tinyint(4) NOT NULL default '0',
- `name` varchar(255) NOT NULL default '',
- `user` smallint(3) UNSIGNED NOT NULL default '0'
-) TYPE=MyISAM;
-
-# Database: Ragnarok
-# Table: 'interlog'
-#
-CREATE TABLE `interlog` (
- `time` datetime NOT NULL default '0000-00-00 00:00:00',
- `log` varchar(255) NOT NULL default ''
-) TYPE=MyISAM;
-
-# Database: Ragnarok
-# Table: '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;
-
-
-# Database: Rangarok
-# Table: 'errors'
-#
-CREATE TABLE `errors` (
- `result` tinyint(3) UNSIGNED NOT NULL,
- `error` varchar(20) NOT NULL,
- INDEX (`result`)
-) TYPE=MyISAM;
-
-INSERT INTO `errors` (`result`,`error`) VALUES
-('1','Unregistered ID'),
-('2','Incorrect Password'),
-('3','Account Expired'),
-('4','Rejected from Server'),
-('5','Blocked by GM'),
-('6','Not latest game EXE'),
-('7','Banned'),
-('8','Server OverPopulated'),
-('9',''),
-('100','Account Gone');
-
-##########################
-#
-# Inter server / Char server databases
-# By CLOWNISIUS aka Anthony
-#
-##########################
-
-# Database: Ragnarok
-# Table: 'party'
-#
-CREATE TABLE `party` (
- `party_id` smallint(3) UNSIGNED NOT NULL default '100',
- `name` varchar(100) NOT NULL default '',
- `exp` int(11) UNSIGNED NOT NULL default '0',
- `item` int(11) UNSIGNED NOT NULL default '0',
- `leader_id` smallint(4) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`party_id`),
- INDEX (`party_id`,`leader_id`)
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'char'
-#
-CREATE TABLE `char` (
- `char_id` mediumint(6) UNSIGNED NOT NULL auto_increment,
- `account_id` mediumint(7) UNSIGNED NOT NULL default '0',
- `char_num` tinyint(1) UNSIGNED NOT NULL default '0',
- `name` varchar(32) NOT NULL default '',
- `class` smallint(4) UNSIGNED NOT NULL default '0',
- `base_level` tinyint(3) UNSIGNED NOT NULL default '1',
- `job_level` tinyint(3) UNSIGNED NOT NULL default '1',
- `base_exp` int(9) UNSIGNED NOT NULL default '0',
- `job_exp` int(9) UNSIGNED NOT NULL default '0',
- `zeny` int(11) UNSIGNED NOT NULL default '500',
- `str` tinyint(3) UNSIGNED NOT NULL default '0',
- `agi` tinyint(3) UNSIGNED NOT NULL default '0',
- `vit` tinyint(3) UNSIGNED NOT NULL default '0',
- `int` tinyint(3) UNSIGNED NOT NULL default '0',
- `dex` tinyint(3) UNSIGNED NOT NULL default '0',
- `luk` tinyint(3) UNSIGNED NOT NULL default '0',
- `max_hp` smallint(5) UNSIGNED NOT NULL default '0',
- `hp` smallint(5) UNSIGNED NOT NULL default '0',
- `max_sp` smallint(5) UNSIGNED NOT NULL default '0',
- `sp` smallint(5) UNSIGNED NOT NULL default '0',
- `status_point` smallint(4) UNSIGNED NOT NULL default '0',
- `skill_point` smallint(4) UNSIGNED NOT NULL default '0',
- `option` smallint(5) UNSIGNED NOT NULL default '0',
- `karma` tinyint(3) UNSIGNED NOT NULL default '0',
- `manner` tinyint(3) UNSIGNED NOT NULL default '0',
- `party_id` smallint(3) UNSIGNED NULL,
- `guild_id` smallint(5) UNSIGNED NULL,
- `pet_id` smallint(4) UNSIGNED NOT NULL default '0',
- `hair` tinyint(3) UNSIGNED NOT NULL default '0',
- `hair_color` tinyint(3) UNSIGNED NOT NULL default '0',
- `clothes_color` tinyint(3) UNSIGNED NOT NULL default '0',
- `weapon` tinyint(3) UNSIGNED NOT NULL default '1',
- `shield` tinyint(3) UNSIGNED NOT NULL default '0',
- `head_top` tinyint(3) UNSIGNED NOT NULL default '0',
- `head_mid` tinyint(3) UNSIGNED NOT NULL default '0',
- `head_bottom` tinyint(3) UNSIGNED NOT NULL default '0',
- `last_map` varchar(20) NOT NULL default 'new_5-1.gat',
- `last_x` smallint(3) UNSIGNED NOT NULL default '53',
- `last_y` smallint(3) UNSIGNED NOT NULL default '111',
- `save_map` varchar(20) NOT NULL default 'new_5-1.gat',
- `save_x` smallint(3) UNSIGNED NOT NULL default '53',
- `save_y` smallint(3) UNSIGNED NOT NULL default '111',
- `partner_id` mediumint(6) UNSIGNED NULL,
- `online` tinyint(1) NOT NULL default '0',
- PRIMARY KEY (`char_id`,`account_id`),
- INDEX (`account_id`,`char_id`,`name`),
- KEY (`partner_id`),
- KEY (`party_id`),
- KEY (`guild_id`),
- UNIQUE (`name`),
- FOREIGN KEY (`account_id`) REFERENCES `login` (`account_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- FOREIGN KEY (`partner_id`) REFERENCES `char` (`char_id`) ON DELETE SET NULL
-) TYPE=INNODB AUTO_INCREMENT=150000;
-
-CREATE TABLE `friend` (
- `char_id` mediumint(6) UNSIGNED NOT NULL default '0',
- `position` tinyint(1) UNSIGNED NOT NULL default '0',
- `friend_id` mediumint(6) UNSIGNED NOT NULL default '0',
- `friend_name` varchar(32) NOT NULL default '',
- PRIMARY KEY (`char_id`,`friend_id`),
- INDEX (`char_id`),
- INDEX (`friend_id`),
- FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE,
- FOREIGN KEY (`friend_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
-) TYPE=InnoDB;
-
-# Database: Ragnarok
-# Table: 'global_reg_value'
-#
-CREATE TABLE `global_reg_value` (
- `char_id` mediumint(6) UNSIGNED,
- `str` varchar(255) NOT NULL default '',
- `value` varchar(255) NOT NULL default '0',
- `type` tinyint(3) UNSIGNED NOT NULL default '3',
- `account_id` mediumint(7) UNSIGNED,
- PRIMARY KEY (`char_id`,`str`,`account_id`),
- INDEX (`account_id`),
- INDEX (`char_id`),
- FOREIGN KEY (`account_id`) REFERENCES `login`(`account_id`) ON DELETE CASCADE,
- FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-## Cannot use due to char and account load from same database, saving will be done to diferent DBs soon.
-## so that dependencies can be placed in.
-
-# Login register value.
-#
-
-CREATE TABLE `account_reg_value` (
- `account_id` mediumint(7) UNSIGNED,
- `str` varchar(255) NOT NULL default '',
- `value` varchar(255) NOT NULL default '0',
- KEY (`account_id`, `str`),
- FOREIGN KEY (`account_id`) REFERENCES `login`(`account_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Character register value.
-#
-
-CREATE TABLE `char_reg_value` (
- `char_id` mediumint(6) UNSIGNED,
- `str` varchar(255) NOT NULL default '',
- `value` varchar(255) NOT NULL default '0',
- PRIMARY KEY (`char_id`, `str`),
- FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-
-# Database: Ragnarok
-# Table: 'inventory'
-#
-CREATE TABLE `inventory` (
- `char_id` mediumint(6) UNSIGNED NOT NULL default '0',
- `id` smallint(4) UNSIGNED NOT NULL auto_increment,
- `nameid` smallint(4) UNSIGNED NOT NULL default '0',
- `amount` tinyint(3) UNSIGNED NOT NULL default '0',
- `equip` smallint(5) UNSIGNED NOT NULL default '0',
- `identify` tinyint(1) UNSIGNED NOT NULL default '0',
- `refine` tinyint(1) UNSIGNED NOT NULL default '0',
- `attribute` tinyint(3) UNSIGNED NOT NULL default '0',
- `card0` smallint(4) UNSIGNED NOT NULL default '0',
- `card1` smallint(4) UNSIGNED NOT NULL default '0',
- `card2` smallint(4) UNSIGNED NOT NULL default '0',
- `card3` smallint(4) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`id`,`char_id`),
- INDEX(`char_id`,`id`),
- FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'memo'
-#
-CREATE TABLE `memo` (
- `char_id` mediumint(6) UNSIGNED NOT NULL default '0',
- `memo_id` smallint(4) UNSIGNED NOT NULL default '0',
- `map` varchar(20) NOT NULL default '',
- `x` smallint(3) UNSIGNED NOT NULL default '0',
- `y` smallint(3) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`char_id`,`memo_id`),
- INDEX (`char_id`,`memo_id`),
- FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'pet'
-#
-CREATE TABLE `pet` (
- `pet_id` smallint(4) UNSIGNED NOT NULL default '0',
- `class` smallint(4) UNSIGNED NOT NULL default '0',
- `name` varchar(24) NOT NULL default '',
- `account_id` mediumint(7) UNSIGNED NOT NULL default '0',
- `char_id` mediumint(6) UNSIGNED NOT NULL default '0',
- `level` tinyint(3) UNSIGNED NOT NULL default '0',
- `egg_id` smallint(4) UNSIGNED NOT NULL default '0',
- `equip` smallint(5) UNSIGNED NOT NULL default '0',
- `intimate` smallint(4) UNSIGNED NOT NULL default '0',
- `hungry` tinyint(3) UNSIGNED NOT NULL default '0',
- `rename_flag` tinyint(1) UNSIGNED NOT NULL default '0',
- `incuvate` tinyint(1) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`char_id`,`pet_id`),
- INDEX (`char_id`,`pet_id`),
- FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'skill'
-#
-CREATE TABLE `skill` (
- `char_id` mediumint(6) UNSIGNED NOT NULL default '0',
- `id` smallint(3) UNSIGNED NOT NULL default '0',
- `lv` tinyint(3) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`char_id`,`id`),
- INDEX (`char_id`,`id`),
- FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'cart_inventory'
-#
-CREATE TABLE `cart_inventory` (
- `char_id` mediumint(6) UNSIGNED NOT NULL default '0',
- `id` smallint(4) UNSIGNED NOT NULL auto_increment,
- `nameid` smallint(4) UNSIGNED NOT NULL default '0',
- `amount` tinyint(3) UNSIGNED NOT NULL default '0',
- `equip` smallint(5) UNSIGNED NOT NULL default '0',
- `identify` tinyint(1) UNSIGNED NOT NULL default '0',
- `refine` tinyint(1) UNSIGNED NOT NULL default '0',
- `attribute` tinyint(4) UNSIGNED NOT NULL default '0',
- `card0` smallint(4) UNSIGNED NOT NULL default '0',
- `card1` smallint(4) UNSIGNED NOT NULL default '0',
- `card2` smallint(4) UNSIGNED NOT NULL default '0',
- `card3` smallint(4) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`id`,`char_id`),
- INDEX (`char_id`,`id`),
- FOREIGN KEY (`char_id`) REFERENCES `char`(`char_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'storage'
-#
-CREATE TABLE `storage` (
- `account_id` mediumint(7) UNSIGNED NOT NULL default '0',
- `id` smallint(4) UNSIGNED NOT NULL default '0',
- `nameid` smallint(4) UNSIGNED NOT NULL default '0',
- `amount` tinyint(3) UNSIGNED NOT NULL default '0',
- `equip` smallint(5) UNSIGNED NOT NULL default '0',
- `identify` tinyint(1) UNSIGNED NOT NULL default '0',
- `refine` tinyint(1) UNSIGNED NOT NULL default '0',
- `attribute` tinyint(4) UNSIGNED NOT NULL default '0',
- `card0` smallint(4) UNSIGNED NOT NULL default '0',
- `card1` smallint(4) UNSIGNED NOT NULL default '0',
- `card2` smallint(4) UNSIGNED NOT NULL default '0',
- `card3` smallint(4) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`account_id`,`id`),
- INDEX (`account_id`,`id`),
- FOREIGN KEY (`account_id`) REFERENCES `login` (`account_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-##########################
-#
-# Inter server / Guild server databases
-# By CLOWNISIUS aka Anthony
-#
-##########################
-
-
-# Database: Ragnarok
-# Table: 'guild'
-#
-CREATE TABLE `guild` (
- `guild_id` smallint(5) UNSIGNED NOT NULL default '10000',
- `name` varchar(24) NOT NULL default '',
- `char_id` mediumint(6) UNSIGNED NOT NULL default '10000',
- `master` varchar(24) NOT NULL default '',
- `guild_lv` tinyint(3) UNSIGNED NOT NULL default '0',
- `connect_member` tinyint(3) UNSIGNED NOT NULL default '0',
- `max_member` tinyint(3) UNSIGNED NOT NULL default '0',
- `average_lv` tinyint(3) UNSIGNED NOT NULL default '0',
- `exp` int(9) UNSIGNED NOT NULL default '0',
- `next_exp` int(9) UNSIGNED NOT NULL default '0',
- `skill_point` smallint(4) UNSIGNED NOT NULL default '0',
- `castle_id` smallint(5) UNSIGNED NOT NULL default '-1',
- `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`),
- INDEX (`char_id`,`guild_id`),
- FOREIGN KEY (`char_id`) REFERENCES `char`(`char_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-
-CREATE TABLE `guild_alliance` (
- `guild_id` smallint(5) UNSIGNED NOT NULL default '0',
- `opposition` smallint(5) UNSIGNED NOT NULL default '0',
- `alliance_id` smallint(5) UNSIGNED NOT NULL default '0',
- `name` varchar(24) NOT NULL default '',
- PRIMARY KEY (`guild_id`,`alliance_id`),
- INDEX (`guild_id`),
- INDEX (`alliance_id`),
- FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE,
- FOREIGN KEY (`alliance_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'guild_castle'
-#
-CREATE TABLE `guild_castle` (
- `castle_id` smallint(5) UNSIGNED NOT NULL default '0',
- `guild_id` smallint(5) UNSIGNED NOT NULL default '0',
- `economy` int(11) NOT NULL default '0',
- `defense` int(11) NOT NULL default '0',
- `triggerE` int(11) NOT NULL default '0',
- `triggerD` int(11) NOT NULL default '0',
- `nextTime` int(11) NOT NULL default '0',
- `payTime` int(11) NOT NULL default '0',
- `createTime` int(11) NOT NULL default '0',
- `visibleC` int(11) NOT NULL default '0',
- `visibleG0` int(11) NOT NULL default '0',
- `visibleG1` int(11) NOT NULL default '0',
- `visibleG2` int(11) NOT NULL default '0',
- `visibleG3` int(11) NOT NULL default '0',
- `visibleG4` int(11) NOT NULL default '0',
- `visibleG5` int(11) NOT NULL default '0',
- `visibleG6` int(11) NOT NULL default '0',
- `visibleG7` int(11) NOT NULL default '0',
- `gHP0` smallint(5) UNSIGNED NOT NULL default '0',
- `ghP1` smallint(5) UNSIGNED NOT NULL default '0',
- `gHP2` smallint(5) UNSIGNED NOT NULL default '0',
- `gHP3` smallint(5) UNSIGNED NOT NULL default '0',
- `gHP4` smallint(5) UNSIGNED NOT NULL default '0',
- `gHP5` smallint(5) UNSIGNED NOT NULL default '0',
- `gHP6` smallint(5) UNSIGNED NOT NULL default '0',
- `gHP7` smallint(5) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`castle_id`),
- INDEX (`guild_id`,`castle_id`),
- FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'guild_expulsion'
-#
-CREATE TABLE `guild_expulsion` (
- `guild_id` smallint(5) 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` mediumint(7) UNSIGNED NOT NULL default '0',
- `rsv1` int(11) NOT NULL default '0',
- `rsv2` int(11) NOT NULL default '0',
- `rsv3` int(11) NOT NULL default '0',
- PRIMARY KEY (`guild_id`,`name`),
- INDEX (`guild_id`,`name`),
- FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-
-##########################
-#
-# Linked Database to the CHAR section and LOGIN
-#
-##########################
-
-# Database: Ragnarok
-# Table: 'guild_member'
-#
-
-CREATE TABLE `guild_member` (
- `guild_id` smallint(5) UNSIGNED NOT NULL default '0',
- `account_id` mediumint(7) UNSIGNED NOT NULL default '0',
- `char_id` mediumint(6) UNSIGNED NOT NULL default '0',
- `hair` tinyint(3) UNSIGNED NOT NULL default '0',
- `hair_color` tinyint(3) UNSIGNED NOT NULL default '0',
- `gender` tinyint(3) UNSIGNED NOT NULL default '0',
- `class` smallint(4) UNSIGNED NOT NULL default '0',
- `lv` tinyint(3) UNSIGNED NOT NULL default '0',
- `exp` int(9) UNSIGNED NOT NULL default '0',
- `exp_payper` int(9) UNSIGNED NOT NULL default '0',
- `online` tinyint(1) UNSIGNED NOT NULL default '0',
- `position` smallint(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`),
- INDEX (`guild_id`),
- INDEX (`char_id`),
- FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE,
- FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'guild_position'
-#
-CREATE TABLE `guild_position` (
- `guild_id` smallint(5) UNSIGNED NOT NULL default '0',
- `position` smallint(5) UNSIGNED NOT NULL default '0',
- `name` varchar(24) NOT NULL default '',
- `mode` int(11) UNSIGNED NOT NULL default '0',
- `exp_mode` int(11) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`guild_id`),
- INDEX (`guild_id`),
- FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'guild_skill'
-#
-CREATE TABLE `guild_skill` (
- `guild_id` smallint(5) UNSIGNED NOT NULL default '0',
- `id` smallint(4) UNSIGNED NOT NULL default '0',
- `lv` tinyint(3) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`guild_id`,`id`),
- INDEX (`guild_id`,`id`),
- FOREIGN KEY (`guild_id`) REFERENCES `guild`(`guild_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-# Database: Ragnarok
-# Table: 'guild_storage'
-#
-CREATE TABLE `guild_storage` (
- `id` mediumint(5) UNSIGNED NOT NULL auto_increment,
- `guild_id` smallint(5) UNSIGNED NOT NULL default '0',
- `nameid` smallint(4) UNSIGNED NOT NULL default '0',
- `amount` tinyint(3) UNSIGNED NOT NULL default '0',
- `equip` smallint(5) UNSIGNED NOT NULL default '0',
- `identify` tinyint(1) UNSIGNED NOT NULL default '0',
- `refine` tinyint(1) UNSIGNED NOT NULL default '0',
- `attribute` tinyint(4) UNSIGNED NOT NULL default '0',
- `card0` smallint(4) UNSIGNED NOT NULL default '0',
- `card1` smallint(4) UNSIGNED NOT NULL default '0',
- `card2` smallint(4) UNSIGNED NOT NULL default '0',
- `card3` smallint(4) UNSIGNED NOT NULL default '0',
- PRIMARY KEY (`guild_id`,`id`),
- INDEX (`id`,`guild_id`),
- FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
-) TYPE=INNODB;
-
-
-# Database: Ragnarok
-# Table: '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` mediumint(7) UNSIGNED NOT NULL default '0',
- `char_num` tinyint(1) UNSIGNED NOT NULL default '0',
- `name` varchar(255) NOT NULL default '',
- `str` tinyint(3) UNSIGNED NOT NULL default '0',
- `agi` tinyint(3) UNSIGNED NOT NULL default '0',
- `vit` tinyint(3) UNSIGNED NOT NULL default '0',
- `int` tinyint(3) UNSIGNED NOT NULL default '0',
- `dex` tinyint(3) UNSIGNED NOT NULL default '0',
- `luk` tinyint(3) UNSIGNED NOT NULL default '0',
- `hair` tinyint(3) UNSIGNED NOT NULL default '0',
- `hair_color` tinyint(3) UNSIGNED NOT NULL default '0'
-) TYPE=MyISAM;
-
-ALTER TABLE `char` ADD FOREIGN KEY (`party_id`) REFERENCES `party` (`party_id`) ON DELETE SET NULL ON UPDATE SET NULL;
-ALTER TABLE `char` ADD FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE SET NULL ON UPDATE SET NULL; \ No newline at end of file
diff --git a/sql-files/main.sql b/sql-files/main.sql
new file mode 100644
index 000000000..49c9848c5
--- /dev/null
+++ b/sql-files/main.sql
@@ -0,0 +1,501 @@
+# Database: Ragnarok
+# Table: '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',
+ `broken` int(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'char'
+#
+CREATE TABLE `char` (
+ `char_id` int(11) NOT NULL auto_increment,
+ `account_id` int(11) NOT NULL default '0',
+ `char_num` tinyint(4) NOT NULL default '0',
+ `name` varchar(255) NOT NULL default '',
+ `class` int(11) NOT NULL default '0',
+ `base_level` bigint(20) unsigned NOT NULL default '1',
+ `job_level` bigint(20) unsigned NOT NULL default '1',
+ `base_exp` bigint(20) NOT NULL default '0',
+ `job_exp` bigint(20) NOT NULL default '0',
+ `zeny` int(11) NOT NULL default '500',
+ `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',
+ `max_hp` int(11) NOT NULL default '0',
+ `hp` int(11) NOT NULL default '0',
+ `max_sp` int(11) NOT NULL default '0',
+ `sp` int(11) NOT NULL default '0',
+ `status_point` int(11) NOT NULL default '0',
+ `skill_point` int(11) NOT NULL default '0',
+ `option` int(11) NOT NULL default '0',
+ `karma` int(11) NOT NULL default '0',
+ `manner` int(11) NOT NULL default '0',
+ `party_id` int(11) NOT NULL default '0',
+ `guild_id` int(11) NOT NULL default '0',
+ `pet_id` int(11) NOT NULL default '0',
+ `hair` tinyint(4) NOT NULL default '0',
+ `hair_color` int(11) NOT NULL default '0',
+ `clothes_color` tinyint(4) NOT NULL default '0',
+ `weapon` int(11) NOT NULL default '1',
+ `shield` int(11) NOT NULL default '0',
+ `head_top` int(11) NOT NULL default '0',
+ `head_mid` int(11) NOT NULL default '0',
+ `head_bottom` int(11) NOT NULL default '0',
+ `last_map` varchar(20) NOT NULL default 'new_5-1.gat',
+ `last_x` int(4) NOT NULL default '53',
+ `last_y` int(11) NOT NULL default '111',
+ `save_map` varchar(20) NOT NULL default 'new_5-1.gat',
+ `save_x` int(11) NOT NULL default '53',
+ `save_y` int(11) NOT NULL default '111',
+ `partner_id` int(11) NOT NULL default '0',
+ `online` tinyint(4) NOT NULL default '0',
+ PRIMARY KEY (`char_id`),
+ KEY `party_id` (`party_id`),
+ KEY `guild_id` (`guild_id`)
+) TYPE=MyISAM AUTO_INCREMENT=15000;
+
+# Database: Ragnarok
+# Table: '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;
+
+# Database: Ragnarok
+# Table: 'global_reg_value'
+#
+CREATE TABLE `global_reg_value` (
+ `char_id` int(11) 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) NOT NULL default '0',
+ PRIMARY KEY (`char_id`,`str`,`account_id`),
+ KEY `account_id` (`account_id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'guild'
+#
+CREATE TABLE `guild` (
+ `guild_id` int(11) NOT NULL default '10000',
+ `name` varchar(24) NOT NULL default '',
+ `master` varchar(24) NOT NULL default '',
+ `guild_lv` smallint(6) NOT NULL default '0',
+ `connect_member` smallint(6) NOT NULL default '0',
+ `max_member` smallint(6) NOT NULL default '0',
+ `average_lv` smallint(6) NOT NULL default '0',
+ `exp` int(11) NOT NULL default '0',
+ `next_exp` int(11) NOT NULL default '0',
+ `skill_point` int(11) NOT NULL default '0',
+ `castle_id` int(11) NOT NULL default '-1',
+ `mes1` varchar(60) NOT NULL default '',
+ `mes2` varchar(120) NOT NULL default '',
+ `emblem_len` int(11) NOT NULL default '0',
+ `emblem_id` int(11) NOT NULL default '0',
+ `emblem_data` blob NOT NULL,
+ PRIMARY KEY (`guild_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'guild_alliance'
+#
+CREATE TABLE `guild_alliance` (
+ `guild_id` int(11) NOT NULL default '0',
+ `opposition` int(11) NOT NULL default '0',
+ `alliance_id` int(11) NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ KEY `guild_id` (`guild_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'guild_castle'
+#
+CREATE TABLE `guild_castle` (
+ `castle_id` int(11) NOT NULL default '0',
+ `guild_id` int(11) NOT NULL default '0',
+ `economy` int(11) NOT NULL default '0',
+ `defense` int(11) NOT NULL default '0',
+ `triggerE` int(11) NOT NULL default '0',
+ `triggerD` int(11) NOT NULL default '0',
+ `nextTime` int(11) NOT NULL default '0',
+ `payTime` int(11) NOT NULL default '0',
+ `createTime` int(11) NOT NULL default '0',
+ `visibleC` int(11) NOT NULL default '0',
+ `visibleG0` int(11) NOT NULL default '0',
+ `visibleG1` int(11) NOT NULL default '0',
+ `visibleG2` int(11) NOT NULL default '0',
+ `visibleG3` int(11) NOT NULL default '0',
+ `visibleG4` int(11) NOT NULL default '0',
+ `visibleG5` int(11) NOT NULL default '0',
+ `visibleG6` int(11) NOT NULL default '0',
+ `visibleG7` int(11) NOT NULL default '0',
+ `gHP0` int(11) NOT NULL default '0',
+ `ghP1` int(11) NOT NULL default '0',
+ `gHP2` int(11) NOT NULL default '0',
+ `gHP3` int(11) NOT NULL default '0',
+ `gHP4` int(11) NOT NULL default '0',
+ `gHP5` int(11) NOT NULL default '0',
+ `gHP6` int(11) NOT NULL default '0',
+ `gHP7` int(11) NOT NULL default '0',
+ PRIMARY KEY (`castle_id`),
+ KEY `guild_id` (`guild_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'guild_expulsion'
+#
+CREATE TABLE `guild_expulsion` (
+ `guild_id` int(11) 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) NOT NULL default '0',
+ `rsv1` int(11) NOT NULL default '0',
+ `rsv2` int(11) NOT NULL default '0',
+ `rsv3` int(11) NOT NULL default '0',
+ KEY `guild_id` (`guild_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'guild_member'
+#
+CREATE TABLE `guild_member` (
+ `guild_id` int(11) NOT NULL default '0',
+ `account_id` int(11) NOT NULL default '0',
+ `char_id` int(11) NOT NULL default '0',
+ `hair` smallint(6) NOT NULL default '0',
+ `hair_color` smallint(6) NOT NULL default '0',
+ `gender` smallint(6) NOT NULL default '0',
+ `class` smallint(6) NOT NULL default '0',
+ `lv` smallint(6) NOT NULL default '0',
+ `exp` bigint(20) NOT NULL default '0',
+ `exp_payper` int(11) NOT NULL default '0',
+ `online` tinyint(4) NOT NULL default '0',
+ `position` smallint(6) NOT NULL default '0',
+ `rsv1` int(11) NOT NULL default '0',
+ `rsv2` int(11) NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ KEY `guild_id` (`guild_id`),
+ KEY `account_id` (`account_id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'guild_position'
+#
+CREATE TABLE `guild_position` (
+ `guild_id` int(11) NOT NULL default '0',
+ `position` smallint(6) NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ `mode` int(11) NOT NULL default '0',
+ `exp_mode` int(11) NOT NULL default '0',
+ KEY `guild_id` (`guild_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'guild_skill'
+#
+CREATE TABLE `guild_skill` (
+ `guild_id` int(11) NOT NULL default '0',
+ `id` int(11) NOT NULL default '0',
+ `lv` int(11) NOT NULL default '0',
+ KEY `guild_id` (`guild_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'guild_storage'
+#
+CREATE TABLE `guild_storage` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `guild_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',
+ `broken` int(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `guild_id` (`guild_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'interlog'
+#
+CREATE TABLE `interlog` (
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `log` varchar(255) NOT NULL default ''
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'inventory'
+#
+CREATE TABLE `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',
+ `broken` int(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: '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;
+
+# Database: Ragnarok
+# Table: 'login'
+#
+CREATE TABLE `login` (
+ `account_id` int(11) 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) NOT NULL default '0',
+ `email` varchar(60) NOT NULL default '',
+ `level` smallint(3) NOT NULL default '0',
+ `error_message` int(11) NOT NULL default '0',
+ `connect_until` int(11) NOT NULL default '0',
+ `last_ip` varchar(100) NOT NULL default '',
+ `memo` int(11) NOT NULL default '0',
+ `ban_until` int(11) NOT NULL default '0',
+ `state` int(11) NOT NULL default '0',
+ PRIMARY KEY (`account_id`),
+ KEY `name` (`userid`)
+) TYPE=MyISAM 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');
+
+# Database: Ragnarok
+# Table: 'login_error'
+#
+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;
+
+# Database: Ragnarok
+# Table: '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;
+
+# Database: Ragnarok
+# Table: 'memo'
+#
+CREATE TABLE `memo` (
+ `memo_id` int(11) NOT NULL auto_increment,
+ `char_id` int(11) NOT NULL default '0',
+ `map` varchar(255) NOT NULL default '',
+ `x` mediumint(9) NOT NULL default '0',
+ `y` mediumint(9) NOT NULL default '0',
+ PRIMARY KEY (`memo_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'party'
+#
+CREATE TABLE `party` (
+ `party_id` int(11) NOT NULL default '100',
+ `name` char(100) NOT NULL default '',
+ `exp` int(11) NOT NULL default '0',
+ `item` int(11) NOT NULL default '0',
+ `leader_id` int(11) NOT NULL default '0',
+ PRIMARY KEY (`party_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'pet'
+#
+CREATE TABLE `pet` (
+ `pet_id` int(11) NOT NULL auto_increment,
+ `class` mediumint(9) NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ `account_id` int(11) NOT NULL default '0',
+ `char_id` int(11) NOT NULL default '0',
+ `level` tinyint(4) NOT NULL default '0',
+ `egg_id` int(11) NOT NULL default '0',
+ `equip` mediumint(8) unsigned NOT NULL default '0',
+ `intimate` mediumint(9) NOT NULL default '0',
+ `hungry` mediumint(9) NOT NULL default '0',
+ `rename_flag` tinyint(4) NOT NULL default '0',
+ `incuvate` int(11) NOT NULL default '0',
+ PRIMARY KEY (`pet_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'ragsrvinfo'
+#
+CREATE TABLE `ragsrvinfo` (
+ `index` int(11) NOT NULL default '0',
+ `name` varchar(255) NOT NULL default '',
+ `exp` int(11) NOT NULL default '0',
+ `jexp` int(11) NOT NULL default '0',
+ `drop` int(11) NOT NULL default '0',
+ `motd` varchar(255) NOT NULL default ''
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'skill'
+#
+CREATE TABLE `skill` (
+ `char_id` int(11) NOT NULL default '0',
+ `id` int(11) NOT NULL default '0',
+ `lv` tinyint(4) NOT NULL default '0',
+ PRIMARY KEY (`char_id`,`id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'sstatus'
+#
+CREATE TABLE `sstatus` (
+ `index` tinyint(4) NOT NULL default '0',
+ `name` varchar(255) NOT NULL default '',
+ `user` int(11) NOT NULL default '0'
+) TYPE=MyISAM;
+
+# Database: Ragnarok
+# Table: 'storage'
+#
+CREATE TABLE `storage` (
+ `id` int(11) NOT NULL auto_increment,
+ `account_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',
+ `broken` int(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `account_id` (`account_id`)
+) TYPE=MyISAM;
+
+CREATE TABLE `friends` (
+ `id` int(11) NOT NULL auto_increment,
+ `account_id` int(11) NOT NULL default '0',
+ `friend_id0` int(11) NOT NULL default '0',
+ `name0` varchar(255) NOT NULL default '',
+ `friend_id1` int(11) NOT NULL default '0',
+ `name1` varchar(255) NOT NULL default '',
+ `friend_id2` int(11) NOT NULL default '0',
+ `name2` varchar(255) NOT NULL default '',
+ `friend_id3` int(11) NOT NULL default '0',
+ `name3` varchar(255) NOT NULL default '',
+ `friend_id4` int(11) NOT NULL default '0',
+ `name4` varchar(255) NOT NULL default '',
+ `friend_id5` int(11) NOT NULL default '0',
+ `name5` varchar(255) NOT NULL default '',
+ `friend_id6` int(11) NOT NULL default '0',
+ `name6` varchar(255) NOT NULL default '',
+ `friend_id7` int(11) NOT NULL default '0',
+ `name7` varchar(255) NOT NULL default '',
+ `friend_id8` int(11) NOT NULL default '0',
+ `name8` varchar(255) NOT NULL default '',
+ `friend_id9` int(11) NOT NULL default '0',
+ `name9` varchar(255) NOT NULL default '',
+ `friend_id10` int(11) NOT NULL default '0',
+ `name10` varchar(255) NOT NULL default '',
+ `friend_id11` int(11) NOT NULL default '0',
+ `name11` varchar(255) NOT NULL default '',
+ `friend_id12` int(11) NOT NULL default '0',
+ `name12` varchar(255) NOT NULL default '',
+ `friend_id13` int(11) NOT NULL default '0',
+ `name13` varchar(255) NOT NULL default '',
+ `friend_id14` int(11) NOT NULL default '0',
+ `name14` varchar(255) NOT NULL default '',
+ `friend_id15` int(11) NOT NULL default '0',
+ `name15` varchar(255) NOT NULL default '',
+ `friend_id16` int(11) NOT NULL default '0',
+ `name16` varchar(255) NOT NULL default '',
+ `friend_id17` int(11) NOT NULL default '0',
+ `name17` varchar(255) NOT NULL default '',
+ `friend_id18` int(11) NOT NULL default '0',
+ `name18` varchar(255) NOT NULL default '',
+ `friend_id19` int(11) NOT NULL default '0',
+ `name19` varchar(255) NOT NULL default '',
+ `friend_id20` int(11) NOT NULL default '0',
+ `name20` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`id`),
+ KEY `account_id` (`account_id`)
+) TYPE=MyISAM
diff --git a/sql-files/mob_db.sql b/sql-files/mob_db.sql
new file mode 100644
index 000000000..89abab730
--- /dev/null
+++ b/sql-files/mob_db.sql
@@ -0,0 +1,687 @@
+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',
+ `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'
+) TYPE=MyISAM;
+
+INSERT 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,149,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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1003,'TESTEGG','Test Egg',2,10,0,10000,10000,0,3,9,99,0,1,99,1,1,1,1,10,12,0,4,22,0,512,0,512,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);
+INSERT 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,137,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);
+INSERT 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,133,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);
+INSERT INTO `mob_db` VALUES (1006,'THIEF_BUG_LARVA','Thief Bug Larva',0,0,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);
+INSERT 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);
+INSERT 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,128,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);
+INSERT 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,137,150,1148,648,480,917,6500,1702,150,715,80,1750,5500,517,400,916,2000,0,0,0,0,0,0,4015,2,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1010,'WILLOW','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,1019,100,907,600,516,700,1068,3500,0,0,1066,2000,0,0,0,0,4010,7,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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);
+INSERT 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,137,200,1054,54,432,1011,20,920,5500,2308,10,517,650,528,1050,919,5500,0,0,0,0,0,0,4029,5,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,0,0,4022,5,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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);
+INSERT 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,139,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);
+INSERT 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,0,0,0,0,0,0,4040,3,0,0,0,0,0,0,0,0);
+INSERT 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,153,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,0,0,0,0,0,0,0,0,4031,3,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,4030,1,0,0,0,0,0,0,0,0);
+INSERT 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,141,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);
+INSERT 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,181,200,1500,768,652,999,500,1034,4000,984,500,985,500,7017,800,714,380,1912,300,0,0,0,0,4091,50,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1023,'ORC_WARRIOR','Orc Warrior',24,1400,0,261,160,1,104,126,10,5,1,24,48,25,34,10,10,12,1,7,22,133,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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1025,'BOA','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,0,0,0,0,0,0,4037,1,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,129,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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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);
+INSERT 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);
+INSERT 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,512,0,2612,200,639,20,0,0,0,0,4107,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1033,'ELDER_WILLOW','Elder Willow',20,693,0,163,101,1,58,70,10,30,1,20,25,35,38,30,10,12,1,3,43,133,200,1452,672,432,990,50,907,5500,1019,3500,757,37,2329,30,516,1000,0,0,0,0,0,0,4052,1,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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,133,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);
+INSERT 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,11,49,133,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);
+INSERT INTO `mob_db` VALUES (1037,'SIDEWINDER','Sidewinder',43,4929,0,1996,993,1,240,320,5,10,1,43,40,15,115,20,10,12,1,2,25,149,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);
+INSERT 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,181,100,1072,672,384,617,2000,1232,150,2235,200,1255,600,1009,1000,985,3500,984,3900,0,0,0,0,4144,1,7710,5000,603,4000,608,3000,751,500);
+INSERT 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,181,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);
+INSERT 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);
+INSERT 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,133,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);
+INSERT 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,139,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);
+INSERT 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,129,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,181,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);
+INSERT 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,128,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);
+INSERT 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,128,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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1050,'SHELL_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);
+INSERT 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,139,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);
+INSERT 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);
+INSERT 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,139,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);
+INSERT 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,141,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);
+INSERT 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);
+INSERT 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);
+INSERT 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,139,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,0,0,0,0,0,0,4051,1,0,0,0,0,0,0,0,0);
+INSERT 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,139,200,1708,1008,540,990,60,940,6500,911,400,757,49,707,20,935,3000,0,0,0,0,0,0,4057,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,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);
+INSERT 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);
+INSERT 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,149,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);
+INSERT 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);
+INSERT 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);
+INSERT 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);
+INSERT 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,133,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);
+INSERT 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);
+INSERT 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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1069,'SWORDFISH','Swordfish',30,4299,0,529,319,1,168,199,5,20,1,30,30,41,62,30,10,12,2,5,41,133,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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1071,'PIRATE_SKELETON','Pirate Skeleton',25,1676,0,233,142,1,145,178,10,15,1,13,25,5,25,10,10,12,1,1,29,133,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);
+INSERT INTO `mob_db` VALUES (1072,'KAHO','Kaho',24,1141,0,287,176,1,128,156,0,50,1,24,24,25,44,5,10,12,1,6,83,133,200,1700,1000,500,994,30,1003,100,953,3000,911,1000,757,10,716,100,970,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,512,0,512,0,757,37,0,0,0,0,4153,1,0,0,0,0,0,0,0,0);
+INSERT 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,512,0,757,18,0,0,0,0,4273,1,0,0,0,0,0,0,0,0);
+INSERT 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,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);
+INSERT 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);
+INSERT 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,133,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);
+INSERT 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,0,0,0,0,2269,2,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,2270,2,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,2270,2,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,2269,2,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,2269,2,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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);
+INSERT 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);
+INSERT 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,187,100,768,768,480,969,1000,1524,150,2246,250,10016,500,714,300,984,2000,985,2000,0,0,0,0,4128,1,1250,5000,2610,2000,701,1000,2610,2000);
+INSERT INTO `mob_db` VALUES (1087,'ORC_HERO','Orc Hero',77,295700,0,58630,32890,1,2257,2542,40,45,1,91,99,70,105,90,10,10,2,7,42,181,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);
+INSERT 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,181,200,1080,648,480,2247,50,940,8000,721,1000,752,1500,912,700,645,3000,532,60,0,0,4021,60,4211,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,200,1236,336,432,2244,50,518,2000,729,1000,746,1500,970,100,971,100,0,0,0,0,4014,5,4306,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,300,1072,672,480,2257,200,619,50,722,1000,741,1500,512,8000,512,8000,531,4000,0,0,4001,100,4197,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1091,'DRAGONFLY','Dragon Fly',8,2400,0,88,44,1,22,27,40,0,1,20,8,15,17,5,10,10,0,4,24,181,100,1076,576,480,2245,200,501,8000,719,1500,742,2000,2607,200,625,50,533,3000,0,0,4009,40,4179,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,150,1048,648,432,2248,200,920,8000,728,1500,919,5500,725,11,517,8000,626,50,0,0,4029,40,4183,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,200,1456,456,336,2250,200,515,8000,727,1200,746,1500,706,30,622,50,534,5000,0,0,4006,70,4266,1,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,4032,5,0,0,0,0,0,0,0,0);
+INSERT 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,139,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);
+INSERT 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,181,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);
+INSERT 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,128,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);
+INSERT 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,181,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT INTO `mob_db` VALUES (1101,'BAPHOMET_JR','Baphomet Jr.',50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,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);
+INSERT 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,149,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);
+INSERT 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);
+INSERT 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);
+INSERT 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,139,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);
+INSERT 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,141,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);
+INSERT INTO `mob_db` VALUES (1107,'DESERT_WOLF_B','Desert Wolf Puppy',9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,137,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);
+INSERT 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);
+INSERT 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,149,150,980,600,384,1038,5500,1039,400,2255,2,1458,2,1009,5,912,1500,756,154,0,0,0,0,4122,1,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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,149,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);
+INSERT 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,181,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);
+INSERT 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);
+INSERT 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);
+INSERT 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,181,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);
+INSERT 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);
+INSERT 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,149,300,2276,576,336,2217,10,1615,1,2508,2,1551,10,610,200,609,10,509,2000,0,0,0,0,4141,1,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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,145,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);
+INSERT 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,181,300,1220,1080,648,1059,5500,2274,100,2336,50,604,500,603,10,714,30,2335,150,0,0,0,0,4047,1,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1122,'GOBLIN_1','Goblin 1',25,1176,0,310,188,1,118,140,10,5,1,53,25,20,38,10,10,12,1,7,24,149,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);
+INSERT INTO `mob_db` VALUES (1123,'GOBLIN_2','Goblin 2',24,1034,0,287,176,1,88,100,10,5,1,24,24,15,66,10,10,12,1,7,23,149,150,1320,620,240,998,250,911,1000,5010,3,1511,10,2104,1,501,550,508,120,0,0,0,0,4060,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1124,'GOBLIN_3','Goblin 3',24,1034,0,357,176,1,132,165,10,5,1,24,24,15,24,10,10,12,1,7,25,141,250,1624,624,240,998,230,911,1000,2275,3,512,0,2104,1,501,550,508,120,0,0,0,0,4060,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1125,'GOBLIN_4','Goblin 4',23,1359,0,264,164,1,109,131,10,5,1,23,46,15,36,10,10,12,1,7,22,141,200,1624,624,240,993,100,998,170,911,800,2263,3,1508,10,2104,1,501,500,0,0,0,0,4060,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1126,'GOBLIN_5','Goblin 5',22,1952,0,241,152,1,105,127,10,5,1,22,22,15,32,10,10,12,1,7,21,141,300,3074,1874,480,998,150,911,800,1605,15,2104,1,508,100,501,500,508,120,0,0,0,0,4060,1,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,4081,2,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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,141,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);
+INSERT 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,149,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);
+INSERT 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,149,100,1364,864,432,912,2000,616,2,641,20,502,1000,1259,1,984,100,0,0,0,0,0,0,4139,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT INTO `mob_db` VALUES (1133,'KOBOLD_1','Kobold 1',36,3893,0,988,625,1,265,318,15,10,1,90,36,30,52,20,10,12,1,7,44,141,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);
+INSERT INTO `mob_db` VALUES (1134,'KOBOLD_2','Kobold 2',31,2179,0,806,407,1,262,324,15,10,1,31,31,20,46,20,10,12,1,7,45,141,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);
+INSERT INTO `mob_db` VALUES (1135,'KOBOLD_3','Kobold 3',31,2179,0,644,407,1,186,216,15,10,1,31,31,20,88,20,10,12,1,7,43,141,300,1228,528,360,990,35,999,100,1034,5500,912,200,512,0,2104,3,502,100,0,0,0,0,4091,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1136,'KOBOLD_4','Kobold 4',30,3503,0,481,290,1,168,199,15,10,1,30,30,20,50,20,10,12,1,7,41,141,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);
+INSERT INTO `mob_db` VALUES (1137,'KOBOLD_5','Kobold 5',30,2462,0,481,290,1,168,199,15,10,1,30,60,20,45,20,10,12,1,7,42,141,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);
+INSERT 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,0,0,0,0,0,0,4076,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,300,1540,840,504,994,35,1045,4500,1608,10,2617,1,1614,3,1006,8,642,20,0,0,0,0,4112,1,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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);
+INSERT 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,149,300,1480,480,1056,1060,5500,2294,5,2605,1,1008,10,1520,15,2407,1,656,200,0,0,0,0,4113,1,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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);
+INSERT 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,149,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);
+INSERT 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,181,100,864,1000,480,10006,500,2615,200,2234,200,639,500,7020,10,985,3500,984,2500,0,0,0,0,4146,1,10500,5000,730,2000,603,3000,617,2000);
+INSERT 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,149,180,2000,1000,500,1048,6000,522,2500,702,200,2610,150,722,250,7062,3500,1007,3,0,0,0,0,4124,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,181,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);
+INSERT 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,149,200,1576,576,384,5005,2,1019,800,10005,10,756,65,757,97,605,20,0,0,0,0,0,0,4108,2,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,181,125,2000,1000,500,7113,6000,7114,2500,1136,100,2327,150,5002,500,1552,300,984,4500,0,0,0,0,4148,1,4060,5000,607,6000,526,2000,732,1000);
+INSERT 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);
+INSERT 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,181,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);
+INSERT 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,139,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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1162,'RAFFLESIA','Rafflesia',27,1950,0,388,242,1,105,120,20,10,1,27,54,1,76,27,10,10,0,3,22,133,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT INTO `mob_db` VALUES (1165,'SANDMAN','Sandman',34,3413,0,810,492,1,180,205,10,25,1,34,58,38,60,5,10,12,1,0,62,133,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);
+INSERT 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);
+INSERT 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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1169,'SKELETON_WORKER','Skeleton Worker',30,2872,0,397,240,1,242,288,0,15,1,15,30,5,42,10,10,12,1,1,29,133,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);
+INSERT 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,0,0,0,0,0,0,4100,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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);
+INSERT 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,512,0,0,0,0,0,0,0,4028,5,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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,149,150,840,540,480,1022,5500,919,7000,603,100,604,100,526,250,525,350,756,100,746,200,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,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);
+INSERT 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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,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);
+INSERT 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,149,250,2536,1536,672,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);
+INSERT 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);
+INSERT 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,149,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);
+INSERT 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,149,300,1960,620,480,1063,5500,1753,1000,1756,2500,1755,2500,1716,2,501,1400,509,900,2330,5,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,100,1248,500,360,1363,200,2601,500,5007,150,2627,1000,512,0,985,4400,984,3100,0,0,0,0,4135,1,12800,5000,968,5500,617,900,0,0);
+INSERT 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,149,100,972,500,288,617,5,603,45,1065,1200,611,3000,714,3,2626,1,757,270,2205,120,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,300,1816,576,240,1059,6500,2206,10,2506,2,716,650,602,1300,2505,10,731,5,735,10,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,300,1020,500,768,1095,5500,2607,20,7005,1500,611,1300,984,105,7026,20,912,1500,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,100,960,500,480,1096,3500,938,3000,943,800,912,450,716,300,997,20,912,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,141,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);
+INSERT 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,141,350,1768,500,192,1099,3500,7016,105,2266,1,716,600,930,3500,2408,3,985,112,1093,1,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,300,1500,500,1000,7001,5500,715,800,1001,300,1061,1000,1057,3000,601,1100,10004,10,2502,15,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,141,200,800,792,384,7017,5,504,800,503,1200,2331,8,2622,1,984,134,2291,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,175,1500,500,1000,1015,4000,7017,4,504,800,512,0,984,150,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,250,1152,500,240,7019,1,1117,100,1152,70,1155,40,1163,2,999,120,984,243,985,210,0,0,4207,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,100,816,500,240,7022,1,638,50,1211,100,1214,70,1217,40,999,120,984,189,1157,25,0,0,4254,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,200,768,500,384,7024,5,1108,100,1111,80,1114,60,1125,40,999,120,984,145,0,0,0,0,4250,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,900,500,864,7003,5500,1754,2000,504,650,10019,10,943,5500,2625,1,984,134,526,5,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,300,528,500,240,7004,5500,1756,1500,2624,2,1003,130,997,25,10007,10,2209,350,719,3,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1208,'WANDERER','Wanderer',74,8170,0,5786,4730,2,450,550,5,5,1,192,38,45,127,85,10,12,1,6,24,149,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);
+INSERT 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,149,100,1000,500,1000,7007,5500,528,1000,726,80,746,110,657,150,510,70,984,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,200,1500,500,1000,7009,5500,992,200,912,1200,602,1000,757,220,610,250,509,1600,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,1500,500,1000,7010,5500,757,229,757,22,1002,850,999,180,998,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,150,1500,500,1000,7002,2500,1304,10,999,90,931,7500,912,1300,756,196,502,900,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,1500,500,1000,7011,5500,942,7000,985,53,513,5000,634,20,532,1000,607,25,0,0,4051,2,4285,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,1500,500,1000,7012,5500,509,1800,912,1200,756,115,997,5,1454,20,608,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT INTO `mob_db` VALUES (1219,'ABYSS_KNIGHT','Knight of Abyss',79,36140,0,8469,6268,1,1600,2150,55,50,1,68,64,25,135,50,10,12,2,7,87,149,300,1500,500,1000,1064,5500,7023,5,2318,1,1410,25,1162,1,985,369,984,259,1162,15,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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);
+INSERT 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,128,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);
+INSERT 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,512,0,0,0,0,0,4040,3,0,0,0,0,0,0,0,0);
+INSERT 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,128,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);
+INSERT 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,145,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);
+INSERT 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,139,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);
+INSERT 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,141,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);
+INSERT 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,128,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);
+INSERT 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,139,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);
+INSERT 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,139,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);
+INSERT 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,139,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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1241,'META_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);
+INSERT 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,300,1260,192,192,912,750,509,800,949,1000,5030,1,948,5000,727,30,757,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1247,'ANTONIO','Antonio',10,10,0,3,2,1,13,20,100,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,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT INTO `mob_db` VALUES (1251,'STORMY_KNIGHT','Stormy Knight',77,240000,0,64350,21450,2,1425,1585,35,60,1,185,83,55,130,79,10,12,2,0,84,181,200,468,468,288,1468,150,603,3000,617,4000,2621,200,2506,500,985,4700,984,3500,5007,1,0,0,0,0,31200,5000,720,4500,2406,500,995,3000);
+INSERT 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,181,400,608,408,336,7036,5500,1131,150,1256,500,0,0,512,0,985,4100,984,2900,0,0,0,0,0,0,28473,5000,7036,1000,603,3000,995,3000);
+INSERT 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,512,0,2619,1,1769,2000,757,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,200,776,576,288,1055,5500,7053,1000,510,230,717,250,656,250,757,180,985,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,400,770,720,336,999,300,7054,5500,7053,3500,2313,5,2316,2,0,0,1255,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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,181,100,704,504,432,7048,2500,7054,5500,7063,120,1452,1500,757,150,984,185,996,150,1417,1,0,0,4163,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,920,720,200,7054,5500,734,1000,2505,30,0,0,512,0,1000,80,747,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1262,'MUTANT_DRAGONOID','Mutant Dragonoid',65,62600,0,4730,3536,4,2400,3400,15,20,1,47,30,68,45,35,10,12,2,9,43,181,250,1280,1080,240,7054,5500,1035,500,1036,500,930,500,2627,30,522,150,505,150,504,250,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,150,1056,1056,336,912,5000,932,6000,7005,500,1610,25,1611,8,996,100,1615,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,916,816,336,1054,1300,523,300,657,200,720,40,995,35,1460,3,756,203,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,145,200,1036,936,240,538,1000,530,150,979,1,645,280,2402,30,1001,40,2502,20,529,320,0,0,4293,1,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT 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,149,200,1078,768,384,7054,3200,536,1000,2409,5,5003,1,0,0,512,0,504,450,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1268,'BLOODY_KNIGHT','Blood Knight',82,57870,0,10120,6820,3,2150,3030,60,50,1,75,70,77,125,55,10,12,2,0,87,149,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);
+INSERT 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,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1270,'TOWER_KEEPER','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,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,512,0,756,129,0,0,0,0,4252,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,100,868,768,480,1615,800,5017,500,1237,300,2334,300,2507,100,985,5300,984,4100,2609,140,0,0,0,0,36500,5000,7005,6000,512,0,617,2000);
+INSERT 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,149,200,1050,900,288,7053,5500,998,300,2602,1,756,40,1352,10,508,900,2338,1,2206,1,0,0,4255,1,0,0,0,0,0,0,0,0);
+INSERT 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,512,0,512,0,985,61,757,207,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,1152,480,7047,2500,637,40,2407,3,739,30,5085,5,503,400,2215,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,512,0,2272,1,503,150,609,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,860,660,624,7053,100,943,380,606,200,993,160,1001,140,0,0,757,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1281,'SAGEWORM','Sageworm',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,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,512,0,1763,2000,1711,5,756,79,0,0,0,0,4292,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,200,772,672,360,7054,5500,1048,2500,657,500,1306,1,504,560,1364,1,984,160,0,0,0,0,4300,1,0,0,0,0,0,0,0,0);
+INSERT 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,100,512,100,512,100,512,100,512,100,512,100,512,100,512,100,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,4,22,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);
+INSERT INTO `mob_db` VALUES (1289,'MAYA_PURPLE','Maya Purple',81,54331,0,10496,3893,2,1446,1999,68,48,1,90,80,95,90,119,10,12,2,4,82,181,100,1024,1000,480,7053,4550,757,250,756,300,969,100,984,150,985,100,639,50,10006,1,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,150,2276,576,432,7068,2550,756,160,503,800,1220,35,1219,80,1222,3,0,0,2274,1,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,175,1816,576,240,1059,4550,2206,10,2506,8,716,700,732,5,717,850,657,150,603,100,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,150,1000,600,384,1038,4550,1039,450,2255,6,757,160,912,2500,1009,10,1410,3,7054,2500,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1293,'CREAMY_FEAR','Creamy Fear',62,13109,0,7365,2691,2,667,830,45,30,1,40,16,15,68,55,10,12,0,4,24,149,155,1136,720,840,924,4550,2333,10,518,550,602,200,1550,8,1611,8,522,50,7053,1800,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,175,1528,660,432,1031,4550,943,2500,721,10,504,5,656,25,2224,3,2108,1,7053,2500,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,175,1345,824,440,7071,3500,7063,2500,1716,2,1472,1,1402,25,1514,10,5045,5,7054,2500,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,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);
+INSERT 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,149,175,1772,120,384,930,4550,934,1800,2624,1,2611,150,503,350,756,150,757,100,7053,2500,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,175,2612,912,288,7071,4550,938,1500,958,1500,723,200,727,100,1260,1,2324,2,2627,2,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,120,1120,620,240,998,1200,999,800,756,120,2297,5,2106,2,503,650,2611,240,7054,1500,0,0,4155,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,300,1672,672,480,949,3000,7054,5500,2227,20,1000,100,997,50,501,1000,502,500,505,12,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,1156,456,384,1021,4550,757,250,1517,3,969,5,2282,1,912,1200,746,250,616,1,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,145,1024,768,480,1615,3,5017,2,2508,3,7054,5500,522,120,504,550,1162,2,7053,2500,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1303,'GIANT_HORNET','Giant Hornet',56,12834,0,5785,2006,1,650,851,38,43,1,38,32,10,71,64,10,12,0,4,24,149,155,1292,792,340,526,550,518,1200,522,12,610,15,1608,3,722,20,2627,1,516,3500,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,165,1468,468,768,1025,4550,1042,1200,757,140,525,450,943,1200,1096,680,7053,800,7054,800,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,165,1792,792,336,1042,4550,912,2500,2406,1,719,15,1096,680,938,3500,7054,2500,7053,2500,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,175,1260,230,192,948,4550,2289,8,740,120,518,500,526,1,969,5,7053,800,512,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,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);
+INSERT 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,149,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);
+INSERT 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,149,300,1000,1152,828,953,6500,912,2300,503,870,2279,8,1752,10000,999,640,994,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,250,1100,960,780,941,4550,1361,4,657,300,984,16,504,850,2611,160,2607,1,1000,250,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,150,1960,960,384,1028,3500,656,290,702,6,2276,1,605,15,2627,1,912,160,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,200,900,1000,500,1529,8,1306,5,0,0,1417,9,7070,5500,0,0,912,5500,658,1,0,0,0,0,39805,5000,967,5500,607,1500,617,2000);
+INSERT 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,149,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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1315,'ASSAULTER','Assaulter',71,15861,0,4854,2654,2,764,1499,35,28,1,74,10,35,100,100,10,12,1,7,44,149,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);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1317,'SEAL','Seal',63,9114,0,3765,1824,1,845,1202,25,33,1,28,22,15,69,84,10,12,1,2,21,133,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);
+INSERT 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,149,250,1452,483,528,967,4550,7070,750,501,2400,912,1640,526,140,7054,600,1505,2,7068,1250,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,149,250,1452,483,528,967,4550,7070,850,7066,1250,912,1800,526,160,7053,600,1504,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,195,1345,824,440,7071,4550,7063,1500,1714,1,747,1,1451,3,1513,2,5045,1,7054,1500,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1321,'DRAGON_TAIL','Dragon Tail',61,8368,0,3587,1453,1,520,715,25,19,0,68,15,5,67,67,10,12,1,4,44,149,175,862,534,312,7064,4550,1096,400,943,800,2207,8,2226,2,601,300,602,150,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,190,1132,583,532,722,150,965,5500,7065,4500,725,50,726,50,746,650,7053,1200,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1324,'TREASURE_BOX1','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1325,'TREASURE_BOX2','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7073,80,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);
+INSERT INTO `mob_db` VALUES (1326,'TREASURE_BOX3','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1327,'TREASURE_BOX4','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7074,80,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);
+INSERT INTO `mob_db` VALUES (1328,'TREASURE_BOX5','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1329,'TREASURE_BOX6','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7075,80,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);
+INSERT INTO `mob_db` VALUES (1330,'TREASURE_BOX7','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1331,'TREASURE_BOX8','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7076,80,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);
+INSERT INTO `mob_db` VALUES (1332,'TREASURE_BOX9','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1333,'TREASURE_BOX10','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7077,80,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);
+INSERT INTO `mob_db` VALUES (1334,'TREASURE_BOX11','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1335,'TREASURE_BOX12','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7078,80,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);
+INSERT INTO `mob_db` VALUES (1336,'TREASURE_BOX13','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1337,'TREASURE_BOX14','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7079,80,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);
+INSERT INTO `mob_db` VALUES (1338,'TREASURE_BOX15','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1339,'TREASURE_BOX16','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7080,80,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);
+INSERT INTO `mob_db` VALUES (1340,'TREASURE_BOX17','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1341,'TREASURE_BOX18','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7081,80,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);
+INSERT INTO `mob_db` VALUES (1342,'TREASURE_BOX19','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1343,'TREASURE_BOX20','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7082,80,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);
+INSERT INTO `mob_db` VALUES (1344,'TREASURE_BOX21','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1345,'TREASURE_BOX22','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7083,80,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);
+INSERT INTO `mob_db` VALUES (1346,'TREASURE_BOX23','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1347,'TREASURE_BOX24','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7084,80,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);
+INSERT INTO `mob_db` VALUES (1348,'TREASURE_BOX25','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1349,'TREASURE_BOX26','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7085,80,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);
+INSERT INTO `mob_db` VALUES (1350,'TREASURE_BOX27','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1351,'TREASURE_BOX28','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7086,80,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);
+INSERT INTO `mob_db` VALUES (1352,'TREASURE_BOX29','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1353,'TREASURE_BOX30','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7087,80,658,500,604,10000,984,5000,985,7500,2507,500,2625,38,5027,34,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1354,'TREASURE_BOX31','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1355,'TREASURE_BOX32','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7088,80,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);
+INSERT INTO `mob_db` VALUES (1356,'TREASURE_BOX33','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1357,'TREASURE_BOX34','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7089,80,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);
+INSERT INTO `mob_db` VALUES (1358,'TREASURE_BOX35','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1359,'TREASURE_BOX36','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7090,80,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);
+INSERT INTO `mob_db` VALUES (1360,'TREASURE_BOX37','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1361,'TREASURE_BOX38','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7091,80,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);
+INSERT INTO `mob_db` VALUES (1362,'TREASURE_BOX39','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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);
+INSERT INTO `mob_db` VALUES (1363,'TREASURE_BOX40','Treasure Chest',99,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,7092,80,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);
+INSERT INTO `mob_db` VALUES (1364,'G_ASSAULTER','Assaulter',59,18251,0,1,1,2,195,227,35,36,85,55,10,35,145,100,10,12,1,7,44,149,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);
+INSERT 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,133,400,1564,864,576,7095,5500,7094,2400,7093,2200,985,5,757,15,2506,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,133,180,1564,864,576,7097,5500,7098,3700,504,4000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,137,165,1564,864,576,7101,5000,522,300,992,1000,969,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,155,1564,864,576,522,1500,2407,3,2611,500,2613,150,2601,2,1472,1,505,1000,0,0,0,0,4218,1,0,0,0,0,0,0,0,0);
+INSERT 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,133,160,1564,864,576,7104,5500,7105,3500,717,1000,715,1000,716,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,145,165,1564,864,576,7106,5000,7107,2500,713,5000,507,500,510,1000,508,2500,511,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,300,1564,864,576,7108,5500,1417,5,607,2500,2621,2,2624,2,1306,1,1529,2,658,1,0,0,0,0,10000,1000,732,2000,617,2000,607,5500);
+INSERT 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,133,165,1564,864,576,522,1500,504,5500,1306,2,2621,1,2610,500,2613,150,504,1200,5072,1,0,0,4268,1,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,133,165,1564,864,576,7099,4500,7117,1500,7118,1500,1472,4,1473,1,0,0,0,0,0,0,0,0,4251,1,0,0,0,0,0,0,0,0);
+INSERT 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,133,170,1564,864,576,7119,4200,7001,4700,715,4000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,133,165,1564,864,576,1012,7500,715,4000,716,3500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,133,150,1564,864,576,1038,6800,1039,5700,2605,3,984,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,165,1564,864,576,7006,6500,7097,2500,7122,3500,756,1000,522,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,133,195,1564,864,576,7124,5500,1056,5500,997,3500,756,300,1226,5,1222,20,7043,1400,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,170,1564,864,576,7125,5000,904,7500,716,150,525,2500,994,850,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,180,1564,864,576,2255,5,610,1800,608,150,985,15,984,55,2317,3,0,500,0,0,0,0,4241,1,0,0,0,0,0,0,0,0);
+INSERT 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,181,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);
+INSERT 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,131,165,1564,864,576,7053,6700,610,1500,503,2500,606,100,605,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1393,'G_MUMMY','G Mummy',0,0,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);
+INSERT INTO `mob_db` VALUES (1394,'G_ZOMBIE','G Zombie',0,0,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);
+INSERT 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);
+INSERT 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);
+INSERT 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);
+INSERT 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);
+INSERT 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,181,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);
+INSERT 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,512,0,0,0,0,0,4286,1,0,0,0,0,0,0,0,0);
+INSERT 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,133,200,1480,480,720,7156,5500,7157,2000,7053,2300,739,30,2337,8,2335,8,2336,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,909,0,0,0,0,0,4175,1,0,0,0,0,0,0,0,0);
+INSERT 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,0,0,2285,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1404,'MIYABI_DOLL','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,0,0,0,0,4208,1,0,0,0,0,0,0,0,0);
+INSERT 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,133,150,1056,1056,336,7159,4000,7158,6000,999,80,7063,50,522,200,2278,0,909,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,200,1152,1152,384,7149,6500,7053,4000,912,600,521,2300,520,2000,640,10,708,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1407,'DOKEBI_','Dokebi',0,0,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);
+INSERT INTO `mob_db` VALUES (1408,'BLOODY_BUTTERFLY','Bloody Butterfly',57,8082,0,2119,1562,2,354,575,5,23,1,65,35,37,116,30,10,13,1,4,44,133,150,872,500,300,7163,4700,7168,2500,602,1000,924,5500,1962,1,1802,5,0,0,0,0,0,0,4327,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1409,'DUMPLING_CHILD','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,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1410,'ENCHANTED_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,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1412,'TAOIST_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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1413,'HERMIT_PLANT','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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT INTO `mob_db` VALUES (1416,'EVIL_NYMPH','Evil Nymph',63,18029,0,3945,2599,1,691,1382,12,75,1,64,12,69,100,80,10,13,1,6,67,133,200,1672,672,288,7165,4000,7166,4000,1904,1,984,105,1906,1,0,0,0,0,0,0,0,0,4258,1,0,0,0,0,0,0,0,0);
+INSERT 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);
+INSERT INTO `mob_db` VALUES (1418,'EVIL_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,181,200,976,500,400,7169,6500,10020,6500,5012,300,617,1500,0,0,0,0,0,0,0,0,0,0,0,0,524,5000,985,2000,607,3600,608,1000);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT INTO `mob_db` VALUES (1430,'G_ARGOS','Argor',25,1117,0,0,0,1,158,191,15,0,1,25,25,5,32,15,10,12,2,4,25,149,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);
+INSERT INTO `mob_db` VALUES (1431,'G_BAPHOMET_','Baphomet',50,8578,0,0,0,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,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);
+INSERT 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,141,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,181,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);
+INSERT 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,149,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);
+INSERT 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,181,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,181,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT 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,133,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);
+INSERT INTO `mob_db` VALUES (1471,'G_NINE_TAIL','NineTail',51,9466,0,0,0,1,610,734,10,25,1,80,46,1,89,85,10,12,1,2,63,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,141,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);
+INSERT 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,141,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);
+INSERT 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,149,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);
+INSERT 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,141,200,800,792,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,181,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,149,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);
+INSERT 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,145,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);
+INSERT 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,181,200,1152,1152,480,7146,5000,505,500,999,500,984,1000,985,1000,607,500,608,500,504,500,0,0,0,0,5000,1000,7146,6000,608,500,0,0);
+INSERT 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,149,200,1152,1152,384,7188,3000,7198,1100,7197,6000,1951,200,2269,2,1964,1,7100,3200,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1494,'BEETLE_KING','Beetle King',34,1874,0,679,442,1,191,243,45,12,1,34,10,1,50,1,10,12,0,4,22,149,200,1152,1152,384,7190,9000,7202,6000,928,600,955,600,2102,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,133,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);
+INSERT 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,149,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);
+INSERT 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,133,200,1152,1152,384,7049,1000,513,1000,7195,4500,7200,3500,512,100,0,0,0,0,0,0,0,0,4260,1,0,0,0,0,0,0,0,0);
+INSERT 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,149,200,1152,1152,384,517,4700,7196,4000,513,1000,7198,900,1801,5,1812,3,0,0,0,0,0,0,4261,1,0,0,0,0,0,0,0,0);
+INSERT 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,148,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);
+INSERT INTO `mob_db` VALUES (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);
+INSERT INTO `mob_db` VALUES (1503,'GIBBET','Gibbet',58,6841,0,4011,1824,3,238,418,28,31,1,42,42,27,46,28,10,12,2,6,27,149,150,1152,1584,400,7218,5500,7212,2000,7222,1000,604,100,716,100,724,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1504,'DULLAHAN','Dullahan',62,12437,0,4517,2963,3,418,647,47,38,1,30,5,45,62,22,10,12,1,1,49,149,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);
+INSERT INTO `mob_db` VALUES (1505,'LOLI_RURI','Loli Ruri',71,23470,0,6641,4314,3,841,1476,39,44,1,66,54,74,81,43,10,12,2,6,87,149,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);
+INSERT INTO `mob_db` VALUES (1506,'DISGUISE','Disguise',55,7543,0,2815,1919,3,267,279,18,29,1,72,45,35,48,65,10,12,1,6,82,149,147,1152,768,732,7221,5500,7216,2000,518,200,2508,10,2502,10,0,0,0,0,0,0,0,0,4181,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1507,'BLOODY_MURDERER','Bloody Murderer',72,27521,0,9742,3559,3,217,864,37,41,1,30,90,15,52,12,10,12,2,7,67,149,175,1152,1344,400,7208,5500,7207,2000,7223,200,7017,200,984,100,969,10,2288,5,1229,2,0,0,4214,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1508,'QUVE','Quve',40,4559,0,414,306,3,170,299,12,12,1,61,24,19,37,24,10,12,0,1,29,149,150,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);
+INSERT INTO `mob_db` VALUES (1509,'LUDE','Lude',36,3214,0,392,247,3,164,287,14,10,1,59,60,18,36,21,10,12,0,1,29,149,150,1152,960,752,1059,5500,7220,5500,7225,1000,2282,2,2274,1,0,0,0,0,0,0,0,0,4193,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1510,'HYLOZOIST','Hylozoist',51,7186,0,2314,1297,3,181,317,16,51,1,28,26,47,66,14,10,12,0,1,47,149,155,1152,1536,969,7217,5500,7215,2000,7213,1000,7220,1000,740,200,757,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,181,200,1872,672,480,7211,8000,984,2000,0,0,607,3000,616,450,5053,250,1552,5,2615,100,0,0,0,0,8000,3000,7114,10,617,100,0,0);
+INSERT INTO `mob_db` VALUES (1512,'HYEGUN','Hyegun',56,9981,0,2199,1032,3,318,710,12,10,1,40,36,10,73,15,10,12,1,1,49,133,200,1152,1152,384,512,0,0,0,0,0,0,0,0,0,617,10,2614,5,616,10,0,0,4328,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1513,'CIVIL_SERVANT','Civil Servant',62,14390,0,4023,2750,3,360,650,42,5,1,15,20,60,80,50,10,12,1,2,44,133,200,1152,1152,384,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4202,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1514,'DANCING_DRAGON','Dancing Dragon',54,9136,0,3030,769,3,239,550,39,10,1,62,55,25,72,22,10,12,1,9,44,131,200,1152,1152,384,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4272,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1515,'GARM_BABY','Hatii Baby',61,20119,0,1022,2980,3,499,680,34,13,1,30,56,55,85,30,10,12,1,2,41,133,300,1152,1152,384,512,0,0,0,0,0,0,0,0,0,617,10,1305,15,616,10,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1516,'INCREASE_SOIL','Increase Soil',51,8230,0,2760,2110,3,140,560,30,12,1,45,23,12,69,12,10,12,1,0,62,145,200,1152,1152,384,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);
+INSERT INTO `mob_db` VALUES (1517,'LI_ME_MANG_RYANG','Li Me Mang Ryang',48,5920,0,1643,1643,3,199,434,23,16,1,51,19,8,57,30,10,12,1,6,62,133,200,1152,1152,384,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);
+INSERT INTO `mob_db` VALUES (1518,'BACSOJIN','Bacsojin',75,218652,0,33095,18214,1,1219,2169,10,51,1,85,78,85,150,60,10,12,2,1,67,181,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);
+INSERT INTO `mob_db` VALUES (1519,'Chung_E','Chung E',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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+INSERT 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,3,25,131,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);
+INSERT INTO `mob_db` VALUES (1582,'DEVILING','Deviling',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,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1583,'TAO_GUNKA','Tao Gunka',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,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1584,'TAMRUAN','Tamruan',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,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1585,'MIME_MONKEY','Mime Monkey',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,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1586,'LEAF_CAT','Leaf Cat',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,0,0,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1587,'KRABEN','Kraben',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,0,0,0,0,0,0,0,0,0,0);
+
+INSERT INTO `mob_db` VALUES (1419,'G_FARMILIAR','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);
+INSERT INTO `mob_db` VALUES (1420,'G_ARCHER_SKELETON','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);
+INSERT INTO `mob_db` VALUES (1421,'G_ISIS','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);
+INSERT INTO `mob_db` VALUES (1422,'G_HUNTER_FLY','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);
+INSERT INTO `mob_db` VALUES (1423,'G_GHOUL','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);
+INSERT INTO `mob_db` VALUES (1424,'G_SIDE_WINDER','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);
+INSERT INTO `mob_db` VALUES (1425,'G_OBEAUNE','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);
+INSERT INTO `mob_db` VALUES (1426,'G_MARC','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);
+INSERT INTO `mob_db` VALUES (1427,'G_NIGHTMARE','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);
+INSERT INTO `mob_db` VALUES (1428,'G_POISON_SPORE','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);
+INSERT INTO `mob_db` VALUES (1429,'G_ARGIOPE','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);
+INSERT INTO `mob_db` VALUES (1430,'G_ARGOS','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);
+INSERT INTO `mob_db` VALUES (1431,'G_BAPHOMET_','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);
+INSERT INTO `mob_db` VALUES (1432,'G_DESERT_WOLF','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);
+INSERT INTO `mob_db` VALUES (1433,'G_DEVIRUCHI','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);
+INSERT INTO `mob_db` VALUES (1434,'G_DRAINLIAR','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);
+INSERT INTO `mob_db` VALUES (1435,'G_EVIL_DRUID','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);
+INSERT INTO `mob_db` VALUES (1436,'G_JAKK','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);
+INSERT INTO `mob_db` VALUES (1437,'G_JOKER','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);
+INSERT INTO `mob_db` VALUES (1438,'G_KHALITZBURG','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);
+INSERT INTO `mob_db` VALUES (1439,'G_HIGH_ORC','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);
+INSERT INTO `mob_db` VALUES (1440,'G_STEM_WORM','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);
+INSERT INTO `mob_db` VALUES (1441,'G_PENOMENA','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);
+INSERT INTO `mob_db` VALUES (1442,'G_SASQUATCH','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);
+INSERT INTO `mob_db` VALUES (1443,'G_CRUISER','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);
+INSERT INTO `mob_db` VALUES (1444,'G_CHEPET','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);
+INSERT INTO `mob_db` VALUES (1445,'G_RAGGLER','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);
+INSERT INTO `mob_db` VALUES (1446,'G_INJUSTICE','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);
+INSERT INTO `mob_db` VALUES (1447,'G_GRYPHON','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);
+INSERT INTO `mob_db` VALUES (1448,'G_DARK_FRAME','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);
+INSERT INTO `mob_db` VALUES (1449,'G_MUTANT_DRAGON','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);
+INSERT INTO `mob_db` VALUES (1450,'G_WIND_GHOST','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);
+INSERT INTO `mob_db` VALUES (1451,'G_MERMAN','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);
+INSERT INTO `mob_db` VALUES (1452,'G_ORC_LADY','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);
+INSERT INTO `mob_db` VALUES (1453,'G_RAYDRIC_ARCHER','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);
+INSERT INTO `mob_db` VALUES (1454,'G_TRI_JOINT','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);
+INSERT INTO `mob_db` VALUES (1455,'G_KOBOLD_ARCHER','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);
+INSERT INTO `mob_db` VALUES (1456,'G_CHIMERA','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);
+INSERT INTO `mob_db` VALUES (1457,'G_MANTIS','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);
+INSERT INTO `mob_db` VALUES (1458,'G_MARDUK','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);
+INSERT INTO `mob_db` VALUES (1459,'G_MARIONETTE','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);
+INSERT INTO `mob_db` VALUES (1460,'G_MATYR','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);
+INSERT INTO `mob_db` VALUES (1461,'G_MINOROUS','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);
+INSERT INTO `mob_db` VALUES (1462,'G_ORC_SKELETON','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);
+INSERT INTO `mob_db` VALUES (1463,'G_ORC_ZOMBIE','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);
+INSERT INTO `mob_db` VALUES (1464,'G_PASANA','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);
+INSERT INTO `mob_db` VALUES (1465,'G_PETIT','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);
+INSERT INTO `mob_db` VALUES (1466,'G_PETIT_','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);
+INSERT INTO `mob_db` VALUES (1467,'G_RAYDRIC','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);
+INSERT INTO `mob_db` VALUES (1468,'G_REQUIEM','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);
+INSERT INTO `mob_db` VALUES (1469,'G_SKEL_WORKER','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);
+INSERT INTO `mob_db` VALUES (1470,'G_ZEROM','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);
+INSERT INTO `mob_db` VALUES (1471,'G_NINE_TAIL','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);
+INSERT INTO `mob_db` VALUES (1472,'G_BON_GUN','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);
+INSERT INTO `mob_db` VALUES (1473,'G_ORC_ARCHER','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);
+INSERT INTO `mob_db` VALUES (1474,'G_MIMIC','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);
+INSERT INTO `mob_db` VALUES (1475,'G_WRAITH','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);
+INSERT INTO `mob_db` VALUES (1476,'G_ALARM','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);
+INSERT INTO `mob_db` VALUES (1477,'G_ARCLOUSE','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);
+INSERT INTO `mob_db` VALUES (1478,'G_RIDEWORD','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);
+INSERT INTO `mob_db` VALUES (1479,'G_SKEL_PRISONER','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);
+INSERT INTO `mob_db` VALUES (1480,'G_ZOMBIE_PRISONER','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);
+INSERT INTO `mob_db` VALUES (1481,'G_PUNK','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);
+INSERT INTO `mob_db` VALUES (1482,'G_ZHERLTHSH','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);
+INSERT INTO `mob_db` VALUES (1483,'G_RYBIO','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);
+INSERT INTO `mob_db` VALUES (1484,'G_PHENDARK','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);
+INSERT INTO `mob_db` VALUES (1485,'G_MYSTELTAINN','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);
+INSERT INTO `mob_db` VALUES (1486,'G_TIRFING','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);
+INSERT INTO `mob_db` VALUES (1487,'G_EXECUTIONER','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);
+INSERT INTO `mob_db` VALUES (1488,'G_ANOLIAN','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);
+INSERT INTO `mob_db` VALUES (1489,'G_STING','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);
+INSERT INTO `mob_db` VALUES (1490,'G_WANDER_MAN','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);
+INSERT INTO `mob_db` VALUES (1491,'G_DOKEBI','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);
+
+INSERT INTO `mob_db` VALUES (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);
+INSERT INTO `mob_db` VALUES (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);
+INSERT INTO `mob_db` VALUES (1900,'VALARIS','Valaris',99,668000,0,107250,37895,1,440,510,35,45,1,152,96,85,120,95,10,10,0,7,67,181,100,676,1152,768,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1,13000,1000,608,1000,750,400,923,3800);
+INSERT INTO `mob_db` VALUES (1901,'VALARIS_WORSHIPPER','Valariss Worshipper',50,8578,0,2706,1480,1,260,310,15,25,1,75,55,1,93,45,10,12,0,7,27,149,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);
+INSERT INTO `mob_db` VALUES (1902,'MC_CAMERI','MC Cameri',99,668000,0,107250,37895,1,440,510,35,45,1,152,96,85,120,95,10,10,0,7,67,181,100,676,1152,768,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1,13000,1000,608,1000,750,400,923,3800);
+
+INSERT INTO `mob_db` VALUES (1970,'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);
+INSERT INTO `mob_db` VALUES (1971,'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);
+INSERT INTO `mob_db` VALUES (1972,'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,512,0,0,0,0,0,4022,5,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1973,'PECOPECO_','PecoPeco',13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,137,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,512,0,512,0,0,0,0,0,4031,3,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1974,'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,133,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);
+INSERT INTO `mob_db` VALUES (1975,'MUNAK_','Munak',30,2872,0,361,218,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,609,20,2337,1,2305,100,1558,5,0,0,0,0,4090,3,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1976,'ISIS_','Isis',43,4828,0,2396,993,1,423,507,10,35,1,65,43,30,72,15,10,12,2,6,27,149,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);
+INSERT INTO `mob_db` VALUES (1977,'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,512,0,512,0,0,0,0,0,4033,5,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1978,'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,133,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);
+INSERT INTO `mob_db` VALUES (1979,'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,139,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);
+INSERT INTO `mob_db` VALUES (1980,'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,512,0,0,0,0,0,4008,10,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1981,'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);
+INSERT INTO `mob_db` VALUES (1982,'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);
+INSERT INTO `mob_db` VALUES (1983,'YOYO_','Yoyo',19,879,0,148,93,1,71,82,0,0,1,24,30,35,32,55,10,12,0,2,22,139,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,512,0,0,0,0,0,4051,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1984,'METALLER_','Metaller',22,926,0,241,152,1,131,159,15,30,1,22,22,20,49,50,10,12,1,4,23,139,200,1708,1008,540,990,60,940,6500,911,400,757,49,707,20,935,3000,512,0,0,0,0,0,4057,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1985,'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);
+INSERT INTO `mob_db` VALUES (1986,'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,133,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);
+INSERT INTO `mob_db` VALUES (1987,'BAPHOMET__','Baphomet Jr.',50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,149,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);
+INSERT INTO `mob_db` VALUES (1988,'DESERT_WOLF_B_','Desert Wolf Puppy',9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,137,300,1600,900,240,1010,85,919,5500,2306,60,517,600,2301,200,512,0,512,0,0,0,0,0,4023,10,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1989,'DEVIRUCHI_','Deviruchi',46,7360,0,2662,1278,1,475,560,10,25,1,69,40,55,87,30,10,12,0,6,27,149,150,980,600,384,1038,5500,1039,400,2255,2,1458,2,1009,5,912,1500,756,154,0,0,0,0,4122,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1990,'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);
+INSERT INTO `mob_db` VALUES (1991,'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);
+INSERT INTO `mob_db` VALUES (1992,'PETIT__','Petit',44,6881,0,1677,1034,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,149,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);
+INSERT INTO `mob_db` VALUES (1993,'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);
+INSERT INTO `mob_db` VALUES (1994,'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,512,0,0,0,0,0,4100,1,0,0,0,0,0,0,0,0);
+INSERT INTO `mob_db` VALUES (1995,'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,149,200,1720,500,420,1094,5500,7014,40,618,60,2337,2,609,15,508,1000,502,250,5046,1,0,0,0,0,0,0,0,0,0,0,0,0);
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_svn1125.sql b/sql-files/upgrade_svn1125.sql
new file mode 100644
index 000000000..b2de93c23
--- /dev/null
+++ b/sql-files/upgrade_svn1125.sql
@@ -0,0 +1,12 @@
+ALTER TABLE `mob_db2` Add column `Drop9id` mediumint(9) NOT NULL default '0';
+ALTER TABLE `mob_db2` Add column `Drop9per` mediumint(9) NOT NULL default '0';
+ALTER TABLE `mob_db2` Add column `DropCardid` mediumint(9) NOT NULL default '0';
+ALTER TABLE `mob_db2` Add column `DropCardper` mediumint(9) NOT NULL default '0';
+ALTER TABLE `mob_db2` Drop column `Item1`;
+ALTER TABLE `mob_db2` Drop column `Item2`;
+ALTER TABLE `mob_db2` Change column `Drop7d` `Drop7id` mediumint(9) NOT NULL default '0';
+
+ALTER TABLE `mob_db` Add column `Drop9id` mediumint(9) NOT NULL default '0';
+ALTER TABLE `mob_db` Add column `Drop9per` mediumint(9) NOT NULL default '0';
+ALTER TABLE `mob_db` Add column `DropCardid` mediumint(9) NOT NULL default '0';
+ALTER TABLE `mob_db` Add column `DropCardper` mediumint(9) NOT NULL default '0';
diff --git a/sql-files/upgrade_svn1315.sql b/sql-files/upgrade_svn1315.sql
new file mode 100644
index 000000000..e77e679f6
--- /dev/null
+++ b/sql-files/upgrade_svn1315.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `char` ADD `father` int(11) NOT NULL default '0';
+ALTER TABLE `char` ADD `mother` int(11) NOT NULL default '0';
+ALTER TABLE `char` ADD `child` int(11) NOT NULL default '0'; \ No newline at end of file
diff --git a/src/char/GNUmakefile b/src/char/GNUmakefile
deleted file mode 100644
index f3164e0ec..000000000
--- a/src/char/GNUmakefile
+++ /dev/null
@@ -1,17 +0,0 @@
-all: char-server
-txt: char-server
-
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../common/showmsg.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/lock.h ../common/timer.h ../common/malloc.h ../common/showmsg.h
-char-server: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $^
-
-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_pet.o: int_pet.c int_pet.h inter.h char.h $(COMMON_H)
-
-clean:
- rm -f *.o ../../char-server
diff --git a/src/char/Makefile b/src/char/Makefile
index 0a2009333..aee0e69e2 100644
--- a/src/char/Makefile
+++ b/src/char/Makefile
@@ -1,10 +1,10 @@
all: char-server
txt: char-server
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../common/showmsg.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/lock.h ../common/timer.h ../common/malloc.h ../common/showmsg.h
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.o ../common/obj/lock.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/db.h ../common/lock.h ../common/timer.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
char-server: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $>
+ $(CC) -o ../../$@ $> $(LIB_S)
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)
diff --git a/src/char/char.c b/src/char/char.c
index 7ad959bd8..73efbc864 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2,29 +2,39 @@
// original : char2.c 2003/03/14 11:58:35 Rev.1.5
#include <sys/types.h>
-#include <sys/socket.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 <sys/time.h>
-#include <time.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 <arpa/inet.h>
-#include <netdb.h>
#include <stdarg.h>
+#include "../common/strlib.h"
#include "core.h"
#include "socket.h"
#include "timer.h"
#include "mmo.h"
+#include "db.h"
#include "version.h"
#include "lock.h"
#include "char.h"
#include "showmsg.h"
+#include "buffer.h"
#include "inter.h"
#include "int_pet.h"
@@ -38,9 +48,6 @@
struct mmo_map_server server[MAX_MAP_SERVERS];
int server_fd[MAX_MAP_SERVERS];
-int server_freezeflag[MAX_MAP_SERVERS]; // Map-server anti-freeze system. Counter. 5 ok, 4...0 freezed
-int anti_freeze_enable = 0;
-int ANTI_FREEZE_INTERVAL = 6;
int login_fd, char_fd;
char userid[24];
@@ -49,11 +56,13 @@ char server_name[20];
char wisp_server_name[24] = "Server";
int login_ip_set_ = 0;
char login_ip_str[16];
-int login_ip;
+in_addr_t login_ip;
int login_port = 6900;
int char_ip_set_ = 0;
char char_ip_str[16];
-int char_ip;
+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;
@@ -103,6 +112,7 @@ int char_id_count = 150000;
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 start_zeny = 500;
int start_weapon = 1201;
@@ -151,7 +161,7 @@ int char_log(char *fmt, ...) {
fprintf(logfp, RETCODE);
else {
gettimeofday(&tv, NULL);
- strftime(tmpstr, 24, "%d-%m-%Y %H:%M:%S", localtime(&(tv.tv_sec)));
+ strftime(tmpstr, 24, "%d-%m-%Y %H:%M:%S", localtime((const time_t*)&(tv.tv_sec)));
sprintf(tmpstr + 19, ".%03d: %s", (int)tv.tv_usec / 1000, fmt);
vfprintf(logfp, tmpstr, ap);
}
@@ -162,23 +172,6 @@ int char_log(char *fmt, ...) {
return 0;
}
-//-----------------------------------------------------
-// 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;
-}
-
//----------------------------------------------------------------------
// 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)
@@ -235,6 +228,25 @@ char * search_character_name(int index) {
return unknown_char_name;
}
+//-------------------------------------------------
+// Set Character online/offline [Wizputer]
+//-------------------------------------------------
+
+void set_char_online(int char_id, int account_id) {
+ 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) {
+ if (login_fd <= 0 || session[login_fd]->eof)
+ return;
+ WFIFOW(login_fd,0) = 0x272c;
+ WFIFOL(login_fd,2) = account_id;
+ WFIFOSET(login_fd,6);
+}
+
/*---------------------------------------------------
Make a data line for friends list
--------------------------------------------------*/
@@ -243,7 +255,7 @@ 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<20;i++)
{
str_p += sprintf(str_p, ",%d,%s", p->friend_id[i],p->friend_name[i]);
@@ -267,9 +279,9 @@ int mmo_char_tostr(char *str, struct mmo_charstatus *p) {
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\t",
+ "\t%s,%d,%d\t%s,%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->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,
@@ -280,7 +292,7 @@ int mmo_char_tostr(char *str, struct mmo_charstatus *p) {
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,
- p->partner_id);
+ p->partner_id,p->father,p->mother,p->child);
for(i = 0; i < 10; i++)
if (p->memo_point[i].map[0]) {
str_p += sprintf(str_p, "%s,%d,%d", p->memo_point[i].map, p->memo_point[i].x, p->memo_point[i].y);
@@ -329,8 +341,28 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p) {
// initilialise character
memset(p, '\0', sizeof(struct mmo_charstatus));
-
- // If it's not char structure of version 1008 and after
+
+ // If it's not char structure of version 1363 and after
+ if ((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,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%[^,],%d,%d\t%[^,],%d,%d,%d,%d,%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], &tmp_int[34],
+ p->last_point.map, &tmp_int[35], &tmp_int[36], //
+ p->save_point.map, &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%[^\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%[^,],%d,%d\t%[^,],%d,%d,%d%n",
@@ -389,15 +421,20 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p) {
}
// Char structure of version 1008+
} else {
+ set+=3;
//printf("char: new char data ver.3\n");
}
- if (set != 43)
+ // Char structture of version 1363+
+ } else {
+ //printf("char: new char data ver.4\n");
+ }
+ if (set != 46)
return 0;
p->char_id = tmp_int[0];
p->account_id = tmp_int[1];
p->char_num = tmp_int[2];
- p->class = tmp_int[3];
+ p->class_ = tmp_int[3];
p->base_level = tmp_int[4];
p->job_level = tmp_int[5];
p->base_exp = tmp_int[6];
@@ -434,6 +471,9 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p) {
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];
// Some checks
for(i = 0; i < char_num; i++) {
@@ -574,13 +614,16 @@ 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;
@@ -608,7 +651,7 @@ int parse_friend_txt(struct mmo_charstatus *p)
if (cid == p->char_id)
break;
}
-
+
// No register of friends list
if (cid == 0) {
fclose(fp);
@@ -634,16 +677,11 @@ int mmo_char_init(void) {
FILE *fp;
char_max = 256;
- char_dat = calloc(sizeof(struct mmo_charstatus) * 256, 1);
+ char_dat = (struct mmo_charstatus*)aCalloc(sizeof(struct mmo_charstatus) * 256, 1);
if (!char_dat) {
printf("out of memory: mmo_char_init (calloc of char_dat).\n");
exit(1);
}
- online_chars = calloc(sizeof(struct online_chars) * 256, 1);
- if (!online_chars) {
- printf("out of memory: mmo_char_init (calloc of online_chars).\n");
- exit(1);
- }
for(i = 0; i < char_max; i++)
{
online_chars[i].char_id = -1;
@@ -679,13 +717,13 @@ int mmo_char_init(void) {
if (char_num >= char_max) {
char_max += 256;
- char_dat = realloc(char_dat, sizeof(struct mmo_charstatus) * char_max);
+ char_dat = (struct mmo_charstatus*)aRealloc(char_dat, sizeof(struct mmo_charstatus) * char_max);
if (!char_dat) {
printf("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);
}
- online_chars = realloc(online_chars, sizeof(struct online_chars) * char_max);
+ online_chars = (struct online_chars*)aRealloc(online_chars, sizeof(struct online_chars) * char_max);
if (!online_chars) {
printf("Out of memory: mmo_char_init (realloc of online_chars).\n");
char_log("Out of memory: mmo_char_init (realloc of online_chars)." RETCODE);
@@ -699,10 +737,10 @@ int mmo_char_init(void) {
}
ret = mmo_char_fromstr(line, &char_dat[char_num]);
-
+
// Initialize friends list
parse_friend_txt(&char_dat[char_num]); // Grab friends for the character
-
+
if (ret > 0) { // negative value or zero for errors
if (char_dat[char_num].char_id >= char_id_count)
char_id_count = char_dat[char_num].char_id + 1;
@@ -765,7 +803,8 @@ void mmo_char_sync(void) {
int i, j, k;
int lock;
FILE *fp,*f_fp;
- int id[char_num];
+ //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++) {
@@ -804,6 +843,8 @@ void mmo_char_sync(void) {
if (fp == NULL) {
printf("WARNING: 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++) {
@@ -821,9 +862,12 @@ void mmo_char_sync(void) {
mmo_friends_list_data_str(f_line, &char_dat[id[i]]);
fprintf(f_fp, "%s" RETCODE, f_line);
}
-
+
lock_fclose(f_fp, friends_txt, &lock);
-
+
+ //aFree(id);
+ DELETE_BUFFER(id);
+
return;
}
@@ -843,18 +887,18 @@ int make_new_char(int fd, unsigned char *dat) {
int i, j;
struct char_session_data *sd;
- sd = session[fd]->session_data;
+ sd = (struct char_session_data*)session[fd]->session_data;
// remove control characters from the name
dat[23] = '\0';
- if (remove_control_chars(dat)) {
+ if (remove_control_chars((unsigned char *)(char*)dat)) {
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(dat) < 4) {
+ if (strlen((const char*)dat) < 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;
@@ -896,8 +940,8 @@ int make_new_char(int fd, unsigned char *dat) {
}
for(i = 0; i < char_num; i++) {
- if ((name_ignoring_case != 0 && strcmp(char_dat[i].name, dat) == 0) ||
- (name_ignoring_case == 0 && strcmpi(char_dat[i].name, dat) == 0)) {
+ if ((name_ignoring_case != 0 && strcmp(char_dat[i].name, (const char*)dat) == 0) ||
+ (name_ignoring_case == 0 && strcmpi(char_dat[i].name, (const char*)dat) == 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].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;
@@ -909,7 +953,7 @@ int make_new_char(int fd, unsigned char *dat) {
}
}
- if (strcmp(wisp_server_name, dat) == 0) {
+ if (strcmp(wisp_server_name, (const char*)dat) == 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], dat, char_dat[i].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;
@@ -917,13 +961,13 @@ int make_new_char(int fd, unsigned char *dat) {
if (char_num >= char_max) {
char_max += 256;
- char_dat = realloc(char_dat, sizeof(struct mmo_charstatus) * char_max);
+ char_dat = (struct mmo_charstatus*)aRealloc(char_dat, sizeof(struct mmo_charstatus) * char_max);
if (!char_dat) {
printf("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);
}
- online_chars = realloc(online_chars, sizeof(struct online_chars) * char_max);
+ online_chars = (struct online_chars*)aRealloc(online_chars, sizeof(struct online_chars) * char_max);
if (!online_chars) {
printf("Out of memory: make_new_char (realloc of online_chars).\n");
char_log("Out of memory: make_new_char (realloc of online_chars)." RETCODE);
@@ -943,8 +987,8 @@ int make_new_char(int fd, unsigned char *dat) {
char_dat[i].char_id = char_id_count++;
char_dat[i].account_id = sd->account_id;
char_dat[i].char_num = dat[30];
- strcpy(char_dat[i].name, dat);
- char_dat[i].class = 0;
+ strcpy(char_dat[i].name, (const char*)dat);
+ char_dat[i].class_ = 0;
char_dat[i].base_level = 1;
char_dat[i].job_level = 1;
char_dat[i].base_exp = 0;
@@ -994,8 +1038,8 @@ int make_new_char(int fd, unsigned char *dat) {
//----------------------------------------------------
// This function return the name of the job (by [Yor])
//----------------------------------------------------
-char * job_name(int class) {
- switch (class) {
+char * job_name(int class_) {
+ switch (class_) {
case 0: return "Novice";
case 1: return "Swordsman";
case 2: return "Mage";
@@ -1080,7 +1124,7 @@ void create_online_files(void) {
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[online_players_max];
+ int id[4096];
// don't return here if we display nothing, because server[j].users is updated in the first loop.
@@ -1153,12 +1197,12 @@ void create_online_files(void) {
break;
case 4: // by job (and job level)
for(k = 0; k < players; k++)
- if (char_dat[j].class < char_dat[id[k]].class ||
+ if (char_dat[j].class_ < char_dat[id[k]].class_ ||
// if same job, we sort by job level.
- (char_dat[j].class == char_dat[id[k]].class &&
+ (char_dat[j].class_ == char_dat[id[k]].class_ &&
char_dat[j].job_level < char_dat[id[k]].job_level) ||
// if same job and job level, we sort by job exp.
- (char_dat[j].class == char_dat[id[k]].class &&
+ (char_dat[j].class_ == char_dat[id[k]].class_ &&
char_dat[j].job_level == char_dat[id[k]].job_level &&
char_dat[j].job_exp < char_dat[id[k]].job_exp)) {
for(l = players; l > k; l--)
@@ -1299,7 +1343,7 @@ void create_online_files(void) {
}
// displaying of the job
if (online_display_option & 6) {
- char * jobname = job_name(char_dat[j].class);
+ char * jobname = job_name(char_dat[j].class_);
if ((online_display_option & 6) == 6) {
fprintf(fp2, " <td>%s %d/%d</td>\n", jobname, char_dat[j].base_level, char_dat[j].job_level);
fprintf(fp, "%-18s %3d/%3d ", jobname, char_dat[j].base_level, char_dat[j].job_level);
@@ -1352,8 +1396,9 @@ void create_online_files(void) {
if (players == 0) {
fprintf(fp2, " <p>No user is online.</p>\n");
fprintf(fp, "No user is online.\n");
- // no display if only 1 player
} 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);
@@ -1433,9 +1478,15 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
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+52) = p->class_;
WFIFOW(fd,j+54) = p->hair;
- WFIFOW(fd,j+56) = p->weapon;
+
+ // pecopeco knights/crusaders crash fix
+ if (p->class_ == 13 || p->class_ == 21 ||
+ p->class_ == 4014 || p->class_ == 4022)
+ 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;
@@ -1501,9 +1552,9 @@ int char_divorce(struct mmo_charstatus *cs) {
//------------------------------------------------------------
// E-mail check: return 0 (not correct) or 1 (valid). by [Yor]
//------------------------------------------------------------
-int e_mail_check(unsigned char *email) {
+int e_mail_check(char *email) {
char ch;
- unsigned char* last_arobas;
+ char* last_arobas;
// athena limits
if (strlen(email) < 3 || strlen(email) > 39)
@@ -1546,7 +1597,7 @@ int disconnect_player(int accound_id) {
// disconnect player if online on char-server
for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data)) {
+ if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) {
if (sd->account_id == accound_id) {
session[i]->eof = 1;
return 1;
@@ -1579,7 +1630,7 @@ static int char_delete(struct mmo_charstatus *cs) {
// —£¥
if (cs->partner_id){
// —£¥î•ñ‚ðmap‚É’Ê’m
- char buf[10];
+ unsigned char buf[10];
WBUFW(buf,0) = 0x2b12;
WBUFL(buf,2) = cs->char_id;
WBUFL(buf,6) = cs->partner_id;
@@ -1608,7 +1659,7 @@ int parse_tologin(int fd) {
return 0;
}
- sd = session[fd]->session_data;
+ sd = (struct char_session_data*)session[fd]->session_data;
while(RFIFOREST(fd) >= 2) {
// printf("parse_tologin: connection #%d, packet: 0x%x (with being read: %d bytes).\n", fd, RFIFOW(fd,0), RFIFOREST(fd));
@@ -1641,7 +1692,7 @@ int parse_tologin(int fd) {
return 0;
// printf("parse_tologin 2713 : %d\n", RFIFOB(fd,6));
for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data) && sd->account_id == RFIFOL(fd,2)) {
+ 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;
@@ -1657,6 +1708,10 @@ int parse_tologin(int fd) {
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);
@@ -1675,7 +1730,7 @@ int parse_tologin(int fd) {
if (RFIFOREST(fd) < 50)
return 0;
for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data)) {
+ 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)
@@ -1688,6 +1743,42 @@ int parse_tologin(int fd) {
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
if (RFIFOREST(fd) < 10)
return 0;
@@ -1714,7 +1805,7 @@ int parse_tologin(int fd) {
if (acc > 0) {
for (i = 0; i < char_num; i++) {
if (char_dat[i].account_id == acc) {
- int jobclass = char_dat[i].class;
+ int jobclass = char_dat[i].class_;
char_dat[i].sex = sex;
auth_fifo[i].sex = sex;
if (jobclass == 19 || jobclass == 20 ||
@@ -1722,11 +1813,11 @@ int parse_tologin(int fd) {
jobclass == 4042 || jobclass == 4043) {
// job modification
if (jobclass == 19 || jobclass == 20) {
- char_dat[i].class = (sex) ? 19 : 20;
+ char_dat[i].class_ = (sex) ? 19 : 20;
} else if (jobclass == 4020 || jobclass == 4021) {
- char_dat[i].class = (sex) ? 4020 : 4021;
+ char_dat[i].class_ = (sex) ? 4020 : 4021;
} else if (jobclass == 4042 || jobclass == 4043) {
- char_dat[i].class = (sex) ? 4042 : 4043;
+ char_dat[i].class_ = (sex) ? 4042 : 4043;
}
// remove specifical skills of classes 19, 4020 and 4042
for(j = 315; j <= 322; j++) {
@@ -1780,14 +1871,14 @@ int parse_tologin(int fd) {
if (i == MAX_MAP_SERVERS)
char_log("'ladmin': Receiving a message for broadcast, but no map-server is online." RETCODE);
else {
- char buf[128];
- char message[RFIFOL(fd,4) + 1]; // +1 to add a null terminated if not exist in the packet
+ 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(message);
+ remove_control_chars((unsigned char *)message);
// remove all first spaces
p = message;
while(p[0] == ' ')
@@ -1875,7 +1966,7 @@ int parse_tologin(int fd) {
int j, k;
struct char_session_data *sd2;
for (j = 0; j < fd_max; j++) {
- if (session[j] && (sd2 = session[j]->session_data) &&
+ if (session[j] && (sd2 = (struct char_session_data*)session[j]->session_data) &&
sd2->account_id == char_dat[char_num-1].account_id) {
for (k = 0; k < 9; k++) {
if (sd2->found_char[k] == char_num-1) {
@@ -1928,10 +2019,10 @@ int parse_tologin(int fd) {
if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
return 0;
{
- char buf[32000];
+ unsigned char buf[32000];
if (gm_account != NULL)
- free(gm_account);
- gm_account = calloc(sizeof(struct gm_account) * ((RFIFOW(fd,2) - 4) / 5), 1);
+ 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);
@@ -1950,7 +2041,66 @@ int parse_tologin(int fd) {
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) {
+ printf("***WARNING: 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;
+ printf("From login-server: receiving a 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;
+
default:
+ printf("parse_tologin: unknown packet %x! \n", RFIFOW(fd,0));
session[fd]->eof = 1;
return 0;
}
@@ -1960,28 +2110,6 @@ int parse_tologin(int fd) {
return 0;
}
-//--------------------------------
-// Map-server anti-freeze system
-//--------------------------------
-int map_anti_freeze_system(int tid, unsigned int tick, int id, int data) {
- int i;
-
- //printf("Entering in map_anti_freeze_system function to check freeze of servers.\n");
- for(i = 0; i < MAX_MAP_SERVERS; i++) {
- if (server_fd[i] >= 0) {// if map-server is online
- //printf("map_anti_freeze_system: server #%d, flag: %d.\n", i, server_freezeflag[i]);
- if (server_freezeflag[i]-- < 1) { // Map-server anti-freeze system. Counter. 5 ok, 4...0 freezed
- printf("Map-server anti-freeze system: char-server #%d is freezed -> disconnection.\n", i);
- char_log("Map-server anti-freeze system: char-server #%d is freezed -> disconnection." RETCODE,
- i);
- session[server_fd[i]]->eof = 1;
- }
- }
- }
-
- return 0;
-}
-
int parse_frommap(int fd) {
int i, j;
int id;
@@ -2007,6 +2135,14 @@ int parse_frommap(int fd) {
// 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
@@ -2119,8 +2255,6 @@ int parse_frommap(int fd) {
if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,2))
return 0;
server[id].users = RFIFOW(fd,4);
- if(anti_freeze_enable)
- server_freezeflag[id] = 5; // Map anti-freeze system. Counter. 5 ok, 4...0 freezed
// remove all previously online players of the server
for(i = 0; i < online_players_max; i++)
if (online_chars[i].server == id) {
@@ -2141,7 +2275,7 @@ int parse_frommap(int fd) {
if (j == online_players_max) {
// create 256 new slots
online_players_max += 256;
- online_chars = realloc(online_chars, sizeof(struct online_chars) * online_players_max);
+ online_chars = (struct online_chars*)aRealloc(online_chars, sizeof(struct online_chars) * online_players_max);
if (!online_chars) {
printf("out of memory: parse_frommap - online_chars (realloc).\n");
exit(1);
@@ -2411,20 +2545,23 @@ int parse_frommap(int fd) {
RFIFOSKIP(fd, RFIFOW(fd,2));
// printf("char: save_account_reg (from map)\n");
break;
- }
- // Map server send information to change an email of an account -> login-server
- case 0x3000:
- if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ }
+ // Character disconnected set online 0 [Wizputer]
+ case 0x2b17:
+ if (RFIFOREST(fd) < 6)
return 0;
- if (login_fd > 0) { // don't send request if no login-server
- WFIFOW(login_fd,0) = 0x3000;
- WFIFOW(login_fd,2) = RFIFOW(fd,2);
- WFIFOL(login_fd,4) = RFIFOL(fd,4);
- WFIFOB(login_fd,8) = RFIFOB(fd,8);
- WFIFOSET(login_fd, RFIFOW(fd,2));
- printf("char : change sex -> login %d %d %d \n", RFIFOL(fd,4), RFIFOB(fd,8), RFIFOW(fd,2));
- }
- RFIFOSKIP(fd, RFIFOW(fd,2));
+ //printf("Setting %d char offline\n",RFIFOL(fd,2));
+ set_char_offline(RFIFOL(fd,2),RFIFOL(fd,6));
+ RFIFOSKIP(fd,10);
+ 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(RFIFOL(fd,2),RFIFOL(fd,6));
+ RFIFOSKIP(fd,10);
break;
default:
@@ -2513,7 +2650,7 @@ int parse_char(int fd) {
return 0;
}
- sd = session[fd]->session_data;
+ sd = (struct char_session_data*)session[fd]->session_data;
while (RFIFOREST(fd) >= 2) {
cmd = RFIFOW(fd,0);
@@ -2537,7 +2674,7 @@ int parse_char(int fd) {
// if (sd == NULL && cmd != 0x65 && cmd != 0x20b && cmd != 0x187 &&
// cmd != 0x2af8 && cmd != 0x7530 && cmd != 0x7532)
// cmd = 0xffff; // ƒpƒPƒbƒgƒ_ƒ“ƒv‚ð•\Ž¦‚³‚¹‚é
-
+
switch(cmd){
case 0x20b: //20040622ˆÃ†‰»ragexe‘Ήž
if (RFIFOREST(fd) < 19)
@@ -2555,7 +2692,9 @@ int parse_char(int fd) {
else
printf("Account Logged On; Account ID: %d.\n", RFIFOL(fd,2));
if (sd == NULL) {
- sd = session[fd]->session_data = calloc(sizeof(struct char_session_data), 1);
+ 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));
memcpy(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)
@@ -2742,7 +2881,7 @@ int parse_char(int fd) {
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+52) = char_dat[i].class_;
WFIFOW(fd,2+54) = char_dat[i].hair;
WFIFOW(fd,2+58) = char_dat[i].base_level;
@@ -2835,7 +2974,7 @@ int parse_char(int fd) {
int j, k;
struct char_session_data *sd2;
for (j = 0; j < fd_max; j++) {
- if (session[j] && (sd2 = session[j]->session_data) &&
+ if (session[j] && (sd2 = (struct char_session_data*)session[j]->session_data) &&
sd2->account_id == char_dat[char_num-1].account_id) {
for (k = 0; k < 9; k++) {
if (sd2->found_char[k] == char_num-1) {
@@ -2877,7 +3016,7 @@ int parse_char(int fd) {
if (server_fd[i] < 0)
break;
}
- if (i == MAX_MAP_SERVERS || strcmp(RFIFOP(fd,2), userid) || strcmp(RFIFOP(fd,26), passwd)){
+ 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);
@@ -2886,8 +3025,6 @@ int parse_char(int fd) {
WFIFOB(fd,2) = 0;
session[fd]->func_parse = parse_frommap;
server_fd[i] = fd;
- if(anti_freeze_enable)
- server_freezeflag[i] = 5; // Map anti-freeze system. Counter. 5 ok, 4...0 freezed
server[i].ip = RFIFOL(fd,54);
server[i].port = RFIFOW(fd,58);
server[i].users = 0;
@@ -2945,24 +3082,24 @@ int parse_char(int fd) {
// Console Command Parser [Wizputer]
int parse_console(char *buf) {
char *type,*command;
-
- type = (char *)malloc(64);
- command = (char *)malloc(64);
-
+
+ type = (char *)aMalloc(64);
+ command = (char *)aMalloc(64);
+
memset(type,0,64);
memset(command,0,64);
-
+
printf("Console: %s\n",buf);
-
+
if ( sscanf(buf, "%[^:]:%[^\n]", type , command ) < 2 )
sscanf(buf,"%[^\n]",type);
-
+
printf("Type of command: %s || Command: %s \n",type,command);
-
- if(buf) free(buf);
- if(type) free(type);
- if(command) free(command);
-
+
+ if(buf) aFree(buf);
+ if(type) aFree(type);
+ if(command) aFree(command);
+
return 0;
}
@@ -3015,7 +3152,7 @@ int mapif_send(int fd, unsigned char *buf, unsigned int len) {
int send_users_tologin(int tid, unsigned int tick, int id, int data) {
int users = count_users();
- char buf[16];
+ unsigned char buf[16];
if (login_fd > 0 && session[login_fd]) {
// send number of user to login server
@@ -3103,8 +3240,8 @@ int lan_config_read(const char *lancfgName) {
if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2)
continue;
- remove_control_chars(w1);
- remove_control_chars(w2);
+ 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) {
@@ -3175,8 +3312,8 @@ int char_config_read(const char *cfgName) {
if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2)
continue;
- remove_control_chars(w1);
- remove_control_chars(w2);
+ remove_control_chars((unsigned char *)w1);
+ remove_control_chars((unsigned char *)w2);
if (strcmpi(w1, "userid") == 0) {
memcpy(userid, w2, 24);
} else if (strcmpi(w1, "passwd") == 0) {
@@ -3184,7 +3321,7 @@ int char_config_read(const char *cfgName) {
} else if (strcmpi(w1, "server_name") == 0) {
memcpy(server_name, w2, sizeof(server_name));
server_name[sizeof(server_name) - 1] = '\0';
- printf("%s server has been intialized\n", w2);
+ printf("%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));
@@ -3208,6 +3345,14 @@ int char_config_read(const char *cfgName) {
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) {
+ printf("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) {
@@ -3228,6 +3373,10 @@ int char_config_read(const char *cfgName) {
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, "autosave_time") == 0) {
@@ -3296,12 +3445,6 @@ int char_config_read(const char *cfgName) {
online_refresh_html = 1;
} else if(strcmpi(w1,"db_path")==0) {
strcpy(db_path,w2);
- } else if(strcmpi(w1,"anti_freeze_enable")==0){
- anti_freeze_enable = config_switch(w2);
- } else if (strcmpi(w1, "anti_freeze_interval") == 0) {
- ANTI_FREEZE_INTERVAL = atoi(w2);
- if (ANTI_FREEZE_INTERVAL < 5)
- ANTI_FREEZE_INTERVAL = 5; // minimum 5 seconds
} else if (strcmpi(w1, "import") == 0) {
char_config_read(w2);
} else if (strcmpi(w1, "console") == 0) {
@@ -3343,19 +3486,20 @@ void do_final(void) {
}
create_online_files();
- if(online_chars) free(online_chars);
+ if(online_chars) aFree(online_chars);
mmo_char_sync();
inter_save();
- if(gm_account) free(gm_account);
- if(char_dat) free(char_dat);
+ if(gm_account) aFree(gm_account);
+ if(char_dat) aFree(char_dat);
delete_session(login_fd);
delete_session(char_fd);
- for(i = 0; i < fd_max; i++)
- if(session[i] != NULL) free(session[i]);
+ inter_final();
+ exit_dbn();
+ timer_final();
char_log("----End of char-server (normal end with closing of all files)." RETCODE);
}
@@ -3363,21 +3507,23 @@ void do_final(void) {
int do_init(int argc, char **argv) {
int i;
- // a newline in the log...
- char_log("");
- char_log("The char-server starting..." RETCODE);
-
+ SERVER_TYPE = SERVER_CHAR;
char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
lan_config_read((argc > 1) ? argv[1] : LOGIN_LAN_CONF_NAME);
- if ((naddr_ != 0) && (login_ip_set_ == 0 || char_ip_set_ == 0)) {
+ // 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)
+ if (naddr_ != 1)
printf("Multiple interfaces detected.. using %s as our IP address\n", buf);
else
printf("Defaulting to %s as our IP address\n", buf);
@@ -3386,9 +3532,9 @@ int do_init(int argc, char **argv) {
if (char_ip_set_ == 0)
strcpy(char_ip_str, buf);
- if (ptr[0] == 192 && ptr[1] == 168)
- printf("Firewall detected.. edit lan_support.conf and char_athena.conf");
- }
+ if (ptr[0] == 192 && ptr[1] == 168)
+ printf("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);
@@ -3399,7 +3545,7 @@ int do_init(int argc, char **argv) {
}
online_players_max = 256;
- online_chars = calloc(sizeof(struct online_chars) * 256, 1);
+ online_chars = (struct online_chars*)aCalloc(sizeof(struct online_chars) * 256, 1);
if (!online_chars) {
printf("out of memory: do_init (calloc).\n");
exit(1);
@@ -3409,7 +3555,6 @@ int do_init(int argc, char **argv) {
online_chars[i].server = -1;
}
-
mmo_char_init();
update_online = time(NULL);
@@ -3420,12 +3565,15 @@ int do_init(int argc, char **argv) {
set_termfunc(do_final);
set_defaultparse(parse_char);
- 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(mmo_char_sync_timer, "mmo_char_sync_timer");
-
+
i = add_timer_interval(gettick() + 1000, check_connect_login_server, 0, 0, 10 * 1000);
i = add_timer_interval(gettick() + 1000, send_users_tologin, 0, 0, 5 * 1000);
i = add_timer_interval(gettick() + autosave_interval, mmo_char_sync_timer, 0, 0, autosave_interval);
@@ -3438,13 +3586,6 @@ int do_init(int argc, char **argv) {
if (flush_on)
add_timer_interval(gettick()+10, flush_timer,0,0,flush_time);
-
-
- if(anti_freeze_enable > 0) {
- add_timer_func_list(map_anti_freeze_system, "map_anti_freeze_system");
- i = add_timer_interval(gettick() + 1000, map_anti_freeze_system, 0, 0, ANTI_FREEZE_INTERVAL * 1000); // checks every X seconds user specifies
- }
-
if(console) {
set_defaultconsoleparse(parse_console);
start_console();
@@ -3456,3 +3597,19 @@ int do_init(int argc, char **argv) {
return 0;
}
+
+int char_married(int pl1,int pl2) {
+ if (char_dat[pl1].char_id == char_dat[pl2].partner_id && char_dat[pl2].char_id == char_dat[pl1].partner_id)
+ return 1;
+ else
+ return 0;
+}
+
+int char_child(int parent_id, int child_id) {
+ if (char_dat[parent_id].child == char_dat[child_id].char_id &&
+ ((char_dat[parent_id].char_id == char_dat[child_id].father) ||
+ (char_dat[parent_id].char_id == char_dat[child_id].mother)))
+ return 1;
+ else
+ return 0;
+}
diff --git a/src/char/char.h b/src/char/char.h
index 3ee2f9f6d..78f4f0194 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -24,6 +24,9 @@ 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, ...);
extern int autosave_interval;
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index eb03dd335..9268d9339 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -45,7 +45,7 @@ int inter_guild_tostr(char *str, struct guild *g) {
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->class_, m->lv, m->exp, m->exp_payper, m->position,
((m->account_id > 0) ? m->name : "-"));
}
// –ðE
@@ -138,7 +138,7 @@ int inter_guild_fromstr(char *str, struct guild *g) {
m->hair = tmp_int[2];
m->hair_color = tmp_int[3];
m->gender = tmp_int[4];
- m->class = tmp_int[5];
+ m->class_ = tmp_int[5];
m->lv = tmp_int[6];
m->exp = tmp_int[7];
m->exp_payper = tmp_int[8];
@@ -398,7 +398,7 @@ int inter_guild_init() {
continue;
}
- g = calloc(sizeof(struct guild), 1);
+ g = (struct guild *) aCalloc(sizeof(struct guild), 1);
if(g == NULL){
printf("int_guild: out of memory!\n");
exit(0);
@@ -412,7 +412,7 @@ int inter_guild_init() {
guild_calcinfo(g);
} else {
printf("int_guild: broken data [%s] line %d\n", guild_txt, c);
- free(g);
+ aFree(g);
}
c++;
}
@@ -426,7 +426,7 @@ int inter_guild_init() {
}
while(fgets(line, sizeof(line)-1, fp)) {
- gc = calloc(sizeof(struct guild_castle), 1);
+ gc = (struct guild_castle *) aCalloc(sizeof(struct guild_castle), 1);
if(gc == NULL){
printf("int_guild: out of memory!\n");
exit(0);
@@ -436,7 +436,7 @@ int inter_guild_init() {
numdb_insert(castle_db, gc->castle_id, gc);
} else {
printf("int_guild: broken data [%s] line %d\n", castle_txt, c);
- free(gc);
+ aFree(gc);
}
c++;
}
@@ -445,7 +445,7 @@ int inter_guild_init() {
printf(" %s - making Default Data...\n", castle_txt);
//ƒfƒtƒHƒ‹ƒgƒf[ƒ^‚ðì¬
for(i = 0; i < MAX_GUILDCASTLE; i++) {
- gc = calloc(sizeof(struct guild_castle), 1);
+ gc = (struct guild_castle *) aCalloc(sizeof(struct guild_castle), 1);
if (gc == NULL) {
printf("int_guild: out of memory!\n");
exit(0);
@@ -488,10 +488,28 @@ int inter_guild_init() {
return 0;
}
+int castle_db_final (void *k, void *data, va_list ap)
+{
+ struct guild_castle *gc = (struct guild_castle *) data;
+ if (gc) aFree(gc);
+ return 0;
+}
+int guild_db_final (void *k, void *data, va_list ap)
+{
+ struct guild *g = (struct guild *) data;
+ if (g) aFree(g);
+ return 0;
+}
+void inter_guild_final() {
+ numdb_final(castle_db, castle_db_final);
+ numdb_final(guild_db, guild_db_final);
+ return;
+}
+
struct guild *inter_guild_search(int guild_id) {
struct guild *g;
- g=numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
return g;
}
@@ -577,7 +595,7 @@ int guild_check_empty(struct guild *g) {
numdb_erase(guild_db, g->guild_id);
inter_guild_storage_delete(g->guild_id);
mapif_guild_broken(g->guild_id, 0);
- free(g);
+ aFree(g);
return 1;
}
@@ -656,7 +674,7 @@ int guild_calcinfo(struct guild *g) {
g->next_exp = guild_nextexp(g->guild_lv);
// ƒƒ“ƒoãŒÀiƒMƒ‹ƒhŠg’£“K—pj
- g->max_member = 16 + guild_checkskill(g, GD_EXTENSION) * 2;
+ g->max_member = 16 + guild_checkskill(g, GD_EXTENSION) * 6; //Lupus 2 -> 6
// •½‹ÏƒŒƒxƒ‹‚ƃIƒ“ƒ‰ƒCƒ“l”
g->average_lv = 0;
@@ -713,7 +731,7 @@ int mapif_guild_noinfo(int fd, int guild_id) {
// ƒMƒ‹ƒhî•ñ‚Ü‚Æ‚ß‘—‚è
int mapif_guild_info(int fd, struct guild *g) {
- unsigned char buf[4 + sizeof(struct guild)];
+ unsigned char buf[16384];
WBUFW(buf,0) = 0x3831;
memcpy(buf + 4, g, sizeof(struct guild));
@@ -765,9 +783,9 @@ int mapif_guild_memberinfoshort(struct guild *g, int idx) {
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) = g->member[idx].online;
+ WBUFB(buf,14) = (unsigned char)g->member[idx].online;
WBUFW(buf,15) = g->member[idx].lv;
- WBUFW(buf,17) = g->member[idx].class;
+ WBUFW(buf,17) = g->member[idx].class_;
mapif_sendall(buf, 19);
return 0;
}
@@ -786,15 +804,15 @@ int mapif_guild_broken(int guild_id, int flag) {
}
// ƒMƒ‹ƒh“à”­Œ¾
-int mapif_guild_message(int guild_id, int account_id, char *mes, int len) {
- unsigned char buf[len+12];
+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_sendall(buf, len + 12);
+ mapif_sendallwos(sfd, buf, len + 12);
return 0;
}
@@ -814,7 +832,7 @@ int mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int l
// ƒ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[len + 18];
+ unsigned char buf[4096];
WBUFW(buf, 0) = 0x383a;
WBUFW(buf, 2) = len + 18;
@@ -860,7 +878,7 @@ int mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int acco
// ƒMƒ‹ƒh–ðE•ÏX’Ê’m
int mapif_guild_position(struct guild *g, int idx) {
- unsigned char buf[sizeof(struct guild_position) + 12];
+ unsigned char buf[2048];
WBUFW(buf,0) = 0x383b;
WBUFW(buf,2) = sizeof(struct guild_position) + 12;
@@ -965,7 +983,7 @@ int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_mem
mapif_guild_created(fd, account_id, NULL);
return 0;
}
- g = calloc(sizeof(struct guild), 1);
+ g = (struct guild *) aCalloc(sizeof(struct guild), 1);
if (g == NULL) {
printf("int_guild: CreateGuild: out of memory !\n");
mapif_guild_created(fd, account_id, NULL);
@@ -1005,7 +1023,7 @@ int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_mem
int mapif_parse_GuildInfo(int fd, int guild_id) {
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g != NULL){
guild_calcinfo(g);
mapif_guild_info(fd, g);
@@ -1020,7 +1038,7 @@ int mapif_parse_GuildAddMember(int fd, int guild_id, struct guild_member *m) {
struct guild *g;
int i;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL) {
mapif_guild_memberadded(fd, guild_id, m->account_id, m->char_id, 1);
return 0;
@@ -1046,7 +1064,7 @@ int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, in
struct guild *g = NULL;
int i, j;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *)numdb_search(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) {
@@ -1085,11 +1103,11 @@ int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, in
}
// ƒIƒ“ƒ‰ƒCƒ“/LvXV
-int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class) {
+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 = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL)
return 0;
@@ -1101,7 +1119,7 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id,
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;
+ g->member[i].class_ = class_;
mapif_guild_memberinfoshort(g, i);
}
if (g->member[i].account_id > 0) {
@@ -1111,8 +1129,10 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id,
if (g->member[i].online)
g->connect_member++;
}
- // •½‹ÏƒŒƒxƒ‹
- g->average_lv = alv / c;
+
+ if (c)
+ // •½‹ÏƒŒƒxƒ‹
+ g->average_lv = alv / c;
return 0;
}
@@ -1134,7 +1154,7 @@ int guild_break_sub(void *key, void *data, va_list ap) {
int mapif_parse_BreakGuild(int fd, int guild_id) {
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if(g == NULL)
return 0;
@@ -1145,14 +1165,14 @@ int mapif_parse_BreakGuild(int fd, int guild_id) {
if(log_inter)
inter_log("guild %s (id=%d) broken" RETCODE, g->name, guild_id);
- free(g);
+ aFree(g);
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);
+ return mapif_guild_message(guild_id, account_id, mes, len, fd);
}
// ƒMƒ‹ƒhŠî–{ƒf[ƒ^•ÏX—v‹
@@ -1160,7 +1180,7 @@ int mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const char
struct guild *g;
short dw = *((short *)data);
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL)
return 0;
@@ -1187,7 +1207,7 @@ int mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int
int i;
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if(g == NULL)
return 0;
@@ -1222,7 +1242,7 @@ int mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int
// ƒMƒ‹ƒh–ðE–¼•ÏX—v‹
int mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_position *p) {
- struct guild *g = numdb_search(guild_db, guild_id);
+ struct guild *g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL || idx < 0 || idx >= MAX_GUILDPOSITION) {
return 0;
@@ -1236,7 +1256,7 @@ int mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_positi
// ƒ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 = numdb_search(guild_db, guild_id);
+ struct guild *g = (struct guild *) numdb_search(guild_db, guild_id);
int idx = skill_num - GD_SKILLBASE;
if (g == NULL || idx < 0 || idx >= MAX_GUILDSKILL)
@@ -1259,8 +1279,8 @@ int mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_
struct guild *g[2];
int j, i;
- g[0] = numdb_search(guild_db, guild_id1);
- g[1] = numdb_search(guild_db, guild_id2);
+ g[0] = (struct guild *) numdb_search(guild_db, guild_id1);
+ g[1] = (struct guild *) numdb_search(guild_db, guild_id2);
if (g[0] == NULL || g[1] == NULL)
return 0;
@@ -1292,7 +1312,7 @@ int mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_
int mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *mes2) {
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL)
return 0;
memcpy(g->mes1, mes1, 60);
@@ -1305,7 +1325,7 @@ int mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *
int mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char *data) {
struct guild *g;
- g = numdb_search(guild_db, guild_id);
+ g = (struct guild *) numdb_search(guild_db, guild_id);
if (g == NULL)
return 0;
memcpy(g->emblem_data, data, len);
@@ -1316,7 +1336,7 @@ int mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char
}
int mapif_parse_GuildCastleDataLoad(int fd, int castle_id, int index) {
- struct guild_castle *gc = numdb_search(castle_db, castle_id);
+ struct guild_castle *gc = (struct guild_castle *) numdb_search(castle_db, castle_id);
if (gc == NULL) {
return mapif_guild_castle_dataload(castle_id, 0, 0);
@@ -1357,7 +1377,7 @@ int mapif_parse_GuildCastleDataLoad(int fd, int castle_id, int index) {
}
int mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value) {
- struct guild_castle *gc=numdb_search(castle_db, castle_id);
+ struct guild_castle *gc= (struct guild_castle *) numdb_search(castle_db, castle_id);
if (gc == NULL) {
return mapif_guild_castle_datasave(castle_id, index, value);
@@ -1366,10 +1386,10 @@ int mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value)
case 1:
if (gc->guild_id != value) {
int gid = (value) ? value : gc->guild_id;
- struct guild *g = numdb_search(guild_db, gid);
+ struct guild *g = (struct guild *) numdb_search(guild_db, gid);
if(log_inter)
inter_log("guild %s (id=%d) %s castle id=%d" RETCODE,
- (g) ? g->name : "??", gid, (value) ? "occupy" : "abandon", index);
+ (g) ? g->name : "??", gid, (value) ? "occupy" : "abandon", castle_id);
}
gc->guild_id = value;
break;
@@ -1417,21 +1437,21 @@ int mapif_parse_GuildCheck(int fd, int guild_id, int account_id, int char_id) {
// 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), RFIFOP(fd,8), (struct guild_member *)RFIFOP(fd,32)); break;
+ 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 0x3034: mapif_parse_GuildLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOB(fd,14), RFIFOP(fd,15)); 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), RFIFOP(fd,12), RFIFOW(fd,2)-12); 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), 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), RFIFOP(fd,18), RFIFOW(fd,2)-18); 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), RFIFOP(fd,6), RFIFOP(fd,66)); break;
- case 0x303F: mapif_parse_GuildEmblem(fd, RFIFOW(fd,2)-12, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12)); 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;
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index 555f5e123..3eeb1b3db 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -3,6 +3,7 @@
#define _INT_GUILD_H_
int inter_guild_init();
+void inter_guild_final();
int inter_guild_save();
int inter_guild_parse_frommap(int fd);
struct guild *inter_guild_search(int guild_id);
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 0fd58fa14..299a75135 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -19,7 +19,7 @@ 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);
-// ƒp[ƒeƒBƒf[ƒ^‚Ì•¶Žš—ñ‚Ö‚Ì•ÏŠ·
+// ƒp?ƒeƒBƒf?ƒ^‚Ì•¶Žš—ñ‚Ö‚Ì?Š·
int inter_party_tostr(char *str, struct party *p) {
int i, len;
@@ -32,7 +32,7 @@ int inter_party_tostr(char *str, struct party *p) {
return 0;
}
-// ƒp[ƒeƒBƒf[ƒ^‚Ì•¶Žš—ñ‚©‚ç‚Ì•ÏŠ·
+// ƒp?ƒeƒBƒf?ƒ^‚Ì•¶Žš—ñ‚©‚ç‚Ì?Š·
int inter_party_fromstr(char *str, struct party *p) {
int i, j;
int tmp_int[16];
@@ -74,7 +74,7 @@ int inter_party_fromstr(char *str, struct party *p) {
return 0;
}
-// ƒp[ƒeƒBƒf[ƒ^‚̃[ƒh
+// ƒp?ƒeƒBƒf?ƒ^‚̃?ƒh
int inter_party_init() {
char line[8192];
struct party *p;
@@ -94,7 +94,7 @@ int inter_party_init() {
continue;
}
- p = calloc(sizeof(struct party), 1);
+ p = (struct party*)aCalloc(sizeof(struct party), 1);
if (p == NULL){
printf("int_party: out of memory!\n");
exit(0);
@@ -107,7 +107,7 @@ int inter_party_init() {
party_check_empty(p);
} else {
printf("int_party: broken data [%s] line %d\n", party_txt, c + 1);
- free(p);
+ aFree(p);
}
c++;
}
@@ -117,7 +117,18 @@ int inter_party_init() {
return 0;
}
-// ƒp[ƒeƒB[ƒf[ƒ^‚̃Z[ƒu—p
+int party_db_final (void *k, void *data, va_list ap) {
+ struct party *p = (struct party *) data;
+ if (p) aFree(p);
+ return 0;
+}
+void inter_party_final()
+{
+ numdb_final(party_db, party_db_final);
+ return;
+}
+
+// ƒp?ƒeƒB?ƒf?ƒ^‚̃Z?ƒu—p
int inter_party_save_sub(void *key, void *data, va_list ap) {
char line[8192];
FILE *fp;
@@ -129,7 +140,7 @@ int inter_party_save_sub(void *key, void *data, va_list ap) {
return 0;
}
-// ƒp[ƒeƒB[ƒf[ƒ^‚̃Z[ƒu
+// ƒp?ƒeƒB?ƒf?ƒ^‚̃Z?ƒu
int inter_party_save() {
FILE *fp;
int lock;
@@ -146,7 +157,7 @@ int inter_party_save() {
return 0;
}
-// ƒp[ƒeƒB–¼ŒŸõ—p
+// ƒp?ƒeƒB–¼?õ—p
int search_partyname_sub(void *key,void *data,va_list ap) {
struct party *p = (struct party *)data,**dst;
char *str;
@@ -159,7 +170,7 @@ int search_partyname_sub(void *key,void *data,va_list ap) {
return 0;
}
-// ƒp[ƒeƒB–¼ŒŸõ
+// ƒp?ƒeƒB–¼?õ
struct party* search_partyname(char *str) {
struct party *p = NULL;
numdb_foreach(party_db, search_partyname_sub, str, &p);
@@ -169,7 +180,8 @@ struct party* search_partyname(char *str) {
// EXPŒö•½•ª”z‚Å‚«‚é‚©ƒ`ƒFƒbƒN
int party_check_exp_share(struct party *p) {
- int i;
+ int i, dudes=0;
+ int pl1=0,pl2=0,pl3=0;
int maxlv = 0, minlv = 0x7fffffff;
for(i = 0; i < MAX_PARTY; i++) {
@@ -179,13 +191,26 @@ int party_check_exp_share(struct party *p) {
minlv = lv;
if (maxlv < lv)
maxlv = lv;
+ if( lv >= 70 ) dudes+=1000;
+ dudes++;
}
}
-
- return (maxlv == 0 || maxlv-minlv <= party_share_level);
+ if((dudes/1000 >= 2) && (dudes%1000 == 3) && (!strcmp(p->member[0].map,p->member[1].map)) && (!strcmp(p->member[1].map,p->member[2].map))) {
+ pl1=search_character_index(p->member[0].name);
+ pl2=search_character_index(p->member[1].name);
+ pl3=search_character_index(p->member[2].name);
+ printf("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[0].lv,p->member[0].name,pl2,p->member[1].lv,p->member[1].name,pl3,p->member[2].lv,p->member[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
+// ƒp?ƒeƒB‚ª‹ó‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
int party_check_empty(struct party *p) {
int i;
@@ -199,7 +224,7 @@ int party_check_empty(struct party *p) {
// ’N‚à‚¢‚È‚¢‚̂ʼnðŽU
mapif_party_broken(p->party_id, 0);
numdb_erase(party_db, p->party_id);
- free(p);
+ aFree(p);
return 1;
}
@@ -214,12 +239,12 @@ int party_check_conflict_sub(void *key, void *data, va_list ap) {
account_id=va_arg(ap, int);
nick=va_arg(ap, char *);
- if (p->party_id == party_id) // –{—ˆ‚ÌŠ‘®‚È‚Ì‚Å–â‘è‚È‚µ
+ if (p->party_id == party_id) // –{?‚ÌŠ?‚È‚Ì‚Å–â‘è‚È‚µ
return 0;
for(i = 0; i < MAX_PARTY; i++) {
if (p->member[i].account_id == account_id && strcmp(p->member[i].name, nick) == 0) {
- // •Ê‚̃p[ƒeƒB‚É‹U‚ÌŠ‘®ƒf[ƒ^‚ª‚ ‚é‚Ì‚Å’E‘Þ
+ // •Ê‚̃p?ƒeƒB‚É?‚ÌŠ?ƒf?ƒ^‚ª‚ ‚é‚Ì‚Å?‘Þ
printf("int_party: party conflict! %d %d %d\n", account_id, party_id, p->party_id);
mapif_parse_PartyLeave(-1, p->party_id, account_id);
}
@@ -238,7 +263,7 @@ int party_check_conflict(int party_id, int account_id, char *nick) {
//-------------------------------------------------------------------
// map server‚Ö‚Ì’ÊM
-// ƒp[ƒeƒB쬉”Û
+// ƒp?ƒeƒB쬉”Û
int mapif_party_created(int fd,int account_id, struct party *p) {
WFIFOW(fd,0) = 0x3820;
WFIFOL(fd,2) = account_id;
@@ -257,7 +282,7 @@ int mapif_party_created(int fd,int account_id, struct party *p) {
return 0;
}
-// ƒp[ƒeƒBî•ñŒ©‚‚©‚炸
+// ƒp?ƒeƒBî•ñŒ©‚‚©‚炸
int mapif_party_noinfo(int fd, int party_id) {
WFIFOW(fd,0) = 0x3821;
WFIFOW(fd,2) = 8;
@@ -268,9 +293,9 @@ int mapif_party_noinfo(int fd, int party_id) {
return 0;
}
-// ƒp[ƒeƒBî•ñ‚Ü‚Æ‚ß‘—‚è
+// ƒp?ƒeƒBî•ñ‚Ü‚Æ‚ß‘—‚è
int mapif_party_info(int fd, struct party *p) {
- unsigned char buf[4 + sizeof(struct party)];
+ unsigned char buf[2048];
WBUFW(buf,0) = 0x3821;
memcpy(buf + 4, p, sizeof(struct party));
@@ -284,7 +309,7 @@ int mapif_party_info(int fd, struct party *p) {
return 0;
}
-// ƒp[ƒeƒBƒƒ“ƒo’ljÁ‰Â”Û
+// ƒp?ƒeƒBƒƒ“ƒo’ljÁ‰Â”Û
int mapif_party_memberadded(int fd, int party_id, int account_id, int flag) {
WFIFOW(fd,0) = 0x3822;
WFIFOL(fd,2) = party_id;
@@ -295,7 +320,7 @@ int mapif_party_memberadded(int fd, int party_id, int account_id, int flag) {
return 0;
}
-// ƒp[ƒeƒBÝ’è•ÏX’Ê’m
+// ƒp?ƒeƒBÝ’è?X’Ê’m
int mapif_party_optionchanged(int fd,struct party *p, int account_id, int flag) {
unsigned char buf[15];
@@ -314,7 +339,7 @@ int mapif_party_optionchanged(int fd,struct party *p, int account_id, int flag)
return 0;
}
-// ƒp[ƒeƒB’E‘Þ’Ê’m
+// ƒp?ƒeƒB?‘Þ’Ê’m
int mapif_party_leaved(int party_id,int account_id, char *name) {
unsigned char buf[34];
@@ -328,7 +353,7 @@ int mapif_party_leaved(int party_id,int account_id, char *name) {
return 0;
}
-// ƒp[ƒeƒBƒ}ƒbƒvXV’Ê’m
+// ƒp?ƒeƒBƒ}ƒbƒvXV’Ê’m
int mapif_party_membermoved(struct party *p, int idx) {
unsigned char buf[29];
@@ -343,7 +368,7 @@ int mapif_party_membermoved(struct party *p, int idx) {
return 0;
}
-// ƒp[ƒeƒB‰ðŽU’Ê’m
+// ƒp?ƒeƒB‰ðŽU’Ê’m
int mapif_party_broken(int party_id, int flag) {
unsigned char buf[7];
WBUFW(buf,0) = 0x3826;
@@ -355,16 +380,16 @@ int mapif_party_broken(int party_id, int flag) {
return 0;
}
-// ƒp[ƒeƒB“à”­Œ¾
-int mapif_party_message(int party_id, int account_id, char *mes, int len) {
- unsigned char buf[len+12];
+// ƒ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_sendall(buf,len + 12);
+ mapif_sendallwos(sfd, buf,len + 12);
return 0;
}
@@ -373,8 +398,8 @@ int mapif_party_message(int party_id, int account_id, char *mes, int len) {
// map server‚©‚ç‚Ì’ÊM
-// ƒp[ƒeƒB
-int mapif_parse_CreateParty(int fd, int account_id, char *name, char *nick, char *map, int lv) {
+// ƒp?ƒeƒB
+int mapif_parse_CreateParty(int fd, int account_id, char *name, char *nick, char *map, int lv, int item, int item2) {
struct party *p;
int i;
@@ -391,7 +416,7 @@ int mapif_parse_CreateParty(int fd, int account_id, char *name, char *nick, char
mapif_party_created(fd, account_id, NULL);
return 0;
}
- p = calloc(sizeof(struct party), 1);
+ p = (struct party *) aCalloc(sizeof(struct party), 1);
if (p == NULL) {
printf("int_party: out of memory !\n");
mapif_party_created(fd,account_id,NULL);
@@ -401,7 +426,12 @@ int mapif_parse_CreateParty(int fd, int account_id, char *name, char *nick, char
p->party_id = party_newid++;
memcpy(p->name, name, 24);
p->exp = 0;
- p->item = 0;
+ p->item = item;
+ //<item1>ƒAƒCƒeƒ€?W•û–@B0‚ÅŒÂl•ÊA1‚Ńp?ƒeƒBŒö—L
+ //<item2>ƒAƒCƒeƒ€•ª”z•û–@B0‚ÅŒÂl•ÊA1‚Ńp?ƒeƒB‚É‹Ï“™•ª”z
+ //difference between "collection" and "distribution" is...? ^^;
+ p->itemc = 0;
+
p->member[0].account_id = account_id;
memcpy(p->member[0].name, nick, 24);
memcpy(p->member[0].map, map, 16);
@@ -417,11 +447,11 @@ int mapif_parse_CreateParty(int fd, int account_id, char *name, char *nick, char
return 0;
}
-// ƒp[ƒeƒBî•ñ—v‹
+// ƒp?ƒeƒBî•ñ—v‹
int mapif_parse_PartyInfo(int fd, int party_id) {
struct party *p;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p != NULL)
mapif_party_info(fd, p);
else
@@ -430,12 +460,12 @@ int mapif_parse_PartyInfo(int fd, int party_id) {
return 0;
}
-// ƒp[ƒeƒB’ljÁ—v‹
+// ƒp?ƒeƒB’ljÁ—v‹
int mapif_parse_PartyAddMember(int fd, int party_id, int account_id, char *nick, char *map, int lv) {
struct party *p;
int i;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p == NULL) {
mapif_party_memberadded(fd, party_id, account_id, 1);
return 0;
@@ -468,12 +498,12 @@ int mapif_parse_PartyAddMember(int fd, int party_id, int account_id, char *nick,
return 0;
}
-// ƒp[ƒeƒB[Ý’è•ÏX—v‹
+// ƒp?ƒeƒB?Ý’è?X—v‹
int mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int exp, int item) {
struct party *p;
int flag = 0;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p == NULL)
return 0;
@@ -489,12 +519,12 @@ int mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int exp,
return 0;
}
-// ƒp[ƒeƒB’E‘Þ—v‹
+// ƒp?ƒeƒB?‘Þ—v‹
int mapif_parse_PartyLeave(int fd, int party_id, int account_id) {
struct party *p;
int i;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p != NULL) {
for(i = 0; i < MAX_PARTY; i++) {
if (p->member[i].account_id == account_id) {
@@ -502,7 +532,7 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id) {
memset(&p->member[i], 0, sizeof(struct party_member));
if (party_check_empty(p) == 0)
- mapif_party_info(-1, p);// ‚Ü‚¾l‚ª‚¢‚é‚̂Ńf[ƒ^‘—M
+ mapif_party_info(-1, p);// ‚Ü‚¾l‚ª‚¢‚é‚̂Ńf?ƒ^‘—M
return 0;
}
}
@@ -511,12 +541,12 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id) {
return 0;
}
-// ƒp[ƒeƒBƒ}ƒbƒvXV—v‹
+// ƒp?ƒeƒBƒ}ƒbƒvXV—v‹
int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, char *map, int online, int lv) {
struct party *p;
int i;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p == NULL)
return 0;
@@ -542,11 +572,11 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, char *map,
return 0;
}
-// ƒp[ƒeƒB‰ðŽU—v‹
+// ƒp?ƒeƒB‰ðŽU—v‹
int mapif_parse_BreakParty(int fd, int party_id) {
struct party *p;
- p = numdb_search(party_db, party_id);
+ p = (struct party *) numdb_search(party_db, party_id);
if (p == NULL)
return 0;
@@ -556,31 +586,31 @@ int mapif_parse_BreakParty(int fd, int party_id) {
return 0;
}
-// ƒp[ƒeƒBƒƒbƒZ[ƒW‘—M
+// ƒ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);
+ return mapif_party_message(party_id, account_id, mes, len, fd);
}
-// ƒp[ƒeƒBƒ`ƒFƒbƒN—v‹
+// ƒp?ƒeƒBƒ`ƒFƒbƒN—v‹
int mapif_parse_PartyCheck(int fd, int party_id, int account_id, char *nick) {
return party_check_conflict(party_id, account_id, nick);
}
// 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)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢
+// ?‚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) {
switch(RFIFOW(fd,0)) {
- case 0x3020: mapif_parse_CreateParty(fd, RFIFOL(fd,2), RFIFOP(fd,6), RFIFOP(fd,30), RFIFOP(fd,54), RFIFOW(fd,70)); break;
+ case 0x3020: mapif_parse_CreateParty(fd, RFIFOL(fd,2), (char*)RFIFOP(fd,6), (char*)RFIFOP(fd,30), (char*)RFIFOP(fd,54), RFIFOW(fd,70), RFIFOB(fd,72), RFIFOB(fd,73)); break;
case 0x3021: mapif_parse_PartyInfo(fd, RFIFOL(fd,2)); break;
- case 0x3022: mapif_parse_PartyAddMember(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOP(fd,10), RFIFOP(fd,34), RFIFOW(fd,50)); break;
+ case 0x3022: mapif_parse_PartyAddMember(fd, RFIFOL(fd,2), RFIFOL(fd,6), (char*)RFIFOP(fd,10), (char*)RFIFOP(fd,34), RFIFOW(fd,50)); 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)); break;
- case 0x3025: mapif_parse_PartyChangeMap(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOP(fd,10), RFIFOB(fd,26), RFIFOW(fd,27)); break;
+ case 0x3025: mapif_parse_PartyChangeMap(fd, RFIFOL(fd,2), RFIFOL(fd,6), (char*)RFIFOP(fd,10), RFIFOB(fd,26), RFIFOW(fd,27)); break;
case 0x3026: mapif_parse_BreakParty(fd, RFIFOL(fd,2)); break;
- case 0x3027: mapif_parse_PartyMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12), RFIFOW(fd,2)-12); break;
- case 0x3028: mapif_parse_PartyCheck(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOP(fd,10)); 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), (char*)RFIFOP(fd,10)); break;
default:
return 0;
}
@@ -588,7 +618,7 @@ int inter_party_parse_frommap(int fd) {
return 1;
}
-// ƒT[ƒo[‚©‚ç’E‘Þ—v‹iƒLƒƒƒ‰íœ—pj
+// ƒT?ƒo?‚©‚ç?‘Þ—v‹iƒLƒƒƒ‰íœ—pj
int inter_party_leave(int party_id, int account_id) {
return mapif_parse_PartyLeave(-1, party_id, account_id);
}
diff --git a/src/char/int_party.h b/src/char/int_party.h
index b265b4c2e..e3180f3b7 100644
--- a/src/char/int_party.h
+++ b/src/char/int_party.h
@@ -3,6 +3,7 @@
#define _INT_PARTY_H_
int inter_party_init();
+void inter_party_final();
int inter_party_save();
int inter_party_parse_frommap(int fd);
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index cff1e434f..ab53d0533 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -30,7 +30,7 @@ int inter_pet_tostr(char *str,struct s_pet *p)
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->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;
@@ -41,18 +41,18 @@ 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];
+ p->class_ = tmp_int[1];
memcpy(p->name,tmp_str,24);
p->account_id = tmp_int[2];
p->char_id = tmp_int[3];
@@ -88,7 +88,7 @@ int inter_pet_init()
if( (fp=fopen(pet_txt,"r"))==NULL )
return 1;
while(fgets(line,sizeof(line),fp)){
- p=calloc(sizeof(struct s_pet), 1);
+ p = (struct s_pet*)aCalloc(sizeof(struct s_pet), 1);
if(p==NULL){
printf("int_pet: out of memory!\n");
exit(0);
@@ -100,7 +100,7 @@ int inter_pet_init()
numdb_insert(pet_db,p->pet_id,p);
}else{
printf("int_pet: broken data [%s] line %d\n",pet_txt,c);
- free(p);
+ aFree(p);
}
c++;
}
@@ -109,6 +109,17 @@ int inter_pet_init()
return 0;
}
+int pet_db_final (void *k, void *data, va_list ap) {
+ struct s_pet *p = (struct s_pet *) data;
+ if (p) aFree(p);
+ return 0;
+}
+void inter_pet_final()
+{
+ numdb_final(pet_db, pet_db_final);
+ return;
+}
+
int inter_pet_save_sub(void *key,void *data,va_list ap)
{
char line[8192];
@@ -136,7 +147,7 @@ int inter_pet_save()
int inter_pet_delete(int pet_id)
{
struct s_pet *p;
- p = numdb_search(pet_db,pet_id);
+ p = (struct s_pet *) numdb_search(pet_db,pet_id);
if( p == NULL)
return 1;
else {
@@ -210,7 +221,7 @@ int mapif_create_pet(int fd,int account_id,int char_id,short pet_class,short pet
short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name)
{
struct s_pet *p;
- p=malloc(sizeof(struct s_pet));
+ p= (struct s_pet *) aMalloc(sizeof(struct s_pet));
if(p==NULL){
printf("int_pet: out of memory !\n");
mapif_pet_created(fd,account_id,NULL);
@@ -225,7 +236,7 @@ int mapif_create_pet(int fd,int account_id,int char_id,short pet_class,short pet
p->account_id = account_id;
p->char_id = char_id;
}
- p->class = pet_class;
+ p->class_ = pet_class;
p->level = pet_lv;
p->egg_id = pet_egg_id;
p->equip = pet_equip;
@@ -242,18 +253,18 @@ int mapif_create_pet(int fd,int account_id,int char_id,short pet_class,short pet
p->intimate = 0;
else if(p->intimate > 1000)
p->intimate = 1000;
-
+
numdb_insert(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=numdb_search(pet_db,pet_id);
+ p=(struct s_pet *)numdb_search(pet_db,pet_id);
if(p!=NULL) {
if(p->incuvate == 1) {
p->account_id = p->char_id = 0;
@@ -280,9 +291,9 @@ int mapif_save_pet(int fd,int account_id,struct s_pet *data)
}
else{
pet_id = data->pet_id;
- p=numdb_search(pet_db,pet_id);
+ p=(struct s_pet *)numdb_search(pet_db,pet_id);
if(p == NULL) {
- p=malloc(sizeof(struct s_pet));
+ p=(struct s_pet *)aMalloc(sizeof(struct s_pet));
if(p==NULL){
printf("int_pet: out of memory !\n");
mapif_save_pet_ack(fd,account_id,1);
@@ -292,7 +303,7 @@ int mapif_save_pet(int fd,int account_id,struct s_pet *data)
p->pet_id = data->pet_id;
if(p->pet_id == 0)
data->pet_id = p->pet_id = pet_newid++;
- numdb_insert(pet_db,p->pet_id,p);
+ numdb_insert(pet_db,p->pet_id,p);
}
if(data->hungry < 0)
data->hungry = 0;
@@ -322,7 +333,7 @@ int mapif_delete_pet(int fd,int pet_id)
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),RFIFOP(fd,24));
+ RFIFOL(fd,20),RFIFOB(fd,22),RFIFOB(fd,23),(char*)RFIFOP(fd,24));
return 0;
}
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
index 993f913ab..3a48ada3b 100644
--- a/src/char/int_pet.h
+++ b/src/char/int_pet.h
@@ -3,6 +3,7 @@
#define _INT_PET_H_
int inter_pet_init();
+void inter_pet_final();
int inter_pet_save();
int inter_pet_delete(int pet_id);
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 7a4022a55..eaf9e001a 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -28,11 +28,11 @@ int storage_tostr(char *str,struct storage *p)
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) ){
+ if( (p->storage_[i].nameid) && (p->storage_[i].amount) ){
str_p += sprintf(str_p,"%d,%d,%d,%d,%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,
- p->storage[i].card[0],p->storage[i].card[1],p->storage[i].card[2],p->storage[i].card[3]);
+ 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,
+ p->storage_[i].card[0],p->storage_[i].card[1],p->storage_[i].card[2],p->storage_[i].card[3]);
f++;
}
@@ -56,49 +56,49 @@ int storage_fromstr(char *str,struct storage *p)
if(set!=2)
return 1;
if(str[next]=='\n' || str[next]=='\r')
- return 0;
+ 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];
+ 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++;
+ 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];
+ 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++;
+ next++;
}
-
+
else return 1;
}
return 0;
@@ -111,11 +111,11 @@ int guild_storage_tostr(char *str,struct guild_storage *p)
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) ){
+ if( (p->storage_[i].nameid) && (p->storage_[i].amount) ){
str_p += sprintf(str_p,"%d,%d,%d,%d,%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,
- p->storage[i].card[0],p->storage[i].card[1],p->storage[i].card[2],p->storage[i].card[3]);
+ 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,
+ p->storage_[i].card[0],p->storage_[i].card[1],p->storage_[i].card[2],p->storage_[i].card[3]);
f++;
}
@@ -138,49 +138,49 @@ int guild_storage_fromstr(char *str,struct guild_storage *p)
if(set!=2)
return 1;
if(str[next]=='\n' || str[next]=='\r')
- return 0;
+ 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];
+ 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++;
+ 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];
+ 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++;
+ next++;
}
-
+
else return 1;
}
return 0;
@@ -190,9 +190,9 @@ int guild_storage_fromstr(char *str,struct guild_storage *p)
struct storage *account2storage(int account_id)
{
struct storage *s;
- s=numdb_search(storage_db,account_id);
+ s= (struct storage *) numdb_search(storage_db,account_id);
if(s == NULL) {
- s = calloc(sizeof(struct storage), 1);
+ s = (struct storage *) aCalloc(sizeof(struct storage), 1);
if(s==NULL){
printf("int_storage: out of memory!\n");
exit(0);
@@ -208,9 +208,9 @@ struct guild_storage *guild2storage(int guild_id)
{
struct guild_storage *gs = NULL;
if(inter_guild_search(guild_id) != NULL) {
- gs=numdb_search(guild_storage_db,guild_id);
+ gs= (struct guild_storage *) numdb_search(guild_storage_db,guild_id);
if(gs == NULL) {
- gs = calloc(sizeof(struct guild_storage), 1);
+ gs = (struct guild_storage *) aCalloc(sizeof(struct guild_storage), 1);
if(gs==NULL){
printf("int_storage: out of memory!\n");
exit(0);
@@ -242,7 +242,7 @@ int inter_storage_init()
}
while(fgets(line,65535,fp)){
sscanf(line,"%d",&tmp_int);
- s=calloc(sizeof(struct storage), 1);
+ s = (struct storage*)aCalloc(sizeof(struct storage), 1);
if(s==NULL){
printf("int_storage: out of memory!\n");
exit(0);
@@ -254,7 +254,7 @@ int inter_storage_init()
}
else{
printf("int_storage: broken data [%s] line %d\n",storage_txt,c);
- free(s);
+ aFree(s);
}
c++;
}
@@ -270,7 +270,7 @@ int inter_storage_init()
}
while(fgets(line,65535,fp)){
sscanf(line,"%d",&tmp_int);
- gs=calloc(sizeof(struct guild_storage), 1);
+ gs = (struct guild_storage*)aCalloc(sizeof(struct guild_storage), 1);
if(gs==NULL){
printf("int_storage: out of memory!\n");
exit(0);
@@ -282,7 +282,7 @@ int inter_storage_init()
}
else{
printf("int_storage: broken data [%s] line %d\n",guild_storage_txt,c);
- free(gs);
+ aFree(gs);
}
c++;
}
@@ -291,6 +291,22 @@ int inter_storage_init()
return 0;
}
+int storage_db_final (void *k, void *data, va_list ap) {
+ struct storage *p = (struct storage *) data;
+ if (p) aFree(p);
+ return 0;
+}
+int guild_storage_db_final (void *k, void *data, va_list ap) {
+ struct guild_storage *p = (struct guild_storage *) data;
+ if (p) aFree(p);
+ return 0;
+}
+void inter_storage_final() {
+ numdb_final(storage_db, storage_db_final);
+ numdb_final(guild_storage_db, guild_storage_db_final);
+ return;
+}
+
int inter_storage_save_sub(void *key,void *data,va_list ap)
{
char line[65536];
@@ -348,15 +364,15 @@ int inter_guild_storage_save()
// ‘qŒÉƒf[ƒ^íœ
int inter_storage_delete(int account_id)
{
- struct storage *s = numdb_search(storage_db,account_id);
+ struct storage *s = (struct storage *) numdb_search(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(*((long *)(&s->storage[i].card[2])));
+ if(s->storage_[i].card[0] == (short)0xff00)
+ inter_pet_delete(*((long *)(&s->storage_[i].card[2])));
}
numdb_erase(storage_db,account_id);
- free(s);
+ aFree(s);
}
return 0;
}
@@ -364,15 +380,15 @@ int inter_storage_delete(int account_id)
// ƒMƒ‹ƒh‘qŒÉƒf[ƒ^íœ
int inter_guild_storage_delete(int guild_id)
{
- struct guild_storage *gs = numdb_search(guild_storage_db,guild_id);
+ struct guild_storage *gs = (struct guild_storage *) numdb_search(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(*((long *)(&gs->storage[i].card[2])));
+ if(gs->storage_[i].card[0] == (short)0xff00)
+ inter_pet_delete(*((long *)(&gs->storage_[i].card[2])));
}
numdb_erase(guild_storage_db,guild_id);
- free(gs);
+ aFree(gs);
}
return 0;
}
diff --git a/src/char/int_storage.h b/src/char/int_storage.h
index d918f5fe3..f228be53d 100644
--- a/src/char/int_storage.h
+++ b/src/char/int_storage.h
@@ -3,6 +3,7 @@
#define _INT_STORAGE_H_
int inter_storage_init();
+void inter_storage_final();
int inter_storage_save();
int inter_guild_storage_save();
int inter_storage_delete(int account_id);
diff --git a/src/char/inter.c b/src/char/inter.c
index bf7bdcccf..0dca38559 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -47,7 +47,7 @@ int inter_send_packet_length[] = {
int inter_recv_packet_length[] = {
-1,-1, 7,-1, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0,
- 72, 6,52,14, 10,29, 6,-1, 34, 0, 0, 0, 0, 0, 0, 0,
+ 74, 6,52,14, 10,29, 6,-1, 34, 0, 0, 0, 0, 0, 0, 0,
-1, 6,-1, 0, 55,19, 6,-1, 14,-1,-1,-1, 14,19,186,-1,
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,
@@ -114,7 +114,7 @@ int inter_accreg_init() {
while(fgets(line, sizeof(line)-1, fp)){
line[sizeof(line)-1] = '\0';
- reg = calloc(sizeof(struct accreg), 1);
+ reg = (struct accreg*)aCalloc(sizeof(struct accreg), 1);
if (reg == NULL) {
printf("inter: accreg: out of memory!\n");
exit(0);
@@ -123,7 +123,7 @@ int inter_accreg_init() {
numdb_insert(accreg_db, reg->account_id, reg);
} else {
printf("inter: accreg: broken data [%s] line %d\n", accreg_txt, c);
- free(reg);
+ aFree(reg);
}
c++;
}
@@ -261,6 +261,29 @@ int inter_init(const char *file) {
return 0;
}
+// finalize
+int accreg_db_final (void *k, void *data, va_list ap) {
+ struct accreg *p = (struct accreg *) data;
+ if (p) aFree(p);
+ return 0;
+}
+int wis_db_final (void *k, void *data, va_list ap) {
+ struct WisData *p = (struct WisData *) data;
+ if (p) aFree(p);
+ return 0;
+}
+void inter_final() {
+ numdb_final(accreg_db, accreg_db_final);
+ numdb_final(wis_db, wis_db_final);
+
+ 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);
@@ -272,13 +295,13 @@ int inter_mapif_init(int fd) {
// sended packets to map-server
// GMƒƒbƒZ[ƒW‘—M
-int mapif_GMmessage(unsigned char *mes, int len) {
- unsigned char buf[len];
+int mapif_GMmessage(unsigned char *mes, int len, int sfd) {
+ unsigned char buf[2048];
WBUFW(buf,0) = 0x3800;
WBUFW(buf,2) = len;
memcpy(WBUFP(buf,4), mes, len - 4);
- mapif_sendall(buf, len);
+ mapif_sendallwos(sfd, buf, len);
// printf("inter server: GM:%d %s\n", len, mes);
return 0;
@@ -286,7 +309,7 @@ int mapif_GMmessage(unsigned char *mes, int len) {
// Wisp/page transmission to all map-server
int mapif_wis_message(struct WisData *wd) {
- unsigned char buf[56 + wd->len];
+ unsigned char buf[2048];
WBUFW(buf, 0) = 0x3801;
WBUFW(buf, 2) = 56 + wd->len;
@@ -314,7 +337,7 @@ int mapif_wis_end(struct WisData *wd, int flag) {
// ƒAƒJƒEƒ“ƒg•Ï”‘—M
int mapif_account_reg(int fd, unsigned char *src) {
- unsigned char buf[WBUFW(src,2)];
+ unsigned char buf[2048];
memcpy(WBUFP(buf,0),src,WBUFW(src,2));
WBUFW(buf, 0) = 0x3804;
@@ -325,7 +348,7 @@ int mapif_account_reg(int fd, unsigned char *src) {
// ƒAƒJƒEƒ“ƒg•Ï”—v‹•ÔM
int mapif_account_reg_reply(int fd,int account_id) {
- struct accreg *reg = numdb_search(accreg_db,account_id);
+ struct accreg *reg = (struct accreg*)numdb_search(accreg_db,account_id);
WFIFOW(fd,0) = 0x3804;
WFIFOL(fd,4) = account_id;
@@ -366,12 +389,12 @@ int check_ttl_wisdata() {
wis_delnum = 0;
numdb_foreach(wis_db, check_ttl_wisdata_sub, tick);
for(i = 0; i < wis_delnum; i++) {
- struct WisData *wd = numdb_search(wis_db, wis_dellist[i]);
+ struct WisData *wd = (struct WisData*)numdb_search(wis_db, wis_dellist[i]);
printf("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
numdb_erase(wis_db, wd->id);
- free(wd);
+ aFree(wd);
}
} while(wis_delnum >= WISDELLIST_MAX);
@@ -383,7 +406,7 @@ int check_ttl_wisdata() {
// GMƒƒbƒZ[ƒW‘—M
int mapif_parse_GMmessage(int fd) {
- mapif_GMmessage(RFIFOP(fd,4), RFIFOW(fd,2));
+ mapif_GMmessage(RFIFOP(fd,4), RFIFOW(fd,2), fd);
return 0;
}
@@ -403,7 +426,7 @@ int mapif_parse_WisRequest(int fd) {
}
// search if character exists before to ask all map-servers
- if ((index = search_character_index(RFIFOP(fd,28))) == -1) {
+ if ((index = search_character_index((char*)RFIFOP(fd,28))) == -1) {
unsigned char buf[27];
WBUFW(buf, 0) = 0x3802;
memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), 24);
@@ -413,9 +436,9 @@ int mapif_parse_WisRequest(int fd) {
} else {
// to be sure of the correct name, rewrite it
memset(RFIFOP(fd,28), 0, 24);
- strncpy(RFIFOP(fd,28), search_character_name(index), 24);
+ strncpy((char*)RFIFOP(fd,28), search_character_name(index), 24);
// if source is destination, don't ask other servers.
- if (strcmp(RFIFOP(fd,4),RFIFOP(fd,28)) == 0) {
+ if (strcmp((char*)RFIFOP(fd,4),(char*)RFIFOP(fd,28)) == 0) {
unsigned char buf[27];
WBUFW(buf, 0) = 0x3802;
memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), 24);
@@ -423,7 +446,7 @@ int mapif_parse_WisRequest(int fd) {
mapif_send(fd, buf, 27);
} else {
- wd = (struct WisData *)calloc(sizeof(struct WisData), 1);
+ wd = (struct WisData *)aCalloc(sizeof(struct WisData), 1);
if (wd == NULL){
printf("inter: WisRequest: out of memory !\n");
return 0;
@@ -450,7 +473,7 @@ int mapif_parse_WisRequest(int fd) {
// Wisp/page transmission result
int mapif_parse_WisReply(int fd) {
int id = RFIFOL(fd,2), flag = RFIFOB(fd,6);
- struct WisData *wd = numdb_search(wis_db, id);
+ struct WisData *wd = (struct WisData*)numdb_search(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
@@ -458,7 +481,7 @@ int mapif_parse_WisReply(int fd) {
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
numdb_erase(wis_db, id);
- free(wd);
+ aFree(wd);
}
return 0;
@@ -466,7 +489,7 @@ int mapif_parse_WisReply(int fd) {
// 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[RFIFOW(fd,2)]; // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
+ unsigned char buf[2048]; // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
memcpy(WBUFP(buf,0), RFIFOP(fd,0), RFIFOW(fd,2));
WBUFW(buf, 0) = 0x3803;
@@ -478,10 +501,10 @@ int mapif_parse_WisToGM(int fd) {
// ƒAƒJƒEƒ“ƒg•Ï”•Û‘¶—v‹
int mapif_parse_AccReg(int fd) {
int j, p;
- struct accreg *reg = numdb_search(accreg_db, RFIFOL(fd,4));
+ struct accreg *reg = (struct accreg*)numdb_search(accreg_db, RFIFOL(fd,4));
if (reg == NULL) {
- if ((reg = calloc(sizeof(struct accreg), 1)) == NULL) {
+ if ((reg = (struct accreg*)aCalloc(sizeof(struct accreg), 1)) == NULL) {
printf("inter: accreg: out of memory !\n");
exit(0);
}
diff --git a/src/char/inter.h b/src/char/inter.h
index 0b6f809d7..636ce31d8 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -3,6 +3,7 @@
#define _INTER_H_
int inter_init(const char *file);
+void inter_final();
int inter_save();
int inter_parse_frommap(int fd);
int inter_mapif_init(int fd);
diff --git a/src/char_sql/GNUmakefile b/src/char_sql/GNUmakefile
deleted file mode 100644
index 0f25010d8..000000000
--- a/src/char_sql/GNUmakefile
+++ /dev/null
@@ -1,20 +0,0 @@
-all: char-server_sql
-sql: char-server_sql
-
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/utils.o ../common/nullpo.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/nullpo.h
-
-char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o strlib.o itemdb.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $^ $(LIB_S)
-
-char.o: char.c char.h 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
-strlib.o: strlib.c strlib.h ../common/showmsg.h
-itemdb.o: itemdb.c itemdb.h ../common/db.h ../common/mmo.h ../common/showmsg.h
-
-clean:
- rm -f *.o ../../char-server_sql \ No newline at end of file
diff --git a/src/char_sql/Makefile b/src/char_sql/Makefile
index 0f25010d8..1741b5ab6 100644
--- a/src/char_sql/Makefile
+++ b/src/char_sql/Makefile
@@ -1,20 +1,20 @@
all: char-server_sql
sql: char-server_sql
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/utils.o ../common/nullpo.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/nullpo.h
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o ../common/obj/strlib.o
+COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h
-char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o strlib.o itemdb.o $(COMMON_OBJ)
+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)
-char.o: char.c char.h strlib.h itemdb.h ../common/showmsg.h
+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
-strlib.o: strlib.c strlib.h ../common/showmsg.h
itemdb.o: itemdb.c itemdb.h ../common/db.h ../common/mmo.h ../common/showmsg.h
+$(COMMON_OBJ): $(COMMON_H)
clean:
- rm -f *.o ../../char-server_sql \ No newline at end of file
+ rm -f *.o ../../char-server_sql
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 91bc604a3..d672bc0eb 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -18,8 +18,6 @@
#include <netdb.h>
#endif
-#include "../common/utils.h"
-#include "../common/nullpo.h"
#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
@@ -35,15 +33,18 @@
#include <stdarg.h>
#include "char.h"
-#include "strlib.h"
+#include "../common/utils.h"
+#include "../common/strlib.h"
#include "itemdb.h"
#include "inter.h"
+#include "db.h"
+#include "malloc.h"
#ifdef MEMWATCH
#include "memwatch.h"
#endif
-#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+static struct dbt *char_db_;
char char_db[256] = "char";
char cart_db[256] = "cart_inventory";
@@ -65,22 +66,18 @@ char guild_storage_db[256] = "guild_storage";
char party_db[256] = "party";
char pet_db[256] = "pet";
char login_db[256] = "login";
+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;
-int user_count_timer;
-
-unsigned char *SQL_CONF_NAME = "conf/inter_athena.conf";
+char *SQL_CONF_NAME = "conf/inter_athena.conf";
struct mmo_map_server server[MAX_MAP_SERVERS];
int server_fd[MAX_MAP_SERVERS];
-int server_freezeflag[MAX_MAP_SERVERS]; // Map-server anti-freeze system. Counter. 5 ok, 4...0 freezed
-
-int anti_freeze_enable = 0;
-int ANTI_FREEZE_INTERVAL = 6;
int login_fd, char_fd;
char userid[24];
@@ -89,17 +86,21 @@ char server_name[20];
char wisp_server_name[24] = "Server";
int login_ip_set_ = 0;
char login_ip_str[128];
-int login_ip;
+in_addr_t login_ip;
int login_port = 6900;
int char_ip_set_ = 0;
char char_ip_str[128];
-int char_ip;
+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 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]
+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]
@@ -132,10 +133,11 @@ 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 = 150000; // no longer needed, use of MIN_CHAR_ID instead [Ajarn]
+//int char_id_count = 150000; //removed by [Sirius] for new charcreate issue (auto_increment @sql)
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 start_zeny = 500;
int start_weapon = 1201;
@@ -154,49 +156,77 @@ int GM_num = 0;
int console = 0;
-char prev_query[65535];
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
-char servers_connected = 0;
+//-------------------------------------------------
+// Set Character online/offline [Wizputer]
+//-------------------------------------------------
-// GM Database
-struct dbt *gm_db;
+void set_char_online(int char_id, int account_id) {
+ 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)) {
+ printf("DB server Error (set char online)- %s\n", mysql_error(&mysql_handle));
+ }
+ }
-//----------------------------------------------
-//SQL Commands ( Original by Clownisius ) [Edit: Wizputer]
-//----------------------------------------------
+ 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 sql_query(char* query,char function[32]) {
- if(mysql_query(&mysql_handle, query)){
- printf("---------- SQL error report ----------\n");
- printf("MySQL Server Error: %s\n", mysql_error(&mysql_handle));
- printf("Query: %s\n", query);
- printf("In function: %s \n", function);
- printf("\nPrevious query: %s\n", prev_query);
-// if (strcmp(mysql_error(&mysql_handle),"CR_COMMANDS_OUT_OF_SYNC") !=0) printf(" - = Shutting down Char Server = - \n\n");
- printf("-------- End SQL Error Report --------\n");
-// printf("Uncontrolled param: %s",&mysql_handle);
-// if (strcmp(mysql_error(&mysql_handle),"CR_COMMANDS_OUT_OF_SYNC") !=0) exit(1);
+}
+
+void set_all_offline(void) {
+ sprintf(tmp_sql, "SELECT `account_id` FROM `%s` WHERE `online`='1'",char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select all online)- %s\n", mysql_error(&mysql_handle));
}
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))) {
+ if ( login_fd > 0 ) {
+ printf("send user offline: %d\n",atoi(sql_row[0]));
+ WFIFOW(login_fd,0) = 0x272c;
+ WFIFOL(login_fd,2) = atoi(sql_row[0]);
+ WFIFOSET(login_fd,6);
+ }
+ }
+ }
- strcpy(prev_query,query);
+ mysql_free_result(sql_res);
+ sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `online`='1'", char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (set_all_offline)- %s\n", mysql_error(&mysql_handle));
+ }
}
-//-----------------------------------------------------
-// Function to suppress control characters in a string.
-//-----------------------------------------------------
-int remove_control_chars(unsigned char *str) {
- int i;
- int change = 0;
+void set_char_offline(int char_id, int account_id) {
+ struct mmo_charstatus *cp;
- for(i = 0; i < strlen(str); i++) {
- if (str[i] < 32) {
- str[i] = '_';
- change = 1;
+ if ( char_id == 99 )
+ sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `account_id`='%d'", char_db, account_id);
+ else {
+ cp = (struct mmo_charstatus*)numdb_search(char_db_,char_id);
+ if (cp != NULL) {
+ aFree(cp);
+ numdb_erase(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))
+ printf("DB server Error (set_char_offline)- %s\n", mysql_error(&mysql_handle));
}
- return change;
+ if (login_fd <= 0 || session[login_fd]->eof)
+ return;
+
+ WFIFOW(login_fd,0) = 0x272c;
+ WFIFOL(login_fd,2) = account_id;
+ WFIFOSET(login_fd,6);
}
//----------------------------------------------------------------------
@@ -204,161 +234,214 @@ int remove_control_chars(unsigned char *str) {
// 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;
-unsigned char isGM(int account_id) {
- unsigned char *level;
-
- level = numdb_search(gm_db, account_id);
- if (level == NULL)
- return 0;
-
- return *level;
-}
-
-static int gmdb_final(void *key,void *data,va_list ap) {
- unsigned char *level;
-
- nullpo_retr(0, level=data);
-
- free(level);
-
+ for(i = 0; i < GM_num; i++)
+ if (gm_account[i].account_id == account_id)
+ return gm_account[i].level;
return 0;
}
-void do_final_gmdb(void) {
- if(gm_db){
- numdb_final(gm_db,gmdb_final);
- gm_db=NULL;
+void read_gm_account(void) {
+ if (gm_account != NULL)
+ aFree(gm_account);
+ GM_num = 0;
+
+ sprintf(tmp_lsql, "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(&lmysql_handle, tmp_lsql)) {
+ printf("DB server Error (select %s to Memory)- %s\n",login_db,mysql_error(&lmysql_handle));
+ }
+ lsql_res = mysql_store_result(&lmysql_handle);
+ if (lsql_res) {
+ gm_account = (struct gm_account*)aCalloc(sizeof(struct gm_account) * mysql_num_rows(lsql_res), 1);
+ 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]);
+ GM_num++;
+ }
}
-}
-
-int read_gm_accounts(int fd, int len) {
- GM_num = RFIFOW(fd,2);
-
- if(len < (6+5*GM_num))
- return -1;
- int i=0,account_id=0;
- unsigned char *level;
-
- if (gm_db)
- do_final_gmdb();
+ mysql_free_result(lsql_res);
+ mapif_send_gmaccounts();
+}
- gm_db = numdb_init();
+// Insert friends list
+int insert_friends(int char_id){
+ int i;
+ char *tmp_p = tmp_sql;
- WFIFOW(fd,0) = 0x2b99;
- WFIFOW(fd,2) = GM_num;
+ tmp_p += sprintf(tmp_p, "REPLACE INTO `%s` (`id`, `account_id`",friend_db);
- if(GM_num) {
- for(i=0;i<GM_num;i++) {
- level = malloc(sizeof(unsigned char));
+ for (i=0;i<20;i++)
+ tmp_p += sprintf(tmp_p, ", `friend_id%d`, `name%d`", i, i);
- *level = RFIFOB(fd,(10+5*(GM_num-1)));
- account_id = RFIFOW(fd,(6+5*(GM_num-1)));
+ tmp_p += sprintf(tmp_p, ") VALUES (NULL, '%d'", char_id);
- numdb_insert(gm_db, account_id, level);
+ for (i=0;i<20;i++)
+ tmp_p += sprintf(tmp_p, ", '0', ''");
- WFIFOL(fd,6+5*i) = account_id;
- WFIFOB(fd,10+5*i) = *level;
- }
- }
+ tmp_p += sprintf(tmp_p, ")");
- WFIFOSET(fd,6+5*i);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (insert `friend`)- %s\n", mysql_error(&mysql_handle));
+ return 0;
+ }
+return 1;
+}
- return 0;
+int compare_item(struct item *a, struct item *b) {
+ return (
+ (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) &&
+ (a->card[0] == b->card[0]) &&
+ (a->card[1] == b->card[1]) &&
+ (a->card[2] == b->card[2]) &&
+ (a->card[3] == b->card[3]));
}
//=====================================================================================================
int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
- int i=0;
- int eqcount=1;
- char temp_str[32];
+ int i=0,party_exist,guild_exist;
+// int eqcount=1;
+// int noteqcount=1;
+ int count = 0;
+ int diff = 0;
+ char temp_str[1024];
+ char *tmp_p = tmp_sql;
+ struct mmo_charstatus *cp;
+ struct itemtmp mapitem[MAX_GUILD_STORAGE];
- struct itemtemp mapitem;
if (char_id!=p->char_id) return 0;
- save_flag = p->char_id;
+ cp = (struct mmo_charstatus*)numdb_search(char_db_,char_id);
- #ifdef DEBUG
+ if (cp == NULL) {
+ cp = (struct mmo_charstatus *) aMalloc(sizeof(struct mmo_charstatus));
+ memset(cp, 0, sizeof(struct mmo_charstatus));
+ numdb_insert(char_db_, char_id,cp);
+ }
+
+ save_flag = p->char_id;
printf("(\033[1;32m%d\033[0m) %s \trequest save char data - ",char_id,char_dat[0].name);
- #endif
- sql_query("START TRANSACTION","mmo_char_tosql");
+//for(testcount=1;testcount<50;testcount++){//---------------------------test count--------------------
+// printf("test count : %d\n", testcount);
+// eqcount=1;
+// noteqcount=1;
+// dbeqcount=1;
+// dbnoteqcount=1;
+//-----------------------------------------------------------------------------------------------------
//=========================================map inventory data > memory ===============================
+ 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.equip[eqcount].flag=0;
- mapitem.equip[eqcount].id = p->inventory[i].id;
- mapitem.equip[eqcount].nameid=p->inventory[i].nameid;
- mapitem.equip[eqcount].amount = p->inventory[i].amount;
- mapitem.equip[eqcount].equip = p->inventory[i].equip;
- mapitem.equip[eqcount].identify = p->inventory[i].identify;
- mapitem.equip[eqcount].refine = p->inventory[i].refine;
- mapitem.equip[eqcount].attribute = p->inventory[i].attribute;
- mapitem.equip[eqcount].card[0] = p->inventory[i].card[0];
- mapitem.equip[eqcount].card[1] = p->inventory[i].card[1];
- mapitem.equip[eqcount].card[2] = p->inventory[i].card[2];
- mapitem.equip[eqcount].card[3] = p->inventory[i].card[3];
- eqcount++;
+ 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++;
}
}
-
- memitemdata_to_sql2(mapitem, eqcount, p->char_id,TABLE_INVENTORY);
-
- #ifdef DEBUG
- printf("Char [%s] - Save item data to SQL!\n",p->name);
- #endif
+ //printf("- Save item data to MySQL!\n");
+ if (diff)
+ memitemdata_to_sql(mapitem, count, p->char_id,TABLE_INVENTORY);
//=========================================map cart data > memory ====================================
- eqcount=1;
+// eqcount=1;
+// noteqcount=1;
+ 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.equip[eqcount].flag=0;
- mapitem.equip[eqcount].id = p->cart[i].id;
- mapitem.equip[eqcount].nameid=p->cart[i].nameid;
- mapitem.equip[eqcount].amount = p->cart[i].amount;
- mapitem.equip[eqcount].equip = p->cart[i].equip;
- mapitem.equip[eqcount].identify = p->cart[i].identify;
- mapitem.equip[eqcount].refine = p->cart[i].refine;
- mapitem.equip[eqcount].attribute = p->cart[i].attribute;
- mapitem.equip[eqcount].card[0] = p->cart[i].card[0];
- mapitem.equip[eqcount].card[1] = p->cart[i].card[1];
- mapitem.equip[eqcount].card[2] = p->cart[i].card[2];
- mapitem.equip[eqcount].card[3] = p->cart[i].card[3];
- eqcount++;
+ 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++;
}
}
- memitemdata_to_sql2(mapitem, eqcount, p->char_id,TABLE_CART);
+ //printf("- Save cart data to MySQL!\n");
+ if (diff)
+ memitemdata_to_sql(mapitem, count, p->char_id,TABLE_CART);
- #ifdef DEBUG
- printf("Char [%s] - Save cart data to SQL!\n",p->name);
- #endif
+//=====================================================================================================
+ 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)) {
+
+//}//---------------------------test count------------------------------
//check party_exist
- sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `party_id` = '%d'",party_db, p->party_id);
- sql_query(tmp_sql,"mmo_char_tosql");
-
- if((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res)))
- if(!atoi(sql_row[0]))
- p->party_id=0;
-
+ party_exist=0;
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `party_id` = '%d'",party_db, p->party_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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
- sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `guild_id` = '%d'",guild_db, p->guild_id);
- sql_query(tmp_sql,"mmo_char_tosql");
-
- if((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res)))
- if(!atoi(sql_row[0]))
- p->guild_id=0;
-
+ guild_exist=0;
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `guild_id` = '%d'",guild_db, p->guild_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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;
+
//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
@@ -373,8 +456,8 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
"`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' WHERE `account_id`='%d' AND `char_id` = '%d'",
- char_db, p->class, p->base_level, p->job_level,
+ "`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' 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,
@@ -382,351 +465,252 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
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, p->partner_id, p->account_id, p->char_id
+ p->save_point.map, p->save_point.x, p->save_point.y, p->partner_id, p->father, p->mother,
+ p->child, p->account_id, p->char_id
);
- sql_query(tmp_sql,"mmo_char_tosql");
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle));
+ }
- #ifdef DEBUG
- printf("Char [%s] - Saved Char data to SQL!\n",p->name);
- #endif
+ }
- sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",memo_db,char_id);
- sql_query(tmp_sql,"mmo_char_tosql");
+ diff = 0;
- sprintf(tmp_sql,"INSERT INTO `%s`(`char_id`,`map`,`x`,`y`) VALUES ",memo_db);
for(i=0;i<10;i++){
- if(i)
- sprintf(tmp_sql,"%s,",tmp_sql);
+ 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(p->memo_point[i].map[0])
- sprintf(tmp_sql,"%s('%d', '%s', '%d', '%d')",tmp_sql,
- char_id, p->memo_point[i].map, p->memo_point[i].x, p->memo_point[i].y);
+ if (diff) {
+ //printf("- Save memo data to MySQL!\n");
+ //`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)) {
+ printf("DB server Error (delete `memo`)- %s\n", mysql_error(&mysql_handle));
}
- sql_query(tmp_sql,"mmo_char_tosql");
+ //insert here.
+ for(i=0;i<10;i++){
+ if(p->memo_point[i].map[0]){
+ sprintf(tmp_sql,"INSERT INTO `%s`(`char_id`,`map`,`x`,`y`) VALUES ('%d', '%s', '%d', '%d')",
+ memo_db, char_id, p->memo_point[i].map, p->memo_point[i].x, p->memo_point[i].y);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ printf("DB server Error (insert `memo`)- %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ }
- #ifdef DEBUG
- printf("Char [%s] - Saved memo data to SQL!\n",p->name);
- #endif
+ 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
- sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",skill_db,char_id);
- sql_query(tmp_sql,"mmo_char_tosql");
+ 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;
+ }
+ }
- sprintf(tmp_sql,"INSERT INTO `%s`(`char_id`, `id`, `lv`) VALUES ",skill_db);
+ if (diff) {
+ //printf("- Save skill data to MySQL!\n");
+ //`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)) {
+ printf("DB server Error (delete `skill`)- %s\n", mysql_error(&mysql_handle));
+ }
+ //printf("- Insert skill \n");
+ //insert here.
for(i=0;i<MAX_SKILL;i++){
if(p->skill[i].id){
if (p->skill[i].id && p->skill[i].flag!=1) {
- if(i)
- sprintf(tmp_sql,"%s,",tmp_sql);
-
- sprintf(tmp_sql,"%s('%d', '%d','%d')",tmp_sql,
- char_id, p->skill[i].id, (p->skill[i].flag==0)?p->skill[i].lv:p->skill[i].flag-2);
+ sprintf(tmp_sql,"INSERT INTO `%s`(`char_id`, `id`, `lv`) VALUES ('%d', '%d','%d')",
+ skill_db, char_id, p->skill[i].id, (p->skill[i].flag==0)?p->skill[i].lv:p->skill[i].flag-2);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (insert `skill`)- %s\n", mysql_error(&mysql_handle));
+ }
}
}
}
+ }
- sql_query(tmp_sql,"mmo_char_tosql");
-
- #ifdef DEBUG
- printf("Char [%s] - Save skill data to SQL!\n",p->name);
- #endif
+ 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;
+ }
+ }
- sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d' AND `type`='3'",reg_db,char_id);
- sql_query(tmp_sql,"mmo_char_tosql");
+ if (diff) {
+ //printf("- Save global_reg_value data to MySQL!\n");
+ //`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)) {
+ printf("DB server Error (delete `global_reg_value`)- %s\n", mysql_error(&mysql_handle));
+ }
- sprintf(tmp_sql,"INSERT INTO `%s`(`char_id`, `str`, `value`) VALUES ",reg_db);
+ //insert here.
for(i=0;i<p->global_reg_num;i++){
if (p->global_reg[i].str) {
if(p->global_reg[i].value !=0){
- if(i)
- sprintf(tmp_sql,"%s,",tmp_sql);
-
- sprintf(tmp_sql,"%s('%d', '%s','%d')",tmp_sql,
- char_id, jstrescapecpy(temp_str,(unsigned char*)p->global_reg[i].str), p->global_reg[i].value);
+ sprintf(tmp_sql,"INSERT INTO `%s` (`char_id`, `str`, `value`) VALUES ('%d', '%s','%d')",
+ reg_db, char_id, jstrescapecpy(temp_str,p->global_reg[i].str), p->global_reg[i].value);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (insert `global_reg_value`)- %s\n", mysql_error(&mysql_handle));
+ }
}
}
}
+ }
- sql_query(tmp_sql,"mmo_char_tosql");
-
- sql_query("COMMIT","mmo_char_tosql");
-
- #ifdef DEBUG
- printf("Char [%s] - Save global reg data to SQL!\n",p->name);
- printf("Char [%s] - Saving char is done.\n",p->name);
- #endif
+ // Friends list
+ // account_id, friend_id0, name0, ...
+ #if 0
+ tmp_p += sprintf(tmp_p, "REPLACE INTO `%s` (`id`, `account_id`",friend_db);
- save_flag = 0;
+ diff = 0;
- return 0;
-}
+ for (i=0;i<20;i++)
+ tmp_p += sprintf(tmp_p, ", `friend_id%d`, `name%d`", i, i);
-int memitemdata_to_sql2(struct itemtemp mapitem, int eqcount, int char_id, int tableswitch){
- //equ
- int i;
- char tablename[16];
- char selectoption[16];
+ tmp_p += sprintf(tmp_p, ") VALUES (NULL, '%d'", char_id);
- switch (tableswitch){
- case TABLE_INVENTORY:
- sprintf(tablename,"%s",inventory_db);
- sprintf(selectoption,"char_id");
- break;
- case TABLE_CART:
- sprintf(tablename,"%s",cart_db);
- sprintf(selectoption,"char_id");
- break;
- case TABLE_STORAGE:
- sprintf(tablename,"%s",storage_db);
- sprintf(selectoption,"account_id");
- break;
- case TABLE_GUILD_STORAGE:
- sprintf(tablename,"%s",guild_storage_db);
- sprintf(selectoption,"guild_id");
- break;
- }
-
- sprintf(tmp_sql,"DELETE FROM `%s` WHERE `%s`='%d'",tablename,selectoption,char_id);
- sql_query(tmp_sql,"memitemdata_to_sql");
-
- //==============================================Memory data > SQL ===============================
+ for (i=0;i<20;i++) {
+ tmp_p += sprintf(tmp_p, ", '%d', '%s'", p->friend_id[i], p->friend_name[i]);
+ if ((p->friend_id[i] != cp->friend_id[i]) ||
+ strcmp(p->friend_name[i], cp->friend_name[i]))
+ diff = 1;
+ }
- sprintf(tmp_sql,"INSERT INTO `%s` (`%s`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`card0`,`card1`,`card2`,`card3`) VALUES ",tablename,selectoption);
+ tmp_p += sprintf(tmp_p, ")");
+ #else // [Dino9021]
+ tmp_p += sprintf(tmp_p, "UPDATE `%s` SET ",friend_db);
- for(i=1;i<eqcount;i++){
- if(mapitem.equip[i].flag == 1) break;
+ diff = 0;
+
+ for (i=0;i<20;i++) {
+ if (i>0)
+ tmp_p += sprintf(tmp_p, ", ");
- if(i!=1)
- sprintf(tmp_sql,"%s,",tmp_sql);
+ tmp_p += sprintf(tmp_p, "`friend_id%d`='%d', `name%d`='%s'", i, p->friend_id[i], i, p->friend_name[i]);
- sprintf(tmp_sql,"%s('%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d')",tmp_sql,char_id,
- mapitem.equip[i].nameid, mapitem.equip[i].amount, mapitem.equip[i].equip, mapitem.equip[i].identify,
- mapitem.equip[i].refine,mapitem.equip[i].attribute, mapitem.equip[i].card[0],mapitem.equip[i].card[1],
- mapitem.equip[i].card[2],mapitem.equip[i].card[3]);
+ if ((p->friend_id[i] != cp->friend_id[i]) || strcmp(p->friend_name[i], cp->friend_name[i]))
+ diff = 1;
+ }
- mapitem.equip[i].flag=1;
- }
+ tmp_p += sprintf(tmp_p, " where account_id='%d';", char_id);
+ #endif
- sql_query(tmp_sql,"memitemdata_to_sql");
+ if (diff)
+ mysql_query(&mysql_handle, tmp_sql);
- #ifdef DEBUG
- printf("Char [%d] - Saved Eqip Item Data to SQL!\n",char_id);
- #endif
+ printf("saving char is done.\n");
+ save_flag = 0;
+ memcpy(cp, p, sizeof(struct mmo_charstatus));
- return 0;
+ return 0;
}
-int memitemdata_to_sql(struct itemtemp mapitem, int eqcount, int noteqcount, int char_id, int tableswitch){
- //equ
- int i, j;
- int dbeqcount = 1;
- int dbnoteqcount = 1;
- struct itemtemp dbitem;
- char tablename[16];
+// [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){
+ switch (tableswitch) {
case TABLE_INVENTORY:
- sprintf(tablename,"%s",inventory_db);
+ tablename = inventory_db; // no need for sprintf here as *_db are char*.
sprintf(selectoption,"char_id");
break;
case TABLE_CART:
- sprintf(tablename,"%s",cart_db);
+ tablename = cart_db;
sprintf(selectoption,"char_id");
break;
case TABLE_STORAGE:
- sprintf(tablename,"%s",storage_db);
+ tablename = storage_db;
sprintf(selectoption,"account_id");
break;
case TABLE_GUILD_STORAGE:
- sprintf(tablename,"%s",guild_storage_db);
+ tablename = guild_storage_db;
sprintf(selectoption,"guild_id");
break;
+ default:
+ printf("Invalid table name!\n");
+ return 1;
}
//printf("Working Table : %s \n",tablename);
//=======================================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);
+ "FROM `%s` WHERE `%s`='%d'", tablename, selectoption, char_id);
if (mysql_query(&mysql_handle, tmp_sql)) {
printf("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) {
- for(i=0;(sql_row = mysql_fetch_row(sql_res));i++){
- if (itemdb_isequip(atoi(sql_row[1]))==1){
- dbitem.equip[dbeqcount].flag=0;
- dbitem.equip[dbeqcount].id = atoi(sql_row[0]);
- dbitem.equip[dbeqcount].nameid = atoi(sql_row[1]);
- dbitem.equip[dbeqcount].amount = atoi(sql_row[2]);
- dbitem.equip[dbeqcount].equip = atoi(sql_row[3]);
- dbitem.equip[dbeqcount].identify = atoi(sql_row[4]);
- dbitem.equip[dbeqcount].refine = atoi(sql_row[5]);
- dbitem.equip[dbeqcount].attribute = atoi(sql_row[6]);
- dbitem.equip[dbeqcount].card[0] = atoi(sql_row[7]);
- dbitem.equip[dbeqcount].card[1] = atoi(sql_row[8]);
- dbitem.equip[dbeqcount].card[2] = atoi(sql_row[9]);
- dbitem.equip[dbeqcount].card[3] = atoi(sql_row[10]);
- dbeqcount++;
- }else {
- dbitem.notequip[dbnoteqcount].flag=0;
- dbitem.notequip[dbnoteqcount].id = atoi(sql_row[0]);
- dbitem.notequip[dbnoteqcount].nameid = atoi(sql_row[1]);
- dbitem.notequip[dbnoteqcount].amount = atoi(sql_row[2]);
- dbitem.notequip[dbnoteqcount].equip = atoi(sql_row[3]);
- dbitem.notequip[dbnoteqcount].identify = atoi(sql_row[4]);
- dbitem.notequip[dbnoteqcount].refine = atoi(sql_row[5]);
- dbitem.notequip[dbnoteqcount].attribute = atoi(sql_row[6]);
- dbitem.notequip[dbnoteqcount].card[0] = atoi(sql_row[7]);
- dbitem.notequip[dbnoteqcount].card[1] = atoi(sql_row[8]);
- dbitem.notequip[dbnoteqcount].card[2] = atoi(sql_row[9]);
- dbitem.notequip[dbnoteqcount].card[3] = atoi(sql_row[10]);
- dbnoteqcount++;
- }
- }
- mysql_free_result(sql_res);
- }
-
- //==============================================Memory data > SQL ===============================
- //======================================Equip ITEM=======================================
- if((eqcount==1) && (dbeqcount==1)){//printf("%s Equip Empty\n",tablename);
- //item empty
- } else {
-
- for(i=1;i<eqcount;i++){
- for(j=1;j<dbeqcount;j++){
- if(mapitem.equip[i].flag==1) break;
- if(!(dbitem.equip[j].flag==1)){
- if(mapitem.equip[i].nameid==dbitem.equip[j].nameid){
- if ((mapitem.equip[i].equip==dbitem.equip[j].equip) && (mapitem.equip[i].identify==dbitem.equip[j].identify) && (mapitem.equip[i].amount==dbitem.equip[j].amount) &&
-
- (mapitem.equip[i].refine==dbitem.equip[j].refine) && (mapitem.equip[i].attribute==dbitem.equip[j].attribute) && (mapitem.equip[i].card[0]==dbitem.equip[j].card[0]) &&
- (mapitem.equip[i].card[1]==dbitem.equip[j].card[1]) && (mapitem.equip[i].card[2]==dbitem.equip[j].card[2]) && (mapitem.equip[i].card[3]==dbitem.equip[j].card[3])) {
- mapitem.equip[i].flag = 1;
- dbitem.equip[j].flag = 1;
- //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 {
+ 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.equip[i].equip, mapitem.equip[i].identify, mapitem.equip[i].refine,mapitem.equip[i].attribute, mapitem.equip[i].card[0],
- mapitem.equip[i].card[1], mapitem.equip[i].card[2], mapitem.equip[i].card[3], mapitem.equip[i].amount, dbitem.equip[j].id);
- //printf("%s\n",tmp_sql);
+ "`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))
printf("DB server Error (UPdate `equ %s`)- %s\n", tablename, mysql_error(&mysql_handle));
- mapitem.equip[i].flag=1;
- dbitem.equip[j].flag=1;
- //printf("not the same item : %d ; i : %d ; flag : %d\n", mapitem.equip[i].nameid, i, mapitem.equip[i].flag);
}
+ //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;
}
}
- }
-
- //printf("dbeqcount = %d\n",dbeqcount);
-
- for(i=1;i<dbeqcount;i++){
- //printf("dbitem.equip[i].flag = %d , dbitem.equip[i].id = %d\n",dbitem.equip[i].flag,dbitem.equip[i].id);
- if (!(dbitem.equip[i].flag == 1)) {
- sprintf(tmp_sql,"DELETE from `%s` where `id`='%d'",tablename , dbitem.equip[i].id);
- //printf("%s", tmp_sql);
- if(mysql_query(&mysql_handle, tmp_sql))
- printf("DB server Error (DELETE `equ %s`)- %s\n", tablename ,mysql_error(&mysql_handle));
+ if(!flag) {
+ sprintf(tmp_sql,"DELETE from `%s` where `id`='%d'", tablename, id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ printf("DB server Error (DELETE `equ %s`)- %s\n", tablename, mysql_error(&mysql_handle));
}
}
- for(i=1;i<eqcount;i++){
- if(!(mapitem.equip[i].flag==1)){
- 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.equip[i].nameid, mapitem.equip[i].amount, mapitem.equip[i].equip, mapitem.equip[i].identify, mapitem.equip[i].refine,
- mapitem.equip[i].attribute, mapitem.equip[i].card[0], mapitem.equip[i].card[1], mapitem.equip[i].card[2], mapitem.equip[i].card[3]);
- //printf("%s", tmp_sql);
- if(mysql_query(&mysql_handle, tmp_sql))
- printf("DB server Error (INSERT `equ %s`)- %s\n",tablename ,mysql_error(&mysql_handle));
- }
- }
-
- //======================================DEBUG=================================================
-
-// gettimeofday(&tv,NULL);
-// strftime(tmpstr,24,"%Y-%m-%d %H:%M:%S",localtime(&(tv.tv_sec)));
-// printf("\n\n");
-// printf("Working Table Name : EQU %s, Count : map %3d | db %3d \n",tablename ,eqcount ,dbeqcount);
-// printf("*********************************************************************************\n");
-// printf("======================================MAP===================Char ID %10d===\n",char_id);
-// printf("==flag ===name ===equip===ident===amoun===attri===card0===card1===card2===card3==\n");
-// for(j=1;j<eqcount;j++)
-// printf("| %5d | %5d | %5d | %5d | %5d | %5d | %5d | %5d | %5d | %5d |\n", mapitem.equip[j].flag,mapitem.equip[j].nameid, mapitem.equip[j].equip, mapitem.equip[j].identify, mapitem.equip[j].refine,mapitem.equip[j].attribute, mapitem.equip[j].card[0], mapitem.equip[j].card[1], mapitem.equip[j].card[2], mapitem.equip[j].card[3]);
-// printf("======================================DB=========================================\n");
-// printf("==flag ===name ===equip===ident===refin===attri===card0===card1===card2===card3==\n");
-// for(j=1;j<dbeqcount;j++)
-// printf("| %5d | %5d | %5d | %5d | %5d | %5d | %5d | %5d | %5d | %5d |\n", dbitem.equip[j].flag ,dbitem.equip[j].nameid, dbitem.equip[j].equip, dbitem.equip[j].identify, dbitem.equip[j].amount,dbitem.equip[j].attribute, dbitem.equip[j].card[0], dbitem.equip[j].card[1], dbitem.equip[j].card[2], dbitem.equip[j].card[3]);
-// printf("=================================================================================\n");
-// printf("=================================================Data Time %s===\n", tmpstr);
-// printf("=================================================================================\n");
-
+ mysql_free_result(sql_res);
}
- //======================================DEBUG==================================================
-
- //=============================Not Equip ITEM==========================================
- if((noteqcount==1) && (dbnoteqcount==1)){
- //printf("%s Not Equip Empty\n",tablename);
- //item empty
- } else {
-
- for(i=1;i<noteqcount;i++){
- for(j=1;j<dbnoteqcount;j++){
- if(mapitem.notequip[i].flag==1) break;
- if(!(dbitem.notequip[j].flag==1)){
- if(mapitem.notequip[i].nameid==dbitem.notequip[j].nameid){
- if ((mapitem.notequip[i].amount==dbitem.notequip[j].amount) && (mapitem.notequip[i].equip==dbitem.notequip[j].equip) && (mapitem.notequip[i].identify==dbitem.notequip[j].identify)
- && (mapitem.notequip[i].attribute==dbitem.notequip[j].attribute))
- { mapitem.notequip[i].flag=1;
- dbitem.notequip[j].flag=1;
- //printf("the same item : %d ; i : %d ; flag : %d\n", mapitem.notequip[i].nameid, i, mapitem.notequip[i].flag); //DEBUG-STRING
- }
- else{
- sprintf(tmp_sql,"UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d',"
- "`attribute`='%d' WHERE `%s`='%d' AND `nameid`='%d'",
- tablename, mapitem.notequip[i].amount, mapitem.notequip[i].equip, mapitem.notequip[i].identify, mapitem.notequip[i].attribute,
- selectoption, char_id, mapitem.notequip[i].nameid);
- //printf("%s",tmp_sql);
- if(mysql_query(&mysql_handle, tmp_sql))
- printf("DB server Error (UPdate `notequ %s`)- %s\n",tablename ,mysql_error(&mysql_handle));
-
- mapitem.notequip[i].flag=1;
- dbitem.notequip[j].flag=1;
- }
- }
- }
- }
- }
-
- //printf("dbnoteqcount = %d\n",dbnoteqcount);
-
- for(i=1;i<dbnoteqcount;i++){
- //printf("dbitem.notequip[i].flag = %d , dbitem.notequip[i].id = %d\n",dbitem.notequip[i].flag,dbitem.notequip[i].id);
- if(!(dbitem.notequip[i].flag==1)){
- sprintf(tmp_sql,"DELETE from `%s` where `id`='%d'", tablename, dbitem.notequip[i].id);
- //printf("%s", tmp_sql);
- if(mysql_query(&mysql_handle, tmp_sql))
- printf("DB server Error (DELETE `notequ %s`)- %s\n", tablename ,mysql_error(&mysql_handle));
- }
- }
- for(i=1;i<noteqcount;i++){
- if(!(mapitem.notequip[i].flag==1)){
- 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.notequip[i].nameid, mapitem.notequip[i].amount, mapitem.notequip[i].equip, mapitem.notequip[i].identify, mapitem.notequip[i].refine,
- mapitem.notequip[i].attribute, mapitem.notequip[i].card[0], mapitem.notequip[i].card[1], mapitem.notequip[i].card[2], mapitem.notequip[i].card[3]);
- //printf("%s", tmp_sql);
- if(mysql_query(&mysql_handle, tmp_sql))
- printf("DB server Error (INSERT `notequ %s`)- %s\n", tablename, mysql_error(&mysql_handle));
- }
+ for(i = 0; i < count; i++) {
+ if(!mapitem[i].flag) {
+ 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))
+ printf("DB server Error (INSERT `equ %s`)- %s\n", tablename, mysql_error(&mysql_handle));
}
+ }
//======================================DEBUG=================================================
@@ -747,21 +731,23 @@ int memitemdata_to_sql(struct itemtemp mapitem, int eqcount, int noteqcount, int
// printf("=================================================Data Time %s===\n", tmpstr);
// printf("=================================================================================\n");
//
- }
+
return 0;
}
-
//=====================================================================================================
int mmo_char_fromsql(int char_id, struct mmo_charstatus *p, int online){
- int i=0, n=0;
+ int i, n;
+ char *tmp_p = tmp_sql;
+ struct mmo_charstatus *cp;
+
+ cp = (struct mmo_charstatus*)numdb_search(char_db_,char_id);
+ if (cp != NULL)
+ aFree(cp);
memset(p, 0, sizeof(struct mmo_charstatus));
p->char_id = char_id;
-
- #ifdef DEBUG
- printf("Loading Char [%d]... ",char_id);
- #endif
+ printf("Loaded: ");
//`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
@@ -770,15 +756,23 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus *p, int online){
//`last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`)
//splite 2 parts. cause veeeery long SQL syntax
- sprintf(tmp_sql, "SELECT * FROM `%s` WHERE `char_id` = '%d'",char_db, char_id);
+ 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
- sql_query(tmp_sql,"mmo_char_fromsql");
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `char`)- %s\n", mysql_error(&mysql_handle));
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
- if ((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+
+ 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->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]);
@@ -796,43 +790,57 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus *p, int online){
p->sp = atoi(sql_row[19]);
p->status_point = atoi(sql_row[20]);
p->skill_point = atoi(sql_row[21]);
- p->option = atoi(sql_row[22]);
- p->karma = atoi(sql_row[23]);
- p->manner = atoi(sql_row[24]);
- p->party_id = atoi(sql_row[25]);
- p->guild_id = atoi(sql_row[26]);
- p->pet_id = atoi(sql_row[27]);
- p->hair = atoi(sql_row[28]);
- p->hair_color = atoi(sql_row[29]);
- p->clothes_color = atoi(sql_row[30]);
- p->weapon = atoi(sql_row[31]);
- p->shield = atoi(sql_row[32]);
- p->head_top = atoi(sql_row[33]);
- p->head_mid = atoi(sql_row[34]);
- p->head_bottom = atoi(sql_row[35]);
- strcpy(p->last_point.map,sql_row[36]);
- p->last_point.x = atoi(sql_row[37]);
- p->last_point.y = atoi(sql_row[38]);
- strcpy(p->save_point.map,sql_row[39]);
- p->save_point.x = atoi(sql_row[40]);
- p->save_point.y = atoi(sql_row[41]);
- p->partner_id = atoi(sql_row[42]);
+ //free mysql result.
+ mysql_free_result(sql_res);
+ } else
+ printf("char1 - failed\n"); //Error?! ERRRRRR WHAT THAT SAY!?
+ printf("(\033[1;32m%d\033[0m)\033[1;32m%s\033[0m\t[",p->char_id,p->name);
+ printf("char1 ");
+
+ 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` FROM `%s` WHERE `char_id` = '%d'",char_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `char2`)- %s\n", mysql_error(&mysql_handle));
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+
+
+ 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]);
+ strcpy(p->last_point.map,sql_row[14]); p->last_point.x = atoi(sql_row[15]); p->last_point.y = atoi(sql_row[16]);
+ strcpy(p->save_point.map,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]);
//free mysql result.
mysql_free_result(sql_res);
-#ifdef DEBUG
- printf("Loading of char [%d] Completed!\n",char_id);
- } else {
- printf("Loading of char [%d] FAILED!\n",char_id); //Error?! ERRRRRR WHAT THAT SAY!?
-#endif
- }
+ } else
+ printf("char2 - failed\n"); //Error?! ERRRRRR WHAT THAT SAY!?
+
+ if (p->last_point.x == 0 || p->last_point.y == 0 || p->last_point.map[0] == '\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] == '\0')
+ memcpy(&p->save_point, &start_point, sizeof(start_point));
+
+ printf("char2 ");
//read memo data
//`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
- sprintf(tmp_sql, "SELECT `map`,`x`,`y` FROM `%s` WHERE `char_id`='%d'",memo_db, char_id);
- sql_query(tmp_sql,"mmo_char_fromsql");
+ sprintf(tmp_sql, "SELECT `map`,`x`,`y` FROM `%s` WHERE `char_id`='%d'",memo_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `memo`)- %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle);
- if ((sql_res = mysql_store_result(&mysql_handle))) {
+ if (sql_res) {
for(i=0;(sql_row = mysql_fetch_row(sql_res));i++){
strcpy (p->memo_point[i].map,sql_row[0]);
p->memo_point[i].x=atoi(sql_row[1]);
@@ -841,83 +849,87 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus *p, int online){
}
mysql_free_result(sql_res);
}
-#ifdef DEBUG
- printf("Char [%s] - Memo Loaded\n",p->name);
-#endif
+ printf("memo ");
//read inventory
//`inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`)
- sprintf(tmp_sql, "SELECT * FROM `%s` WHERE `char_id`='%d'",inventory_db, char_id);
- sql_query(tmp_sql,"mmo_char_fromsql");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
+ sprintf(tmp_sql, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`"
+ "FROM `%s` WHERE `char_id`='%d'",inventory_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `inventory`)- %s\n", mysql_error(&mysql_handle));
+ }
+ 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[1]);
- p->inventory[i].nameid = atoi(sql_row[2]);
- p->inventory[i].amount = atoi(sql_row[3]);
- p->inventory[i].equip = atoi(sql_row[4]);
- p->inventory[i].identify = atoi(sql_row[5]);
- p->inventory[i].refine = atoi(sql_row[6]);
- p->inventory[i].attribute = atoi(sql_row[7]);
- p->inventory[i].card[0] = atoi(sql_row[8]);
- p->inventory[i].card[1] = atoi(sql_row[9]);
- p->inventory[i].card[2] = atoi(sql_row[10]);
- p->inventory[i].card[3] = atoi(sql_row[11]);
+ 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]);
+ p->inventory[i].card[0] = atoi(sql_row[7]);
+ p->inventory[i].card[1] = atoi(sql_row[8]);
+ p->inventory[i].card[2] = atoi(sql_row[9]);
+ p->inventory[i].card[3] = atoi(sql_row[10]);
}
mysql_free_result(sql_res);
}
-#ifdef DEBUG
- printf("Char [%s] - Inventory Loaded\n",p->name);
-#endif
+ printf("inventory ");
+
//read cart.
//`cart_inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`)
- sprintf(tmp_sql, "SELECT * FROM `%s` WHERE `char_id`='%d'",cart_db, char_id);
- sql_query(tmp_sql,"mmo_char_fromsql");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
+ sprintf(tmp_sql, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`"
+ "FROM `%s` WHERE `char_id`='%d'",cart_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `cart_inventory`)- %s\n", mysql_error(&mysql_handle));
+ }
+ 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[1]);
- p->cart[i].nameid = atoi(sql_row[2]);
- p->cart[i].amount = atoi(sql_row[3]);
- p->cart[i].equip = atoi(sql_row[4]);
- p->cart[i].identify = atoi(sql_row[5]);
- p->cart[i].refine = atoi(sql_row[6]);
- p->cart[i].attribute = atoi(sql_row[7]);
- p->cart[i].card[0] = atoi(sql_row[8]);
- p->cart[i].card[1] = atoi(sql_row[9]);
- p->cart[i].card[2] = atoi(sql_row[10]);
- p->cart[i].card[3] = atoi(sql_row[11]);
+ 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]);
+ p->cart[i].card[0] = atoi(sql_row[7]);
+ p->cart[i].card[1] = atoi(sql_row[8]);
+ p->cart[i].card[2] = atoi(sql_row[9]);
+ p->cart[i].card[3] = atoi(sql_row[10]);
}
mysql_free_result(sql_res);
}
-#ifdef DEBUG
- printf("Char [%s] - Cart Inventory Loaded\n",p->name);
-#endif
+ printf("cart ");
//read skill
//`skill` (`char_id`, `id`, `lv`)
- sprintf(tmp_sql, "SELECT `id`, `lv` FROM `%s` WHERE `char_id`='%d'",skill_db, char_id);
- sql_query(tmp_sql,"mmo_char_fromsql");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
+ sprintf(tmp_sql, "SELECT `id`, `lv` FROM `%s` WHERE `char_id`='%d'",skill_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `skill`)- %s\n", mysql_error(&mysql_handle));
+ }
+ 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;
+ 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);
}
-#ifdef DEBUG
- printf("Char [%s] - Skills Loaded\n",p->name);
-#endif
+ printf("skill ");
//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);
- sql_query(tmp_sql,"mmo_char_fromsql");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
+ 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)) {
+ printf("DB server Error (select `global_reg_value`)- %s\n", mysql_error(&mysql_handle));
+ }
+ 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]);
p->global_reg[i].value = atoi (sql_row[1]);
@@ -925,76 +937,152 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus *p, int online){
mysql_free_result(sql_res);
}
p->global_reg_num=i;
-#ifdef DEBUG
- printf("Char [%s] - Global Reg Loaded\n",p->name);
-#endif
+
+ //Friends List Load
+
+ for(i=0;i<20;i++) {
+ p->friend_id[i] = 0;
+ p->friend_name[i][0] = '\0';
+ }
+
+ tmp_p += sprintf(tmp_p, "SELECT `id`, `account_id`");
+
+ for(i=0;i<20;i++)
+ tmp_p += sprintf(tmp_p, ", `friend_id%d`, `name%d`", i, i);
+
+ tmp_p += sprintf(tmp_p, " FROM `%s` WHERE `account_id`='%d' ", friend_db, char_id); // TBR
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `friends list`)- %s\n", mysql_error(&mysql_handle));
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = mysql_fetch_row(sql_res);
+
+ i=mysql_num_rows(sql_res);
+
+ // debugg
+ //printf("mysql: %d\n",i);
+
+ // Create an entry for the character if it doesnt already have one
+ if(!i) {
+
+ insert_friends(char_id);
+
+ } else {
+
+ if (sql_res) {
+ for(i=0;i<20;i++) {
+ p->friend_id[i] = atoi(sql_row[i*2 +2]);
+ sprintf(p->friend_name[i], "%s", sql_row[i*2 +3]);
+ }
+ mysql_free_result(sql_res);
+ }
+ }
+
+ printf("friends ");
+
+ //-- end friends list load --
if (online) {
- sprintf(tmp_sql, "UPDATE `%s` SET `online`='%d' WHERE `char_id`='%d'",char_db,online,char_id);
- sql_query(tmp_sql,"mmo_char_fromsql");
+ set_char_online(char_id,p->account_id);
}
-#ifdef DEBUG
- printf("Char [%d][%s] - Loading Complete\n",char_id,p->name);
-#endif
+ printf("char data load success]\n"); //ok. all data load successfuly!
+
+ cp = (struct mmo_charstatus *) aMalloc(sizeof(struct mmo_charstatus));
+ memcpy(cp, p, sizeof(struct mmo_charstatus));
+ numdb_insert(char_db_, char_id,cp);
return 1;
}
//==========================================================================================================
int mmo_char_sql_init(void) {
- int i=0;
- #ifdef DEBUG
- int cid=0;
- #endif
+ int charcount;
+
+ char_db_=numdb_init();
+ printf("init start.......\n");
// memory initialize
// no need to set twice size in this routine. but some cause segmentation error. :P
- #ifdef DEBUG
- printf("Initializing char memory...(%d byte)\n",sizeof(struct mmo_charstatus)*2);
- #endif
-
+ printf("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);
+/* Initialized in inter.c already [Wizputer]
+ // DB connection initialized
+ // for char-server session only
+ mysql_init(&mysql_handle);
+ printf("Connect DB server....(char 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)) {
+ // SQL connection pointer check
+ printf("%s\n",mysql_error(&mysql_handle));
+ exit(1);
+ } else {
+ printf("connect success! (char server)\n");
+ }
+*/ /* Removed .. not needed now :P
sprintf(tmp_sql , "SELECT count(*) FROM `%s`", char_db);
- sql_query(tmp_sql,"mmo_char_sql_init");
-
- if((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
- i = atoi (sql_row[0]);
- #ifdef DEBUG
- printf("Total number of chars in DB [%d]\n",i);
- #endif
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
}
+ sql_res = mysql_store_result(&mysql_handle) ;
+ sql_row = mysql_fetch_row(sql_res);
+ printf("total char data -> '%s'.......\n",sql_row[0]);
+ i = atoi (sql_row[0]);
+ mysql_free_result(sql_res);
- mysql_free_result(sql_res);
-
- // Because it's no longer needed, I made it debug. Some people may still want to know the highest
- // char_id. It has no functional purpose though. [Ajarn]
- #ifdef DEBUG
- if (i != 0) {
+ if (i !=0) {
sprintf(tmp_sql , "SELECT max(`char_id`) FROM `%s`", char_db);
- sql_query(tmp_sql,"mmo_char_sql_init");
-
- if((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res)))
- cid = atoi (sql_row[0]);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ sql_row = mysql_fetch_row(sql_res);
+ char_id_count = atoi (sql_row[0]);
mysql_free_result(sql_res);
- }
- printf("Highest Char ID [%d]\n",cid);
- #endif
+ } else
+ printf("set char_id_count: %d.......\n",char_id_count);
+ */
+ sprintf(tmp_sql, "SELECT `char_id` FROM `%s`", char_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ //fail :(
+ printf("SQL Error (in select the charid .. (all)): %s", mysql_error(&mysql_handle));
+ }else{
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ charcount = mysql_num_rows(sql_res);
+ printf("total char data -> '%d'.......\n", charcount);
+ mysql_free_result(sql_res);
+ }else{
+ printf("total char data -> '0'.......\n");
+ }
+ }
+
+ if(char_per_account == 0){
+ printf("Chars per Account: 'Unlimited'.......\n");
+ }else{
+ printf("Chars per Account: '%d'.......\n", char_per_account);
+ }
- if (i == 0) {
- // If there is no characters in the SQL DB, make sure the starting id will be MIN_CHAR_ID
- // Remove once main.sql has this to begin with and it's a standard to have it be this way
- // (thus saving a check) [Ajarn]
- sprintf(tmp_sql , "ALTER TABLE `%s` AUTO_INCREMENT = %d", char_db, MIN_CHAR_ID-1);
- sql_query(tmp_sql,"mmo_char_sql_init");
- }
+ //sprintf(tmp_sql , "REPLACE INTO `%s` SET `online`=0", char_db); //OLD QUERY ! BUGGED
+ sprintf(tmp_sql, "UPDATE `%s` SET `online` = '0'", char_db);//fixed the on start 0 entrys!
+ if (mysql_query(&mysql_handle, tmp_sql))
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ //sprintf(tmp_sql , "REPLACE INTO `%s` SET `online`=0", guild_member_db); //OLD QUERY ! BUGGED
+ sprintf(tmp_sql, "UPDATE `%s` SET `online` = '0'", guild_member_db);//fixed the 0 entrys in start ..
+ if (mysql_query(&mysql_handle, tmp_sql))
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
- #ifdef DEBUG
- printf("Init finsihed\n");
- #endif
+ //sprintf(tmp_sql , "REPLACE INTO `%s` SET `connect_member`=0", guild_db); //OLD QUERY BUGGED!
+ sprintf(tmp_sql, "UPDATE `%s` SET `connect_member` = '0'", guild_db);//fixed the 0 entrys in start.....
+ if (mysql_query(&mysql_handle, tmp_sql))
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+
+ printf("init end.......\n");
return 0;
}
@@ -1004,105 +1092,246 @@ int mmo_char_sql_init(void) {
int make_new_char_sql(int fd, unsigned char *dat) {
struct char_session_data *sd;
char t_name[100];
- int i, cid;
-
- //aphostropy error check! - fixed!
- jstrescapecpy(t_name, dat);
-
- #ifdef DEBUG
- printf("Making new char [%s]\n",dat);
- #endif
+ int i, char_id, temp;
- sd = session[fd]->session_data;
+ //aphostropy error check! - fixed!
+ jstrescapecpy(t_name, (char*)dat);
+
+ sd = (struct char_session_data*)session[fd]->session_data;
+
+ printf("[CHAR] Add - ");
+
+ //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)){
+ printf("fail, SQL Error: %s !!FAIL!!\n", tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ //ok
+ temp = mysql_num_rows(sql_res);
+ if(temp >= char_per_account){
+ //hehe .. limit exceeded :P
+ printf("fail (aid: %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 < strlen(dat); i++)
+ for (i = 0; i < strlen((const char*)dat); i++)
if (strchr(char_name_letters, dat[i]) == NULL)
- return -1;
+ return -2;
} else if (char_name_option == 2) { // letters/symbols in char_name_letters are forbidden
- for (i = 0; i < strlen(dat); i++)
+ for (i = 0; i < strlen((const char*)dat); i++)
if (strchr(char_name_letters, dat[i]) != NULL)
- return -1;
+ 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]!=5*6 ) ||
- (dat[30] >= 9) || (dat[33] <= 0) || (dat[33] >= 20) ||
+ (dat[30] >= 9) ||
+ (dat[33] <= 0) || (dat[33] >= 20) ||
(dat[31] >= 9)) {
// check individual stat value
for(i = 24; i <= 29; i++) {
if (dat[i] < 1 || dat[i] > 9) {
- return -1;
+ printf("fail (aid: %d), stats error(bot cheat?!)\n", sd->account_id);
+ return -2;
}
}
+ 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], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
+ //query
+ mysql_query(&mysql_handle, tmp_sql);
+ }
+ //printf("make new char error %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]);
+
+ printf("fail (aid: %d), stats error(bot cheat?!)\n", sd->account_id);
+ return -2;
+ }
+
+ if (log_char) {
// char.log to charlog
- sprintf(tmp_sql,"INSERT DELAYED INTO `%s` (`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
+ 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], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
+ charlog_db,"make new char", sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
//query
- sql_query(tmp_sql,"amke_new_char_sql");
-
- #ifdef DEBUG
- printf("Make new char error %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]);
- #endif
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("fail(log error), SQL error: %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ //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)) {
+ printf("fail (namecheck!), SQL error: %s\n", mysql_error(&mysql_handle));
+ return -2;
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ temp = mysql_num_rows(sql_res);
+
+ if (temp > 0) {
+ mysql_free_result(sql_res);
+ printf("fail, charname already in use\n");
return -1;
+ }
+ mysql_free_result(sql_res);
}
- // char.log to charlog
- sprintf(tmp_sql,"INSERT DELAYED 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], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
- //query
- sql_query(tmp_sql,"make_new_char_sql");
-
- #ifdef DEBUG
- 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]);
- #endif
-
// check char slot.
- sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d'",char_db, sd->account_id, dat[30]);
- sql_query(tmp_sql,"make_new_char_sql");
-
- if((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
- if (atoi(sql_row[0]) > 0) {
- mysql_free_result(sql_res);
- return -1;
- } else
- mysql_free_result(sql_res);
+ 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)) {
+ printf("fail (charslot check), SQL error: %s\n", mysql_error(&mysql_handle));
}
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if(sql_res){
+ temp = mysql_num_rows(sql_res);
+ if (temp > 0) {
+ mysql_free_result(sql_res);
+ printf("fail (aid: %d, slot: %d), slot already in use\n", sd->account_id, dat[30]);
+ return -2;
+ }
+ mysql_free_result(sql_res);
+ }
+
//char_id_count++;
- // make new char.
- 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],
- start_point.map,start_point.x,start_point.y, start_point.map,start_point.x,start_point.y);
+ // make new char.
+ /*
+ 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`)"
+ " VALUES ('%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%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]);
if (mysql_query(&mysql_handle, tmp_sql)) {
- printf("DB server Error (insert new char into `char`)- %s\n", mysql_error(&mysql_handle));
- return -1;
+ printf("DB server Error (insert `char`)- %s\n", mysql_error(&mysql_handle));
}
- cid = mysql_last_insert_id(sql_res);
-
//`inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`)
- sprintf(tmp_sql,"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d'),('%d', '%d', '%d', '%d', '%d')",
- inventory_db, cid, 1201,1,0x02,1,cid,2301,1,0x10,1); //add Knife and Cotton Shirt
- sql_query(tmp_sql,"make_new_char_sql");
+ sprintf(tmp_sql,"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d')",
+ inventory_db, char_id_count, 1201,1,0x02,1); //add Knife
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (insert `inventory`)- %s\n", mysql_error(&mysql_handle));
+ }
+
+ sprintf(tmp_sql,"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d')",
+ inventory_db, char_id_count, 2301,1,0x10,1); //add Cotton Shirt
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (insert `inventory`)- %s\n", mysql_error(&mysql_handle));
+ }
+ // respawn map and start point set
+ sprintf(tmp_sql,"UPDATE `%s` SET `last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d' WHERE `char_id` = '%d'",
+ char_db, start_point.map,start_point.x,start_point.y, start_point.map,start_point.x,start_point.y, char_id_count);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle));
+ }
+
+
+ // Insert friends list
+ insert_friends(char_id_count);
+ */
+
+ //New Querys [Sirius]
+ //Insert the char to the 'chardb' ^^
+ 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], start_point.map, start_point.x, start_point.y, start_point.map, start_point.x, start_point.y);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ printf("failed (insert in chardb), SQL error: %s\n", mysql_error(&mysql_handle));
+ return -2; //No, stop the procedure!
+ }
+
+ //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)){
+ printf("failed (get char_id), SQL error: %s\n", mysql_error(&mysql_handle));
+ //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);
+ mysql_query(&mysql_handle, 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 = atoi(sql_row[0]); //char id :)
+ mysql_free_result(sql_res);
+ if(char_id <= 0){
+ printf("failed (get char id..) CHARID wrong!\n");
+ 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);
+ mysql_query(&mysql_handle, tmp_sql);
+ return -2; //charcreate denied ..
+ }
+ }else{
+ //prevent to crash (if its false, and we want to free -> segfault :)
+ printf("failed (get char id.. res), SQL error: %s\n", mysql_error(&mysql_handle));
+ 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);
+ mysql_query(&mysql_handle, tmp_sql);
+ return -2; //end ...... -> charcreate failed :)
+ }
+ }
+
+ //Give the char the default items
+ //knife
+ sprintf(tmp_sql,"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d')", inventory_db, char_id, 1201,1,0x02,1); //add Knife
+ if (mysql_query(&mysql_handle, tmp_sql)){
+ printf("fail (insert in inventory the 'knife'), SQL error: %s\n", mysql_error(&mysql_handle));
+ 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);
+ mysql_query(&mysql_handle, tmp_sql);
+ return -2;//end XD
+ }
+ //cotton shirt
+ sprintf(tmp_sql,"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d')", inventory_db, char_id, 2301,1,0x10,1); //add Cotton Shirt
+ if (mysql_query(&mysql_handle, tmp_sql)){
+ printf("fail (insert in inventroxy the 'cotton shirt'), SQL error: %s\n", mysql_error(&mysql_handle));
+ 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);
+ mysql_query(&mysql_handle, tmp_sql);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `char_id` = '%d'", inventory_db, char_id);
+ mysql_query(&mysql_handle, tmp_sql);
+ return -2; //end....
+ }
+
+ if(!insert_friends(char_id)){
+ printf("fail (friendlist entrys..)\n");
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `char_id` = '%d'", char_db, char_id);
+ mysql_query(&mysql_handle, tmp_sql);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `char_id` = '%d'", inventory_db, char_id);
+ mysql_query(&mysql_handle, tmp_sql);
+ return -2; //end.. charcreate failed
+ }
+
+ //printf("making new char success - id:(\033[1;32m%d\033[0m\tname:\033[1;32%s\033[0m\n", char_id, t_name);
+ printf("success, aid: %d, cid: %d, slot: %d, name: %s\n", sd->account_id, char_id, dat[30], t_name);
+ return char_id;
+}
+
+//==========================================================================================================
+
+void mmo_char_sync(void){
+ printf("mmo_char_sync() - nothing to do\n");
+}
- #ifdef DEBUG
- printf("Make new char success - id:(\033[1;32m%d\033[0m\tname:\033[1;32%s\033[0m\n", cid, t_name);
- #endif
+// to do
+///////////////////////////
- return cid;
+int mmo_char_sync_timer(int tid, unsigned int tick, int id, int data) {
+ printf("mmo_char_sync_timer() tic - no works to do\n");
+ return 0;
}
int count_users(void) {
@@ -1110,7 +1339,7 @@ int count_users(void) {
if (login_fd > 0 && session[login_fd]){
users = 0;
- for(i = 0; i < MAX_MAP_SERVERS && i < servers_connected; i++) {
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
if (server_fd[i] >= 0) {
users += server[i].users;
}
@@ -1120,52 +1349,40 @@ int count_users(void) {
return 0;
}
-int send_users_tologin(int tid, unsigned int tick, int id, int data) {
- int users = count_users();
- 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;
-}
-
-
-
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
- #ifdef DEBUG
- printf("Send Chars (account:%d)\n",sd->account_id);
- #endif
+ printf("mmo_char_send006b start.. (account:%d)\n",sd->account_id);
+// printf("offset -> %d...\n",offset);
+
+ set_char_online(99,sd->account_id);
//search char.
sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id` = '%d'",char_db, sd->account_id);
- sql_query(tmp_sql,"mmo_char_send006b");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
found_num = mysql_num_rows(sql_res);
-
- #ifdef DEBUG
printf("number of chars: %d\n", found_num);
- #endif
-
- for(i=0;(sql_row = mysql_fetch_row(sql_res));i++)
+ i = 0;
+ while((sql_row = mysql_fetch_row(sql_res))) {
sd->found_char[i] = atoi(sql_row[0]);
+ i++;
+ }
+ mysql_free_result(sql_res);
}
- 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;
@@ -1174,9 +1391,7 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
WFIFOW(fd, 0) = 0x6b;
WFIFOW(fd, 2) = offset + found_num * 106;
- #ifdef DEBUG
printf("(\033[1;13m%d\033[0m) Request Char Data:\n",sd->account_id);
- #endif
for(i = 0; i < found_num; i++) {
mmo_char_fromsql(sd->found_char[i], char_dat, 0);
@@ -1204,9 +1419,15 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
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+52) = p->class_;
WFIFOW(fd,j+54) = p->hair;
- WFIFOW(fd,j+56) = p->weapon;
+
+ // pecopeco knights/crusaders crash fix
+ if (p->class_ == 13 || p->class_ == 21 ||
+ p->class_ == 4014 || p->class_ == 4022)
+ 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;
@@ -1228,246 +1449,22 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
}
WFIFOSET(fd,WFIFOW(fd,2));
-
- #ifdef DEBUG
- printf("Sent [%d] Chars to [%d]\n",found_num,sd->account_id);
- #endif
-
+// printf("mmo_char_send006b end..\n");
return 0;
}
-int reply_login_request(int fd, int len) {
- if (len < 3)
- return -1;
-
- if (RFIFOB(fd, 2)) {
- printf("Can not connect to login-server.\n");
- printf("The server communication passwords (default s1/p1) is probably invalid.\n");
- printf("Also, please make sure your login db has the username/password present and the sex of the account is S.\n");
- printf("If you changed the communication passwords, change them back at map_athena.conf and char_athena.conf\n");
- return -1;
- }else {
- printf("Connected to login-server (connection #%d).\n", fd);
- // if no map-server already connected, display a message...
- if(!servers_connected)
- printf("Awaiting maps from map-server.\n");
-
- // send USER COUNT PING to login server.
- #ifdef DEBUG
- printf("Add timer: (send_users_tologin)\n");
- #endif
-
- user_count_timer = add_timer_interval(gettick() + 10, send_users_tologin, 0, 0, 5 * 1000);
- }
-
- RFIFOSKIP(fd, 3);
-
- return 0;
-}
-
-int send_chars(int fd, int len) {
- if(len<51)
- return -1;
-
- int i;
- struct char_session_data *sd;
-
- for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = 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) {
- 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
- WFIFOW(i,0) = 0x6c;
- WFIFOW(i,2) = 0;
- WFIFOSET(i,3);
- }
- }
- }
- RFIFOSKIP(fd,51);
-
- return 0;
-}
-
-int connect_until_reply(int fd, int len) {
- if (len < 50)
- return -1;
-
- int i;
- struct char_session_data *sd;
-
- for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data)) {
- if (sd->account_id == RFIFOL(fd,2)) {
- sd->connect_until_time = (time_t)RFIFOL(fd,46);
- break;
- }
- }
- }
-
- RFIFOSKIP(fd,50);
-
- return 0;
-}
-
-// changesex reply (modified by [Yor])
-int change_sex_reply(int fd, int len) {
- if (len < 7)
- return -1;
-
- int acc, sex, i;
- unsigned char buf[16];
- struct char_session_data *sd;
-
- acc = RFIFOL(fd,2);
- sex = RFIFOB(fd,6);
- RFIFOSKIP(fd, 7);
-
- if (acc > 0) {
- sprintf(tmp_sql, "SELECT `char_id`,`class`,`skill_point` FROM `%s` WHERE `account_id` = '%d'",char_db, acc);
- sql_query(tmp_sql,"change_sex_reply");
-
- if ((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
- int char_id, jobclass, skill_point, char_class;
-
- char_id = atoi(sql_row[0]);
- jobclass = atoi(sql_row[1]);
- skill_point = atoi(sql_row[2]);
- char_class = jobclass;
-
- if (jobclass == 19 || jobclass == 20 ||
- jobclass == 4020 || jobclass == 4021 ||
- jobclass == 4042 || jobclass == 4043) {
-
- // job modification
- if (jobclass == 19 || jobclass == 20) {
- char_class = (sex) ? 19 : 20;
- } else if (jobclass == 4020 || jobclass == 4021) {
- char_class = (sex) ? 4020 : 4021;
- } else if (jobclass == 4042 || jobclass == 4043) {
- char_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);
- sql_query(tmp_sql,"change_sex_reply");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- 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);
- sql_query(tmp_sql,"change_sex_reply");
-
- // 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);
- sql_query(tmp_sql,"change_sex_reply");
-
- 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, char_class, skill_point, char_id);
- sql_query(tmp_sql,"change_sex_reply");
- }
- }
-
- // disconnect player if online on char-server
- for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = 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);
- }
-
- return 0;
-}
-
-int account_reg2(int fd, int len) {
- if (len < 4 || len < RFIFOW(fd,2))
- return -1;
-
- struct global_reg reg[ACCOUNT_REG2_NUM];
- unsigned char buf[4096];
- int j, p, acc;
-
- acc = RFIFOL(fd,4);
-
- for(p = 8, j = 0; p < RFIFOW(fd,2) && j < ACCOUNT_REG2_NUM; p += 36, j++) {
- memcpy(reg[j].str, RFIFOP(fd,p), 32);
- reg[j].value = RFIFOL(fd,p+32);
- }
-
- // set_account_reg2(acc,j,reg);
- // “¯CƒƒOƒCƒ“‚ð‹ÖŽ~‚µ‚Ä‚¢‚ê‚Α—‚é•K—v‚Í–³‚¢
- memcpy(buf,RFIFOP(fd,0), RFIFOW(fd,2));
- WBUFW(buf,0) = 0x2b11;
- mapif_sendall(buf, WBUFW(buf,2));
- RFIFOSKIP(fd, RFIFOW(fd,2));
-
- #ifdef DEBUG
- printf("char: save_account_reg_reply\n");
- #endif
-
- return 0;
-}
-
-// State change of account/ban notification (from login-server) by [Yor]
-int change_state_reply(int fd, int len) {
- if (len < 11)
- return -1;
-
+int parse_tologin(int fd) {
int i;
struct char_session_data *sd;
- // 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 = session[i]->session_data)) {
- if (sd->account_id == RFIFOL(fd,2)) {
- session[i]->eof = 1;
- break;
- }
- }
- }
-
- RFIFOSKIP(fd,11);
-
- return 0;
-}
-
-int parse_tologin(int fd) {
- int len,res = 0;
-
// 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) {
printf("Char-server can't connect to login-server (connection #%d).\n", fd);
- delete_timer(user_count_timer,send_users_tologin);
login_fd = -1;
}
close(fd);
@@ -1475,570 +1472,826 @@ int parse_tologin(int fd) {
return 0;
}
+ sd = (struct char_session_data*)session[fd]->session_data;
+
// hehe. no need to set user limite on SQL version. :P
// but char limitation is good way to maintain server. :D
- len = RFIFOREST(fd);
- while(len >= 2 && res == 0) {
- #ifdef DEBUG
- printf("parse_tologin : %d %d %x\n", fd, RFIFOREST(fd), RFIFOW(fd, 0));
- #endif
+ while(RFIFOREST(fd) >= 2) {
+// printf("parse_tologin : %d %d %x\n", fd, RFIFOREST(fd), RFIFOW(fd, 0));
switch(RFIFOW(fd, 0)){
- case 0x2711: res = reply_login_request(fd,len); break;
- case 0x2713: res = send_chars(fd,len); break;
- case 0x2717: res = connect_until_reply(fd,len); break;
- case 0x2723: res = change_sex_reply(fd,len); break;
- case 0x2729: res = account_reg2(fd,len); break;
- case 0x2731: res = change_state_reply(fd,len); break;
- case 0x2732: res = read_gm_accounts(fd,len); break;
-
- default:
- printf("set eof.\n");
- session[fd]->eof = 1;
- return 0;
- }
-
- len = RFIFOREST(fd);
- }
-
- RFIFOFLUSH(fd);
-
- return 0;
-}
-
-//--------------------------------
-// Map-server anti-freeze system
-//--------------------------------
-int map_anti_freeze_system(int tid, unsigned int tick, int id, int data) {
- int i;
+ case 0x2711:
+ if (RFIFOREST(fd) < 3)
+ return 0;
+ if (RFIFOB(fd, 2)) {
+ //printf("connect login server error : %d\n", RFIFOB(fd, 2));
+ printf("Can not connect to login-server.\n");
+ printf("The server communication passwords (default s1/p1) is probably invalid.\n");
+ printf("Also, please make sure your login db has the username/password present and the sex of the account is S.\n");
+ printf("If you changed the communication passwords, change them back at map_athena.conf and char_athena.conf\n");
+ return 0;
+ //exit(1); //fixed for server shutdown.
+ }else {
+ printf("Connected to login-server (connection #%d).\n", fd);
+ 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][0]) // if map-server online and at least 1 map
+ break;
+ if (i == MAX_MAP_SERVERS)
+ printf("Awaiting maps from map-server.\n");
+ }
+ RFIFOSKIP(fd, 3);
+ break;
- for(i = 0; i < MAX_MAP_SERVERS; i++) {
- if (server_fd[i] >= 0) {// if map-server is online
- printf("map_anti_freeze_system: server #%d, flag: %d.\n", i, server_freezeflag[i]);
- if (server_freezeflag[i]-- < 1) {// Map-server anti-freeze system. Counter. 5 ok, 4...0 freezed
- printf("Map-server anti-freeze system: char-server #%d is frozen -> disconnection.\n", i);
- session[server_fd[i]]->eof = 1;
- sprintf(tmp_sql, "DELETE FROM `ragsrvinfo` WHERE `index`='%d'", server_fd[i]);
- if (mysql_query(&mysql_handle, tmp_sql)) {
- printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ 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);
+ // 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);
+ WFIFOW(i,0) = 0x6c;
+ WFIFOW(i,2) = 0;
+ WFIFOSET(i,3);
+ }
}
}
- }
- }
-
- return 0;
-}
-
-int recv_map_names(int fd, int len, unsigned char id) {
- if (len < 4 || len < RFIFOW(fd,2))
- return -1;
-
- memset(server[id].map, 0, sizeof(server[id].map));
-
- int j = 0,i;
- unsigned char buf[16384];
- int x;
-
- for(i = 4; i < RFIFOW(fd,2); i += 16) {
- memcpy(server[id].map[j], RFIFOP(fd,i), 16);
-// 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;
-
- printf("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);
-
-
- WFIFOW(fd,0) = 0x2afb;
- WFIFOB(fd,2) = 0;
- memcpy(WFIFOP(fd,3), wisp_server_name, 24); // name for wisp to player
- WFIFOSET(fd,27);
-
-
- if (j == 0) {
- printf("WARNING: Map-Server %d have NO maps.\n", id);
- } else {
- // Transmitting maps information to the other map-servers
- WBUFW(buf,0) = 0x2b04;
- WBUFW(buf,2) = j * 16 + 10;
- WBUFL(buf,4) = server[id].ip;
- WBUFW(buf,8) = server[id].port;
- memcpy(WBUFP(buf,10), RFIFOP(fd,4), j * 16);
- 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;
+ RFIFOSKIP(fd,51);
+ break;
- j = 0;
+ 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;
- for(i = 0; i < MAX_MAP_PER_SERVER; i++)
- if (server[x].map[i][0])
- memcpy(WFIFOP(fd,10+(j++)*16), server[x].map[i], 16);
+ // login-server alive packet
+ case 0x2718:
+ if (RFIFOREST(fd) < 2)
+ return 0;
+ RFIFOSKIP(fd,2);
+ break;
- if (j > 0) {
- WFIFOW(fd,2) = j * 16 + 10;
- WFIFOSET(fd,WFIFOW(fd,2));
+ // 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++;
}
- }
- }
-
- RFIFOSKIP(fd,RFIFOW(fd,2));
+ //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;
- printf("Map-server %d loading complete.\n", id);
+/* 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` FROM `%s` WHERE `account_id` = '%d'",char_db, acc);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `char`)- %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if (sql_res) {
+ int char_id, jobclass, skill_point, class_;
+ sql_row = mysql_fetch_row(sql_res);
+ char_id = atoi(sql_row[0]);
+ jobclass = atoi(sql_row[1]);
+ skill_point = atoi(sql_row[2]);
+ 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)) {
+ printf("DB server Error (select `char`)- %s\n", mysql_error(&mysql_handle));
+ }
+ 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)) {
+ printf("DB server Error (select `char`)- %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ // 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)) {
+ printf("DB server Error (select `char`)- %s\n", mysql_error(&mysql_handle));
+ }
+ 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)) {
+ printf("DB server Error (select `char`)- %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ }
+ // 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;
+ }
+ }
+ }
- servers_connected++;
+ WBUFW(buf,0) = 0x2b0d;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = sex;
- return 0;
-}
+ mapif_sendall(buf, 7);
+ }
+ break;
-int auth_request(int fd, int len) {
- if (len < 22)
- return -1;
+ // account_reg2•ÏX’Ê’m
+ case 0x2729:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ struct global_reg reg[ACCOUNT_REG2_NUM];
+ unsigned char buf[4096];
+ int j, p, acc;
+ acc = RFIFOL(fd,4);
+ for(p = 8, j = 0; p < RFIFOW(fd,2) && j < ACCOUNT_REG2_NUM; p += 36, j++) {
+ memcpy(reg[j].str, RFIFOP(fd,p), 32);
+ reg[j].value = RFIFOL(fd,p+32);
+ }
+ // set_account_reg2(acc,j,reg);
+ // “¯CƒƒOƒCƒ“‚ð‹ÖŽ~‚µ‚Ä‚¢‚ê‚Α—‚é•K—v‚Í–³‚¢
+ memcpy(buf,RFIFOP(fd,0), RFIFOW(fd,2));
+ WBUFW(buf,0) = 0x2b11;
+ mapif_sendall(buf, WBUFW(buf,2));
+ RFIFOSKIP(fd, RFIFOW(fd,2));
+// printf("char: save_account_reg_reply\n");
+ }
+ break;
- int i;
+ // 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;
- #ifdef DEBUG
- printf("(AUTH request) auth_fifo search %d %d %d\n", RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
- #endif
+ // 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)
+ printf("***WARNING: 4000 GM accounts found. Next GM accounts are not readed.\n");
+ }
+ }
+ if (new_level == 1) {
+ printf("From login-server: receiving a GM account information (%d: level %d).\n", RFIFOL(fd,2), (int)RFIFOB(fd,6));
+ mapif_send_gmaccounts();
- for(i = 0; i < AUTH_FIFO_SIZE; i++) {
- if (auth_fifo[i].account_id == RFIFOL(fd,2) &&
- auth_fifo[i].char_id == RFIFOL(fd,6) &&
- auth_fifo[i].login_id1 == RFIFOL(fd,10) &&
-#if CMP_AUTHFIFO_LOGIN2 != 0
- // here, it's the only area where it's possible that we doesn't know login_id2 (map-server asks just after 0x72 packet, that doesn't given the value)
- (auth_fifo[i].login_id2 == RFIFOL(fd,14) || RFIFOL(fd,14) == 0) && // relate to the versions higher than 18
-#endif
- (!check_ip_flag || auth_fifo[i].ip == RFIFOL(fd,18)) &&
- !auth_fifo[i].delflag) {
-
- auth_fifo[i].delflag = 1;
- WFIFOW(fd,0) = 0x2afd;
- WFIFOW(fd,2) = 16 + sizeof(struct mmo_charstatus);
- WFIFOL(fd,4) = RFIFOL(fd,2);
- WFIFOL(fd,8) = auth_fifo[i].login_id2;
- WFIFOL(fd,12) = (unsigned long)auth_fifo[i].connect_until_time;
- mmo_char_fromsql(auth_fifo[i].char_id, char_dat, 1);
- char_dat[0].sex = auth_fifo[i].sex;
- memcpy(WFIFOP(fd,16), &char_dat[0], sizeof(struct mmo_charstatus));
- WFIFOSET(fd, WFIFOW(fd,2));
-
- #ifdef DEBUG
- printf("auth_fifo search success (auth #%d, account %d, character: %d).\n", i, RFIFOL(fd,2), RFIFOL(fd,6));
- #endif
+ //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;
+ default:
+ printf("set eof.\n");
+ session[fd]->eof = 1;
return 0;
}
}
- if (i == AUTH_FIFO_SIZE) {
- WFIFOW(fd,0) = 0x2afe;
- WFIFOL(fd,2) = RFIFOL(fd,2);
- WFIFOSET(fd,6);
-
- #ifdef DEBUG
- printf("(AUTH request) auth_fifo search error!\n");
- #endif
- }
-
- RFIFOSKIP(fd,22);
-
- return 0;
-}
-
-int set_map_users(int fd, int len, unsigned char id) {
- if (len < 6 || len < RFIFOW(fd,2))
- return -1;
-
- if (RFIFOW(fd,4) != server[id].users)
- printf("map user: %d\n", RFIFOW(fd,4));
-
- server[id].users = RFIFOW(fd,4);
-
- if(anti_freeze_enable)
- server_freezeflag[id] = 5; // Map anti-freeze system. Counter. 5 ok, 4...0 freezed
-
- RFIFOSKIP(fd,RFIFOW(fd,2));
+ RFIFOFLUSH(fd);
return 0;
}
-int save_char(int fd, int len) {
- if (len < 4 || len < RFIFOW(fd,2))
- return -1;
+int parse_frommap(int fd) {
+ int i = 0, j = 0;
+ int id;
- //check account
- sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'",char_db, RFIFOL(fd,4),RFIFOL(fd,8));
- sql_query(tmp_sql,"save_char");
+ // Sometimes fd=0, and it will cause server crash. Don't know why. :(
+ if (fd <= 0) {
+ printf("parse_frommap error fd=0\n");
+ return 0;
+ }
- if ((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res)))
- if (atoi(sql_row[0]) == 1) {
- memcpy(&char_dat[0], RFIFOP(fd,12), sizeof(struct mmo_charstatus));
- mmo_char_tosql(RFIFOL(fd,8), char_dat);
+ 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) {
+ memset(&server[id], 0, sizeof(struct mmo_map_server));
+ printf("Map-server %d (session #%d) has disconnected.\n", id, fd);
+ sprintf(tmp_sql, "DELETE FROM `ragsrvinfo` WHERE `index`='%d'", server_fd[id]);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ server_fd[id] = -1;
}
+ close(fd);
+ delete_session(fd);
+ return 0;
+ }
- mysql_free_result(sql_res);
-
-
- RFIFOSKIP(fd,RFIFOW(fd,2));
-
- return 0;
-}
-
-int request_char_select(int fd, int len) {
- if (len < 18)
- return -1;
-
- if (auth_fifo_pos >= AUTH_FIFO_SIZE)
- auth_fifo_pos = 0;
-
- #ifdef DEBUG
- printf("(charselect) auth_fifo set %d - account_id:%08x login_id1:%08x\n", auth_fifo_pos, RFIFOL(fd, 2), RFIFOL(fd, 6));
- #endif
-
- 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);
-
- return 0;
-}
-
-int request_change_map(int fd, int len) {
- if (len < 49)
- return -1;
-
- if (auth_fifo_pos >= AUTH_FIFO_SIZE)
- auth_fifo_pos = 0;
-
- WFIFOW(fd, 0) = 0x2b06;
- memcpy(WFIFOP(fd,2), RFIFOP(fd,2), 42);
-
- #ifdef DEBUG
- printf("(map change) auth_fifo set %d - account_id:%08x login_id1:%08x\n", auth_fifo_pos, RFIFOL(fd, 2), RFIFOL(fd, 6));
- #endif
+ while(RFIFOREST(fd) >= 2) {
+// printf("parse_frommap : %d %d %x\n", fd, RFIFOREST(fd), RFIFOW(fd,0));
- auth_fifo[auth_fifo_pos].account_id = RFIFOL(fd, 2);
- 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].char_id = RFIFOL(fd,14);
- auth_fifo[auth_fifo_pos].delflag = 0;
- auth_fifo[auth_fifo_pos].sex = RFIFOB(fd,44);
- auth_fifo[auth_fifo_pos].ip = RFIFOL(fd,45);
+ switch(RFIFOW(fd, 0)) {
- sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", char_db, RFIFOL(fd,2), RFIFOL(fd,14));
- sql_query(tmp_sql,"request_map_change");
+ // map-server alive packet
+ case 0x2718:
+ if (RFIFOREST(fd) < 2)
+ return 0;
+ RFIFOSKIP(fd,2);
+ break;
- if ((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
+ case 0x2af7:
+ RFIFOSKIP(fd,2);
+ read_gm_account();
+ break;
- auth_fifo[auth_fifo_pos].char_pos = auth_fifo[auth_fifo_pos].char_id;
- auth_fifo_pos++;
+ // 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 += 16) {
+ memcpy(server[id].map[j], RFIFOP(fd,i), 16);
+// 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;
+ printf("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);
+ printf("Map-server %d loading complete.\n", id);
+ set_all_offline();
+ }
+ WFIFOW(fd,0) = 0x2afb;
+ WFIFOB(fd,2) = 0;
+ memcpy(WFIFOP(fd,3), wisp_server_name, 24); // name for wisp to player
+ WFIFOSET(fd,27);
+ {
+ unsigned char buf[16384];
+ int x;
+ if (j == 0) {
+ printf("WARNING: 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 * 16 + 10;
+ WBUFL(buf,4) = server[id].ip;
+ WBUFW(buf,8) = server[id].port;
+ memcpy(WBUFP(buf,10), RFIFOP(fd,4), j * 16);
+ 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][0])
+ memcpy(WFIFOP(fd,10+(j++)*16), server[x].map[i], 16);
+ if (j > 0) {
+ WFIFOW(fd,2) = j * 16 + 10;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ }
+ }
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
- WFIFOL(fd,6) = 0;
- }
+ // auth request
+ case 0x2afc:
+ if (RFIFOREST(fd) < 22)
+ return 0;
+// printf("(AUTH request) auth_fifo search %d %d %d\n", RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
+ for(i = 0; i < AUTH_FIFO_SIZE; i++) {
+ if (auth_fifo[i].account_id == RFIFOL(fd,2) &&
+ auth_fifo[i].char_id == RFIFOL(fd,6) &&
+ auth_fifo[i].login_id1 == RFIFOL(fd,10) &&
+#if CMP_AUTHFIFO_LOGIN2 != 0
+ // here, it's the only area where it's possible that we doesn't know login_id2 (map-server asks just after 0x72 packet, that doesn't given the value)
+ (auth_fifo[i].login_id2 == RFIFOL(fd,14) || RFIFOL(fd,14) == 0) && // relate to the versions higher than 18
+#endif
+ (!check_ip_flag || auth_fifo[i].ip == RFIFOL(fd,18)) &&
+ !auth_fifo[i].delflag) {
+ auth_fifo[i].delflag = 1;
+ WFIFOW(fd,0) = 0x2afd;
+ WFIFOW(fd,2) = 16 + sizeof(struct mmo_charstatus);
+ WFIFOL(fd,4) = RFIFOL(fd,2);
+ WFIFOL(fd,8) = auth_fifo[i].login_id2;
+ WFIFOL(fd,12) = (unsigned long)auth_fifo[i].connect_until_time;
+ mmo_char_fromsql(auth_fifo[i].char_id, char_dat, 1);
+ char_dat[0].sex = auth_fifo[i].sex;
+ memcpy(WFIFOP(fd,16), &char_dat[0], sizeof(struct mmo_charstatus));
+ WFIFOSET(fd, WFIFOW(fd,2));
+ //printf("auth_fifo search success (auth #%d, account %d, character: %d).\n", i, RFIFOL(fd,2), RFIFOL(fd,6));
+ break;
+ }
+ }
+ if (i == AUTH_FIFO_SIZE) {
+ WFIFOW(fd,0) = 0x2afe;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
+ WFIFOSET(fd,6);
+// printf("(AUTH request) auth_fifo search error!\n");
+ }
+ RFIFOSKIP(fd,22);
+ break;
- if (atoi(sql_row[0]) == 0)
- WFIFOW(fd,6) = 1;
+ // set MAP user
+ case 0x2aff:
+ if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ if (RFIFOW(fd,4) != server[id].users)
+ printf("[UserCount]: %d (Server: %d)\n", RFIFOW(fd,4), id);
+ server[id].users = RFIFOW(fd,4);
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
- WFIFOSET(fd,44);
- RFIFOSKIP(fd,49);
+ // char saving
+ case 0x2b01:
+ i = 0;
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ //check account
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'",char_db, RFIFOL(fd,4),RFIFOL(fd,8)); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+ if (sql_row)
+ i = atoi(sql_row[0]);
+ }
+ mysql_free_result(sql_res);
- mysql_free_result(sql_res);
+ if (i == 1) {
+ memcpy(&char_dat[0], RFIFOP(fd,12), sizeof(struct mmo_charstatus));
+ mmo_char_tosql(RFIFOL(fd,8), char_dat);
+ //save to DB
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
- return 0;
-}
+ // req char selection
+ case 0x2b02:
+ if (RFIFOREST(fd) < 18)
+ return 0;
-int char_name_check(int fd, int len) {
- if (len < 6)
- return -1;
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE)
+ auth_fifo_pos = 0;
+
+// printf("(charselect) auth_fifo set %d - account_id:%08x login_id1:%08x\n", auth_fifo_pos, RFIFOL(fd, 2), RFIFOL(fd, 6));
+ 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;
- WFIFOW(fd,0) = 0x2b09;
- WFIFOL(fd,2) = RFIFOL(fd,2);
+ // request "change map server"
+ case 0x2b05:
+ if (RFIFOREST(fd) < 49)
+ return 0;
- sprintf(tmp_sql, "SELECT `name` FROM `%s` WHERE `char_id`='%d'", char_db, RFIFOL(fd,2));
- sql_query(tmp_sql,"char_name_check");
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE)
+ auth_fifo_pos = 0;
+
+ WFIFOW(fd, 0) = 0x2b06;
+ memcpy(WFIFOP(fd,2), RFIFOP(fd,2), 42);
+// printf("(map change) auth_fifo set %d - account_id:%08x login_id1:%08x\n", auth_fifo_pos, RFIFOL(fd, 2), RFIFOL(fd, 6));
+ printf("[MapChange] ");
+ auth_fifo[auth_fifo_pos].account_id = RFIFOL(fd, 2);
+ 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].char_id = RFIFOL(fd,14);
+ auth_fifo[auth_fifo_pos].delflag = 0;
+ auth_fifo[auth_fifo_pos].sex = RFIFOB(fd,44);
+ auth_fifo[auth_fifo_pos].ip = RFIFOL(fd,45);
+
+ sprintf(tmp_sql, "SELECT `char_id`, `name` FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", char_db, RFIFOL(fd,2), RFIFOL(fd,14));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ i = atoi(sql_row[0]);
+ printf("aid: %d, cid: %d, name: %s", RFIFOL(fd,2), atoi(sql_row[0]), sql_row[1]);
+ mysql_free_result(sql_res);
+ auth_fifo[auth_fifo_pos].char_pos = auth_fifo[auth_fifo_pos].char_id;
+ auth_fifo_pos++;
+ WFIFOL(fd,6) = 0;
+ }else{
+ printf("Error, aborted\n");
+ return 0;
+ }
+
+ if(i == 0){
+ WFIFOW(fd, 6) = 0;
+ }
+
+ WFIFOSET(fd, 44);
+ RFIFOSKIP(fd, 49);
+ printf(" done.\n");
+ /*
+ if (( sql_row = mysql_fetch_row(sql_res))) {
+ i = atoi(sql_row[0]);
+ mysql_free_result(sql_res);
+
+ auth_fifo[auth_fifo_pos].char_pos = auth_fifo[auth_fifo_pos].char_id;
+ auth_fifo_pos++;
+
+ WFIFOL(fd,6) = 0;
+ break;
+ }
+ if (i == 0)
+ WFIFOW(fd,6) = 1;
- if((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res)))
- memcpy(WFIFOP(fd,6), sql_row[0], 24);
- else
- memcpy(WFIFOP(fd,6), unknown_char_name, 24);
+ WFIFOSET(fd,44);
+ RFIFOSKIP(fd,49);
+ break;
+ */
- mysql_free_result(sql_res);
+ break;
+
+ // char name check
+ case 0x2b08:
+ if (RFIFOREST(fd) < 6)
+ return 0;
- WFIFOSET(fd,30);
+ sprintf(tmp_sql, "SELECT `name` FROM `%s` WHERE `char_id`='%d'", char_db, RFIFOL(fd,2));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle);
- RFIFOSKIP(fd,6);
+ sql_row = mysql_fetch_row(sql_res);
- return 0;
-}
+ WFIFOW(fd,0) = 0x2b09;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
-int account_reg(int fd, int len) {
- if (len < 4 || len < RFIFOW(fd,2))
- return -1;
+ if (sql_row)
+ memcpy(WFIFOP(fd,6), sql_row[0], 24);
+ else
+ memcpy(WFIFOP(fd,6), unknown_char_name, 24);
+ mysql_free_result(sql_res);
- struct global_reg reg[ACCOUNT_REG2_NUM];
- int j,p,acc;
- acc=RFIFOL(fd,4);
- for(p=8,j=0;p<RFIFOW(fd,2) && j<ACCOUNT_REG2_NUM;p+=36,j++){
- memcpy(reg[j].str,RFIFOP(fd,p),32);
- reg[j].value=RFIFOL(fd,p+32);
- }
+ WFIFOSET(fd,30);
- // set_account_reg2(acc,j,reg);
- // loginƒT[ƒo[‚Ö‘—‚é
- if (login_fd > 0) { // don't send request if no login-server
- WFIFOW(login_fd, 0) = 0x2728;
- memcpy(WFIFOP(login_fd,0), RFIFOP(fd,0), RFIFOW(fd,2));
- WFIFOSET(login_fd, WFIFOW(login_fd,2));
- }
+ RFIFOSKIP(fd,6);
+ break;
- // ƒ[ƒ‹ƒh‚Ö‚Ì“¯CƒƒOƒCƒ“‚ª‚È‚¯‚ê‚ÎmapƒT[ƒo[‚É‘—‚é•K—v‚Í‚È‚¢
- //memcpy(buf,RFIFOP(fd,0),RFIFOW(fd,2));
- //WBUFW(buf,0)=0x2b11;
- //mapif_sendall(buf,WBUFW(buf,2));
- RFIFOSKIP(fd,RFIFOW(fd,2));
+/* // 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));
+ RFIFOSKIP(fd, RFIFOW(fd, 2));
+ break;
+ */
+ // account_reg•Û‘¶—v‹
+ case 0x2b10:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ struct global_reg reg[ACCOUNT_REG2_NUM];
+ int j,p,acc;
+ acc=RFIFOL(fd,4);
+ for(p=8,j=0;p<RFIFOW(fd,2) && j<ACCOUNT_REG2_NUM;p+=36,j++){
+ memcpy(reg[j].str,RFIFOP(fd,p),32);
+ reg[j].value=RFIFOL(fd,p+32);
+ }
+ // set_account_reg2(acc,j,reg);
+ // loginƒT[ƒo[‚Ö‘—‚é
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd, 0) = 0x2728;
+ memcpy(WFIFOP(login_fd,0), RFIFOP(fd,0), RFIFOW(fd,2));
+ WFIFOSET(login_fd, WFIFOW(login_fd,2));
+ }
+ // ƒ[ƒ‹ƒh‚Ö‚Ì“¯CƒƒOƒCƒ“‚ª‚È‚¯‚ê‚ÎmapƒT[ƒo[‚É‘—‚é•K—v‚Í‚È‚¢
+ //memcpy(buf,RFIFOP(fd,0),RFIFOW(fd,2));
+ //WBUFW(buf,0)=0x2b11;
+ //mapif_sendall(buf,WBUFW(buf,2));
+ RFIFOSKIP(fd,RFIFOW(fd,2));
// printf("char: save_account_reg (from map)\n");
+ }
+ break;
- return 0;
-}
-
-// Map server send information to change an email of an account -> login-server
-int change_email_request(int fd, int len) {
- if (len < 86)
- return -1;
-
- 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);
-
- return 0;
-}
+ // 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)
-int status_change_request(int fd, int len) {
- if (len < 44)
- return -1;
+ // 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[24];
+ int acc = RFIFOL(fd,2); // account_id of who ask (-1 if nobody)
+ memcpy(character_name, RFIFOP(fd,6), 24);
+ character_name[sizeof(character_name) -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
+ sprintf(tmp_sql, "SELECT `account_id`,`name` FROM `%s` WHERE `name` = '%s'",char_db, character_name);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error (select `char`)- %s\n", mysql_error(&mysql_handle));
+ }
- char character_name[24];
- int acc = RFIFOL(fd,2); // account_id of who ask (-1 if nobody)
-
- memcpy(character_name, RFIFOP(fd,6), 24);
- character_name[sizeof(character_name) -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
-
- sprintf(tmp_sql, "SELECT `account_id`,`name` FROM `%s` WHERE `name` = '%s'",char_db, character_name);
- sql_query(tmp_sql,"status_change_request");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- if ((sql_row = mysql_fetch_row(sql_res))) {
- memcpy(WFIFOP(fd,6), sql_row[1], 24); // 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);
+ 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], 24); // 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) = 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));
+ 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) = 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);
+ 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) = 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);
+ 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) = 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);
+ 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) = 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, 24);
- 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);
-
- return 0;
-}
-
-int recieve_rates(int fd, int len) {
- if (len < 6 || len < RFIFOW(fd,8))
- return -1;
-
- 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), RFIFOP(fd,10));
- sql_query(tmp_sql,"recieve_rates");
-
- RFIFOSKIP(fd,RFIFOW(fd,8));
-
- return 0;
-}
-
-int set_offline(int fd, int len) {
- if (len < 6 )
- return -1;
-
- #ifdef DEBUG
- printf("Setting [%d] char offline\n",RFIFOL(fd,2));
- #endif
-
- sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `char_id`='%d'", char_db, RFIFOL(fd,2));
- sql_query(tmp_sql,"set_offline");
-
- RFIFOSKIP(fd,6);
-
- return 0;
-}
-
-int parse_frommap(int fd) {
- int len,res=0;
- unsigned char id;
-
- // Sometimes fd=0, and it will cause server crash. Don't know why. :(
- if (fd <= 0) {
- printf("parse_frommap error fd=0\n");
- return 0;
- }
-
- for(id = 0; id < MAX_MAP_SERVERS && id < servers_connected; id++)
- if (server_fd[id] == fd)
+ 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, 24);
+ 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;
- if(id == MAX_MAP_SERVERS || !servers_connected)
- session[fd]->eof = 1;
-
- if(session[fd]->eof) {
- if (servers_connected) {
- memset(&server[id], 0, sizeof(struct mmo_map_server));
-
- printf("Map-server %d (session #%d) has disconnected.\n", id, fd);
-
- sprintf(tmp_sql, "DELETE FROM `ragsrvinfo` WHERE `index`='%d'", server_fd[id]);
- sql_query(tmp_sql,"parse_frommap");
-
- server_fd[id] = -1;
-
- servers_connected--;
- }
- close(fd);
- delete_session(fd);
- return 0;
- }
-
- len = RFIFOREST(fd);
+ // Recieve rates [Wizputer]
+ case 0x2b16:
+ if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,8))
+ return 0;
+ 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), RFIFOP(fd,10));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,8));
+ break;
- while(len >= 2 && res == 0) {
- #ifdef DEBUG
- printf("parse_frommap : %d %d %x\n", fd, RFIFOREST(fd), RFIFOW(fd,0));
- #endif
+ // 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:
+ 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(RFIFOL(fd,2),RFIFOL(fd,6));
+ RFIFOSKIP(fd,10);
+ break;
- switch(RFIFOW(fd, 0)) {
- case 0x2af7: res = read_gm_accounts(fd,len); break;
- case 0x2afa: res = recv_map_names(fd,len,id); break;
- case 0x2afc: res = auth_request(fd,len); break;
- case 0x2aff: res = set_map_users(fd,len,id); break;
- case 0x2b01: res = save_char(fd,len); break;
- case 0x2b02: res = request_char_select(fd,len); break;
- case 0x2b05: res = request_change_map(fd,len); break;
- case 0x2b08: res = char_name_check(fd,len); break;
- case 0x2b10: res = account_reg(fd,len); break;
- case 0x2b0c: res = change_email_request(fd,len); break;
- case 0x2b0e: res = status_change_request(fd,len); break;
- case 0x2b16: res = recieve_rates(fd,len); break;
- case 0x2b17: res = set_offline(fd,len); break;
-
- default:
+ default:
// inter server - packet
{
int r = inter_parse_frommap(fd);
@@ -2051,8 +2304,6 @@ int parse_frommap(int fd) {
session[fd]->eof = 1;
return 0;
}
-
- len = RFIFOREST(fd);
}
return 0;
}
@@ -2069,7 +2320,7 @@ int search_mapserver(char *map) {
temp_map[strchr(temp_map, '.') - temp_map + 1] = '\0'; // suppress the '.gat', but conserve the '.' to be sure of the name of the map
temp_map_len = strlen(temp_map);
- for(i = 0; i < MAX_MAP_SERVERS && i < servers_connected; i++)
+ for(i = 0; i < MAX_MAP_SERVERS; i++)
if (server_fd[i] >= 0)
for (j = 0; server[i].map[j][0]; j++)
//printf("%s : %s = %d\n", server[i].map[j], map, strncmp(server[i].map[j], temp_map, temp_map_len));
@@ -2112,470 +2363,568 @@ int lan_ip_check(unsigned char *p){
return lancheck;
}
-int client_request_connect(int fd, int len) {
- if (len < 17)
- return -1;
-
- struct char_session_data *sd = session[fd]->session_data;
- int i;
+int parse_char(int fd) {
+ int i, ch = 0;
+ char email[40];
+ unsigned short cmd;
+ struct char_session_data *sd;
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
- #ifdef DEBUG
- printf("request connect - account_id:%d/login_id1:%d/login_id2:%d\n", RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
- #endif
+ sd = (struct char_session_data*)session[fd]->session_data;
- if (sd == NULL) {
- CREATE(session[fd]->session_data, struct char_session_data, 1);
- sd = session[fd]->session_data;
- sd->connect_until_time = 0; // unknow or illimited (not displaying on map-server)
+ if(login_fd < 0)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
+ if (fd == login_fd)
+ login_fd = -1;
+ if (sd != NULL)
+ set_char_offline(99,sd->account_id);
+ close(fd);
+ delete_session(fd);
+ return 0;
}
- sd->account_id = RFIFOL(fd, 2);
- sd->login_id1 = RFIFOL(fd, 6);
- sd->login_id2 = RFIFOL(fd, 10);
- sd->sex = RFIFOB(fd, 16);
+ while(RFIFOREST(fd) >= 2) {
+ 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);
+ printf("parse_char : %d crc32 skipped\n",fd);
+ if(RFIFOREST(fd)==0)
+ return 0;
+ }
- WFIFOL(fd, 0) = RFIFOL(fd, 2);
- WFIFOSET(fd, 4);
+// if(cmd<30000 && cmd!=0x187)
+// printf("parse_char : %d %d %d\n",fd,RFIFOREST(fd),cmd);
- 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 (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);
- }
-
- #ifdef DEBUG
- 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);
- #endif
-
- 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;
- WFIFOW(fd,2) = 0;
- WFIFOSET(fd,3);
- }
- }
+ // •s³ƒpƒPƒbƒg‚̈—
+// if (sd == NULL && cmd != 0x65 && cmd != 0x20b && cmd != 0x187 &&
+// cmd != 0x2af8 && cmd != 0x7530 && cmd != 0x7532)
+// cmd = 0xffff; // ƒpƒPƒbƒgƒ_ƒ“ƒv‚ð•\Ž¦‚³‚¹‚é
- #ifdef DEBUG
- if (isGM(RFIFOL(fd,2)))
- printf("Account Logged On; Account ID: %d (GM level %d).\n", RFIFOL(fd,2), isGM(RFIFOL(fd,2)));
- else
- printf("Account Logged On; Account ID: %d.\n", RFIFOL(fd,2));
- #endif
+ switch(cmd){
+ case 0x20b: //20040622 encryption ragexe correspondence
+ if (RFIFOREST(fd) < 19)
+ return 0;
+ RFIFOSKIP(fd,19);
+ break;
- RFIFOSKIP(fd, 17);
+ case 0x65: // request to connect
+ printf("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;
+ {
+/*removed from isGM setup
+ if (isGM(RFIFOL(fd,2)))
+ printf("Account Logged On; Account ID: %d (GM level %d).\n", RFIFOL(fd,2), isGM(RFIFOL(fd,2)));
+ else
+ printf("Account Logged On; Account ID: %d.\n", RFIFOL(fd,2));
+*/
+ 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);
- return 0;
-}
+ WFIFOL(fd, 0) = RFIFOL(fd, 2);
+ WFIFOSET(fd, 4);
-int char_select(int fd, int len, unsigned char *ip) {
- if (len < 3)
- return -1;
+ 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 (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;
+ WFIFOW(fd,2) = 0;
+ WFIFOSET(fd,3);
+ }
+ }
+ }
+ RFIFOSKIP(fd, 17);
+ break;
- int i;
- struct char_session_data *sd = session[fd]->session_data;
+ case 0x66: // char select
+// printf("0x66> request connect - account_id:%d/char_num:%d\n",sd->account_id,RFIFOB(fd, 2));
+ if (RFIFOREST(fd) < 3)
+ return 0;
- #ifdef DEBUG
- printf("0x66> request connect - account_id:%d/char_num:%d\n",sd->account_id,RFIFOB(fd, 2));
- #endif
+ if (sd == NULL)
+ return 0;
- sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id`='%d' AND `char_num`='%d'",char_db, sd->account_id, RFIFOB(fd, 2));
- sql_query(tmp_sql,"char_select");
+ sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id`='%d' AND `char_num`='%d'",char_db, sd->account_id, RFIFOB(fd, 2));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle);
- if ((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
- mmo_char_fromsql(atoi(sql_row[0]), char_dat, 0);
- mysql_free_result(sql_res);
- } else {
- mysql_free_result(sql_res);
- RFIFOSKIP(fd, 3);
- return 0;
- }
+ sql_row = mysql_fetch_row(sql_res);
- sprintf(tmp_sql,"INSERT DELAYED INTO `%s`(`time`, `account_id`,`char_num`,`name`) VALUES (NOW(), '%d', '%d', '%s')",
- charlog_db, sd->account_id, RFIFOB(fd, 2), char_dat[0].name);
- sql_query(tmp_sql,"char_select");
+ if (sql_row)
+ mmo_char_fromsql(atoi(sql_row[0]), char_dat, 1);
+ else {
+ mysql_free_result(sql_res);
+ RFIFOSKIP(fd, 3);
+ break;
+ }
- #ifdef DEBUG
- printf("(\033[1;64m%d\033[0m) char selected (\033[1;32m%d\033[0m) \033[1;32m%s\033[0m" RETCODE, sd->account_id, RFIFOB(fd, 2), char_dat[0].name);
- #endif
+ if (log_char) {
+ 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), char_dat[0].name);
+ //query
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ printf("(\033[1;64m%d\033[0m) char selected (\033[1;32m%d\033[0m) \033[1;32m%s\033[0m" RETCODE, sd->account_id, RFIFOB(fd, 2), char_dat[0].name);
+
+ i = search_mapserver(char_dat[0].last_point.map);
+
+ // if map is not found, we check major cities
+ if (i < 0) {
+ if ((i = search_mapserver("prontera.gat")) >= 0) { // check is done without 'gat'.
+ memcpy(char_dat[0].last_point.map, "prontera.gat", 16);
+ char_dat[0].last_point.x = 273; // savepoint coordonates
+ char_dat[0].last_point.y = 354;
+ } else if ((i = search_mapserver("geffen.gat")) >= 0) { // check is done without 'gat'.
+ memcpy(char_dat[0].last_point.map, "geffen.gat", 16);
+ char_dat[0].last_point.x = 120; // savepoint coordonates
+ char_dat[0].last_point.y = 100;
+ } else if ((i = search_mapserver("morocc.gat")) >= 0) { // check is done without 'gat'.
+ memcpy(char_dat[0].last_point.map, "morocc.gat", 16);
+ char_dat[0].last_point.x = 160; // savepoint coordonates
+ char_dat[0].last_point.y = 94;
+ } else if ((i = search_mapserver("alberta.gat")) >= 0) { // check is done without 'gat'.
+ memcpy(char_dat[0].last_point.map, "alberta.gat", 16);
+ char_dat[0].last_point.x = 116; // savepoint coordonates
+ char_dat[0].last_point.y = 57;
+ } else if ((i = search_mapserver("payon.gat")) >= 0) { // check is done without 'gat'.
+ memcpy(char_dat[0].last_point.map, "payon.gat", 16);
+ char_dat[0].last_point.x = 87; // savepoint coordonates
+ char_dat[0].last_point.y = 117;
+ } else if ((i = search_mapserver("izlude.gat")) >= 0) { // check is done without 'gat'.
+ memcpy(char_dat[0].last_point.map, "izlude.gat", 16);
+ char_dat[0].last_point.x = 94; // savepoint coordonates
+ char_dat[0].last_point.y = 103;
+ } else {
+ int j;
+ // get first online server
+ i = 0;
+ for(j = 0; j < MAX_MAP_SERVERS; j++)
+ if (server_fd[j] >= 0 && server[j].map[0][0]) {
+ i = j;
+ printf("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;
+ WFIFOL(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ RFIFOSKIP(fd,3);
+ break;
+ }
+ }
+ }
+ WFIFOW(fd, 0) =0x71;
+ WFIFOL(fd, 2) =char_dat[0].char_id;
+ memcpy(WFIFOP(fd, 6), char_dat[0].last_point.map, 16);
+ //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;
+ }
+// printf("auth_fifo set (auth_fifo_pos:%d) - account_id:%d char_id:%d login_id1:%d\n", auth_fifo_pos, sd->account_id, char_dat[0].char_id, sd->login_id1);
+ 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 = sd->found_char[ch];
+ 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;
+ auth_fifo_pos++;
+// printf("0x66> end\n");
+ RFIFOSKIP(fd, 3);
+ break;
- i = search_mapserver(char_dat[0].last_point.map);
-
- // if map is not found, we check major cities
- if (i < 0) {
- if ((i = search_mapserver("prontera.gat")) >= 0) { // check is done without 'gat'.
- memcpy(char_dat[0].last_point.map, "prontera.gat", 16);
- char_dat[0].last_point.x = 273; // savepoint coordonates
- char_dat[0].last_point.y = 354;
- } else if ((i = search_mapserver("geffen.gat")) >= 0) { // check is done without 'gat'.
- memcpy(char_dat[0].last_point.map, "geffen.gat", 16);
- char_dat[0].last_point.x = 120; // savepoint coordonates
- char_dat[0].last_point.y = 100;
- } else if ((i = search_mapserver("morocc.gat")) >= 0) { // check is done without 'gat'.
- memcpy(char_dat[0].last_point.map, "morocc.gat", 16);
- char_dat[0].last_point.x = 160; // savepoint coordonates
- char_dat[0].last_point.y = 94;
- } else if ((i = search_mapserver("alberta.gat")) >= 0) { // check is done without 'gat'.
- memcpy(char_dat[0].last_point.map, "alberta.gat", 16);
- char_dat[0].last_point.x = 116; // savepoint coordonates
- char_dat[0].last_point.y = 57;
- } else if ((i = search_mapserver("payon.gat")) >= 0) { // check is done without 'gat'.
- memcpy(char_dat[0].last_point.map, "payon.gat", 16);
- char_dat[0].last_point.x = 87; // savepoint coordonates
- char_dat[0].last_point.y = 117;
- } else if ((i = search_mapserver("izlude.gat")) >= 0) { // check is done without 'gat'.
- memcpy(char_dat[0].last_point.map, "izlude.gat", 16);
- char_dat[0].last_point.x = 94; // savepoint coordonates
- char_dat[0].last_point.y = 103;
- } else {
- int j;
- // get first online server
+ case 0x67: // make new
+// printf("0x67>request make new char\n");
+ if (RFIFOREST(fd) < 37)
+ return 0;
+ 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(i, char_dat, 0);
i = 0;
- for(j = 0; j < MAX_MAP_SERVERS && i < servers_connected; j++)
- if (server_fd[j] >= 0 && server[j].map[0][0]) {
- i = j;
- printf("Map-server #%d found with a map: '%s'.\n", j, server[j].map[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, 24);
+
+ WFIFOB(fd,2+98) = char_dat[i].str;
+ WFIFOB(fd,2+99) = char_dat[i].agi;
+ WFIFOB(fd,2+100) = char_dat[i].vit;
+ WFIFOB(fd,2+101) = char_dat[i].int_;
+ WFIFOB(fd,2+102) = char_dat[i].dex;
+ WFIFOB(fd,2+103) = 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;
}
- // if no map-servers are connected, we send: server closed
- if (j == MAX_MAP_SERVERS) {
- WFIFOW(fd,0) = 0x81;
- WFIFOL(fd,2) = 1; // 01 = Server closed
- WFIFOSET(fd,3);
- RFIFOSKIP(fd,3);
- return 0;
}
- }
- }
-
- WFIFOW(fd, 0) =0x71;
- WFIFOL(fd, 2) =char_dat[0].char_id;
- memcpy(WFIFOP(fd, 6), char_dat[0].last_point.map, 16);
-
- //Lan check added by Kashy
- if (lan_ip_check(ip))
- 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;
-
- #ifdef DEBUG
- printf("auth_fifo set (auth_fifo_pos:%d) - account_id:%d char_id:%d login_id1:%d\n", auth_fifo_pos, sd->account_id, char_dat[0].char_id, sd->login_id1);
- #endif
-
- 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 = sd->found_char[ch];
- 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;
- auth_fifo_pos++;
+ case 0x68: // delete
+ if (RFIFOREST(fd) < 46)
+ return 0;
+ printf("\033[1;31m Request Char Del:\033[0m \033[1;32m%d\033[0m(\033[1;32m%d\033[0m)\n", sd->account_id, RFIFOL(fd, 2));
+ memcpy(email, RFIFOP(fd,6), 40);
+ sprintf(tmp_sql, "SELECT `email` FROM `%s` WHERE `%s`='%d'",login_db, login_db_account_id, sd->account_id);
+ if (mysql_query(&lmysql_handle, tmp_sql)) {
+ printf("\033[1;31m DB server Error Delete Char data - %s \033[0m \n", mysql_error(&lmysql_handle));
+ }
+ sql_res = mysql_store_result(&lmysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+
+ if ( (strcmp(email,sql_row[0]) == 0) || // client_value == db_value?
+ ((strcmp(email,"") == 0) &&
+ (strcmp(sql_row[0],"a@a.com") == 0)) ) { // client_value == "" && db_value == "a@a.com" ?
+ mysql_free_result(sql_res);
+ } else {
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 46);
+ mysql_free_result(sql_res);
+ break;
+ }
+ } else {
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 46);
+ mysql_free_result(sql_res);
+ break;
+ }
+ sprintf(tmp_sql, "SELECT `name`,`partner_id` FROM `%s` WHERE `char_id`='%d'",char_db, RFIFOL(fd,2));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res)
+ sql_row = mysql_fetch_row(sql_res);
+
+ if (sql_res && sql_row[0]) {
+ //delete char from SQL
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",pet_db, RFIFOL(fd, 2));
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",inventory_db, RFIFOL(fd, 2));
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
-// printf("0x66> end\n");
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",cart_db, RFIFOL(fd, 2));
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- RFIFOSKIP(fd, 3);
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",memo_db, RFIFOL(fd, 2));
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- return 0;
-}
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",skill_db, RFIFOL(fd, 2));
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
-int make_new_char(int fd, int len) {
- if (len < 37)
- return -1;
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",char_db, RFIFOL(fd, 2));
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- int i, ch;
- struct char_session_data *sd = session[fd]->session_data;
+ //Divorce [Wizputer]
+ if (sql_row[1] != 0) {
+ unsigned char buf[64];
+ sprintf(tmp_sql,"UPDATE `%s` SET `partner_id`='0' WHERE `char_id`='%d'",char_db,atoi(sql_row[1]));
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE (`nameid`='%d' OR `nameid`='%d') AND `char_id`='%d'",inventory_db,WEDDING_RING_M,WEDDING_RING_F,atoi(sql_row[1]));
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ WBUFW(buf,0) = 0x2b12;
+ WBUFL(buf,2) = atoi(sql_row[0]);
+ WBUFL(buf,6) = atoi(sql_row[1]);
+ mapif_sendall(buf,10);
+ }
+ // Also delete info from guildtables.
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",guild_member_db, RFIFOL(fd,2));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- #ifdef DEBUG
- printf("Request to make a new char\n");
- #endif
+ sprintf(tmp_sql, "SELECT `guild_id` FROM `%s` WHERE `master` = '%s'", guild_db, sql_row[0]);
- i = make_new_char_sql(fd, RFIFOP(fd, 2));
+ if (mysql_query(&mysql_handle, tmp_sql) == 0) {
+ sql_res = mysql_store_result(&mysql_handle);
- if (i < 0) {
- WFIFOW(fd, 0) = 0x6e;
- WFIFOB(fd, 2) = 0x00;
- WFIFOSET(fd, 3);
- RFIFOSKIP(fd, 37);
- return 0;
- }
+ if (sql_res != NULL) {
+ if (mysql_num_rows(sql_res) != 0) {
+ sql_row = mysql_fetch_row(sql_res);
- WFIFOW(fd, 0) = 0x6d;
- memset(WFIFOP(fd, 2), 0x00, 106);
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_db, atoi(sql_row[0]));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- mmo_char_fromsql(i, char_dat, 0);
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_member_db, atoi(sql_row[0]));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- i = 0;
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_castle_db, atoi(sql_row[0]));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- 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, 24);
- WFIFOB(fd,2+98) = char_dat[i].str;
- WFIFOB(fd,2+99) = char_dat[i].agi;
- WFIFOB(fd,2+100) = char_dat[i].vit;
- WFIFOB(fd,2+101) = char_dat[i].int_;
- WFIFOB(fd,2+102) = char_dat[i].dex;
- WFIFOB(fd,2+103) = 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;
- }
- }
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_storage_db, atoi(sql_row[0]));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- return 0;
-}
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d' OR `alliance_id` = '%d'", guild_alliance_db, atoi(sql_row[0]), atoi(sql_row[0]));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
-int delete_char(int fd, int len) {
- if (len < 46)
- return -1;
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_position_db, atoi(sql_row[0]));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- char email[40];
- int char_id = RFIFOL(fd, 2);
- struct char_session_data *sd = session[fd]->session_data;
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_skill_db, atoi(sql_row[0]));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- #ifdef DEBUG
- printf("\033[1;31m Request Char Del:\033[0m \033[1;32m%d\033[0m(\033[1;32m%d\033[0m)\n", sd->account_id, char_id);
- #endif
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_expulsion_db, atoi(sql_row[0]));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
- memcpy(email, RFIFOP(fd,6), 40);
- sprintf(tmp_sql, "SELECT `email` FROM `%s` WHERE `%s`='%d'",login_db, login_db_account_id, sd->account_id);
- sql_query(tmp_sql,"delete_char");
+ mysql_free_result(sql_res);
+ }
+ } else {
+ if (mysql_errno(&mysql_handle) != 0) {
+ printf("Database server error: %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ } else {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
- if ((sql_res = mysql_store_result(&mysql_handle)) &&(sql_row = mysql_fetch_row(sql_res))) {
- if (strcmp(email,sql_row[0]) == 0) {
- mysql_free_result(sql_res);
- } else {
- WFIFOW(fd, 0) = 0x70;
- WFIFOB(fd, 2) = 0;
- WFIFOSET(fd, 3);
+ for(i = 0; i < 9; i++) {
+ printf("char comp: %d - %d (%d)\n", sd->found_char[i], RFIFOL(fd, 2), sd->account_id);
+ if (sd->found_char[i] == RFIFOL(fd, 2)) {
+ for(ch = i; ch < 9-1; ch++)
+ sd->found_char[ch] = sd->found_char[ch+1];
+ sd->found_char[8] = -1;
+ break;
+ }
+ }
+ if (i == 9) { // reject
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0;
+ WFIFOSET(fd, 3);
+ } else { // deleted!
+ WFIFOW(fd, 0) = 0x6f;
+ WFIFOSET(fd, 2);
+ }
RFIFOSKIP(fd, 46);
- mysql_free_result(sql_res);
- return 0;
- }
- } else {
- WFIFOW(fd, 0) = 0x70;
- WFIFOB(fd, 2) = 0;
- WFIFOSET(fd, 3);
- RFIFOSKIP(fd, 46);
- mysql_free_result(sql_res);
- return 0;
- }
-
- sprintf(tmp_sql, "SELECT `partner_id` FROM `%s` WHERE `char_id`='%d'",char_db, char_id);
- sql_query(tmp_sql,"delete_char");
-
- if ((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
- sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",char_db, char_id);
- sql_query(tmp_sql,"delete_char");
-
- if (sql_row[0] != 0) {
- char buf[16];
- WBUFW(buf,0) = 0x2b12;
- WBUFL(buf,2) = char_id;
- WBUFL(buf,6) = atoi(sql_row[1]);
- mapif_sendall(buf,10);
- }
- }
-
- mysql_free_result(sql_res);
-
- WFIFOW(fd, 0) = 0x6f;
- WFIFOSET(fd, 2);
-
- RFIFOSKIP(fd, 46);
-
- return 0;
-}
-
-int mapserver_login(int fd, int len) {
- if (len < 60)
- return -1;
-
- int i;
-
- WFIFOW(fd, 0) = 0x2af9;
-
- for(i = 0; i < MAX_MAP_SERVERS; i++) {
- if (server_fd[i] < 0)
break;
- }
-
- if (i == MAX_MAP_SERVERS || strcmp(RFIFOP(fd,2), userid) || strcmp(RFIFOP(fd,26), passwd)) {
- WFIFOB(fd,2) = 3;
- WFIFOSET(fd, 3);
- } else {
- WFIFOB(fd,2) = 0;
- WFIFOSET(fd, 3);
- session[fd]->func_parse = parse_frommap;
- server_fd[i] = fd;
- if(anti_freeze_enable)
- server_freezeflag[i] = 5; // Map anti-freeze system. Counter. 5 ok, 4...0 freezed
- 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);
- }
-
- RFIFOSKIP(fd,60);
-
- return 0;
-}
-
-int skip_packet(int fd, int len, int real_len) {
- if (len < real_len)
- return 0;
-
- RFIFOSKIP(fd,real_len);
-
- return 0;
-}
-int get_info(int fd, int len) {
- // 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;
-}
-
-int parse_char(int fd) {
- int len,res=0;
- unsigned short cmd;
- unsigned char *ip = (unsigned char *) &session[fd]->client_addr.sin_addr;
- struct char_session_data *sd = session[fd]->session_data;
-
- if(login_fd < 0)
- session[fd]->eof = 1;
-
- if(session[fd]->eof) {
- if (fd == login_fd)
- login_fd = -1;
- close(fd);
- delete_session(fd);
- return 0;
- }
-
- len = RFIFOREST(fd);
-
- while(len >= 2 && res == 0) {
-
- 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);
- printf("parse_char : %d crc32 skipped\n",fd);
- if(RFIFOREST(fd)==0)
+ case 0x2af8: // login as map-server
+ if (RFIFOREST(fd) < 60)
return 0;
- }
-
-// if(cmd<30000 && cmd!=0x187)
-// printf("parse_char : %d %d %d\n",fd,RFIFOREST(fd),cmd);
-
- // •s³ƒpƒPƒbƒg‚̈—
-// if (sd == NULL && cmd != 0x65 && cmd != 0x20b && cmd != 0x187 &&
-// cmd != 0x2af8 && cmd != 0x7530 && cmd != 0x7532)
-// cmd = 0xffff; // ƒpƒPƒbƒgƒ_ƒ“ƒv‚ð•\Ž¦‚³‚¹‚é
+ 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;
- switch(cmd){
- //20040622 encryption ragexe correspondence
- case 0x20b: res = skip_packet(fd,len,19); break;
+ case 0x187: // Alive?
+ if (RFIFOREST(fd) < 6) {
+ return 0;
+ }
+ RFIFOSKIP(fd, 6);
+ break;
- case 0x65: res = client_request_connect(fd,len); break;
- case 0x66: res = char_select(fd,len,ip); break;
- case 0x67: res = make_new_char(fd,len); break;
- case 0x68: res = delete_char(fd,len); break;
- case 0x2af8: res = mapserver_login(fd,len); break;
- case 0x187: res = skip_packet(fd,len,6); break;
- case 0x7530: res = get_info(fd,len); 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;
}
-
- len = RFIFOREST(fd);
}
RFIFOFLUSH(fd);
@@ -2586,8 +2935,8 @@ int parse_char(int fd) {
int parse_console(char *buf) {
char *type,*command;
- type = (char *)malloc(64);
- command = (char *)malloc(64);
+ type = (char *)aMalloc(64);
+ command = (char *)aMalloc(64);
memset(type,0,64);
memset(command,0,64);
@@ -2599,9 +2948,9 @@ int parse_console(char *buf) {
printf("Type of command: %s || Command: %s \n",type,command);
- if(buf) free(buf);
- if(type) free(type);
- if(command) free(command);
+ if(buf) aFree(buf);
+ if(type) aFree(type);
+ if(command) aFree(command);
return 0;
}
@@ -2612,7 +2961,7 @@ int mapif_sendall(unsigned char *buf, unsigned int len) {
int fd;
c = 0;
- for(i = 0; i < MAX_MAP_SERVERS && i < servers_connected; i++) {
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
if ((fd = server_fd[i]) >= 0) {
memcpy(WFIFOP(fd,0), buf, len);
WFIFOSET(fd,len);
@@ -2628,7 +2977,7 @@ int mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) {
int fd;
c = 0;
- for(i=0, c=0;i<MAX_MAP_SERVERS && i < servers_connected;i++){
+ for(i=0, c=0;i<MAX_MAP_SERVERS;i++){
if ((fd = server_fd[i]) >= 0 && fd != sfd) {
memcpy(WFIFOP(fd,0), buf, len);
WFIFOSET(fd, len);
@@ -2643,7 +2992,7 @@ int mapif_send(int fd, unsigned char *buf, unsigned int len) {
int i;
if (fd >= 0) {
- for(i = 0; i < MAX_MAP_SERVERS && i < servers_connected; i++) {
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
if (fd == server_fd[i]) {
memcpy(WFIFOP(fd,0), buf, len);
WFIFOSET(fd,len);
@@ -2654,6 +3003,24 @@ int mapif_send(int fd, unsigned char *buf, unsigned int len) {
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;
+}
+
int check_connect_login_server(int tid, unsigned int tick, int id, int data) {
if (login_fd <= 0 || session[login_fd] == NULL) {
printf("Attempt to connect to login-server...\n");
@@ -2737,33 +3104,48 @@ int char_lan_config_read(const char *lancfgName){
return 0;
}
+static int char_db_final(void *key,void *data,va_list ap)
+{
+ struct mmo_charstatus *p = (struct mmo_charstatus *) data;
+ if (p) aFree(p);
+ return 0;
+}
void do_final(void) {
- printf("Closing char-server...\n");
-
+ printf("Doing final stage...\n");
+ //mmo_char_sync();
+ //inter_save();
do_final_itemdb();
-
//check SQL save progress.
//wait until save char complete
- printf("Waiting until char saving complete...\n");
- do {
- sleep (0);
- }while (save_flag != 0);
- sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `online`='1'", char_db);
- sql_query(tmp_sql,"do_final");
+ set_all_offline();
+
+ flush_fifos();
sprintf(tmp_sql,"DELETE FROM `ragsrvinfo");
- sql_query(tmp_sql,"do_final");
+ if (mysql_query(&mysql_handle, tmp_sql))
+ printf("DB server Error (insert `char`)- %s\n", mysql_error(&mysql_handle));
+
+ if(gm_account) {
+ aFree(gm_account);
+ gm_account = 0;
+ }
- if(gm_account) free(gm_account);
+ if(char_dat) {
+ aFree(char_dat);
+ char_dat = 0;
+ }
- if(char_dat) free(char_dat);
delete_session(login_fd);
delete_session(char_fd);
+ numdb_final(char_db_, char_db_final);
+ exit_dbn();
mysql_close(&mysql_handle);
+ mysql_close(&lmysql_handle);
+ timer_final();
- printf("Good-bye...\n");
+ printf("ok! all done...\n");
}
void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
@@ -2828,11 +3210,7 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
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]
- if (strcmpi(w2, "yes")) {
- db_use_sqldbs = 1;
- } else if (strcmpi(w2, "no")) {
- db_use_sqldbs = 0;
- }
+ db_use_sqldbs = config_switch(w2);
printf("Using SQL dbs: %s\n",w2);
//custom columns for login database
}else if(strcmpi(w1,"login_db_level")==0){
@@ -2846,6 +3224,7 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
}else if(strcmpi(w1,"import")==0){
sql_config_read(w2);
}
+
}
fclose(fp);
printf("reading configure done.....\n");
@@ -2869,15 +3248,15 @@ int char_config_read(const char *cfgName) {
if (sscanf(line,"%[^:]: %[^\r\n]", w1, w2) != 2)
continue;
- remove_control_chars(w1);
- remove_control_chars(w2);
+ remove_control_chars((unsigned char *) w1);
+ remove_control_chars((unsigned char *) w2);
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, 16);
- printf("%s server has been intialized\n", w2);
+ printf("%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));
@@ -2901,6 +3280,14 @@ int char_config_read(const char *cfgName) {
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) {
+ printf("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) {
@@ -2911,6 +3298,10 @@ int char_config_read(const char *cfgName) {
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, "autosave_time") == 0) {
@@ -2960,13 +3351,8 @@ int char_config_read(const char *cfgName) {
strcpy(char_name_letters, w2);
} else if (strcmpi(w1, "check_ip_flag") == 0) {
check_ip_flag = config_switch(w2);
- // anti-freeze options [Valaris]
- } else if(strcmpi(w1,"anti_freeze_enable")==0){
- anti_freeze_enable = config_switch(w2);
- } else if (strcmpi(w1, "anti_freeze_interval") == 0) {
- ANTI_FREEZE_INTERVAL = atoi(w2);
- if (ANTI_FREEZE_INTERVAL < 5)
- ANTI_FREEZE_INTERVAL = 5; // minimum 5 seconds
+ } else if (strcmpi(w1, "chars_per_account") == 0) { //maxchars per account [Sirius]
+ char_per_account = atoi(w2);
} else if (strcmpi(w1, "import") == 0) {
char_config_read(w2);
} else if (strcmpi(w1, "console") == 0) {
@@ -2976,9 +3362,6 @@ int char_config_read(const char *cfgName) {
}
fclose(fp);
-//Read ItemDB
- do_init_itemdb();
-
return 0;
}
@@ -3004,6 +3387,7 @@ int flush_timer(int tid, unsigned int tick, int id, int data){
int do_init(int argc, char **argv){
int i;
+ SERVER_TYPE = SERVER_CHAR;
for(i = 0; i < MAX_MAP_SERVERS; i++) {
memset(&server[i], 0, sizeof(struct mmo_map_server));
server_fd[i] = -1;
@@ -3018,6 +3402,9 @@ int do_init(int argc, char **argv){
inter_init((argc > 2) ? argv[2] : inter_cfgName); // inter server ÃʱâÈ­
printf("interserver configuration reading done.....\n");
+ //Read ItemDB
+ do_init_itemdb();
+
printf("start char server initializing.....\n");
mmo_char_sql_init();
printf("char server initializing done.....\n");
@@ -3028,16 +3415,13 @@ int do_init(int argc, char **argv){
printf("set terminate function -> do_final().....\n");
set_termfunc(do_final);
- printf("open port %d.....\n",char_port);
- char_fd = make_listen_port(char_port);
-
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]);;
+ sprintf(buf, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);
if (naddr_ != 1)
printf("Multiple interfaces detected.. using %s as our IP address\n", buf);
else
@@ -3048,21 +3432,31 @@ int do_init(int argc, char **argv){
strcpy(char_ip_str, buf);
if (ptr[0] == 192 && ptr[1] == 168)
- printf("Firewall detected.. edit lan_support.conf and char_athena.conf");
+ printf("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);
+ printf("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);
+
// send ALIVE PING to login server.
printf("add interval tic (check_connect_login_server)....\n");
i = add_timer_interval(gettick() + 10, check_connect_login_server, 0, 0, 10 * 1000);
+ // send USER COUNT PING to login server.
+ printf("add interval tic (send_users_tologin)....\n");
+ i = add_timer_interval(gettick() + 10, send_users_tologin, 0, 0, 5 * 1000);
+
//no need to set sync timer on SQL version.
//printf("add interval tic (mmo_char_sync_timer)....\n");
//i = add_timer_interval(gettick() + 10, mmo_char_sync_timer, 0, 0, autosave_interval);
- add_timer_func_list(map_anti_freeze_system, "map_anti_freeze_system");
//Added for Mugendais I'm Alive mod
if(imalive_on)
add_timer_interval(gettick()+10, imalive_timer,0,0,imalive_time*1000);
@@ -3071,27 +3465,114 @@ int do_init(int argc, char **argv){
if(flush_on)
add_timer_interval(gettick()+10, flush_timer,0,0,flush_time);
- if(anti_freeze_enable > 0) {
- add_timer_func_list(map_anti_freeze_system, "map_anti_freeze_system");
- i = add_timer_interval(gettick() + 1000, map_anti_freeze_system, 0, 0, ANTI_FREEZE_INTERVAL * 1000); // checks every X seconds user specifies
- }
+ read_gm_account();
if ( console ) {
set_defaultconsoleparse(parse_console);
start_console();
}
+ //Cleaning the tables for NULL entrys @ startup [Sirius]
+ //Chardb clean
+ printf("Cleaning the '%s' table...", char_db);
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `account_id` = '0'", char_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ //error on clean
+ printf(" fail.\n");
+ }else{
+ printf(" done.\n");
+ }
+
+ //guilddb clean
+ printf("Cleaning the '%s' table...", 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)){
+ //error on clean
+ printf(" fail.\n");
+ }else{
+ printf(" done.\n");
+ }
+
+ //guildmemberdb clean
+ printf("Cleaning the '%s' table...", 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)){
+ //error on clean
+ printf(" fail.\n");
+ }else{
+ printf(" done.\n");
+ }
+
+
+
printf("char server init func end (now unlimited loop start!)....\n");
printf("The char-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n", char_port);
return 0;
}
-
#undef mysql_query
-int STDCALL mysql_query(MYSQL *mysql, const char *q);
int debug_mysql_query(char *file, int line, void *mysql, const char *q) {
+#ifdef TWILIGHT
printf("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)) {
+ printf ("DB server Error (select `char2`)- %s\n", mysql_error (&mysql_handle));
+ }
+ sql_res = mysql_store_result (&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row (sql_res);
+ tmp_id = atoi (sql_row[0]);
+ mysql_free_result (sql_res);
+ }
+ else
+ printf("CHAR: child Failed!\n");
+ 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)) {
+ printf ("DB server Error (select `char2`)- %s\n", mysql_error (&mysql_handle));
+ }
+ sql_res = mysql_store_result (&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row (sql_res);
+ tmp_id = atoi (sql_row[0]);
+ mysql_free_result (sql_res);
+ }
+ else
+ printf("CHAR: married Failed!\n");
+ 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)) {
+ printf ("DB server Error (select `char2`)- %s\n", mysql_error (&mysql_handle));
+ }
+ sql_res = mysql_store_result (&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row (sql_res);
+ char_id = atoi (sql_row[0]);
+ mysql_free_result (sql_res);
+ }
+ else
+ printf ("CHAR: nick2id Failed!\n");
+ return char_id;
+}
+
diff --git a/src/char_sql/char.h b/src/char_sql/char.h
index 8da399eff..6ade96c36 100644
--- a/src/char_sql/char.h
+++ b/src/char_sql/char.h
@@ -40,12 +40,15 @@ enum {
struct itemtemp{
struct itemtmp equip[MAX_GUILD_STORAGE],notequip[MAX_GUILD_STORAGE];
};
-int memitemdata_to_sql(struct itemtemp mapitem, int eqcount, int noteqcount, int char_id,int tableswitch);
-int memitemdata_to_sql2(struct itemtemp mapitem, int eqcount, int char_id,int tableswitch);
+int memitemdata_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);
+
extern int autosave_interval;
extern char db_path[];
extern char char_db[256];
@@ -68,11 +71,13 @@ extern char guild_storage_db[256];
extern char party_db[256];
extern char pet_db[256];
-int db_use_sqldbs; // added for sql item_db read for char server [Valaris]
+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);
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index a850bc0f5..794f2e01f 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -3,8 +3,12 @@
// SQL conversion by hack
//
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
#include "char.h"
-#include "strlib.h"
+#include "../common/strlib.h"
#include "int_storage.h"
#include "inter.h"
#include "int_guild.h"
@@ -12,17 +16,10 @@
#include "mmo.h"
#include "socket.h"
#include "db.h"
-#include "utils.h"
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "malloc.h"
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_;
static struct guild *guild_pt;
static struct guild *guild_pt2;
@@ -39,6 +36,18 @@ 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(void *key,void *data,va_list ap);
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+static int _erase_guild(void *key, void *data, va_list ap) {
+ int guild = va_arg(ap, int);
+ struct guild_castle * castle = (struct guild_castle *) data;
+ if (castle->guild_id == guild) {
+ aFree(castle);
+ db_erase(castle_db_, key);
+ }
+
+ return 0;
+}
// Save guild into sql
int inter_guild_tosql(struct guild *g,int flag)
@@ -47,67 +56,114 @@ int inter_guild_tosql(struct guild *g,int flag)
// 2 `guild_member` (`guild_id`,`account_id`,`char_id`,`hair`,`hair_color`,`gender`,`class`,`lv`,`exp`,`exp_payper`,`online`,`position`,`rsv1`,`rsv2`,`name`)
// 4 `guild_position` (`guild_id`,`position`,`name`,`mode`,`exp_mode`)
// 8 `guild_alliance` (`guild_id`,`opposition`,`alliance_id`,`name`)
- // 16 `guild_expulsion` (`guild_id`,`name`,`mes`,`acc`,`account_id`,`rsv1`,`rsv2`,`rsv3`)
+ // 16 `guild_expulsion` (`guild_id`,`name`,`mes`,`acc`,`account_id`,`rsv1`,`rsv2`,`rsv3`)
// 32 `guild_skill` (`guild_id`,`id`,`lv`)
-
- char t_name[100],t_master[24],t_mes1[60],t_mes2[120],t_member[24],t_position[24],t_alliance[24]; // temporay storage for str convertion;
+
+ char t_name[100],t_master[24],t_mes1[60],t_mes2[240],t_member[24],t_position[24],t_alliance[24]; // temporay storage for str convertion;
char t_ename[24],t_emes[40];
char emblem_data[4096];
- int first = 1, i=0;
- int guild_member=0,guild_online_member=0;
- struct StringBuf sbuf;
+ int i=0;
+ int guild_exist=0,guild_member=0,guild_online_member=0;
- StringBuf_Init(&sbuf);
-
if (g->guild_id<=0) return -1;
-
- printf("(\033[1;35m%d\033[0m) Request save guild - ",g->guild_id);
-
+
+ printf("(\033[1;35m%d\033[0m) Request save guild -(flag 0x%x) ",g->guild_id, flag);
+
jstrescapecpy(t_name, g->name);
-
- guild_member = 0;
- i = 0;
- while (i<g->max_member) {
- if (g->member[i].account_id>0) guild_member++;
- i++;
+
+ //printf("- Check if guild %d exists\n",g->guild_id);
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `guild_id`='%d'",guild_db,g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error (delete `guild`)- %s\n", mysql_error(&mysql_handle) );
+ }
+ 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
+
+ if (guild_exist >0){
+ // Check members in party
+ sprintf(tmp_sql,"SELECT count(*) FROM `%s` WHERE `guild_id`='%d'",guild_member_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
+ return -1;
}
-
+ 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_member = atoi (sql_row[0]);
+ // printf("- Check members in guild %d : %d \n",g->guild_id,guild_member);
+
+ }
+ mysql_free_result(sql_res) ; //resource free
+
// Delete old guild from sql
if (flag&1||guild_member==0){
- StringBuf_Printf(&sbuf, "DELETE FROM `%s` WHERE `guild_id`='%d';\n",guild_db, g->guild_id);
+ // printf("- Delete guild %d from guild\n",g->guild_id);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error (delete `guild`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
if (flag&2||guild_member==0){
// printf("- Delete guild %d from guild_member\n",g->guild_id);
- StringBuf_Printf(&sbuf, "DELETE FROM `%s` WHERE `guild_id`='%d';\n",guild_member_db, g->guild_id);
- StringBuf_Printf(&sbuf, "UPDATE `%s` SET `guild_id`='0' WHERE `guild_id`='%d';\n",char_db, g->guild_id);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_member_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error (delete `guild_member`)- %s\n", mysql_error(&mysql_handle) );
+ }
+ 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) ) {
+ printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
if (flag&32||guild_member==0){
// printf("- Delete guild %d from guild_skill\n",g->guild_id);
- StringBuf_Printf(&sbuf, "DELETE FROM `%s` WHERE `guild_id`='%d';\n",guild_skill_db, g->guild_id);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_skill_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error (delete `guild_skill`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
if (flag&4||guild_member==0){
// printf("- Delete guild %d from guild_position\n",g->guild_id);
- StringBuf_Printf(&sbuf, "DELETE FROM `%s` WHERE `guild_id`='%d';\n",guild_position_db, g->guild_id);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_position_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error (delete `guild_position`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
if (flag&16||guild_member==0){
// printf("- Delete guild %d from guild_expulsion\n",g->guild_id);
- StringBuf_Printf(&sbuf, "DELETE FROM `%s` WHERE `guild_id`='%d';\n",guild_expulsion_db, g->guild_id);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_expulsion_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error (delete `guild_expulsion`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
if (flag&8||guild_member==0){
// printf("- Delete guild %d from guild_alliance\n",g->guild_id);
- StringBuf_Printf(&sbuf, "DELETE FROM `%s` WHERE `guild_id`='%d' OR `alliance_id`='%d';\n",guild_alliance_db, g->guild_id,g->guild_id);
+ 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) ) {
+ printf("DB server Error (delete `guild_alliance`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
if (flag&2||guild_member==0){
// printf("- Delete guild %d from char\n",g->guild_id);
- StringBuf_Printf(&sbuf, "UPDATE `%s` SET `guild_id`='0' WHERE `guild_id`='%d';\n",char_db, g->guild_id);
+ 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) ) {
+ printf("DB server Error (delete `guild_alliance`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
if (guild_member==0){
// printf("- Delete guild %d from guild_castle\n",g->guild_id);
- StringBuf_Printf(&sbuf, "DELETE FROM `%s` WHERE `guild_id`='%d';\n",guild_castle_db, g->guild_id);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_castle_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error (delete `guild_castle`)- %s\n", mysql_error(&mysql_handle) );
+ }
+ db_foreach(castle_db_, _erase_guild, g->guild_id);
}
-#if 0
}
-#endif
guild_online_member = 0;
i=0;
@@ -115,13 +171,11 @@ int inter_guild_tosql(struct guild *g,int flag)
if (g->member[i].account_id>0) guild_online_member++;
i++;
}
-
+
// No member in guild , no need to create it in sql
if (guild_member <= 0 && guild_online_member <=0) {
inter_guild_storage_delete(g->guild_id);
printf("No member in guild %d , break it! \n",g->guild_id);
- if(mysql_query(&mysql_handle, StringBuf_Value(&sbuf)) )
- printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
return -2;
}
@@ -132,134 +186,131 @@ int inter_guild_tosql(struct guild *g,int flag)
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);
- StringBuf_Printf(&sbuf, "INSERT INTO `%s` "
+ sprintf(tmp_sql,"INSERT INTO `%s` "
"(`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`) "
- "VALUES ('%d', '%s', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%s', '%d', '%d', '%s');",
+ "VALUES ('%d', '%s', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%s', '%d', '%d', '%s')",
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,g->castle_id,
jstrescapecpy(t_mes1,g->mes1),jstrescapecpy(t_mes2,g->mes2),g->emblem_len,g->emblem_id,emblem_data);
//printf(" %s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ printf("DB server Error (insert `guild`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
if (flag&2||guild_member==0){
- struct StringBuf sbuf2;
- StringBuf_Init(&sbuf2);
-
- first = 1;
-
- StringBuf_Printf(&sbuf,"REPLACE `%s` (`guild_id`,`account_id`,`char_id`,`hair`,`hair_color`,`gender`,`class`,`lv`,`exp`,`exp_payper`,`online`,`position`,`rsv1`,`rsv2`,`name`) VALUES \n", guild_member_db);
-
- StringBuf_Printf(&sbuf2, "UPDATE `%s` SET `guild_id`='%d' WHERE `char_id` IN (",char_db, g->guild_id);
-
- //printf("- Insert guild %d to guild_member\n",g->guild_id);
- for(i=0;i<g->max_member;i++){
- if (g->member[i].account_id>0){
- struct guild_member *m = &g->member[i];
- if (first == 0) {
- StringBuf_Printf(&sbuf , ", ");
- StringBuf_Printf(&sbuf2, ", ");
- } else
- first = 0;
- StringBuf_Printf(&sbuf, "('%d','%d','%d','%d','%d', '%d','%d','%d','%d','%d','%d','%d','%d','%d','%s')\n",
- 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,
- 0,0,
- jstrescapecpy(t_member,m->name));
-
- StringBuf_Printf(&sbuf2, "'%d'", m->char_id);
- }
- }
- StringBuf_Printf(&sbuf, ";\n");
- StringBuf_Printf(&sbuf2,");\n");
- StringBuf_Append(&sbuf, &sbuf2);
- StringBuf_Destroy(&sbuf2);
+ struct StringBuf sbuf;
+ struct StringBuf sbuf2;
+ int first = 1;
+ StringBuf_Init(&sbuf2);
+ StringBuf_Init(&sbuf);
+
+ StringBuf_Printf(&sbuf,"REPLACE `%s` (`guild_id`,`account_id`,`char_id`,`hair`,`hair_color`,`gender`,`class`,`lv`,`exp`,`exp_payper`,`online`,`position`,`rsv1`,`rsv2`,`name`) VALUES \n", guild_member_db);
+
+ StringBuf_Printf(&sbuf2, "UPDATE `%s` SET `guild_id`='%d' WHERE `char_id` IN (",char_db, g->guild_id);
+
+ //printf("- Insert guild %d to guild_member\n",g->guild_id);
+ for(i=0;i<g->max_member;i++){
+ if (g->member[i].account_id>0){
+ struct guild_member *m = &g->member[i];
+ if (first == 0) {
+ StringBuf_Printf(&sbuf , ", ");
+ StringBuf_Printf(&sbuf2, ", ");
+ } else
+ first = 0;
+ StringBuf_Printf(&sbuf, "('%d','%d','%d','%d','%d', '%d','%d','%d','%d','%d','%d','%d','%d','%d','%s')\n",
+ 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,
+ 0,0,
+ jstrescapecpy(t_member,m->name));
+
+ StringBuf_Printf(&sbuf2, "'%d'", m->char_id);
+ }
+ }
+ StringBuf_Printf(&sbuf2,")");
+
+ if(mysql_query(&mysql_handle, StringBuf_Value(&sbuf)))
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
+
+ if(mysql_query(&mysql_handle, StringBuf_Value(&sbuf2)))
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
+
+ StringBuf_Destroy(&sbuf2);
+ StringBuf_Destroy(&sbuf);
}
-
+
if (flag&4||guild_member==0){
- first = 1;
//printf("- Insert guild %d to guild_position\n",g->guild_id);
- StringBuf_Printf(&sbuf ,"INSERT INTO `%s` (`guild_id`,`position`,`name`,`mode`,`exp_mode`) VALUES ", guild_position_db);
for(i=0;i<MAX_GUILDPOSITION;i++){
- if (first == 0)
- StringBuf_Printf(&sbuf , ", ");
- else
- first = 0;
struct guild_position *p = &g->position[i];
- StringBuf_Printf(&sbuf , "('%d','%d', '%s','%d','%d')",
- g->guild_id, i, jstrescapecpy(t_position,p->name),p->mode,p->exp_mode);
+ sprintf(tmp_sql,"INSERT 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) ) {
+ printf("DB server Error (insert `guild_position`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
- StringBuf_Printf(&sbuf ,";\n");
}
if (flag&8||guild_member==0){
- first = 1;
- StringBuf_Printf(&sbuf , "INSERT INTO `%s` (`guild_id`,`opposition`,`alliance_id`,`name`) VALUES ", guild_alliance_db);
//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){
- if (first == 0)
- StringBuf_Printf(&sbuf , ", ");
- else
- first = 0;
- StringBuf_Printf(&sbuf , "('%d','%d','%d','%s')",
- g->guild_id,a->opposition,a->guild_id,jstrescapecpy(t_alliance,a->name));
-
- StringBuf_Printf(&sbuf , ", ('%d','%d','%d','%s')",
- a->guild_id,a->opposition,g->guild_id,t_name);
+ sprintf(tmp_sql,"INSERT 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) ) {
+ printf("DB server Error (insert `guild_alliance`)- %s\n", mysql_error(&mysql_handle) );
+ }
+ sprintf(tmp_sql,"INSERT 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) ) {
+ printf("DB server Error (insert `guild_alliance`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
}
- StringBuf_Printf(&sbuf ,";\n");
}
if (flag&16||guild_member==0){
- first = 1;
//printf("- Insert guild %d to guild_expulsion\n",g->guild_id);
- StringBuf_Printf(&sbuf, "INSERT INTO `%s` (`guild_id`,`name`,`mes`,`acc`,`account_id`,`rsv1`,`rsv2`,`rsv3`) VALUES ",
- guild_expulsion_db);
for(i=0;i<MAX_GUILDEXPLUSION;i++){
struct guild_explusion *e=&g->explusion[i];
if(e->account_id>0){
- if (first == 0)
- StringBuf_Printf(&sbuf , ", ");
- else
- first = 0;
- StringBuf_Printf(&sbuf, "('%d','%s','%s','%s','%d','%d','%d','%d')",
- g->guild_id, jstrescapecpy(t_ename,e->name),jstrescapecpy(t_emes,e->mes),e->acc,e->account_id,e->rsv1,e->rsv2,e->rsv3 );
+ sprintf(tmp_sql,"INSERT 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) ) {
+ printf("DB server Error (insert `guild_expulsion`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
}
- StringBuf_Printf(&sbuf ,";\n");
}
if (flag&32||guild_member==0){
- first = 1;
//printf("- Insert guild %d to guild_skill\n",g->guild_id);
- StringBuf_Printf(&sbuf,"INSERT INTO `%s` (`guild_id`,`id`,`lv`) VALUES ", guild_skill_db);
for(i=0;i<MAX_GUILDSKILL;i++){
if (g->skill[i].id>0){
- if (first == 0)
- StringBuf_Printf(&sbuf , ", ");
- else
- first = 0;
- StringBuf_Printf(&sbuf, "('%d','%d','%d')",
- g->guild_id,g->skill[i].id,g->skill[i].lv);
+ sprintf(tmp_sql,"INSERT 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) ) {
+ printf("DB server Error (insert `guild_skill`)- %s\n", mysql_error(&mysql_handle) );
+ }
}
}
- StringBuf_Printf(&sbuf ,";\n");
}
- if(mysql_query(&mysql_handle, StringBuf_Value(&sbuf)))
- printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
-
- StringBuf_Destroy(&sbuf);
-
printf("Save guild done\n");
return 0;
}
@@ -272,15 +323,15 @@ struct guild * inter_guild_fromsql(int guild_id)
char *pstr;
struct guild *g;
- if (guild_id==0) return 0;
+ if (guild_id<=0) return 0;
- g = numdb_search(guild_db_,guild_id);
+ g = (struct guild*)numdb_search(guild_db_,guild_id);
if (g != NULL)
return g;
-
- g = (struct guild *) malloc(sizeof(struct guild));
+
+ g = (struct guild*)aMalloc(sizeof(struct guild));
memset(g,0,sizeof(struct guild));
-
+
// printf("Retrieve guild information from sql ......\n");
// printf("- Read guild %d from sql \n",guild_id);
@@ -289,25 +340,28 @@ struct guild * inter_guild_fromsql(int guild_id)
//printf(" %s\n",tmp_sql);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (select `guild`)- %s\n", mysql_error(&mysql_handle) );
- free(g);
+ aFree(g);
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);
if (sql_row==NULL) {
mysql_free_result(sql_res);
- free(g);
+ aFree(g);
return 0;
}
-
+
g->guild_id=atoi(sql_row[0]);
strncpy(g->name,sql_row[1],24);
strncpy(g->master,sql_row[2],24);
g->guild_lv=atoi(sql_row[3]);
g->connect_member=atoi(sql_row[4]);
- g->max_member=atoi(sql_row[5]);
+ if (atoi(sql_row[5]) > MAX_GUILD) // Fix reduction of MAX_GUILD [PoW]
+ g->max_member = MAX_GUILD;
+ else
+ g->max_member = atoi(sql_row[5]);
g->average_lv=atoi(sql_row[6]);
g->exp=atoi(sql_row[7]);
g->next_exp=atoi(sql_row[8]);
@@ -327,7 +381,7 @@ struct guild * inter_guild_fromsql(int guild_id)
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);
@@ -337,7 +391,7 @@ struct guild * inter_guild_fromsql(int guild_id)
//printf(" %s\n",tmp_sql);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (select `guild_member`)- %s\n", mysql_error(&mysql_handle) );
- free(g);
+ aFree(g);
return 0;
}
sql_res = mysql_store_result(&mysql_handle) ;
@@ -350,43 +404,47 @@ struct guild * inter_guild_fromsql(int guild_id)
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->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]);
- m->position=atoi(sql_row[11]);
+ 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],24);
}
}
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) ) {
printf("DB server Error (select `guild_position`)- %s\n", mysql_error(&mysql_handle) );
- free(g);
+ aFree(g);
return 0;
}
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]);
+ int position = atoi(sql_row[1]);
struct guild_position *p = &g->position[position];
- strncpy(p->name,sql_row[2],24);
+ strncpy(p->name,sql_row[2],24);
p->mode=atoi(sql_row[3]);
- p->exp_mode=atoi(sql_row[4]);
+ p->exp_mode=atoi(sql_row[4]);
}
}
- mysql_free_result(sql_res);
+ 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) ) {
printf("DB server Error (select `guild_alliance`)- %s\n", mysql_error(&mysql_handle) );
- free(g);
+ aFree(g);
return 0;
}
sql_res = mysql_store_result(&mysql_handle) ;
@@ -400,12 +458,12 @@ struct guild * inter_guild_fromsql(int guild_id)
}
}
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) ) {
printf("DB server Error (select `guild_expulsion`)- %s\n", mysql_error(&mysql_handle) );
- free(g);
+ aFree(g);
return 0;
}
sql_res = mysql_store_result(&mysql_handle) ;
@@ -421,16 +479,16 @@ struct guild * inter_guild_fromsql(int guild_id)
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) ) {
printf("DB server Error (select `guild_skill`)- %s\n", mysql_error(&mysql_handle) );
- free(g);
+ aFree(g);
return 0;
}
sql_res = mysql_store_result(&mysql_handle) ;
@@ -442,7 +500,7 @@ struct guild * inter_guild_fromsql(int guild_id)
}
}
mysql_free_result(sql_res);
-
+
// printf("Successfully retrieve guild information from sql!\n");
numdb_insert(guild_db_, guild_id,g);
@@ -450,21 +508,40 @@ struct guild * inter_guild_fromsql(int guild_id)
return g;
}
-// Save guild_castle to sql
+#if 1
+static int _set_guild_castle(void *key, void *data, va_list ap) {
+ int castle_id = va_arg(ap, int);
+ int guild_id = va_arg(ap, int);
+ struct guild * g = (struct guild *) data;
+
+ if (g->castle_id == castle_id)
+ g->castle_id = -1;
+ if (g->guild_id == guild_id)
+ g->castle_id = castle_id;
+ return 0;
+}
+#endif
+
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;
- //printf("Save to guild_castle\n");
- sprintf(tmp_sql,"DELETE FROM `%s` WHERE `castle_id`='%d'",guild_castle_db, gc->castle_id);
- //printf(" %s\n",tmp_sql);
- if(mysql_query(&mysql_handle, tmp_sql) ) {
- printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
+ struct guild_castle *gcopy;
+ if(gc == NULL || gc->castle_id < 0 ){ //gc->castle_id can be == 0 (for the 1st castle it's == 0) [Lupus]
return 0;
}
-
- sprintf(tmp_sql,"INSERT INTO `%s` "
+ //printf("[Guild Castle %02i]: Save...\n",gc->castle_id);
+ gcopy = (struct guild_castle *) numdb_search(castle_db_,gc->castle_id);
+ if (gcopy == NULL) {
+ gcopy = (struct guild_castle *) aMalloc(sizeof(struct guild_castle));
+ numdb_insert(castle_db_, gc->castle_id, gcopy);
+ } else {
+ //if the castle data hasn't been changed, then we don't write it into SQL
+ if ((gc->guild_id == gcopy->guild_id ) && ( gc->economy == gcopy->economy ) && ( gc->defense == gcopy->defense ) && ( gc->triggerE == gcopy->triggerE ) && ( gc->triggerD == gcopy->triggerD ) && ( gc->nextTime == gcopy->nextTime ) && ( gc->payTime == gcopy->payTime ) && ( gc->createTime == gcopy->createTime ) && ( gc->visibleC == gcopy->visibleC ) && ( gc->visibleG0 == gcopy->visibleG0 ) && ( gc->visibleG1 == gcopy->visibleG1 ) && ( gc->visibleG2 == gcopy->visibleG2 ) && ( gc->visibleG3 == gcopy->visibleG3 ) && ( gc->visibleG4 == gcopy->visibleG4 ) && ( gc->visibleG5 == gcopy->visibleG5 ) && ( gc->visibleG6 == gcopy->visibleG6 ) && ( gc->visibleG7 == gcopy->visibleG7 ) && ( gc->Ghp0 == gcopy->Ghp0 ) && ( gc->Ghp1 == gcopy->Ghp1 ) && ( gc->Ghp2 == gcopy->Ghp2 ) && ( gc->Ghp3 == gcopy->Ghp3 ) && ( gc->Ghp4 == gcopy->Ghp4 ) && ( gc->Ghp5 == gcopy->Ghp5 ) && ( gc->Ghp6 == gcopy->Ghp6 ) && ( gc->Ghp7 == gcopy->Ghp7 ))
+ return 0;
+ }
+ //printf("[Guild Castle %02i]: Save... ->SQL\n",gc->castle_id);
+ memcpy(gcopy, gc, sizeof(struct guild_castle));
+
+ 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`)"
@@ -472,35 +549,35 @@ int inter_guildcastle_tosql(struct guild_castle *gc)
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->visibleG0, gc->visibleG1, gc->visibleG2, gc->visibleG3, gc->visibleG4, gc->visibleG5,
gc->visibleG6, gc->visibleG7, gc->Ghp0, gc->Ghp1, gc->Ghp2, gc->Ghp3, gc->Ghp4, gc->Ghp5, gc->Ghp6, gc->Ghp7);
- //printf(" %s\n",tmp_sql);
- if(mysql_query(&mysql_handle, tmp_sql) ) {
- printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
- return 0;
- }
- sprintf(tmp_sql,"UPDATE `%s` SET `castle_id`='-1' WHERE `castle_id`='%d'",guild_db, gc->castle_id);
- //printf(" %s\n",tmp_sql);
- if(mysql_query(&mysql_handle, tmp_sql) ) {
- printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
- return 0;
- }
-
- sprintf(tmp_sql,"UPDATE `%s` SET `castle_id`='%d' WHERE `guild_id`='%d'",guild_db, gc->castle_id,gc->guild_id);
//printf(" %s\n",tmp_sql);
+
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
return 0;
}
+
+ db_foreach(guild_db_, _set_guild_castle, gc->castle_id,gc->guild_id);
return 0;
}
+
// Read guild_castle from sql
int inter_guildcastle_fromsql(int castle_id,struct guild_castle *gc)
{
-
+ struct guild_castle *gcopy;
if (gc==NULL) return 0;
//printf("Read from guild_castle\n");
- memset(gc,0,sizeof(struct guild_castle));
+
+ gcopy = (struct guild_castle*)numdb_search(castle_db_, castle_id);
+ if (gcopy == NULL) {
+ gcopy = (struct guild_castle*)aMalloc(sizeof(struct guild_castle));
+ numdb_insert(castle_db_, gc->castle_id, gcopy);
+ } else {
+ memcpy(gc, gcopy, sizeof(struct guild_castle));
+ return 0;
+ }
+
gc->castle_id=castle_id;
if (castle_id==-1) return 0;
sprintf(tmp_sql,"SELECT `castle_id`, `guild_id`, `economy`, `defense`, `triggerE`, `triggerD`, `nextTime`, `payTime`, `createTime`, "
@@ -518,7 +595,7 @@ int inter_guildcastle_fromsql(int castle_id,struct guild_castle *gc)
mysql_free_result(sql_res);
return 0;
}
-
+
gc->guild_id = atoi (sql_row[1]);
gc->economy = atoi (sql_row[2]);
gc->defense = atoi (sql_row[3]);
@@ -544,11 +621,14 @@ int inter_guildcastle_fromsql(int castle_id,struct guild_castle *gc)
gc->Ghp5 = atoi (sql_row[23]);
gc->Ghp6 = atoi (sql_row[24]);
gc->Ghp7 = atoi (sql_row[25]);
-
+
//printf("Read Castle %d of guild %d from sql \n",castle_id,gc->guild_id);
}
mysql_free_result(sql_res) ; //resource free
+
+ memcpy(gcopy, gc, sizeof(struct guild_castle));
+
return 0;
}
@@ -559,7 +639,7 @@ int inter_guild_readdb()
FILE *fp;
char line[1024];
for (i=0;i<100;i++) guild_exp[i]=0;
-
+
fp=fopen("db/exp_guild.txt","r");
if(fp==NULL){
printf("can't read db/exp_guild.txt\n");
@@ -585,17 +665,14 @@ int inter_guild_sql_init()
guild_db_=numdb_init();
castle_db_=numdb_init();
- guild_expcache_db_=numdb_init();
- guild_infoevent_db_=numdb_init();
- guild_castleinfoevent_db_=numdb_init();
-
+
printf("interserver guild memory initialize.... (%d byte)\n",sizeof(struct guild));
- guild_pt = calloc(sizeof(struct guild), 1);
- guild_pt2= calloc(sizeof(struct guild), 1);
- guildcastle_pt=calloc(sizeof(struct guild_castle), 1);
-
+ guild_pt = (struct guild*)aCalloc(sizeof(struct guild), 1);
+ guild_pt2= (struct guild*)aCalloc(sizeof(struct guild), 1);
+ guildcastle_pt = (struct guild_castle*)aCalloc(sizeof(struct guild_castle), 1);
+
inter_guild_readdb(); // Read exp
-
+
sprintf (tmp_sql , "SELECT count(*) FROM `%s`",guild_db);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
@@ -614,18 +691,41 @@ int inter_guild_sql_init()
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
exit(0);
}
-
+
sql_res = mysql_store_result(&mysql_handle) ;
sql_row = mysql_fetch_row(sql_res);
guild_newid = atoi(sql_row[0])+1;
mysql_free_result(sql_res);
}
-
+
printf("set guild_newid: %d.......\n",guild_newid);
return 0;
}
+int guild_db_final (void *k, void *data, va_list ap)
+{
+ struct guild *g = (struct guild *) data;
+ if (g) aFree(g);
+ return 0;
+}
+int castle_db_final (void *k, void *data, va_list ap)
+{
+ struct guild_castle *gc = (struct guild_castle *) data;
+ if (gc) aFree(gc);
+ return 0;
+}
+void inter_guild_sql_final()
+{
+ if (guild_pt) aFree(guild_pt);
+ if (guild_pt2) aFree(guild_pt2);
+ if (guildcastle_pt) aFree(guildcastle_pt);
+
+ numdb_final(guild_db_, guild_db_final);
+ numdb_final(castle_db_, castle_db_final);
+
+ return;
+}
// Get guild by its name
struct guild* search_guildname(char *str)
@@ -655,7 +755,7 @@ int guild_check_empty(struct guild *g)
return 0;
}
}
-
+
// ’N‚à‚¢‚È‚¢‚̂ʼnðŽU
mapif_guild_broken(g->guild_id,0);
inter_guild_storage_delete(g->guild_id);
@@ -707,7 +807,7 @@ int guild_calcinfo(struct guild *g)
nextexp = guild_nextexp(g->guild_lv);
}
}
-
+
// ƒMƒ‹ƒh‚ÌŽŸ‚ÌŒoŒ±’l
g->next_exp = guild_nextexp(g->guild_lv);
@@ -721,13 +821,13 @@ int guild_calcinfo(struct guild *g)
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 ||
@@ -735,7 +835,7 @@ int guild_calcinfo(struct guild *g)
mapif_guild_info(-1,g);
return 1;
}
-
+
return 0;
}
@@ -818,9 +918,9 @@ int mapif_guild_memberinfoshort(struct guild *g,int idx)
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)=g->member[idx].online;
+ WBUFB(buf,14)=(unsigned char)g->member[idx].online;
WBUFW(buf,15)=g->member[idx].lv;
- WBUFW(buf,17)=g->member[idx].class;
+ WBUFW(buf,17)=g->member[idx].class_;
mapif_sendall(buf,19);
return 0;
}
@@ -838,7 +938,7 @@ int mapif_guild_broken(int guild_id,int flag)
}
// ƒMƒ‹ƒh“à”­Œ¾
-int mapif_guild_message(int guild_id,int account_id,char *mes,int len)
+int mapif_guild_message(int guild_id,int account_id,char *mes,int len, int sfd)
{
unsigned char buf[512];
WBUFW(buf,0)=0x3837;
@@ -846,7 +946,7 @@ int mapif_guild_message(int guild_id,int account_id,char *mes,int len)
WBUFL(buf,4)=guild_id;
WBUFL(buf,8)=account_id;
memcpy(WBUFP(buf,12),mes,len);
- mapif_sendall(buf,len+12);
+ mapif_sendallwos(sfd, buf,len+12);
return 0;
}
@@ -966,6 +1066,7 @@ int mapif_guild_castle_datasave(int castle_id,int index,int value) // <Agit
int mapif_guild_castle_alldataload(int fd) {
struct guild_castle* gc = guildcastle_pt;
+ struct guild_castle *gcopy;
int i, len = 4;
WFIFOW(fd,0) = 0x3842;
@@ -1004,6 +1105,14 @@ int mapif_guild_castle_alldataload(int fd) {
gc->Ghp6 = atoi(sql_row[24]);
gc->Ghp7 = atoi(sql_row[25]);
memcpy(WFIFOP(fd,len), gc, sizeof(struct guild_castle));
+
+ gcopy = (struct guild_castle*)numdb_search(castle_db_,gc->castle_id);
+ if (gcopy == NULL) {
+ gcopy = (struct guild_castle *) aMalloc(sizeof(struct guild_castle));
+ numdb_insert(castle_db_, gc->castle_id, gcopy);
+ }
+ memcpy(gcopy, gc, sizeof(struct guild_castle));
+
len += sizeof(struct guild_castle);
}
}
@@ -1024,7 +1133,7 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member
{
struct guild *g;
int i;
-
+
printf("CreateGuild\n");
g=search_guildname(name);
if(g!=NULL&&g->guild_id>0){
@@ -1038,38 +1147,38 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member
memcpy(g->name,name,24);
memcpy(g->master,master->name,24);
memcpy(&g->member[0],master,sizeof(struct guild_member));
-
+
g->position[0].mode=0x11;
- strcpy(g->position[ 0].name,"GuildMaster");
+ 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;
g->castle_id=-1;
for(i=0;i<MAX_GUILDSKILL;i++)
g->skill[i].id=i + GD_SKILLBASE;
-
+
// Save to sql
printf("Create initialize OK!\n");
i=inter_guild_tosql(g,255);
-
+
if (i<0) {
mapif_guild_created(fd,account_id,NULL);
return 0;
}
-
+
// 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
@@ -1089,15 +1198,15 @@ int mapif_parse_GuildAddMember(int fd,int guild_id,struct guild_member *m)
{
struct guild *g = inter_guild_fromsql(guild_id);
int i;
-
+
if(g==NULL||g->guild_id<=0){
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);
@@ -1114,7 +1223,7 @@ int mapif_parse_GuildAddMember(int fd,int guild_id,struct guild_member *m)
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!=NULL&&g->guild_id>0){
int i;
for(i=0;i<g->max_member;i++){
@@ -1122,7 +1231,7 @@ int mapif_parse_GuildLeave(int fd,int guild_id,int account_id,int char_id,int fl
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‚É“ü‚ê‚é
int j;
for(j=0;j<MAX_GUILDEXPLUSION;j++){
@@ -1139,17 +1248,17 @@ int mapif_parse_GuildLeave(int fd,int guild_id,int account_id,int char_id,int fl
memcpy(g->explusion[j].name,g->member[i].name,24);
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
/*
else
- inter_guild_save(); // ‰ðŽU‚µ‚½‚̂ňꉞƒZ[ƒu
+ inter_guild_save(); // ‰ðŽU‚µ‚½‚̂ňê‰cZ[ƒu
return 0;*/
}
}
@@ -1162,31 +1271,33 @@ int mapif_parse_GuildLeave(int fd,int guild_id,int account_id,int char_id,int fl
}
/* 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)
+ int account_id,int char_id,int online,int lv,int class_)
{
// Could speed up by manipulating only guild_member
struct guild * g= inter_guild_fromsql(guild_id);
- int i,alv,c;
+ int i,alv,c, idx;
if(g==NULL||g->guild_id<=0)
return 0;
-
+
g->connect_member=0;
-
+
+ idx = -1;
+
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;
+ g->member[i].class_=class_;
mapif_guild_memberinfoshort(g,i);
+ idx = i;
}
if( g->member[i].account_id>0 ){
alv+=g->member[i].lv;
@@ -1195,11 +1306,19 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd,int guild_id,
if( g->member[i].online )
g->connect_member++;
}
- // •½‹ÏƒŒƒxƒ‹
- g->average_lv=alv/c;
-
- inter_guild_tosql(g,3); // Change guild & guild_member
-
+
+ if (c)
+ // •½‹ÏƒŒƒxƒ‹
+ g->average_lv=alv/c;
+
+ sprintf(tmp_sql, "UPDATE `%s` SET `connect_member`=%d,`average_lv`=%d WHERE `guild_id`='%d'", guild_db, g->connect_member, g->average_lv, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) )
+ printf("DB server Error: %s - %s\n", tmp_sql, mysql_error(&mysql_handle) );
+
+ sprintf(tmp_sql, "UPDATE `%s` SET `online`=%d,`lv`=%d,`class`=%d WHERE `char_id`=%d", guild_member_db, g->member[idx].online, g->member[idx].lv, g->member[idx].class_, g->member[idx].char_id);
+ if(mysql_query(&mysql_handle, tmp_sql) )
+ printf("DB server Error: %s - %s\n", tmp_sql, mysql_error(&mysql_handle) );
+
return 0;
}
@@ -1209,7 +1328,7 @@ int mapif_parse_BreakGuild(int fd,int guild_id)
struct guild *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);
@@ -1241,32 +1360,34 @@ int mapif_parse_BreakGuild(int fd,int guild_id)
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (delete `guild_position`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
//printf("- Delete guild %d from guild_castle\n",guild_id);
sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_castle_db, guild_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (delete `guild_position`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
+ db_foreach(castle_db_, _erase_guild, guild_id);
+
//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) ) {
printf("DB server Error (delete `guild_position`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
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);
-
+
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);
+ 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,
@@ -1307,7 +1428,7 @@ int mapif_parse_GuildMemberInfoChange(int fd,int guild_id,int account_id,int cha
struct guild * g = inter_guild_fromsql(guild_id);
//printf("GuildMemberInfoChange %s \n",(type==GMI_EXP)?"GMI_EXP":"OTHER");
-
+
if(g==NULL){
return 0;
}
@@ -1322,21 +1443,34 @@ int mapif_parse_GuildMemberInfoChange(int fd,int guild_id,int account_id,int cha
}
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;
+ {
+ g->member[i].position=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ inter_guild_tosql(g,3); // Change guild & guild_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);
+
+ sprintf(tmp_sql, "UPDATE `%s` SET `guild_lv`=%d,`connect_member`=%d,`max_member`=%d,`average_lv`=%d,`exp`=%d,`next_exp`=%d,`skill_point`=%d WHERE `guild_id`='%d'", guild_db, g->guild_lv, g->connect_member, g->max_member, g->average_lv, g->exp, g->next_exp, g->skill_point, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) )
+ printf("DB server Error: %s - %s\n", tmp_sql, mysql_error(&mysql_handle) );
+
+ sprintf(tmp_sql, "UPDATE `%s` SET `exp`=%d WHERE `char_id`=%d", guild_member_db, g->member[i].exp, g->member[i].char_id);
+ if(mysql_query(&mysql_handle, tmp_sql) )
+ printf("DB server Error: %s - %s\n", tmp_sql, mysql_error(&mysql_handle) );
+ break;
+ }
default:
- printf("int_guild: GuildMemberInfoChange: Unknown type %d\n",type);
- break;
+ printf("int_guild: GuildMemberInfoChange: Unknown type %d\n",type);
+ break;
}
- mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
- inter_guild_tosql(g,3); // Change guild & guild_member
return 0;
}
@@ -1362,10 +1496,11 @@ int mapif_parse_GuildSkillUp(int fd,int guild_id,int skill_num,int account_id)
struct guild *g = inter_guild_fromsql(guild_id);
int idx = skill_num - GD_SKILLBASE;
+
if(g == NULL || idx < 0 || idx >= MAX_GUILDSKILL)
return 0;
//printf("GuildSkillUp\n");
-
+
if( g->skill_point>0 && g->skill[idx].id>0 &&
g->skill[idx].lv<10 ){
g->skill[idx].lv++;
@@ -1388,10 +1523,10 @@ int mapif_parse_GuildAlliance(int fd,int guild_id1,int guild_id2,
int j,i;
g[0]= inter_guild_fromsql(guild_id1);
g[1]= inter_guild_fromsql(guild_id2);
-
+
if(g[0]==NULL || g[1]==NULL || g[0]->guild_id ==0 || g[1]->guild_id==0)
return 0;
-
+
if(!(flag&0x8)){
for(i=0;i<2-(flag&1);i++){
for(j=0;j<MAX_GUILDALLIANCE;j++)
@@ -1422,7 +1557,7 @@ int mapif_parse_GuildAlliance(int fd,int guild_id1,int guild_id2,
int mapif_parse_GuildNotice(int fd,int guild_id,const char *mes1,const char *mes2)
{
struct guild *g= inter_guild_fromsql(guild_id);
-
+
if(g==NULL||g->guild_id<=0)
return 0;
memcpy(g->mes1,mes1,60);
@@ -1434,7 +1569,7 @@ int mapif_parse_GuildNotice(int fd,int guild_id,const char *mes1,const char *mes
int mapif_parse_GuildEmblem(int fd,int len,int guild_id,int dummy,const char *data)
{
struct guild * g= inter_guild_fromsql(guild_id);
-
+
if(g==NULL||g->guild_id<=0)
return 0;
memcpy(g->emblem_data,data,len);
@@ -1497,7 +1632,7 @@ int mapif_parse_GuildCastleDataSave(int fd,int castle_id,int index,int value)
struct guild *g=inter_guild_fromsql(gid);
if(log_inter)
inter_log("guild %s (id=%d) %s castle id=%d" RETCODE,
- (g)?g->name:"??" ,gid, (value)?"occupy":"abandon", index);
+ (g)?g->name:"??" ,gid, (value)?"occupy":"abandon", castle_id);
}
gc->guild_id = value;
break;
@@ -1548,21 +1683,21 @@ int mapif_parse_GuildCheck(int fd,int guild_id,int account_id,int char_id)
int inter_guild_parse_frommap(int fd)
{
switch(RFIFOW(fd,0)){
- case 0x3030: mapif_parse_CreateGuild(fd,RFIFOL(fd,4),RFIFOP(fd,8),(struct guild_member *)RFIFOP(fd,32)); break;
+ 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 0x3034: mapif_parse_GuildLeave(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOP(fd,15)); 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),RFIFOP(fd,12),RFIFOW(fd,2)-12); 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),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),RFIFOP(fd,18),RFIFOW(fd,2)-18); 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),RFIFOP(fd,6),RFIFOP(fd,66)); break;
- case 0x303F: mapif_parse_GuildEmblem(fd,RFIFOW(fd,2)-12,RFIFOL(fd,4),RFIFOL(fd,8),RFIFOP(fd,12)); 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;
diff --git a/src/char_sql/int_guild.h b/src/char_sql/int_guild.h
index 8f4203d7c..8257cf8f6 100644
--- a/src/char_sql/int_guild.h
+++ b/src/char_sql/int_guild.h
@@ -3,6 +3,7 @@
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);
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index b2528a42d..430385110 100644
--- a/src/char_sql/int_party.c
+++ b/src/char_sql/int_party.c
@@ -3,15 +3,12 @@
// SQL conversion by hack
//
-#include "char.h"
-#include "strlib.h"
-#include "socket.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
-
-#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+#include "char.h"
+#include "../common/strlib.h"
+#include "socket.h"
static struct party *party_pt;
static int party_newid=100;
@@ -20,29 +17,31 @@ 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);
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
// Save party to mysql
int inter_party_tosql(int party_id,struct party *p)
{
// 'party' ('party_id','name','exp','item','leader')
-
+
char t_name[100];
char t_member[24];
int party_member = 0, party_online_member = 0;
int party_exist = 0;
int leader_id = 0;
int i = 0;
-
+
printf("(\033[1;64m%d\033[0m) Request save party - ",party_id);
-
+
jstrescapecpy(t_name, p->name);
-
+
if (p==NULL || party_id==0 || p->party_id ==0 || party_id!=p->party_id) {
printf("- Party pointer or party_id error \n");
return 0;
}
-
- // Check if party exists
- sprintf(tmp_sql,"SELECT count(*) FROM `%s` WHERE `party_id`='%d'",party_db, party_id);
+
+ // Check if party exists
+ sprintf(tmp_sql,"SELECT count(*) FROM `%s` WHERE `party_id`='%d'",party_db, party_id); // TBR
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
return 0;
@@ -57,7 +56,7 @@ int inter_party_tosql(int party_id,struct party *p)
if (party_exist >0){
// Check members in party
- sprintf(tmp_sql,"SELECT count(*) FROM `%s` WHERE `party_id`='%d'",char_db, party_id);
+ sprintf(tmp_sql,"SELECT count(*) FROM `%s` WHERE `party_id`='%d'",char_db, party_id); // TBR
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
return 0;
@@ -65,22 +64,22 @@ int inter_party_tosql(int party_id,struct party *p)
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_member = atoi (sql_row[0]);
// printf("- Check members in party %d : %d \n",party_id,party_member);
}
mysql_free_result(sql_res) ; //resource free
-
+
party_online_member = 0;
i=0;
while (i<MAX_PARTY){
if (p->member[i].account_id>0) party_online_member++;
i++;
}
-
+
//if (party_online_member==0) printf("- No member online \n"); else printf("- Some member %d online \n", party_online_member);
-
+
if (party_member <= 0 && party_online_member == 0) {
// Delete the party, if has no member.
@@ -93,29 +92,29 @@ int inter_party_tosql(int party_id,struct party *p)
return 0;
} else {
// Update party information, if exists
-
+
int i=0;
-
+
for (i=0;i<MAX_PARTY;i++){
if (p->member[i].account_id>0){
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='%d', `online`='%d' WHERE `account_id`='%d' AND `name`='%s'",
- char_db, party_id, p->member[i].online, p->member[i].account_id,jstrescapecpy(t_member,p->member[i].name));
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='%d' WHERE `account_id`='%d' AND `name`='%s'",
+ char_db, party_id, p->member[i].account_id,jstrescapecpy(t_member,p->member[i].name));
//printf("%s",tmp_sql);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
}
}
}
-
-
+
+
sprintf(tmp_sql,"UPDATE `%s` SET `name`='%s', `exp`='%d', `item`='%d', `leader_id`=`leader_id` WHERE `party_id`='%d'",
- party_db, t_name,p->exp,p->item,party_id);
+ party_db, t_name,p->exp,p->item,party_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (inset/update `party`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
// printf("- Update party %d information \n",party_id);
}
} else {
@@ -129,18 +128,18 @@ int inter_party_tosql(int party_id,struct party *p)
printf("DB server Error (inset/update `party`)- %s\n", mysql_error(&mysql_handle) );
return 0;
}
-
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='%d', `online`='1' WHERE `account_id`='%d' AND `name`='%s'",
- char_db, party_id,leader_id, jstrescapecpy(t_member,p->member[i].name));
+
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='%d' WHERE `account_id`='%d' AND `name`='%s'",
+ char_db, party_id,leader_id, jstrescapecpy(t_member,p->member[i].name));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (inset/update `party`)- %s\n", mysql_error(&mysql_handle) );
}
-
- //printf("- Insert new party %d \n",party_id);
+
+ //printf("- Insert new party %d \n",party_id);
}
-
+
printf("Party save success\n");
- return 0;
+ return 0;
}
@@ -149,15 +148,15 @@ int inter_party_fromsql(int party_id,struct party *p)
{
int leader_id=0;
printf("(\033[1;64m%d\033[0m) Request load party - ",party_id);
-
+
memset(p, 0, sizeof(struct party));
-
- sprintf(tmp_sql,"SELECT `party_id`, `name`,`exp`,`item`, `leader_id` FROM `%s` WHERE `party_id`='%d'",party_db, party_id);
+
+ sprintf(tmp_sql,"SELECT `party_id`, `name`,`exp`,`item`, `leader_id` FROM `%s` WHERE `party_id`='%d'",party_db, party_id); // TBR
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (select `party`)- %s\n", mysql_error(&mysql_handle) );
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);
@@ -172,11 +171,11 @@ int inter_party_fromsql(int party_id,struct party *p)
// printf("- Cannot find party %d \n",party_id);
return 0;
}
-
+
mysql_free_result(sql_res);
-
+
// Load members
- sprintf(tmp_sql,"SELECT `account_id`, `name`,`base_level`,`last_map`,`online` FROM `%s` WHERE `party_id`='%d'",char_db, party_id);
+ sprintf(tmp_sql,"SELECT `account_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) ) {
printf("DB server Error (select `party`)- %s\n", mysql_error(&mysql_handle) );
return 0;
@@ -196,25 +195,20 @@ int inter_party_fromsql(int party_id,struct party *p)
// printf("- %d members found in party %d \n",i,party_id);
}
mysql_free_result(sql_res);
-
-
+
+
printf("Party load success\n");
return 0;
-
+
}
int inter_party_sql_init(){
int i;
-
+
//memory alloc
printf("interserver party memory initialize.... (%d byte)\n",sizeof(struct party));
- party_pt = calloc(sizeof(struct party), 1);
-
- sprintf(tmp_sql,"UPDATE `%s` SET `online`='0'", char_db);
- if(mysql_query(&mysql_handle, tmp_sql) ) {
- printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
- }
-
+ party_pt = (struct party*)aCalloc(sizeof(struct party), 1);
+
sprintf (tmp_sql , "SELECT count(*) FROM `%s`",party_db);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
@@ -231,18 +225,22 @@ int inter_party_sql_init(){
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
}
-
+
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);
}
-
+
printf("set party_newid: %d.......\n",party_newid);
-
+
return 0;
}
+void inter_party_sql_final(){
+ if (party_pt) aFree(party_pt);
+ return;
+}
// Search for the party according to its name
@@ -251,8 +249,8 @@ struct party* search_partyname(char *str)
struct party *p=NULL;
int leader_id = 0;
char t_name[24];
-
- sprintf(tmp_sql,"SELECT `party_id`, `name`,`exp`,`item`,`leader_id` FROM `%s` WHERE `name`='%s'",party_db, jstrescapecpy(t_name,str));
+
+ sprintf(tmp_sql,"SELECT `party_id`, `name`,`exp`,`item`,`leader_id` FROM `%s` WHERE `name`='%s'",party_db, jstrescapecpy(t_name,str));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (select `party`)- %s\n", mysql_error(&mysql_handle) );
}
@@ -295,16 +293,32 @@ struct party* search_partyname(char *str)
// EXPŒö•½•ª”z‚Å‚«‚é‚©ƒ`ƒFƒbƒN
int party_check_exp_share(struct party *p)
{
- int i;
- 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;
- }
- }
- return (maxlv==0 || maxlv-minlv<=party_share_level);
+ int i, dudes=0;
+ int pl1=0,pl2=0,pl3=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;
+ dudes++;
+ }
+ }
+ if((dudes/1000 >= 2) && (dudes%1000 == 3) && (!strcmp(p->member[0].map,p->member[1].map)) && (!strcmp(p->member[1].map,p->member[2].map))) {
+ pl1=char_nick2id(p->member[0].name);
+ pl2=char_nick2id(p->member[1].name);
+ pl3=char_nick2id(p->member[2].name);
+ printf("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[0].lv,p->member[0].name,pl2,p->member[1].lv,p->member[1].name,pl3,p->member[2].lv,p->member[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)
@@ -441,7 +455,7 @@ int mapif_party_broken(int party_id,int flag)
return 0;
}
// ƒp[ƒeƒB“à”­Œ¾
-int mapif_party_message(int party_id,int account_id,char *mes,int len)
+int mapif_party_message(int party_id,int account_id,char *mes,int len, int sfd)
{
unsigned char buf[512];
WBUFW(buf,0)=0x3827;
@@ -449,7 +463,7 @@ int mapif_party_message(int party_id,int account_id,char *mes,int len)
WBUFL(buf,4)=party_id;
WBUFL(buf,8)=account_id;
memcpy(WBUFP(buf,12),mes,len);
- mapif_sendall(buf,len+12);
+ mapif_sendallwos(sfd, buf,len+12);
return 0;
}
@@ -458,7 +472,7 @@ int mapif_party_message(int party_id,int account_id,char *mes,int len)
// Create Party
-int mapif_parse_CreateParty(int fd,int account_id,char *name,char *nick,char *map,int lv)
+int mapif_parse_CreateParty(int fd,int account_id,char *name,char *nick,char *map,int lv, int item, int item2)
{
struct party *p;
if( (p=search_partyname(name))!=NULL){
@@ -476,19 +490,24 @@ int mapif_parse_CreateParty(int fd,int account_id,char *name,char *nick,char *ma
p->party_id=party_newid++;
memcpy(p->name,name,24);
p->exp=0;
- p->item=0;
+ p->item=item;
+ //<item1>ƒAƒCƒeƒ€?W•û–@B0‚ÅŒÂl•ÊA1‚Ńp?ƒeƒBŒö—L
+ //<item2>ƒAƒCƒeƒ€•ª”z•û–@B0‚ÅŒÂl•ÊA1‚Ńp?ƒeƒB‚É‹Ï“™•ª”z
+ //difference between "collection" and "distribution" is...? ^^;
+ p->itemc = 0;
+
p->member[0].account_id=account_id;
memcpy(p->member[0].name,nick,24);
memcpy(p->member[0].map,map,16);
p->member[0].leader=1;
p->member[0].online=1;
p->member[0].lv=lv;
-
+
inter_party_tosql(p->party_id,p);
-
+
mapif_party_created(fd,account_id,p);
mapif_party_info(fd,p);
-
+
return 0;
}
// ƒp[ƒeƒBî•ñ—v‹
@@ -500,7 +519,7 @@ int mapif_parse_PartyInfo(int fd,int party_id)
return 0;
}
inter_party_fromsql(party_id, p);
-
+
if(p->party_id >= 0)
mapif_party_info(fd,p);
else
@@ -512,23 +531,23 @@ int mapif_parse_PartyAddMember(int fd,int party_id,int account_id,char *nick,cha
{
struct party *p;
int i;
-
+
p = party_pt;
if(p==NULL){
printf("int_party: out of memory !\n");
return 0;
}
inter_party_fromsql(party_id, p);
-
+
if(p->party_id <= 0){
mapif_party_memberadded(fd,party_id,account_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;
memcpy(p->member[i].name,nick,24);
memcpy(p->member[i].map,map,16);
@@ -544,7 +563,7 @@ int mapif_parse_PartyAddMember(int fd,int party_id,int account_id,char *nick,cha
}
if(flag)
mapif_party_optionchanged(fd,p,0,0);
-
+
inter_party_tosql(party_id, p);
return 0;
}
@@ -558,25 +577,25 @@ int mapif_parse_PartyChangeOption(int fd,int party_id,int account_id,int exp,int
{
struct party *p;
int flag=0;
-
+
p = party_pt;
if(p==NULL){
printf("int_party: out of memory !\n");
return 0;
}
-
+
inter_party_fromsql(party_id, p);
-
+
if(p->party_id <= 0){
return 0;
}
-
+
p->exp=exp;
if( exp>0 && !party_check_exp_share(p) ){
flag|=0x01;
p->exp=0;
}
-
+
p->item=item;
mapif_party_optionchanged(fd,p,account_id,flag);
@@ -592,27 +611,27 @@ int mapif_parse_PartyLeave(int fd,int party_id,int account_id)
printf("int_party: out of memory !\n");
return 0;
}
-
+
inter_party_fromsql(party_id, p);
-
+
if(p->party_id >= 0){
int i,j;
for(i=0;i<MAX_PARTY;i++){
-
+
if(p->member[i].account_id==account_id){
//printf("p->member[i].account_id = %d , account_id = %d \n",p->member[i].account_id,account_id);
mapif_party_leaved(party_id,account_id,p->member[i].name);
-
-
-
+
+
+
// Update char information, does the name need encoding?
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0', `online`='1' WHERE `party_id`='%d' AND `name`='%s'",
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d' AND `name`='%s'",
char_db, party_id, jstrescapecpy(t_member,p->member[i].name));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
}
-// printf("Delete member %s from MySQL \n", p->member[i].name);
-
+// printf("Delete member %s from MySQL \n", p->member[i].name);
+
if (p->member[i].leader==1){
for(j=0;j<MAX_PARTY;j++)
{
@@ -620,12 +639,12 @@ int mapif_parse_PartyLeave(int fd,int party_id,int account_id)
if(p->member[j].account_id>0&&j!=i){
mapif_party_leaved(party_id,p->member[j].account_id,p->member[j].name);
// Update char information, does the name need encoding?
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0', `online`='1' WHERE `party_id`='%d' AND `name`='%s'",
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d' AND `name`='%s'",
char_db, party_id, jstrescapecpy(t_member,p->member[i].name));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
}
-// printf("Delete member %s from MySQL \n", p->member[j].name);
+// printf("Delete member %s from MySQL \n", p->member[j].name);
}
}
// Delete the party, if has no member.
@@ -634,9 +653,9 @@ int mapif_parse_PartyLeave(int fd,int party_id,int account_id)
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
}
// printf("Leader breaks party %d \n",party_id);
- memset(p, 0, sizeof(struct party));
+ memset(p, 0, sizeof(struct party));
}else memset(&p->member[i],0,sizeof(struct party_member));
-
+
break;
}
@@ -648,8 +667,8 @@ int mapif_parse_PartyLeave(int fd,int party_id,int account_id)
inter_party_tosql(party_id,p); // Break the party if no member
*/
}else{
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d' AND `account_id`='%d' AND `online`='1'",
- char_db, party_id, account_id);
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d' AND `account_id`='%d' AND `online`='1'",
+ char_db, party_id, account_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
}
@@ -661,21 +680,21 @@ int mapif_parse_PartyChangeMap(int fd,int party_id,int account_id,char *map,int
{
struct party *p;
int i;
-
+
p = party_pt;
if(p==NULL){
printf("int_party: out of memory !\n");
return 0;
}
inter_party_fromsql(party_id, p);
-
+
if(p->party_id <= 0){
return 0;
}
for(i=0;i<MAX_PARTY;i++){
if(p->member[i].account_id==account_id){
int flag=0;
-
+
memcpy(p->member[i].map,map,16);
p->member[i].online=online;
p->member[i].lv=lv;
@@ -697,27 +716,27 @@ int mapif_parse_PartyChangeMap(int fd,int party_id,int account_id,char *map,int
int mapif_parse_BreakParty(int fd,int party_id)
{
struct party *p;
-
+
p = party_pt;
if(p==NULL){
printf("int_party: out of memory !\n");
return 0;
}
-
+
inter_party_fromsql(party_id, p);
-
+
if(p->party_id <= 0){
return 0;
}
inter_party_tosql(party_id,p);
-
+
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);
+ 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,char *nick)
@@ -733,15 +752,15 @@ int mapif_parse_PartyCheck(int fd,int party_id,int account_id,char *nick)
int inter_party_parse_frommap(int fd)
{
switch(RFIFOW(fd,0)){
- case 0x3020: mapif_parse_CreateParty(fd,RFIFOL(fd,2),RFIFOP(fd,6),RFIFOP(fd,30),RFIFOP(fd,54),RFIFOW(fd,70)); break;
+ case 0x3020: mapif_parse_CreateParty(fd,RFIFOL(fd,2),(char*)RFIFOP(fd,6),(char*)RFIFOP(fd,30),(char*)RFIFOP(fd,54),RFIFOW(fd,70), RFIFOB(fd,72), RFIFOB(fd,73)); break;
case 0x3021: mapif_parse_PartyInfo(fd,RFIFOL(fd,2)); break;
- case 0x3022: mapif_parse_PartyAddMember(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOP(fd,10),RFIFOP(fd,34),RFIFOW(fd,50)); break;
+ case 0x3022: mapif_parse_PartyAddMember(fd,RFIFOL(fd,2),RFIFOL(fd,6),(char*)RFIFOP(fd,10),(char*)RFIFOP(fd,34),RFIFOW(fd,50)); 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)); break;
- case 0x3025: mapif_parse_PartyChangeMap(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOP(fd,10),RFIFOB(fd,26),RFIFOW(fd,27)); break;
+ case 0x3025: mapif_parse_PartyChangeMap(fd,RFIFOL(fd,2),RFIFOL(fd,6),(char*)RFIFOP(fd,10),RFIFOB(fd,26),RFIFOW(fd,27)); break;
case 0x3026: mapif_parse_BreakParty(fd,RFIFOL(fd,2)); break;
- case 0x3027: mapif_parse_PartyMessage(fd,RFIFOL(fd,4),RFIFOL(fd,8),RFIFOP(fd,12),RFIFOW(fd,2)-12); break;
- case 0x3028: mapif_parse_PartyCheck(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOP(fd,10)); 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),(char*)RFIFOP(fd,10)); break;
default:
return 0;
}
diff --git a/src/char_sql/int_party.h b/src/char_sql/int_party.h
index 04f71c881..686d70b04 100644
--- a/src/char_sql/int_party.h
+++ b/src/char_sql/int_party.h
@@ -3,6 +3,7 @@
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);
#endif
diff --git a/src/char_sql/int_pet.c b/src/char_sql/int_pet.c
index 7f2ed2a7c..ea1fed67d 100644
--- a/src/char_sql/int_pet.c
+++ b/src/char_sql/int_pet.c
@@ -2,13 +2,13 @@
// original code from athena
// SQL conversion by Jioh L. Jung
//
-#include "char.h"
-#include "strlib.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "char.h"
+#include "../common/strlib.h"
+
struct s_pet *pet_pt;
static int pet_newid = 100;
@@ -18,11 +18,11 @@ static int pet_newid = 100;
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[100];
-
+
printf("request save pet: %d.......\n",pet_id);
-
+
jstrescapecpy(t_name, p->name);
-
+
if(p->hungry < 0)
p->hungry = 0;
else if(p->hungry > 100)
@@ -36,32 +36,32 @@ int inter_pet_tosql(int pet_id, struct s_pet *p) {
printf("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)
+ 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,
+ 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,
+ 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) ) {
printf("DB server Error (inset/update `pet`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
printf("pet save success.......\n");
return 0;
}
int inter_pet_fromsql(int pet_id, struct s_pet *p){
-
+
printf("request load pet: %d.......\n",pet_id);
-
+
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) ) {
printf("DB server Error (select `pet`)- %s\n", mysql_error(&mysql_handle) );
@@ -70,9 +70,9 @@ int inter_pet_fromsql(int pet_id, struct s_pet *p){
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]);
+ p->class_ = atoi(sql_row[1]);
memcpy(p->name, sql_row[2],24);
p->account_id = atoi(sql_row[3]);
p->char_id = atoi(sql_row[4]);
@@ -92,20 +92,20 @@ int inter_pet_fromsql(int pet_id, struct s_pet *p){
p->intimate = 0;
else if(p->intimate > 1000)
p->intimate = 1000;
-
+
mysql_free_result(sql_res);
-
+
printf("pet load success.......\n");
return 0;
}
//----------------------------------------------
-
+
int inter_pet_sql_init(){
int i;
-
+
//memory alloc
printf("interserver pet memory initialize.... (%d byte)\n",sizeof(struct s_pet));
- pet_pt = calloc(sizeof(struct s_pet), 1);
+ 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) ) {
@@ -124,22 +124,26 @@ int inter_pet_sql_init(){
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
}
-
+
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);
}
-
+
printf("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){
printf("request delete pet: %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) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
@@ -215,7 +219,7 @@ int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short
pet_pt->account_id = account_id;
pet_pt->char_id = char_id;
}
- pet_pt->class = pet_class;
+ pet_pt->class_ = pet_class;
pet_pt->level = pet_lv;
pet_pt->egg_id = pet_egg_id;
pet_pt->equip = pet_equip;
@@ -232,19 +236,19 @@ int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short
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;
@@ -267,7 +271,7 @@ int mapif_save_pet(int fd, int account_id, struct s_pet *data) {
if(sizeof(struct s_pet)!=len-8) {
printf("inter pet: data size error %d %d\n", sizeof(struct s_pet), len-8);
}
-
+
else{
if(data->hungry < 0)
data->hungry = 0;
@@ -292,7 +296,7 @@ int mapif_delete_pet(int fd, int pet_id){
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), RFIFOP(fd, 24));
+ RFIFOL(fd, 20), RFIFOB(fd, 22), RFIFOB(fd, 23), (char*)RFIFOP(fd, 24));
return 0;
}
diff --git a/src/char_sql/int_pet.h b/src/char_sql/int_pet.h
index b6e3f1bbf..39f127262 100644
--- a/src/char_sql/int_pet.h
+++ b/src/char_sql/int_pet.h
@@ -2,6 +2,7 @@
#define _INT_PET_H_
int inter_pet_init();
+void inter_pet_sql_final();
int inter_pet_save();
int inter_pet_delete(int pet_id);
diff --git a/src/char_sql/int_storage.c b/src/char_sql/int_storage.c
index 18100e02a..c13c782a6 100644
--- a/src/char_sql/int_storage.c
+++ b/src/char_sql/int_storage.c
@@ -2,62 +2,46 @@
// original code from athena
// SQL conversion by Jioh L. Jung
//
-#include "char.h"
-#include "itemdb.h"
#include <string.h>
#include <stdlib.h>
+#include "char.h"
+#include "itemdb.h"
+
#define STORAGE_MEMINC 16
// reset by inter_config_read()
struct storage *storage_pt=NULL;
struct guild_storage *guild_storage_pt=NULL;
-
#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
// storage data -> DB conversion
int storage_tosql(int account_id,struct storage *p){
int i;
- int eqcount=1;
- int noteqcount=1;
- struct itemtemp mapitem;
+// 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){
- if(itemdb_isequip(p->storage[i].nameid)==1){
- mapitem.equip[eqcount].flag=0;
- mapitem.equip[eqcount].id = p->storage[i].id;
- mapitem.equip[eqcount].nameid=p->storage[i].nameid;
- mapitem.equip[eqcount].amount = p->storage[i].amount;
- mapitem.equip[eqcount].equip = p->storage[i].equip;
- mapitem.equip[eqcount].identify = p->storage[i].identify;
- mapitem.equip[eqcount].refine = p->storage[i].refine;
- mapitem.equip[eqcount].attribute = p->storage[i].attribute;
- mapitem.equip[eqcount].card[0] = p->storage[i].card[0];
- mapitem.equip[eqcount].card[1] = p->storage[i].card[1];
- mapitem.equip[eqcount].card[2] = p->storage[i].card[2];
- mapitem.equip[eqcount].card[3] = p->storage[i].card[3];
- eqcount++;
- }
- else if(itemdb_isequip(p->storage[i].nameid)==0){
- mapitem.notequip[noteqcount].flag=0;
- mapitem.notequip[noteqcount].id = p->storage[i].id;
- mapitem.notequip[noteqcount].nameid=p->storage[i].nameid;
- mapitem.notequip[noteqcount].amount = p->storage[i].amount;
- mapitem.notequip[noteqcount].equip = p->storage[i].equip;
- mapitem.notequip[noteqcount].identify = p->storage[i].identify;
- mapitem.notequip[noteqcount].refine = p->storage[i].refine;
- mapitem.notequip[noteqcount].attribute = p->storage[i].attribute;
- mapitem.notequip[noteqcount].card[0] = p->storage[i].card[0];
- mapitem.notequip[noteqcount].card[1] = p->storage[i].card[1];
- mapitem.notequip[noteqcount].card[2] = p->storage[i].card[2];
- mapitem.notequip[noteqcount].card[3] = p->storage[i].card[3];
- noteqcount++;
- }
+ 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, eqcount, noteqcount, account_id,TABLE_STORAGE);
+ memitemdata_to_sql(mapitem, count, account_id,TABLE_STORAGE);
//printf ("storage dump to DB - id: %d (total: %d)\n", account_id, j);
return 0;
@@ -66,36 +50,36 @@ int storage_tosql(int account_id,struct storage *p){
// DB -> storage data conversion
int storage_fromsql(int account_id, struct storage *p){
int i=0;
-
+
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`}
sprintf(tmp_sql,"SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`card0`,`card1`,`card2`,`card3` FROM `%s` WHERE `account_id`='%d'",storage_db, account_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
}
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]);
- p->storage[i].card[0]= atoi(sql_row[7]);
- p->storage[i].card[1]= atoi(sql_row[8]);
- p->storage[i].card[2]= atoi(sql_row[9]);
- p->storage[i].card[3]= atoi(sql_row[10]);
+ 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]);
+ p->storage_[i].card[0]= atoi(sql_row[7]);
+ p->storage_[i].card[1]= atoi(sql_row[8]);
+ p->storage_[i].card[2]= atoi(sql_row[9]);
+ p->storage_[i].card[3]= atoi(sql_row[10]);
p->storage_amount = ++i;
}
mysql_free_result(sql_res);
}
-
+
printf ("storage load complete from DB - id: %d (total: %d)\n", account_id, p->storage_amount);
return 1;
}
@@ -103,45 +87,29 @@ int storage_fromsql(int account_id, struct storage *p){
// Save guild_storage data to sql
int guild_storage_tosql(int guild_id, struct guild_storage *p){
int i;
- int eqcount=1;
- int noteqcount=1;
- struct itemtemp mapitem;
+// 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){
- if(itemdb_isequip(p->storage[i].nameid)==1){
- mapitem.equip[eqcount].flag=0;
- mapitem.equip[eqcount].id = p->storage[i].id;
- mapitem.equip[eqcount].nameid=p->storage[i].nameid;
- mapitem.equip[eqcount].amount = p->storage[i].amount;
- mapitem.equip[eqcount].equip = p->storage[i].equip;
- mapitem.equip[eqcount].identify = p->storage[i].identify;
- mapitem.equip[eqcount].refine = p->storage[i].refine;
- mapitem.equip[eqcount].attribute = p->storage[i].attribute;
- mapitem.equip[eqcount].card[0] = p->storage[i].card[0];
- mapitem.equip[eqcount].card[1] = p->storage[i].card[1];
- mapitem.equip[eqcount].card[2] = p->storage[i].card[2];
- mapitem.equip[eqcount].card[3] = p->storage[i].card[3];
- eqcount++;
- }
- else if(itemdb_isequip(p->storage[i].nameid)==0){
- mapitem.notequip[noteqcount].flag=0;
- mapitem.notequip[noteqcount].id = p->storage[i].id;
- mapitem.notequip[noteqcount].nameid=p->storage[i].nameid;
- mapitem.notequip[noteqcount].amount = p->storage[i].amount;
- mapitem.notequip[noteqcount].equip = p->storage[i].equip;
- mapitem.notequip[noteqcount].identify = p->storage[i].identify;
- mapitem.notequip[noteqcount].refine = p->storage[i].refine;
- mapitem.notequip[noteqcount].attribute = p->storage[i].attribute;
- mapitem.notequip[noteqcount].card[0] = p->storage[i].card[0];
- mapitem.notequip[noteqcount].card[1] = p->storage[i].card[1];
- mapitem.notequip[noteqcount].card[2] = p->storage[i].card[2];
- mapitem.notequip[noteqcount].card[3] = p->storage[i].card[3];
- noteqcount++;
- }
+ 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, eqcount, noteqcount, guild_id,TABLE_GUILD_STORAGE);
+ memitemdata_to_sql(mapitem, count, guild_id,TABLE_GUILD_STORAGE);
printf ("guild storage save to DB - id: %d (total: %d)\n", guild_id,i);
return 0;
@@ -163,21 +131,23 @@ int guild_storage_fromsql(int guild_id, struct guild_storage *p){
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
}
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]);
- p->storage[i].card[0]= atoi(sql_row[7]);
- p->storage[i].card[1]= atoi(sql_row[8]);
- p->storage[i].card[2]= atoi(sql_row[9]);
- p->storage[i].card[3]= atoi(sql_row[10]);
+ 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]);
+ p->storage_[i].card[0]= atoi(sql_row[7]);
+ p->storage_[i].card[1]= atoi(sql_row[8]);
+ p->storage_[i].card[2]= atoi(sql_row[9]);
+ p->storage_[i].card[3]= atoi(sql_row[10]);
p->storage_amount = ++i;
+ if (i >= MAX_GUILD_STORAGE)
+ break;
}
mysql_free_result(sql_res);
}
@@ -188,17 +158,24 @@ int guild_storage_fromsql(int guild_id, struct guild_storage *p){
//---------------------------------------------------------
// storage data initialize
int inter_storage_sql_init(){
-
+
//memory alloc
printf("interserver storage memory initialize....(%d byte)\n",sizeof(struct storage));
- storage_pt=calloc(sizeof(struct storage), 1);
- guild_storage_pt=calloc(sizeof(struct guild_storage), 1);
+ 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));
memset(guild_storage_pt,0,sizeof(struct guild_storage));
-
+
return 1;
}
-// ‘qŒÉƒf[ƒ^íœ
+// 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);
@@ -243,7 +220,7 @@ int mapif_load_guild_storage(int fd,int account_id,int guild_id)
{
int guild_exist=0;
WFIFOW(fd,0)=0x3818;
-
+
// 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);
@@ -257,7 +234,7 @@ int mapif_load_guild_storage(int fd,int account_id,int guild_id)
//printf("- Check if guild %d exists : %s\n",g->guild_id,((guild_exist==0)?"No":"Yes"));
}
mysql_free_result(sql_res) ; //resource free
-
+
if(guild_exist==1) {
guild_storage_fromsql(guild_id,guild_storage_pt);
WFIFOW(fd,2)=sizeof(struct guild_storage)+12;
@@ -296,7 +273,7 @@ int mapif_parse_LoadStorage(int fd){
int mapif_parse_SaveStorage(int fd){
int account_id=RFIFOL(fd,4);
int len=RFIFOW(fd,2);
-
+
if(sizeof(struct storage)!=len-8){
printf("inter storage: data size error %d %d\n",sizeof(struct storage),len-8);
}else{
@@ -335,7 +312,7 @@ int mapif_parse_SaveGuildStorage(int fd)
//printf("- Check if guild %d exists : %s\n",g->guild_id,((guild_exist==0)?"No":"Yes"));
}
mysql_free_result(sql_res) ; //resource free
-
+
if(guild_exist==1) {
memcpy(guild_storage_pt,RFIFOP(fd,12),sizeof(struct guild_storage));
guild_storage_tosql(guild_id,guild_storage_pt);
diff --git a/src/char_sql/int_storage.h b/src/char_sql/int_storage.h
index f9f37db3e..5541d1ed7 100644
--- a/src/char_sql/int_storage.h
+++ b/src/char_sql/int_storage.h
@@ -2,6 +2,7 @@
#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);
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c
index b50afb9d7..83fcc967f 100644
--- a/src/char_sql/inter.c
+++ b/src/char_sql/inter.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include "char.h"
-#include "strlib.h"
+#include "../common/strlib.h"
#include "inter.h"
#include "int_party.h"
#include "int_guild.h"
@@ -15,8 +15,6 @@
#include "int_pet.h"
#include "lock.h"
-#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
-
#define WISDATA_TTL (60*1000) // Wisƒf[ƒ^‚̶‘¶ŽžŠÔ(60•b)
#define WISDELLIST_MAX 256 // Wisƒf[ƒ^휃ŠƒXƒg‚Ì—v‘f”
@@ -36,6 +34,11 @@ MYSQL_ROW sql_row ;
int sql_fields, sql_cnt;
char tmp_sql[65535];
+MYSQL lmysql_handle;
+char tmp_lsql[65535];
+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";
@@ -64,7 +67,7 @@ int inter_send_packet_length[]={
int inter_recv_packet_length[]={
-1,-1, 7, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0,
- 72, 6,52,14, 10,29, 6,-1, 34, 0, 0, 0, 0, 0, 0, 0,
+ 74, 6,52,14, 10,29, 6,-1, 34, 0, 0, 0, 0, 0, 0, 0,
-1, 6,-1, 0, 55,19, 6,-1, 14,-1,-1,-1, 14,19,186,-1,
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,
@@ -84,20 +87,20 @@ static int wis_dellist[WISDELLIST_MAX], wis_delnum;
//--------------------------------------------------------
// Save account_reg to sql (type=2)
int inter_accreg_tosql(int account_id,struct accreg *reg){
-
+
int j;
char temp_str[32];
if (account_id<=0) return 0;
reg->account_id=account_id;
-
+
//`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);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (delete `global_reg_value`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
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`, `str`, `value`) VALUES (2,'%d', '%s','%d')",
@@ -117,7 +120,7 @@ int inter_accreg_fromsql(int account_id,struct accreg *reg)
if (reg==NULL) return 0;
memset(reg, 0, sizeof(struct accreg));
reg->account_id=account_id;
-
+
//`global_reg_value` (`type`, `account_id`, `char_id`, `str`, `value`)
sprintf (tmp_sql, "SELECT `str`, `value` FROM `%s` WHERE `type`=2 AND `account_id`='%d'",reg_db, reg->account_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
@@ -126,7 +129,7 @@ int inter_accreg_fromsql(int account_id,struct accreg *reg)
sql_res = mysql_store_result(&mysql_handle);
if (sql_res) {
- for(j=0;(sql_row = mysql_fetch_row(sql_res));j++){
+ for(j=0;(sql_row = mysql_fetch_row(sql_res));j++){
memcpy(reg->reg[j].str, sql_row[0],32);
reg->reg[j].value = atoi(sql_row[1]);
}
@@ -141,7 +144,7 @@ int inter_accreg_sql_init()
{
CREATE(accreg_pt, struct accreg, 1);
return 0;
-
+
}
/*==========================================
@@ -187,7 +190,7 @@ int inter_config_read(const char *cfgName) {
}
//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);
printf ("set login_server_ip : %s\n",w2);
@@ -223,7 +226,7 @@ int inter_config_read(const char *cfgName) {
}
}
fclose(fp);
-
+
printf ("success reading interserver configuration\n");
return 0;
@@ -241,7 +244,7 @@ int inter_log(char *fmt,...)
sprintf(tmp_sql,"INSERT INTO `%s` (`time`, `log`) VALUES (NOW(), '%s')",interlog_db, jstrescapecpy(temp_str,str));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (insert `interlog`)- %s\n", mysql_error(&mysql_handle) );
- }
+ }
va_end(ap);
return 0;
@@ -252,37 +255,67 @@ int inter_log(char *fmt,...)
int inter_init(const char *file)
{
//int i;
-
+
printf ("interserver initialize...\n");
inter_config_read(file);
-
+
//DB connection initialized
mysql_init(&mysql_handle);
- printf("Connect to DB server....\n");
+ printf("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, CLIENT_MULTI_STATEMENTS)) {
+ char_server_db ,char_server_port, (char *)NULL, 0)) {
//pointer check
printf("%s\n",mysql_error(&mysql_handle));
exit(1);
}
else {
- printf ("Connect Success!\n");
+ printf ("Connect Success! (Character Server)\n");
+ }
+
+ mysql_init(&lmysql_handle);
+ printf("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
+ printf("%s\n",mysql_error(&lmysql_handle));
+ exit(1);
+ }else {
+ printf ("Connect Success! (Login Server)");
}
-
wis_db = numdb_init();
inter_guild_sql_init();
inter_storage_sql_init();
inter_party_sql_init();
-
+
inter_pet_sql_init();
inter_accreg_sql_init();
+ atexit(inter_final);
+
//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;
}
+// finalize
+int wis_db_final (void *k, void *data, va_list ap) {
+ struct WisData *p = (struct WisData *) data;
+ if (p) aFree(p);
+ return 0;
+}
+void inter_final() {
+ numdb_final(wis_db, wis_db_final);
+
+ 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);
@@ -293,13 +326,13 @@ int inter_mapif_init(int fd) {
//--------------------------------------------------------
// GM message sending
-int mapif_GMmessage(unsigned char *mes, int len) {
+int mapif_GMmessage(unsigned char *mes, int len, int sfd) {
unsigned char buf[len];
WBUFW(buf, 0) = 0x3800;
WBUFW(buf, 2) = len;
memcpy(WBUFP(buf, 4), mes, len-4);
- mapif_sendall(buf, len);
+ mapif_sendallwos(sfd, buf, len);
printf("\033[1;34m inter server: GM[len:%d] - '%s' \033[0m\n", len, mes);
return 0;
}
@@ -322,7 +355,7 @@ int mapif_wis_message(struct WisData *wd) {
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;
@@ -345,7 +378,7 @@ int mapif_account_reg_reply(int fd,int account_id)
{
struct accreg *reg=accreg_pt;
inter_accreg_fromsql(account_id,reg);
-
+
WFIFOW(fd,0)=0x3804;
WFIFOL(fd,4)=account_id;
if(reg->reg_num==0){
@@ -362,6 +395,27 @@ int mapif_account_reg_reply(int fd,int account_id)
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;
+}
+
+
//--------------------------------------------------------
// Existence check of WISP data
@@ -384,12 +438,12 @@ int check_ttl_wisdata() {
wis_delnum = 0;
numdb_foreach(wis_db, check_ttl_wisdata_sub, tick);
for(i = 0; i < wis_delnum; i++) {
- struct WisData *wd = numdb_search(wis_db, wis_dellist[i]);
+ struct WisData *wd = (struct WisData*)numdb_search(wis_db, wis_dellist[i]);
printf("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
numdb_erase(wis_db, wd->id);
- free(wd);
+ aFree(wd);
}
} while(wis_delnum >= WISDELLIST_MAX);
@@ -401,7 +455,7 @@ int check_ttl_wisdata() {
// GM message sending
int mapif_parse_GMmessage(int fd)
{
- mapif_GMmessage(RFIFOP(fd, 4), RFIFOW(fd, 2));
+ mapif_GMmessage(RFIFOP(fd, 4), RFIFOW(fd, 2), fd);
return 0;
}
@@ -410,6 +464,7 @@ int mapif_parse_GMmessage(int fd)
int mapif_parse_WisRequest(int fd) {
struct WisData* wd;
static int wisid = 0;
+ char t_name[32];
if (RFIFOW(fd,2)-52 >= sizeof(wd->msg)) {
printf("inter: Wis message size too long.\n");
@@ -418,7 +473,8 @@ int mapif_parse_WisRequest(int fd) {
printf("inter: Wis message doesn't exist.\n");
return 0;
}
- sprintf (tmp_sql, "SELECT `name` FROM `%s` WHERE `char_id`='%d'",char_db, (int) RFIFOP(fd,28));
+ sprintf (tmp_sql, "SELECT `name` FROM `%s` WHERE `name`='%s'",
+ char_db, jstrescapecpy(t_name, (char *)RFIFOP(fd,28)));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
}
@@ -435,9 +491,9 @@ int mapif_parse_WisRequest(int fd) {
} else {
// to be sure of the correct name, rewrite it
memset(RFIFOP(fd,28), 0, 24);
- strncpy(RFIFOP(fd,28), sql_row[0], 24);
+ strncpy((char*)RFIFOP(fd,28), sql_row[0], 24);
// if source is destination, don't ask other servers.
- if (strcmp(RFIFOP(fd,4),RFIFOP(fd,28)) == 0) {
+ if (strcmp((char*)RFIFOP(fd,4),(char*)RFIFOP(fd,28)) == 0) {
unsigned char buf[27];
WBUFW(buf, 0) = 0x3802;
memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), 24);
@@ -461,7 +517,12 @@ int mapif_parse_WisRequest(int fd) {
mapif_wis_message(wd);
}
}
-
+
+ //Freeing ... O.o
+ if(sql_res){
+ mysql_free_result(sql_res);
+ }
+
return 0;
}
@@ -469,7 +530,7 @@ int mapif_parse_WisRequest(int fd) {
// Wisp/page transmission result
int mapif_parse_WisReply(int fd) {
int id = RFIFOL(fd,2), flag = RFIFOB(fd,6);
- struct WisData *wd = numdb_search(wis_db, id);
+ struct WisData *wd = (struct WisData*)numdb_search(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
@@ -477,7 +538,7 @@ int mapif_parse_WisReply(int fd) {
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
numdb_erase(wis_db, id);
- free(wd);
+ aFree(wd);
}
return 0;
@@ -491,13 +552,13 @@ int mapif_parse_AccReg(int fd)
struct accreg *reg=accreg_pt;
int account_id = RFIFOL(fd,4);
memset(accreg_pt,0,sizeof(struct accreg));
-
+
for(j=0,p=8;j<ACCOUNT_REG_NUM && p<RFIFOW(fd,2);j++,p+=36){
memcpy(reg->reg[j].str,RFIFOP(fd,p),32);
reg->reg[j].value=RFIFOL(fd,p+32);
}
reg->reg_num=j;
-
+
inter_accreg_tosql(account_id,reg);
mapif_account_reg(fd,RFIFOP(fd,0)); // Send confirm message to map
return 0;
@@ -526,7 +587,7 @@ int inter_parse_frommap(int fd)
// ƒ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;
@@ -556,9 +617,9 @@ int inter_check_length(int fd, int length)
return 0;
length = RFIFOW(fd, 2);
}
-
+
if(RFIFOREST(fd)<length) // packet not yet
return 0;
-
+
return length;
}
diff --git a/src/char_sql/inter.h b/src/char_sql/inter.h
index 398088504..9265a8d82 100644
--- a/src/char_sql/inter.h
+++ b/src/char_sql/inter.h
@@ -2,9 +2,10 @@
#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();
int inter_check_length(int fd,int length);
@@ -24,6 +25,11 @@ extern MYSQL_RES* sql_res ;
extern MYSQL_ROW sql_row ;
extern int sql_cnt;
+extern MYSQL lmysql_handle;
+extern char tmp_lsql[65535];
+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];
diff --git a/src/char_sql/itemdb.c b/src/char_sql/itemdb.c
index d045189a0..bc3e8603e 100644
--- a/src/char_sql/itemdb.c
+++ b/src/char_sql/itemdb.c
@@ -13,8 +13,6 @@
#include "memwatch.h"
#endif
-#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
-
#define MAX_RANDITEM 2000
// ** ITEMDB_OVERRIDE_NAME_VERBOSE **
@@ -33,7 +31,7 @@ struct item_data* itemdb_search(int nameid)
{
struct item_data *id;
- id=numdb_search(item_db,nameid);
+ id = (struct item_data*)numdb_search(item_db,nameid);
if(id) return id;
CREATE(id, struct item_data, 1);
@@ -123,7 +121,7 @@ static int itemdb_readdb(void)
}
if(str[0]==NULL)
continue;
-
+
nameid=atoi(str[0]);
if(nameid<=0 || nameid>=20000)
continue;
@@ -174,7 +172,7 @@ static int itemdb_read_sqldb(void) // sql item_db read, shortened version of map
// Insert a new row into the item database
/*
- id = calloc(sizeof(struct item_data), 1);
+ id = aCalloc(sizeof(struct item_data), 1);
if (id == NULL) {
printf("out of memory : itemdb_read_sqldb\n");
@@ -187,7 +185,7 @@ static int itemdb_read_sqldb(void) // sql item_db read, shortened version of map
// ----------
*/
id=itemdb_search(nameid);
-
+
memcpy(id->name, sql_row[1], 24);
memcpy(id->jname, sql_row[2], 24);
@@ -214,12 +212,12 @@ static int itemdb_final(void *key,void *data,va_list ap)
{
struct item_data *id;
- id=data;
+ id = (struct item_data*)data;
if(id->use_script)
- free(id->use_script);
+ aFree(id->use_script);
if(id->equip_script)
- free(id->equip_script);
- free(id);
+ aFree(id->equip_script);
+ aFree(id);
return 0;
}
diff --git a/src/char_sql/itemdb.h b/src/char_sql/itemdb.h
index dea835e78..762873c8e 100644
--- a/src/char_sql/itemdb.h
+++ b/src/char_sql/itemdb.h
@@ -6,7 +6,7 @@ struct item_data {
char name[24],jname[24];
int value_buy,value_sell,value_notdc,value_notoc;
int type;
- int class;
+ int class_;
int sex;
int equip;
int weight;
diff --git a/src/char_sql/make.sh b/src/char_sql/make.sh
index a4ca8b5e4..6ee175f73 100644
--- a/src/char_sql/make.sh
+++ b/src/char_sql/make.sh
@@ -6,6 +6,5 @@
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 strlib.c
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 strlib.o itemdb.o ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o -L/usr/local/lib/mysql -lmysqlclient -lz
+ 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/GNUmakefile b/src/common/GNUmakefile
deleted file mode 100644
index b15d4d481..000000000
--- a/src/common/GNUmakefile
+++ /dev/null
@@ -1,14 +0,0 @@
-txt sql all: core.o socket.o timer.o grfio.o db.o lock.o nullpo.o malloc.o showmsg.o
-
-core.o: core.c core.h showmsg.h
-socket.o: socket.c socket.h mmo.h showmsg.h
-timer.o: timer.c timer.h showmsg.h
-grfio.o: grfio.c grfio.h showmsg.h
-db.o: db.c db.h showmsg.h
-lock.o: lock.h showmsg.h
-nullpo.o: nullpo.c nullpo.h showmsg.h
-malloc.o: malloc.c malloc.h showmsg.h
-showmsg.o: showmsg.c showmsg.h
-
-clean:
- rm -f *.o
diff --git a/src/common/Makefile b/src/common/Makefile
index b15d4d481..7a00c5a3c 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -1,14 +1,23 @@
-txt sql all: core.o socket.o timer.o grfio.o db.o lock.o nullpo.o malloc.o showmsg.o
-
-core.o: core.c core.h showmsg.h
-socket.o: socket.c socket.h mmo.h showmsg.h
-timer.o: timer.c timer.h showmsg.h
-grfio.o: grfio.c grfio.h showmsg.h
-db.o: db.c db.h showmsg.h
-lock.o: lock.h showmsg.h
-nullpo.o: nullpo.c nullpo.h showmsg.h
-malloc.o: malloc.c malloc.h showmsg.h
-showmsg.o: showmsg.c showmsg.h
+txt sql all: obj common
+
+obj:
+ mkdir obj
+
+common: obj/core.o obj/socket.o obj/timer.o obj/grfio.o obj/db.o obj/lock.o obj/nullpo.o obj/malloc.o obj/showmsg.o obj/strlib.o obj/utils.o
+
+obj/%.o: %.c
+ $(COMPILE.c) $(OUTPUT_OPTION) $<
+
+obj/core.o: core.c core.h showmsg.h
+obj/socket.o: socket.c socket.h mmo.h showmsg.h dll.h
+obj/timer.o: timer.c timer.h showmsg.h
+obj/grfio.o: grfio.c grfio.h showmsg.h
+obj/db.o: db.c db.h showmsg.h
+obj/lock.o: lock.h showmsg.h
+obj/nullpo.o: nullpo.c nullpo.h showmsg.h
+obj/malloc.o: malloc.c malloc.h showmsg.h
+obj/showmsg.o: showmsg.c showmsg.h
+obj/strlib.o: strlib.c strlib.h utils.h
clean:
- rm -f *.o
+ rm -rf *.o obj
diff --git a/src/common/buffer.h b/src/common/buffer.h
new file mode 100644
index 000000000..ea94380ce
--- /dev/null
+++ b/src/common/buffer.h
@@ -0,0 +1,18 @@
+#ifndef _BUFFER_H_
+#define _BUFFER_H_
+
+// 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);name=NULL
+
+#endif
+
+#endif
diff --git a/src/common/core.c b/src/common/core.c
index 167b38efb..0a9e76120 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -8,17 +8,29 @@
#endif
#include <signal.h>
#include <string.h>
+#ifdef DUMPSTACK
+ #ifndef CYGWIN // HAVE_EXECINFO_H
+ #include <execinfo.h>
+ #endif
+#endif
#include "core.h"
-#include "socket.h"
-#include "timer.h"
-#include "version.h"
-#include "showmsg.h"
+#include "../common/mmo.h"
+#include "../common/malloc.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/version.h"
+#include "../common/showmsg.h"
#ifdef MEMWATCH
#include "memwatch.h"
#endif
+char *argp;
+int runflag = 1;
+char SERVER_TYPE = SERVER_NONE;
+unsigned long ticks = 0; // by MC Cameri
+char pid_file[256];
static void (*term_func)(void)=NULL;
/*======================================
@@ -30,14 +42,54 @@ void set_termfunc(void (*termfunc)(void))
term_func = termfunc;
}
+// 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_.
+//
+#ifndef 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
*--------------------------------------
*/
-
+// for handling certain signals ourselves, like SIGPIPE
+static void sig_ignore(int sn) {
+ printf ("Broken pipe found... closing socket\n"); // set to eof in socket.c
+ return; // does nothing here
+}
static void sig_proc(int sn)
{
int i;
+ static int is_called = 0;
+
+ if(is_called++)
+ return;
+
switch(sn){
case SIGINT:
case SIGTERM:
@@ -53,6 +105,66 @@ static void sig_proc(int sn)
}
}
+/*=========================================
+ * Dumps the stack using glibc's backtrace
+ *-----------------------------------------
+ */
+#ifndef DUMPSTACK
+ #define sig_dump SIG_DFL
+#else
+ #ifdef CYGWIN
+ #define FOPEN_ freopen
+ extern void cygwin_stackdump();
+ #else
+ #define FOPEN_(fn,m,s) fopen(fn,m)
+ #endif
+extern const char *strsignal(int);
+void sig_dump(int sn)
+{
+ FILE *fp;
+ char file[256];
+ int no = 0;
+
+ #ifndef CYGWIN
+ void* array[20];
+ char **stack;
+ size_t size;
+ #endif
+
+ // search for a usable filename
+ do {
+ sprintf (file, "log/%s%04d.stackdump", argp, ++no);
+ } while((fp = fopen(file,"r")) && (fclose(fp), no < 9999));
+ // dump the trace into the file
+
+ if ((fp = FOPEN_(file, "w", stderr)) != NULL) {
+ printf ("Dumping stack... ");
+ 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");
+ aFree(stack);
+ #endif
+
+ printf ("Done.\n");
+ fflush(stdout);
+ fclose(fp);
+ }
+ // Pass the signal to the system's default handler
+ compat_signal(sn, SIG_DFL);
+ raise(sn);
+}
+#endif
+
int get_svn_revision(char *svnentry) { // Warning: minor syntax checking
char line[1024];
int rev = 0;
@@ -60,12 +172,13 @@ int get_svn_revision(char *svnentry) { // Warning: minor syntax checking
if ((fp = fopen(svnentry, "r")) == NULL) {
return 0;
} else {
- while (fgets(line,1023,fp)) if (strstr(line,"revision=")) break;
+ while (fgets(line,1023,fp))
+ if (strstr(line,"revision=")) break;
fclose(fp);
- if (sscanf(line," %*[^\"]\"%d%*[^\n]",&rev)==1)
- return rev;
+ if (sscanf(line," %*[^\"]\"%d%*[^\n]",&rev) == 1)
+ return rev;
else
- return 0;
+ return 0;
}
// return 0;
}
@@ -87,7 +200,7 @@ static void display_title(void)
// \033[1m : use bold for font
printf("\033[2J"); // clear screen and go up/left (0, 0 position in text)
printf("\033[37;44m (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)\033[K\033[0m\n"); // white writing (37) on blue background (44), \033[K clean until end of file
- printf("\033[0;44m (\033[1;33m (c)2004 eAthena Development Team presents \033[0;44m)\033[K\033[0m\n"); // yellow writing (33)
+ printf("\033[0;44m (\033[1;33m (c)2005 eAthena Development Team presents \033[0;44m)\033[K\033[0m\n"); // yellow writing (33)
printf("\033[0;44m (\033[1m ______ __ __ \033[0;44m)\033[K\033[0m\n"); // 1: bold char, 0: normal char
printf("\033[0;44m (\033[1m /\\ _ \\/\\ \\__/\\ \\ v%2d.%02d.%02d \033[0;44m)\033[K\033[0m\n", ATHENA_MAJOR_VERSION, ATHENA_MINOR_VERSION, ATHENA_REVISION); // 1: bold char, 0: normal char
printf("\033[0;44m (\033[1m __\\ \\ \\_\\ \\ \\ ,_\\ \\ \\___ __ ___ __ \033[0;44m)\033[K\033[0m\n"); // 1: bold char, 0: normal char
@@ -100,80 +213,115 @@ static void display_title(void)
printf("\033[0;44m (\033[1m ( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) \033[0;44m)\033[K\033[0m\n"); // 1: bold char, 0: normal char
printf("\033[0;44m (\033[1m \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \033[0;44m)\033[K\033[0m\n"); // 1: bold char, 0: normal char
printf("\033[0;44m (\033[1m \033[0;44m)\033[K\033[0m\n"); // yellow writing (33)
- printf("\033[0;44m (\033[1;33m Advanced Fusion Maps (c) 2003-2004 The Fusion Project \033[0;44m)\033[K\033[0m\n"); // yellow writing (33)
+ printf("\033[0;44m (\033[1;33m Advanced Fusion Maps (c) 2003-2005 The Fusion Project \033[0;44m)\033[K\033[0m\n"); // yellow writing (33)
printf("\033[37;44m (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)\033[K\033[0m\n\n"); // reset color
if ((revision = get_svn_revision(".svn\\entries"))>0) {
- snprintf(tmp_output,sizeof(tmp_output),"SVN Revision: %d.\n",revision);
+ snprintf(tmp_output,sizeof(tmp_output),"SVN Revision: '"CL_WHITE"%d"CL_RESET"'.\n",revision);
ShowInfo(tmp_output);
}
}
-// 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_.
-//
-#ifndef SIGPIPE
-#define SIGPIPE SIGINT
-#endif
+/*======================================
+ * CORE : MAINROUTINE
+ *--------------------------------------
+ */
-#ifndef POSIX
-#define compat_signal(signo, func) signal(signo, func)
-#else
-sigfunc *compat_signal(int signo, sigfunc *func)
-{
- struct sigaction sact, oact;
+void pid_delete(void) {
+ unlink(pid_file);
+}
- sact.sa_handler = func;
- sigemptyset(&sact.sa_mask);
- sact.sa_flags = 0;
-#ifdef SA_INTERRUPT
- sact.sa_flags |= SA_INTERRUPT; /* SunOS */
+void pid_create(const char* file) {
+ FILE *fp;
+ int len = strlen(file);
+ strcpy(pid_file,file);
+ if(len > 4 && pid_file[len - 4] == '.') {
+ pid_file[len - 4] = 0;
+ }
+ strcat(pid_file,".pid");
+ fp = fopen(pid_file,"w");
+ if(fp) {
+#ifdef _WIN32
+ fprintf(fp,"%d",GetCurrentProcessId());
+#else
+ fprintf(fp,"%d",getpid());
#endif
+ fclose(fp);
+ atexit(pid_delete);
+ }
+}
- if (sigaction(signo, &sact, &oact) < 0)
- return (SIG_ERR);
+#define LOG_UPTIME 0
+void log_uptime(void)
+{
+#if LOG_UPTIME
+ 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;
- return (oact.sa_handler);
-}
-#endif
+ fp = fopen("log/uptime.log","a");
+ if (fp) {
+ time(&curtime);
+ strftime(curtime2, 24, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ seconds = (gettick()-ticks)/CLOCKS_PER_SEC;
+ 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;
-/*======================================
- * CORE : MAINROUTINE
- *--------------------------------------
- */
+ fprintf(fp, "%s: %s uptime - %ld days, %ld hours, %ld minutes, %ld seconds.\n",
+ curtime2, argp, days, hours, minutes, seconds);
+ fclose(fp);
+ }
-int runflag = 1;
+ return;
+#endif
+}
int main(int argc,char **argv)
{
int next;
+ if ((argp = strstr(argv[0], "./")) != NULL)
+ argp+=2;
+ else argp = argv[0];
+
+ display_title();
+
+ do_init_memmgr(argp); // ˆê”Ôʼn‚ÉŽÀs‚·‚é•K—v‚ª‚ ‚é
+ atexit(log_uptime);
+ pid_create(argp);
Net_Init();
do_socket();
- compat_signal(SIGPIPE,SIG_IGN);
+ compat_signal(SIGPIPE, sig_ignore);
compat_signal(SIGTERM,sig_proc);
compat_signal(SIGINT,sig_proc);
-
+
// Signal to create coredumps by system when necessary (crash)
- compat_signal(SIGSEGV, SIG_DFL);
-#ifndef _WIN32
- compat_signal(SIGBUS, SIG_DFL);
- compat_signal(SIGTRAP, SIG_DFL);
-#endif
- compat_signal(SIGILL, SIG_DFL);
+ compat_signal(SIGSEGV, sig_dump);
+ compat_signal(SIGFPE, sig_dump);
+ compat_signal(SIGILL, sig_dump);
+ #ifndef _WIN32
+ compat_signal(SIGBUS, sig_dump);
+ compat_signal(SIGTRAP, SIG_DFL);
+ #endif
- display_title();
+ tick_ = time(0);
+ ticks = gettick();
do_init(argc,argv);
+
while(runflag){
next=do_timer(gettick_nocache());
do_sendrecv(next);
do_parsepacket();
}
+
return 0;
}
diff --git a/src/common/core.h b/src/common/core.h
index bc2be02c2..e9b5c8227 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -3,10 +3,19 @@
#ifndef _CORE_H_
#define _CORE_H_
+extern char *argp;
extern int runflag;
+extern unsigned long ticks;
+extern char SERVER_TYPE;
-int do_init(int,char**);
+enum {
+ SERVER_NONE,
+ SERVER_LOGIN,
+ SERVER_CHAR,
+ SERVER_MAP,
+};
+int do_init(int,char**);
void set_termfunc(void (*termfunc)(void));
#endif // _CORE_H_
diff --git a/src/common/db.c b/src/common/db.c
index 58f0ea4f7..377128e8f 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -1,18 +1,26 @@
// $Id: db.c,v 1.2 2004/09/23 14:43:06 MouseJstr Exp $
-// #define MALLOC_DBN
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "db.h"
#include "mmo.h"
#include "utils.h"
+#include "malloc.h"
#ifdef MEMWATCH
#include "memwatch.h"
#endif
-#define ROOT_SIZE 4096
+//#define MALLOC_DBN
+
+// Backup cleaning routine in case the core doesn't do so properly,
+// only enabled if malloc_dbn is not defined.
+// As a temporary solution the root of the problem should still be found and fixed
+struct dbn *head;
+struct dbn *tail;
+
#ifdef MALLOC_DBN
+#define ROOT_SIZE 4096
static struct dbn *dbn_root[512], *dbn_free;
static int dbn_root_rest=0,dbn_root_num=0;
@@ -39,20 +47,50 @@ static void free_dbn(struct dbn* add_dbn)
add_dbn->parent = dbn_free;
dbn_free = add_dbn;
}
+
+void exit_dbn(void)
+{
+ int i;
+
+ for (i=0;i<dbn_root_num;i++)
+ if (dbn_root[i])
+ aFree(dbn_root[i]);
+
+ dbn_root_rest=0;
+ dbn_root_num=0;
+
+ return;
+}
+#else
+void exit_dbn(void)
+{
+ int i = 0;
+ struct dbn *p = head, *p2;
+ while (p) {
+ p2 = p->next;
+ aFree(p);
+ p = p2;
+ i++;
+ }
+ //printf ("freed %d stray dbn\n", i);
+ return;
+}
#endif
+// maybe change the void* to const char* ???
static int strdb_cmp(struct dbt* table,void* a,void* b)
{
if(table->maxlen)
- return strncmp(a,b,table->maxlen);
- return strcmp(a,b);
+ return strncmp((const char*)a,(const char*)b,table->maxlen);
+ return strcmp((const char*)a,(const char*)b);
}
+// maybe change the void* to unsigned char* ???
static unsigned int strdb_hash(struct dbt* table,void* a)
{
int i;
unsigned int h;
- unsigned char *p=a;
+ unsigned char *p = (unsigned char*)a;
i=table->maxlen;
if(i==0) i=0x7fffffff;
@@ -62,7 +100,7 @@ static unsigned int strdb_hash(struct dbt* table,void* a)
return h;
}
-struct dbt* strdb_init(int maxlen)
+struct dbt* strdb_init_(int maxlen,const char *file,int line)
{
int i;
struct dbt* table;
@@ -74,6 +112,9 @@ struct dbt* strdb_init(int maxlen)
table->maxlen=maxlen;
for(i=0;i<HASH_SIZE;i++)
table->ht[i]=NULL;
+ table->alloc_file = file;
+ table->alloc_line = line;
+ table->item_count = 0;
return table;
}
@@ -95,7 +136,7 @@ static unsigned int numdb_hash(struct dbt* table,void* a)
return (unsigned int)a;
}
-struct dbt* numdb_init(void)
+struct dbt* numdb_init_(const char *file,int line)
{
int i;
struct dbt* table;
@@ -107,6 +148,9 @@ struct dbt* numdb_init(void)
table->maxlen=sizeof(int);
for(i=0;i<HASH_SIZE;i++)
table->ht[i]=NULL;
+ table->alloc_file = file;
+ table->alloc_line = line;
+ table->item_count = 0;
return table;
}
@@ -130,14 +174,14 @@ void * db_search2(struct dbt *table, const char *key)
{
int i,sp;
struct dbn *p,*pn,*stack[64];
- int slen = strlen(key);
+ int slen = strlen(key);
for(i=0;i<HASH_SIZE;i++){
if((p=table->ht[i])==NULL)
continue;
sp=0;
while(1){
- if (strnicmp(key, p->key, slen) == 0)
+ if (strnicmp(key, (const char*)p->key, slen) == 0)
return p->data;
if((pn=p->left)!=NULL){
if(p->right){
@@ -345,6 +389,29 @@ static void db_rebalance_erase(struct dbn *z,struct dbn **root)
}
}
+void db_free_lock(struct dbt *table) {
+ table->free_lock++;
+}
+
+void db_free_unlock(struct dbt *table) {
+ if(--table->free_lock == 0) {
+ int i;
+ for(i = 0; i < table->free_count ; i++) {
+ db_rebalance_erase(table->free_list[i].z,table->free_list[i].root);
+ if(table->cmp == strdb_cmp) {
+ aFree(table->free_list[i].z->key);
+ }
+#ifdef MALLOC_DBN
+ free_dbn(table->free_list[i].z);
+#else
+ aFree(table->free_list[i].z);
+#endif
+ table->item_count--;
+ }
+ table->free_count = 0;
+ }
+}
+
struct dbn* db_insert(struct dbt *table,void* key,void* data)
{
struct dbn *p,*priv;
@@ -354,10 +421,33 @@ struct dbn* db_insert(struct dbt *table,void* key,void* data)
for(c=0,priv=NULL ,p = table->ht[hash];p;){
c=table->cmp(table,key,p->key);
if(c==0){ // replace
- if (table->release)
- table->release(p, 3);
+ if (table->release)
+ table->release(p, 3);
+ if(p->deleted) {
+ // 휂³‚ꂽƒf[ƒ^‚È‚Ì‚ÅAfree_list ã‚Ì휗\’è‚ðÁ‚·
+ int i;
+ for(i = 0; i < table->free_count ; i++) {
+ if(table->free_list[i].z == p) {
+ memmove(
+ &table->free_list[i],
+ &table->free_list[i+1],
+ sizeof(struct db_free)*(table->free_count - i - 1)
+ );
+ break;
+ }
+ }
+ if(i == table->free_count || table->free_count <= 0) {
+ printf("db_insert: cannnot find deleted db node.\n");
+ } else {
+ table->free_count--;
+ if(table->cmp == strdb_cmp) {
+ aFree(p->key);
+ }
+ }
+ }
p->data=data;
p->key=key;
+ p->deleted = 0;
return p;
}
priv=p;
@@ -382,6 +472,17 @@ struct dbn* db_insert(struct dbt *table,void* key,void* data)
p->key = key;
p->data = data;
p->color = RED;
+ p->deleted = 0;
+ p->prev = NULL;
+ p->next = NULL;
+ if (head == NULL)
+ head = tail = p;
+ else {
+ p->prev = tail;
+ tail->next = p;
+ tail = p;
+ }
+
if(c==0){ // hash entry is empty
table->ht[hash] = p;
p->color = BLACK;
@@ -397,6 +498,8 @@ struct dbn* db_insert(struct dbt *table,void* key,void* data)
db_rebalance(p,&table->ht[hash]);
}
}
+ table->item_count++;
+
return p;
}
@@ -419,29 +522,69 @@ void* db_erase(struct dbt *table,void* key)
if(!p)
return NULL;
data=p->data;
- db_rebalance_erase(p,&table->ht[hash]);
-#ifdef MALLOC_DBN
- free_dbn(p);
-#else
- free(p);
-#endif
+ if(table->free_lock) {
+ if(table->free_count == table->free_max) {
+ table->free_max += 32;
+ table->free_list = (struct db_free*)realloc(table->free_list,sizeof(struct db_free) * table->free_max);
+ }
+ table->free_list[table->free_count].z = p;
+ table->free_list[table->free_count].root = &table->ht[hash];
+ table->free_count++;
+ p->deleted = 1;
+ p->data = NULL;
+ if(table->cmp == strdb_cmp) {
+ if(table->maxlen) {
+ char *key = (char*)malloc(table->maxlen);
+ memcpy(key,p->key,table->maxlen);
+ p->key = key;
+ } else {
+ p->key = strdup((const char*)p->key);
+ }
+ }
+ } else {
+ db_rebalance_erase(p,&table->ht[hash]);
+ if (p->prev)
+ p->prev->next = p->next;
+ else
+ head = p->next;
+ if (p->next)
+ p->next->prev = p->prev;
+ else
+ tail = p->prev;
+
+ #ifdef MALLOC_DBN
+ free_dbn(p);
+ #else
+ aFree(p);
+ #endif
+ table->item_count--;
+ }
return data;
}
void db_foreach(struct dbt *table,int (*func)(void*,void*,va_list),...)
{
int i,sp;
+ int count = table->item_count;
// red-black tree‚È‚Ì‚Å64ŒÂstack‚ª‚ ‚ê‚Î2^32ŒÂƒm[ƒh‚Ü‚Å‘åä•v
struct dbn *p,*pn,*stack[64];
va_list ap;
va_start(ap,func);
+ db_free_lock(table);
for(i=0;i<HASH_SIZE;i++){
if((p=table->ht[i])==NULL)
continue;
sp=0;
while(1){
- func(p->key,p->data,ap);
+ //reverted it back. sorry that brought thios bug from Freya [Lupus]
+ //if (!p->data) {
+ // printf("Warning: no data for key %d in db_foreach (db.c) !\n",(int)p->key);
+ //} else {
+ if(!p->deleted)
+ func(p->key, p->data, ap);
+ count--;
+ //}
if((pn=p->left)!=NULL){
if(p->right){
stack[sp++]=p->right;
@@ -458,6 +601,13 @@ void db_foreach(struct dbt *table,int (*func)(void*,void*,va_list),...)
}
}
}
+ db_free_unlock(table);
+ if(count) {
+ printf(
+ "db_foreach : data lost %d item(s) allocated from %s line %d\n",
+ count,table->alloc_file,table->alloc_line
+ );
+ }
va_end(ap);
}
@@ -468,12 +618,13 @@ void db_final(struct dbt *table,int (*func)(void*,void*,va_list),...)
va_list ap;
va_start(ap,func);
+ db_free_lock(table);
for(i=0;i<HASH_SIZE;i++){
if((p=table->ht[i])==NULL)
continue;
sp=0;
while(1){
- if(func)
+ if(func && !p->deleted)
func(p->key,p->data,ap);
if((pn=p->left)!=NULL){
if(p->right){
@@ -488,14 +639,24 @@ void db_final(struct dbt *table,int (*func)(void*,void*,va_list),...)
pn=stack[--sp];
}
}
+ if (p->prev)
+ p->prev->next = p->next;
+ else
+ head = p->next;
+ if (p->next)
+ p->next->prev = p->prev;
+ else
+ tail = p->prev;
#ifdef MALLOC_DBN
free_dbn(p);
#else
- free(p);
+ aFree(p);
#endif
p=pn;
}
}
- free(table);
+ db_free_unlock(table);
+ aFree(table->free_list);
+ aFree(table);
va_end(ap);
}
diff --git a/src/common/db.h b/src/common/db.h
index ea9aceab0..6980099cf 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -13,6 +13,14 @@ struct dbn {
int color;
void *key;
void *data;
+ int deleted; // íœÏ‚݃tƒ‰ƒO(db_foreach)
+ struct dbn *next;
+ struct dbn *prev;
+};
+
+struct db_free {
+ struct dbn *z;
+ struct dbn **root;
};
struct dbt {
@@ -22,6 +30,15 @@ struct dbt {
void (*release)(struct dbn*,int which);
int maxlen;
struct dbn *ht[HASH_SIZE];
+ int item_count; // vf?
+ const char* alloc_file; // DB?t@C
+ int alloc_line; // DB?s
+ // db_foreach “à•”‚Ådb_erase ‚³‚ê‚é‘Îô‚Æ‚µ‚ÄA
+ // db_foreach ‚ªI‚í‚é‚܂ŃƒbƒN‚·‚邱‚Æ‚É‚·‚é
+ struct db_free *free_list;
+ int free_count;
+ int free_max;
+ int free_lock;
};
#define strdb_search(t,k) db_search((t),(void*)(k))
@@ -34,14 +51,18 @@ struct dbt {
#define numdb_erase(t,k) db_erase ((t),(void*)(k))
#define numdb_foreach db_foreach
#define numdb_final db_final
+#define strdb_init(a) strdb_init_(a,__FILE__,__LINE__)
+#define numdb_init() numdb_init_(__FILE__,__LINE__)
+
+struct dbt* strdb_init_(int maxlen,const char *file,int line);
+struct dbt* numdb_init_(const char *file,int line);
-struct dbt* strdb_init(int maxlen);
-struct dbt* numdb_init(void);
void* db_search(struct dbt *table,void* key);
void* db_search2(struct dbt *table, const char *key); // [MouseJstr]
struct dbn* db_insert(struct dbt *table,void* key,void* data);
void* db_erase(struct dbt *table,void* key);
void db_foreach(struct dbt*,int(*)(void*,void*,va_list),...);
void db_final(struct dbt*,int(*)(void*,void*,va_list),...);
+void exit_dbn(void);
#endif
diff --git a/src/common/dll.h b/src/common/dll.h
new file mode 100644
index 000000000..50854da4d
--- /dev/null
+++ b/src/common/dll.h
@@ -0,0 +1,25 @@
+
+#ifndef _DLL_H_
+#define _DLL_H_
+
+#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 HINSTANCE
+
+#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 void *
+
+#endif
+
+#endif // _DLL_H_
+
+
diff --git a/src/common/grfio.c b/src/common/grfio.c
index ff01b6e76..1a3829bf7 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -25,11 +25,50 @@
#include <ctype.h>
#include <sys/stat.h>
-#include <zlib.h>
-
-#include "utils.h"
#include "grfio.h"
-#include "mmo.h"
+#include "../common/utils.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/malloc.h"
+
+#ifdef _WIN32
+ #ifdef LOCALZLIB
+ #include "zlib.h"
+ #define zlib_inflateInit inflateInit
+ #define zlib_inflate inflate
+ #define zlib_inflateEnd inflateEnd
+ #define zlib_deflateInit deflateInit
+ #define zlib_deflate deflate
+ #define zlib_deflateEnd deflateEnd
+ #else
+ #include "../lib/zlib_win32.h"
+ #include "../common/dll.h"
+ DLL zlib_dll;
+ #define zlib_inflateInit(strm) zlib_inflateInit_((strm),ZLIB_VERSION, sizeof(z_stream))
+ #define zlib_deflateInit(strm, level) zlib_deflateInit_((strm),(level),ZLIB_VERSION,sizeof(z_stream))
+
+ int (WINAPI* zlib_inflateInit_) (z_streamp strm, const char *version, int stream_size);
+ int (WINAPI* zlib_inflate) (z_streamp strm, int flush);
+ int (WINAPI* zlib_inflateEnd) (z_streamp strm);
+
+ int (WINAPI* zlib_deflateInit_) (z_streamp strm, int level, const char *version, int stream_size);
+ int (WINAPI* zlib_deflate) (z_streamp strm, int flush);
+ int (WINAPI* zlib_deflateEnd) (z_streamp strm);
+ #endif
+#else
+ #ifdef LOCALZLIB
+ #include "zlib/zlib.h"
+ #else
+ #include <zlib.h>
+ #endif
+
+ #define zlib_inflateInit inflateInit
+ #define zlib_inflate inflate
+ #define zlib_inflateEnd inflateEnd
+ #define zlib_deflateInit deflateInit
+ #define zlib_deflate deflate
+ #define zlib_deflateEnd deflateEnd
+#endif
#ifdef MEMWATCH
#include "memwatch.h"
@@ -72,7 +111,7 @@ typedef struct {
//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 32768 // temporary maximum, and a theory top maximum are 2G.
+#define FILELIST_LIMIT 65536 // temporary maximum, and a theory top maximum are 2G.
static FILELIST *filelist;
static int filelist_entrys;
@@ -139,7 +178,11 @@ static unsigned char NibbleData[4][64]={
*/
static unsigned int getlong(unsigned char *p)
{
- return *p+p[1]*256+(p[2]+p[3]*256)*65536;
+// return *p+p[1]*256+(p[2]+p[3]*256)*65536;
+ return p[0]
+ | p[1] << 0x08
+ | p[2] << 0x10
+ | p[3] << 0x18; // Shinomori
}
/*==========================================
@@ -157,15 +200,17 @@ static void BitConvert(BYTE *Src,char *BitSwapTable)
{
int lop,prm;
BYTE tmp[8];
- *(DWORD*)tmp=*(DWORD*)(tmp+4)=0;
+// *(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);
+// *(DWORD*)Src = *(DWORD*)tmp;
+// *(DWORD*)(Src+4) = *(DWORD*)(tmp+4);
+ memcpy(Src,tmp,8);
}
static void BitConvert4(BYTE *Src)
@@ -193,7 +238,11 @@ static void BitConvert4(BYTE *Src)
tmp[(lop >> 3) + 4] |= BitMaskTable[lop & 7];
}
}
- *(DWORD*)Src ^= *(DWORD*)(tmp+4);
+// *(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)
@@ -248,7 +297,7 @@ static void decode_des_etc(BYTE *buf,int len,int type,int cycle)
* Grf data decode sub : zip
*------------------------------------------
*/
-static int decode_zip(Bytef* dest, uLongf* destLen, const Bytef* source, uLong sourceLen)
+int decode_zip(unsigned char *dest, unsigned long* destLen, const unsigned char* source, unsigned long sourceLen)
{
z_stream stream;
int err;
@@ -258,26 +307,57 @@ static int decode_zip(Bytef* dest, uLongf* destLen, const Bytef* source, uLong s
/* Check for source > 64K on 16-bit machine: */
if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
- stream.next_out = dest;
+ 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 = zlib_inflateInit(&stream);
+ if (err != Z_OK) return err;
+
+ err = zlib_inflate(&stream, Z_FINISH);
+ if (err != Z_STREAM_END) {
+ zlib_inflateEnd(&stream);
+ return err == Z_OK ? Z_BUF_ERROR : err;
+ }
+ *destLen = stream.total_out;
+
+ err = zlib_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 = inflateInit(&stream);
+ err = zlib_deflateInit(&stream,Z_DEFAULT_COMPRESSION);
if (err != Z_OK) return err;
- err = inflate(&stream, Z_FINISH);
+ err = zlib_deflate(&stream, Z_FINISH);
if (err != Z_STREAM_END) {
- inflateEnd(&stream);
+ zlib_inflateEnd(&stream);
return err == Z_OK ? Z_BUF_ERROR : err;
}
*destLen = stream.total_out;
- err = inflateEnd(&stream);
+ err = zlib_deflateEnd(&stream);
return err;
}
+
/***********************************************************
*** File List Sobroutines ***
***********************************************************/
@@ -315,7 +395,7 @@ FILELIST *filelist_find(char *fname)
{
int hash;
- for(hash=filelist_hash[filehash(fname)];hash>=0;hash=filelist[hash].next) {
+ for(hash=filelist_hash[filehash((unsigned char *) fname)];hash>=0;hash=filelist[hash].next) {
if(strcmpi(filelist[hash].fn,fname)==0)
break;
}
@@ -339,7 +419,7 @@ static FILELIST* filelist_add(FILELIST *entry)
}
if (filelist_entrys>=filelist_maxentry) {
- FILELIST *new_filelist = (FILELIST*)realloc(
+ FILELIST *new_filelist = (FILELIST*)aRealloc(
(void*)filelist, (filelist_maxentry+FILELIST_ADDS)*sizeof(FILELIST) );
if (new_filelist != NULL) {
filelist = new_filelist;
@@ -354,7 +434,7 @@ static FILELIST* filelist_add(FILELIST *entry)
memcpy( &filelist[filelist_entrys], entry, sizeof(FILELIST) );
- hash = filehash(entry->fn);
+ hash = filehash((unsigned char *) entry->fn);
filelist[filelist_entrys].next = filelist_hash[hash];
filelist_hash[hash] = filelist_entrys;
@@ -384,7 +464,7 @@ static void filelist_adjust(void)
{
if (filelist!=NULL) {
if (filelist_maxentry>filelist_entrys) {
- FILELIST *new_filelist = (FILELIST*)realloc(
+ FILELIST *new_filelist = (FILELIST*)aRealloc(
(void*)filelist,filelist_entrys*sizeof(FILELIST) );
if (new_filelist != NULL) {
filelist = new_filelist;
@@ -443,17 +523,17 @@ int grfio_size(char *fname)
entry = filelist_find(fname);
if (entry==NULL || entry->gentry<0) { // LocalFileCheck
- char lfname[256],rname[256],*p;
+ char lfname[256],*rname,*p;
FILELIST lentry;
struct stat st;
-
- if(strcmp(data_dir, "") != 0) {
+
+ if(strcmp(data_dir, "") != 0 && (rname=grfio_resnametable(fname,lfname))!=NULL) {
//printf("%s\t",fname);
- sprintf(rname,"%s",grfio_resnametable(fname,lfname));
+ //sprintf(rname,"%s",grfio_resnametable(fname,lfname));
//printf("%s\n",rname);
sprintf(lfname,"%s%s",data_dir,rname);
//printf("%s\n",lfname);
- }
+ }
for(p=&lfname[0];*p!=0;p++) if (*p=='\\') *p = '/'; // * At the time of Unix
@@ -485,13 +565,18 @@ void* grfio_reads(char *fname, int *size)
entry = filelist_find(fname);
if (entry==NULL || entry->gentry<=0) { // LocalFileCheck
- char lfname[256],rname[256],*p;
+ char lfname[256],*rname,*p;
FILELIST lentry;
strncpy(lfname,fname,255);
- sprintf(rname,"%s",grfio_resnametable(fname,lfname));
- sprintf(lfname,"%s%s",data_dir,rname);
- //printf("%s\n",lfname);
+ // i hope this is the correct way =p [celest]
+ if ((rname=grfio_resnametable(fname,lfname))!=NULL) {
+ char tbuf[255];
+ //sprintf(rname,"%s",grfio_resnametable(fname,lfname));
+ sprintf(tbuf,"%s%s",data_dir,rname);
+ strcpy(lfname, tbuf);
+ //printf("%s\n",lfname);
+ }
for(p=&lfname[0];*p!=0;p++) if (*p=='\\') *p = '/'; // * At the time of Unix
@@ -504,7 +589,7 @@ void* grfio_reads(char *fname, int *size)
lentry.declen = ftell(in);
}
fseek(in,0,0); // SEEK_SET
- buf2 = calloc(lentry.declen+1024, 1);
+ buf2 = (unsigned char *)aCallocA(lentry.declen+1024, 1);
if (buf2==NULL) {
printf("file read memory allocate error : declen\n");
goto errret;
@@ -520,13 +605,13 @@ void* grfio_reads(char *fname, int *size)
} else {
printf("%s not found (grfio_reads)\n", fname);
//goto errret;
- free(buf2);
+ aFree(buf2);
return NULL;
}
}
}
if (entry!=NULL && entry->gentry>0) { // Archive[GRF] File Read
- buf = calloc(entry->srclen_aligned+1024, 1);
+ buf = (unsigned char *) aCallocA(entry->srclen_aligned+1024, 1);
if (buf==NULL) {
printf("file read memory allocate error : srclen_aligned\n");
goto errret;
@@ -536,13 +621,13 @@ void* grfio_reads(char *fname, int *size)
if(in==NULL) {
printf("%s not found (grfio_reads)\n",gfname);
//goto errret;
- free(buf);
+ aFree(buf);
return NULL;
}
fseek(in,entry->srcpos,0);
fread(buf,1,entry->srclen_aligned,in);
fclose(in);
- buf2=calloc(entry->declen+1024, 1);
+ buf2 = (unsigned char *)aCallocA(entry->declen+1024, 1);
if (buf2==NULL) {
printf("file decode memory allocate error\n");
goto errret;
@@ -561,16 +646,16 @@ void* grfio_reads(char *fname, int *size)
} else {
memcpy(buf2,buf,entry->declen);
}
- free(buf);
+ aFree(buf);
}
if (size!=NULL && entry!=NULL)
*size = entry->declen;
return buf2;
errret:
- if (buf!=NULL) free(buf);
- if (buf2!=NULL) free(buf2);
+ if (buf!=NULL) aFree(buf);
+ if (buf2!=NULL) aFree(buf2);
if (in!=NULL) fclose(in);
- exit(1); //return NULL;
+ return NULL;
}
/*==========================================
@@ -586,7 +671,7 @@ void* grfio_read(char *fname)
* Resource filename decode
*------------------------------------------
*/
-static unsigned char * decode_filename(unsigned char *buf,int len)
+static char * decode_filename(unsigned char *buf,int len)
{
int lop;
for(lop=0;lop<len;lop+=8) {
@@ -595,7 +680,7 @@ static unsigned char * decode_filename(unsigned char *buf,int len)
BitConvert4(&buf[lop]);
BitConvert(&buf[lop],BitSwapTable2);
}
- return buf;
+ return (char*)buf;
}
/*==========================================
@@ -608,12 +693,13 @@ static int grfio_entryread(char *gfname,int gentry)
int grf_size,list_size;
unsigned char grf_header[0x2e];
int lop,entry,entrys,ofs,grf_version;
- unsigned char *fname;
+ char *fname;
unsigned char *grf_filelist;
fp = fopen(gfname,"rb");
if(fp==NULL) {
- printf("%s not found (grfio_entryread)\n",gfname);
+ sprintf(tmp_output,"GRF Data File not found: '"CL_WHITE"%s"CL_RESET"'.\n",gfname);
+ ShowWarning(tmp_output);
return 1; // 1:not found error
}
@@ -621,7 +707,7 @@ static int grfio_entryread(char *gfname,int gentry)
grf_size = ftell(fp);
fseek(fp,0,0); // SEEK_SET
fread(grf_header,1,0x2e,fp);
- if(strcmp(grf_header,"Master of Magic") || fseek(fp,getlong(grf_header+0x1e),1)){ // SEEK_CUR
+ if(strcmp((const char *) grf_header,"Master of Magic") || fseek(fp,getlong(grf_header+0x1e),1)){ // SEEK_CUR
fclose(fp);
printf("%s read error\n",gfname);
return 2; // 2:file format error
@@ -631,7 +717,7 @@ static int grfio_entryread(char *gfname,int gentry)
if (grf_version==0x01) { //****** Grf version 01xx ******
list_size = grf_size-ftell(fp);
- grf_filelist = calloc(list_size, 1);
+ grf_filelist = (unsigned char *) aCallocA(list_size, 1);
if(grf_filelist==NULL){
fclose(fp);
printf("out of memory : grf_filelist\n");
@@ -654,7 +740,7 @@ static int grfio_entryread(char *gfname,int gentry)
fname = decode_filename(grf_filelist+ofs+6,grf_filelist[ofs]-6);
if(strlen(fname)>sizeof(aentry.fn)-1){
printf("file name too long : %s\n",fname);
- free(grf_filelist);
+ aFree(grf_filelist);
exit(1);
}
srclen=0;
@@ -679,7 +765,7 @@ static int grfio_entryread(char *gfname,int gentry)
aentry.srcpos = getlong(grf_filelist+ofs2+13)+0x2e;
aentry.cycle = srccount;
aentry.type = type;
- strncpy(aentry.fn,fname,sizeof(aentry.fn)-1);
+ 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
@@ -689,7 +775,7 @@ static int grfio_entryread(char *gfname,int gentry)
}
ofs = ofs2 + 17;
}
- free(grf_filelist);
+ aFree(grf_filelist);
} else if (grf_version==0x02) { //****** Grf version 02xx ******
unsigned char eheader[8];
@@ -706,15 +792,15 @@ static int grfio_entryread(char *gfname,int gentry)
return 4;
}
- rBuf = calloc( rSize , 1); // Get a Read Size
+ rBuf = (unsigned char *)aCallocA( rSize , 1); // Get a Read Size
if (rBuf==NULL) {
fclose(fp);
printf("out of memory : grf compress entry table buffer\n");
return 3;
}
- grf_filelist = calloc( eSize , 1); // Get a Extend Size
+ grf_filelist = (unsigned char *)aCallocA( eSize , 1); // Get a Extend Size
if (grf_filelist==NULL) {
- free(rBuf);
+ aFree(rBuf);
fclose(fp);
printf("out of memory : grf extract entry table buffer\n");
return 3;
@@ -723,7 +809,7 @@ static int grfio_entryread(char *gfname,int gentry)
fclose(fp);
decode_zip(grf_filelist,&eSize,rBuf,rSize); // Decode function
list_size = eSize;
- free(rBuf);
+ aFree(rBuf);
entrys = getlong(grf_header+0x26) - 7;
@@ -732,13 +818,14 @@ static int grfio_entryread(char *gfname,int gentry)
int ofs2,srclen,srccount,type;
FILELIST aentry;
- fname = grf_filelist+ofs;
+ fname = (char*)(grf_filelist+ofs);
if (strlen(fname)>sizeof(aentry.fn)-1) {
printf("grf : file name too long : %s\n",fname);
- free(grf_filelist);
+ aFree(grf_filelist);
exit(1);
}
- ofs2 = ofs+strlen(grf_filelist+ofs)+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);
@@ -766,7 +853,7 @@ static int grfio_entryread(char *gfname,int gentry)
}
ofs = ofs2 + 17;
}
- free(grf_filelist);
+ aFree(grf_filelist);
} else { //****** Grf Other version ******
fclose(fp);
@@ -786,11 +873,11 @@ static int grfio_entryread(char *gfname,int gentry)
static void grfio_resourcecheck()
{
int size;
- unsigned char *buf,*ptr;
+ char *buf,*ptr;
char w1[256],w2[256],src[256],dst[256];
FILELIST *entry;
- buf=grfio_reads("data\\resnametable.txt",&size);
+ buf = (char*)grfio_reads("data\\resnametable.txt",&size);
buf[size] = 0;
for(ptr=buf;ptr-buf<size;) {
@@ -816,7 +903,7 @@ static void grfio_resourcecheck()
if (!ptr) break;
ptr++;
}
- free(buf);
+ aFree(buf);
filelist_adjust(); // Unnecessary area release of filelist
}
@@ -836,10 +923,11 @@ int grfio_add(char *fname)
exit(1);
}
- printf("%s file reading...\n",fname);
+// sprintf(tmp_output,"Reading GRF File: '%s'.\n",fname);
+// ShowStatus(tmp_output);
if (gentry_entrys>=gentry_maxentry) {
- char **new_gentry = (char**)realloc(
+ char **new_gentry = (char**)aRealloc(
(void*)gentry_table,(gentry_maxentry+GENTRY_ADDS)*sizeof(char*) );
if (new_gentry!=NULL) {
int lop;
@@ -853,7 +941,7 @@ int grfio_add(char *fname)
}
}
len = strlen( fname );
- buf = calloc(len+1, 1);
+ buf = (char*)aCallocA(len+1, 1);
if (buf==NULL) {
printf("out of memory : gentry\n");
exit(1);
@@ -879,20 +967,30 @@ void grfio_final(void)
{
int lop;
- if (filelist!=NULL) free(filelist);
+ if (filelist!=NULL) aFree(filelist);
filelist = NULL;
filelist_entrys = filelist_maxentry = 0;
if (gentry_table!=NULL) {
for(lop=0;lop<gentry_entrys;lop++) {
if (gentry_table[lop]!=NULL) {
- free(gentry_table[lop]);
+ aFree(gentry_table[lop]);
}
}
- free(gentry_table);
+ aFree(gentry_table);
}
gentry_table = NULL;
gentry_entrys = gentry_maxentry = 0;
+
+#ifdef _WIN32
+ #ifndef LOCALZLIB
+ DLL_CLOSE(zlib_dll);
+ zlib_inflateInit_ = NULL;
+ zlib_inflate = NULL;
+ zlib_inflateEnd = NULL;
+ #endif
+#endif
+
}
/*==========================================
@@ -905,6 +1003,24 @@ void grfio_init(char *fname)
char line[1024], w1[1024], w2[1024];
int result = 0, result2 = 0, result3 = 0, result4 = 0;
+#ifdef _WIN32
+ #ifndef LOCALZLIB
+ if(!zlib_dll) {
+ zlib_dll = DLL_OPEN ("zlib.dll");
+ DLL_SYM (zlib_inflateInit_, zlib_dll, "inflateInit_");
+ DLL_SYM (zlib_inflate, zlib_dll, "inflate");
+ DLL_SYM (zlib_inflateEnd, zlib_dll, "inflateEnd");
+ DLL_SYM (zlib_deflateInit_, zlib_dll, "deflateInit_");
+ DLL_SYM (zlib_deflate, zlib_dll, "deflate");
+ DLL_SYM (zlib_deflateEnd, zlib_dll, "deflateEnd");
+ if(zlib_dll == NULL) {
+ MessageBox(NULL,"Can't load zlib.dll","grfio.c",MB_OK);
+ exit(1);
+ }
+ }
+ #endif
+#endif
+
data_conf = fopen(fname, "r");
// It will read, if there is grf-files.txt.
@@ -923,7 +1039,8 @@ void grfio_init(char *fname)
}
fclose(data_conf);
- printf("read %s done\n",fname);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n",fname);
+ ShowStatus(tmp_output);
} // end of reading grf-files.txt
hashinit(); // hash table initialization
@@ -945,9 +1062,9 @@ void grfio_init(char *fname)
if (strcmp(data_dir, "") == 0) // Id data_dir doesn't exist
result4 = 1; // Data directory
-
+/*
if (result != 0 && result2 != 0 && result3 != 0 && result4 != 0) {
printf("not grf file readed exit!!\n");
exit(1); // It ends, if a resource cannot read one.
- }
+ }*/
}
diff --git a/src/common/grfio.h b/src/common/grfio.h
index 53b9da8d4..3fa257e2f 100644
--- a/src/common/grfio.h
+++ b/src/common/grfio.h
@@ -8,6 +8,9 @@ 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
+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);
+
// Accessor to GRF filenames
char *grfio_setdatafile(const char *str);
char *grfio_setadatafile(const char *str);
diff --git a/src/common/lock.c b/src/common/lock.c
index 9a2205bf4..0258cbd2c 100644
--- a/src/common/lock.c
+++ b/src/common/lock.c
@@ -1,37 +1,55 @@
#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"
+#define exists(filename) (!access(filename, F_OK))
// ‘‚«ž‚݃tƒ@ƒCƒ‹‚̕ی숗
// i‘‚«ž‚Ý‚ªI‚í‚é‚Ü‚ÅA‹Œƒtƒ@ƒCƒ‹‚ð•ÛŠÇ‚µ‚Ä‚¨‚­j
// V‚µ‚¢ƒtƒ@ƒCƒ‹‚Ì‘‚«ž‚ÝŠJŽn
-FILE* lock_fopen(const char* filename,int *info) {
+FILE* lock_fopen (const char* filename, int *info) {
char newfile[512];
FILE *fp;
- int no = 0;
+ 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) );
+ 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 = 0;
+int lock_fclose (FILE *fp, const char* filename, int *info) {
+ int ret = 1;
char newfile[512];
- if(fp != NULL) {
+ char oldfile[512];
+ if (fp != NULL) {
ret = fclose(fp);
- sprintf(newfile,"%s_%04d.tmp",filename,*info);
- remove(filename);
+ 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
- rename(newfile,filename);
- return ret;
- } else {
- return 1;
+ if ((ret = rename(newfile,filename)) != 0) { // rename our temporary file to its correct name
+ sprintf(tmp_output,"%s - '"CL_WHITE"%s"CL_RESET"'\n", strerror(errno), newfile);
+ ShowError(tmp_output);
+ }
}
+
+ return ret;
}
diff --git a/src/common/malloc.c b/src/common/malloc.c
index eda9bc218..b81c25ed5 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -1,13 +1,27 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "malloc.h"
+#ifdef MEMWATCH
+#include "memwatch.h"
+#endif
+
+// “ÆŽ©ƒƒ‚ƒŠƒ}ƒl[ƒWƒƒ‚ðŽg—p‚·‚éê‡AŽŸ‚̃Rƒƒ“ƒg‚ðŠO‚µ‚Ä‚­‚¾‚³‚¢B
+//#define USE_MEMMGR
+
+#if !defined(DMALLOC) && !defined(GCOLLECT) && !defined(BCHECK) && !defined(USE_MEMMGR)
+
void* aMalloc_( size_t size, const char *file, int line, const char *func )
{
void *ret;
-
+
// printf("%s:%d: in func %s: malloc %d\n",file,line,func,size);
+#ifdef MEMWATCH
+ ret=mwMalloc(size,file,line);
+#else
ret=malloc(size);
+#endif
if(ret==NULL){
printf("%s:%d: in func %s: malloc error out of memory!\n",file,line,func);
exit(1);
@@ -18,9 +32,13 @@ void* aMalloc_( size_t size, const char *file, int line, const char *func )
void* aCalloc_( size_t num, size_t size, const char *file, int line, const char *func )
{
void *ret;
-
+
// printf("%s:%d: in func %s: calloc %d %d\n",file,line,func,num,size);
+#ifdef MEMWATCH
+ ret=mwCalloc(num,size,file,line);
+#else
ret=calloc(num,size);
+#endif
if(ret==NULL){
printf("%s:%d: in func %s: calloc error out of memory!\n",file,line,func);
exit(1);
@@ -32,9 +50,13 @@ void* aCalloc_( size_t num, size_t size, const char *file, int line, const char
void* aRealloc_( void *p, size_t size, const char *file, int line, const char *func )
{
void *ret;
-
+
// printf("%s:%d: in func %s: realloc %p %d\n",file,line,func,p,size);
+#ifdef MEMWATCH
+ ret=mwRealloc(p,size,file,line);
+#else
ret=realloc(p,size);
+#endif
if(ret==NULL){
printf("%s:%d: in func %s: realloc error out of memory!\n",file,line,func);
exit(1);
@@ -42,3 +64,485 @@ void* aRealloc_( void *p, size_t size, const char *file, int line, const char *f
}
return ret;
}
+
+char* aStrdup_( const void *p, const char *file, int line, const char *func )
+{
+ char *ret;
+
+ // printf("%s:%d: in func %s: strdup %p\n",file,line,func,p);
+#ifdef MEMWATCH
+ ret=mwStrdup(p,file,line);
+#else
+ ret= strdup((char *) p);
+#endif
+ if(ret==NULL){
+ printf("%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 )
+{
+ // printf("%s:%d: in func %s: free %p\n",file,line,func,p);
+#ifdef MEMWATCH
+ mwFree(p,file,line);
+#else
+ free(p);
+#endif
+}
+
+#elif defined(GCOLLECT)
+
+void * _bcallocA(size_t size, size_t cnt) {
+ void *ret = aMallocA(size * cnt);
+ memset(ret, 0, size * cnt);
+ return ret;
+}
+
+void * _bcalloc(size_t size, size_t cnt) {
+ void *ret = aMalloc(size * cnt);
+ memset(ret, 0, size * cnt);
+ return ret;
+}
+
+char * _bstrdup(const char *chr) {
+ int len = strlen(chr);
+ char *ret = (char*)aMalloc(len + 1);
+ strcpy(ret, chr);
+ return ret;
+}
+
+#elif defined(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ƒ†ƒjƒbƒg“¯Žm‚̓Šƒ“ƒNƒŠƒXƒg(block_prev,block_next) ‚ł‚Ȃª‚èA“¯‚¶ƒTƒC
+ * ƒY‚ðŽ‚ƒ†ƒjƒbƒg“¯Ž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‚ÌŽŸ‚̗̈æ */
+ int unit_size; /* ƒ†ƒjƒbƒg‚̃oƒCƒg” 0=–¢Žg—p */
+ int 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;
+ int size;
+ const char* file;
+ int line;
+};
+
+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 block* block_malloc(void);
+static void block_free(struct block* p);
+static void memmgr_info(void);
+
+void* aMalloc_(size_t size, const char *file, int line, const char *func ) {
+ int i;
+ struct block *block;
+ int size_hash = (size+BLOCK_ALIGNMENT-1) / BLOCK_ALIGNMENT;
+ size = size_hash * BLOCK_ALIGNMENT; /* ƒAƒ‰ƒCƒƒ“ƒg‚Ì”{”‚ÉØ‚èã‚° */
+
+ if(size == 0) {
+ return NULL;
+ }
+
+ /* ƒuƒƒbƒN’·‚ð’´‚¦‚é—̈æ‚ÌŠm•Û‚É‚ÍAmalloc() ‚ð—p‚¢‚é */
+ /* ‚»‚ÌÛAunit_head.block ‚É NULL ‚ð‘ã“ü‚µ‚Ä‹æ•Ê‚·‚é */
+ if(size > 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;
+ if(unit_head_large_first == NULL) {
+ unit_head_large_first = p;
+ p->next = NULL;
+ p->prev = NULL;
+ } else {
+ unit_head_large_first->prev = p;
+ p->prev = NULL;
+ p->next = unit_head_large_first;
+ unit_head_large_first = p;
+ }
+ return (char *)p + sizeof(struct unit_head_large);
+ } else {
+ printf("MEMMGR::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 + sizeof(struct unit_head);
+ block->unit_count = 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;
+ return (char *)head + sizeof(struct unit_head);
+ }
+ }
+ // ‚±‚±‚É—ˆ‚Ä‚Í‚¢‚¯‚È‚¢B
+ printf("MEMMGR::memmgr_malloc() serious error.\n");
+ memmgr_info();
+ exit(1);
+ return NULL;
+};
+
+void* aCalloc_(size_t num, size_t size, const char *file, int line, const char *func ) {
+ void *p = aMalloc_(num * size,file,line,func);
+ memset(p,0,num * size);
+ return p;
+}
+
+void* aRealloc_(void *memblock, size_t size, const char *file, int line, const char *func ) {
+ size_t old_size;
+ if(memblock == NULL) {
+ return aMalloc_(size,file,line,func);
+ }
+
+ old_size = ((struct unit_head *)((char *)memblock - sizeof(struct unit_head)))->size;
+ if(old_size > size) {
+ // ƒTƒCƒYk¬ -> ‚»‚Ì‚Ü‚Ü•Ô‚·iŽè”²‚«j
+ return memblock;
+ } else {
+ // ƒTƒCƒYŠg‘å
+ void *p = aMalloc_(size,file,line,func);
+ if(p != NULL) {
+ memcpy(p,memblock,old_size);
+ }
+ aFree_(memblock,file,line,func);
+ return p;
+ }
+}
+
+char* aStrdup_(const void *p, const char *file, int line, const char *func ) {
+ if(p == NULL) {
+ return NULL;
+ } else {
+ int len = strlen(p);
+ char *string = (char *)aMalloc_(len + 1,file,line,func);
+ memcpy(string,p,len+1);
+ return string;
+ }
+}
+
+void aFree_(void *ptr, const char *file, int line, const char *func ) {
+ struct unit_head *head = (struct unit_head *)((char *)ptr - sizeof(struct unit_head));
+ if(ptr == NULL) {
+ return;
+ } else if(head->block == NULL && head->size > 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));
+ 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;
+ }
+ free(head_large);
+ return;
+ } else {
+ /* ƒ†ƒjƒbƒg‰ð•ú */
+ struct block *block = head->block;
+ if(head->block == NULL) {
+ printf("memmgr: args of aFree is freed pointer %s line %d\n",file,line);
+ } else {
+ head->block = NULL;
+ 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;
+ }
+ }
+ }
+ }
+}
+
+/* Œ»Ý‚Ì󋵂ð•\Ž¦‚·‚é */
+static void memmgr_info(void) {
+ int i;
+ struct block *p;
+ printf("** Memory Maneger Information **\n");
+ if(block_first == NULL) {
+ printf("Uninitialized.\n");
+ return;
+ }
+ printf(
+ "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++) {
+ printf(" Block #%04u : ",p->block_no);
+ if(p->unit_size == 0) {
+ printf("unused.\n");
+ } else {
+ printf(
+ "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) {
+ printf("NULL");
+ } else {
+ printf("%04u",(p->samesize_prev)->block_no);
+ }
+ printf(" next:");
+ if(p->samesize_next == NULL) {
+ printf("NULL");
+ } else {
+ printf("%04u",(p->samesize_next)->block_no);
+ }
+ printf("\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 block *)calloc(sizeof(struct block),BLOCK_ALLOC);
+ if(p == NULL) {
+ printf("MEMMGR::block_alloc failed.\n");
+ exit(1);
+ }
+ 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;
+ }
+}
+
+static char memmer_logfile[128];
+
+static FILE* memmgr_log(void) {
+ FILE *fp = fopen(memmer_logfile,"w");
+ if(!fp) { fp = stdout; }
+ fprintf(fp,"memmgr: memory leaks found\n");
+ return fp;
+}
+
+static void memmer_exit(void) {
+ FILE *fp = NULL;
+ int i;
+ int count = 0;
+ struct block *block = block_first;
+ struct unit_head_large *large = unit_head_large_first;
+ while(block) {
+ if(block->unit_size) {
+ if(!fp) { fp = memmgr_log(); }
+ 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) {
+ fprintf(
+ fp,"%04d : %s line %d size %d\n",++count,
+ head->file,head->line,head->size
+ );
+ }
+ }
+ }
+ block = block->block_next;
+ }
+ while(large) {
+ if(!fp) { fp = memmgr_log(); }
+ fprintf(
+ fp,"%04d : %s line %d size %d\n",++count,
+ large->unit_head.file,
+ large->unit_head.line,large->unit_head.size
+ );
+ large = large->next;
+ }
+ if(!fp) {
+ printf("memmgr: no memory leaks found.\n");
+ } else {
+ printf("memmgr: memory leaks found.\n");
+ fclose(fp);
+ }
+}
+#endif
+
+int do_init_memmgr(const char* file) {
+ #ifdef USE_MEMMGR
+ sprintf(memmer_logfile,"%s.log",file);
+ atexit(memmer_exit);
+ printf("memmgr: initialised: %s\n",memmer_logfile);
+ #endif
+ return 0;
+}
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 3733a5e55..c233adb8d 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -3,6 +3,49 @@
#include <stdlib.h>
+#if defined(DMALLOC)
+
+# include "dmalloc.h"
+# define aMalloc(size) \
+ dmalloc_malloc(__FILE__, __LINE__, (size), DMALLOC_FUNC_MALLOC, 0, 0)
+# define aMallocA(size) \
+ dmalloc_malloc(__FILE__, __LINE__, (size), DMALLOC_FUNC_MALLOC, 0, 0)
+# define aCallocA(count,size) \
+ dmalloc_malloc(__FILE__, __LINE__, (count)*(size), DMALLOC_FUNC_CALLOC, 0, 0)
+# define aCalloc(count,size) \
+ dmalloc_malloc(__FILE__, __LINE__, (count)*(size), DMALLOC_FUNC_CALLOC, 0, 0)
+# define aRealloc(ptr,size) \
+ dmalloc_realloc(__FILE__, __LINE__, (ptr), (size), DMALLOC_FUNC_REALLOC, 0)
+# define aFree(ptr) free(ptr)
+# define aStrdup(ptr) strdup(ptr)
+
+#elif defined(GCOLLECT)
+
+# include "gc.h"
+# define aMalloc(n) GC_MALLOC(n)
+# define aMallocA(n) GC_MALLOC_ATOMIC(n)
+# define aCallocA(m,n) _bcallocA(m,n)
+# define aCalloc(m,n) _bcalloc(m,n)
+# define aRealloc(p,n) GC_REALLOC(p,n)
+# define aFree(n) GC_FREE(n)
+# define aStrdup(n) _bstrdup(n)
+
+ extern void * _bcalloc(size_t, size_t);
+ extern void * _bcallocA(size_t, size_t);
+ extern char * _bstrdup(const char *);
+
+#elif defined(BCHECK)
+
+# define aMalloc(n) malloc(n)
+# define aMallocA(n) malloc(n)
+# define aCalloc(m,n) calloc(m,n)
+# define aCallocA(m,n) calloc(m,n)
+# define aRealloc(p,n) realloc(p,n)
+# define aFree(n) free(n)
+# define aStrdup(n) strdup(n)
+
+#else
+
#if __STDC_VERSION__ < 199901L
# if __GNUC__ >= 2
# define __func__ __FUNCTION__
@@ -11,15 +54,24 @@
# endif
#endif
-#define ALC_MARK __FILE__, __LINE__, __func__
+# define ALC_MARK __FILE__, __LINE__, __func__
-void* aMalloc_( size_t size, const char *file, int line, const char *func );
-void* aCalloc_( size_t num, size_t size, const char *file, int line, const char *func );
-void* aRealloc_( void *p, size_t size, const char *file, int line, const char *func );
+ void* aMalloc_( size_t size, const char *file, int line, const char *func );
+ void* aCalloc_( size_t num, size_t size, const char *file, int line, const char *func );
+ void* aRealloc_( void *p, size_t size, const char *file, int line, const char *func );
+ void aFree_( void *p, const char *file, int line, const char *func );
+ char* aStrdup_( const void *p, const char *file, int line, const char *func );
-#define aMalloc(n) aMalloc_(n,ALC_MARK)
-#define aCalloc(m,n) aCalloc_(m,n,ALC_MARK)
-#define aRealloc(p,n) aRealloc_(p,n,ALC_MARK)
+# define aMalloc(n) aMalloc_(n,ALC_MARK)
+# define aMallocA(n) aMalloc_(n,ALC_MARK)
+# define aCalloc(m,n) aCalloc_(m,n,ALC_MARK)
+# define aCallocA(m,n) aCalloc_(m,n,ALC_MARK)
+# define aRealloc(p,n) aRealloc_(p,n,ALC_MARK)
+# define aStrdup(p) aStrdup_(p,ALC_MARK)
+# define aFree(p) do { aFree_(p,ALC_MARK); if(p != NULL) { p = NULL; } } while(0)
+
+#endif
+int do_init_memmgr(const char* file);
#endif
diff --git a/src/common/mmo.h b/src/common/mmo.h
index f6150d39a..1602c5655 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -7,6 +7,20 @@
#include <time.h>
#include "utils.h" // _WIN32
+#if ! defined(Assert)
+#if defined(RELEASE)
+#define Assert(EX)
+#else
+// extern "C" {
+#include <assert.h>
+// }
+#if defined(_WIN32)
+#include <crtdbg.h>
+#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)
@@ -29,7 +43,7 @@
#define MAX_AMOUNT 30000
#define MAX_ZENY 1000000000 // 1G zeny
#define MAX_CART 100
-#define MAX_SKILL 450
+#define MAX_SKILL 650
#define GLOBAL_REG_NUM 96
#define ACCOUNT_REG_NUM 16
#define ACCOUNT_REG2_NUM 16
@@ -39,7 +53,7 @@
#define MAX_STORAGE 300
#define MAX_GUILD_STORAGE 1000
#define MAX_PARTY 12
-#define MAX_GUILD 36 // increased max guild members to accomodate for +2 increase for extension levels [Valaris] (removed) [PoW]
+#define MAX_GUILD 16+10*6 // increased max guild members to accomodate for +6 increase for 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
@@ -54,8 +68,6 @@
#define MIN_CLOTH_COLOR battle_config.min_cloth_color
#define MAX_CLOTH_COLOR battle_config.max_cloth_color
-#define MIN_CHAR_ID 150000 // shouldn't ever be changed, the client requires this min value [Ajarn]
-
// for produce
#define MIN_ATTRIBUTE 0
#define MAX_ATTRIBUTE 4
@@ -102,7 +114,7 @@ struct s_pet {
int account_id;
int char_id;
int pet_id;
- short class;
+ short class_;
short level;
short egg_id;//pet egg id
short equip;//pet equip name_id
@@ -117,10 +129,13 @@ 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 class_;
short status_point,skill_point;
int hp,max_hp,sp,max_sp;
short option,karma,manner;
@@ -131,7 +146,7 @@ struct mmo_charstatus {
short head_top,head_mid,head_bottom;
char name[24];
- unsigned char base_level,job_level;
+ unsigned int base_level,job_level;
short str,agi,vit,int_,dex,luk;
unsigned char char_num,sex;
@@ -154,17 +169,18 @@ struct mmo_charstatus {
};
struct storage {
+ int dirty;
int account_id;
short storage_status;
short storage_amount;
- struct item storage[MAX_STORAGE];
+ struct item storage_[MAX_STORAGE];
};
struct guild_storage {
int guild_id;
short storage_status;
short storage_amount;
- struct item storage[MAX_GUILD_STORAGE];
+ struct item storage_[MAX_GUILD_STORAGE];
};
struct map_session_data;
@@ -185,13 +201,13 @@ struct party {
int party_id;
char name[24];
int exp;
- int item;
+ int item, itemc;
struct party_member member[MAX_PARTY];
};
struct guild_member {
int account_id, char_id;
- short hair,hair_color,gender,class,lv;
+ short hair,hair_color,gender,class_,lv;
int exp,exp_payper;
short online,position;
int rsv1,rsv2;
@@ -267,8 +283,8 @@ struct guild_castle {
int Ghp4;
int Ghp5;
int Ghp6;
- int Ghp7;
- int GID0;
+ int Ghp7;
+ int GID0;
int GID1;
int GID2;
int GID3;
@@ -313,23 +329,25 @@ enum {
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
-#ifndef strrchr
-#define strrchr rindex
-#endif
-
+#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.h b/src/common/nullpo.h
index 11283f941..0b9a9f7a5 100644
--- a/src/common/nullpo.h
+++ b/src/common/nullpo.h
@@ -87,6 +87,8 @@
#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
@@ -100,6 +102,9 @@
#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...) \
@@ -111,6 +116,9 @@
#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 */
@@ -127,6 +135,7 @@
#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
@@ -134,12 +143,14 @@
#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 */
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index b65181f3a..24d51d2dc 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -1,65 +1,68 @@
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
#include "showmsg.h"
char tmp_output[1024] = {"\0"};
-int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
- /*
- _ShowMessage MUST be used instead of printf as of 10/24/2004.
- Return: 0 = Successful, 1 = Failed.
- */
+// 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[40];
- char *output;
- if (strlen(string) <= 0) {
- ShowError("Empty string passed to ShowMessage().\n");
+
+ if (!string || strlen(string) <= 0) {
+ printf("Empty string passed to _ShowMessage().\n");
return 1;
}
switch (flag) {
+ case MSG_NONE: // direct printf replacement
+ break;
case MSG_STATUS: //Bright Green (To inform about good things)
- strcpy(prefix,"\033[1;32m[Status]\033[0;0m: ");
+ strcpy(prefix,CL_GREEN"[Status]"CL_RESET":");
break;
-/* //Do we really need this now? [MC Cameri]
case MSG_SQL: //Bright Violet (For dumping out anything related with SQL)
- strcpy(prefix,"\033[1;35m[SQL]\033[0;0m: ");
+ strcpy(prefix,CL_MAGENTA"[SQL]"CL_RESET":");
break;
-*/
- case MSG_INFORMATION: //Bright Blue (Variable information)
- strcpy(prefix,"\033[1;34m[Info]\033[0;0m: ");
+ case MSG_INFORMATION: //Bright White (Variable information)
+ strcpy(prefix,CL_WHITE"[Info]"CL_RESET":");
break;
case MSG_NOTICE: //Bright White (Less than a warning)
- strcpy(prefix,"\033[1;29m[Notice]\033[0;0m: ");
+ strcpy(prefix,CL_WHITE"[Notice]"CL_RESET":");
break;
case MSG_WARNING: //Bright Yellow
- strcpy(prefix,"\033[1;33m[Warning]\033[0;0m: ");
+ strcpy(prefix,CL_YELLOW"[Warning]"CL_RESET":");
+ break;
+ case MSG_DEBUG: //Bright Cyan, important stuff!
+ strcpy(prefix,CL_CYAN"[Debug]"CL_RESET":");
break;
case MSG_ERROR: //Bright Red (Regular errors)
- strcpy(prefix,"\033[1;31m[Error]\033[0;0m: ");
+ strcpy(prefix,CL_RED"[Error]"CL_RESET":");
break;
case MSG_FATALERROR: //Bright Red (Fatal errors, abort(); if possible)
- strcpy(prefix,"\033[1;31m[Fatal Error]\033[0;0m: ");
+ strcpy(prefix,CL_RED"[Fatal Error]"CL_RESET":");
break;
default:
- ShowError("In function _ShowMessage() -> Invalid flag passed.\n");
+ printf("In function _ShowMessage() -> Invalid flag passed.\n");
return 1;
}
- output = (char*)malloc(sizeof(char)*(strlen(prefix)+strlen(string))+1);
- if (output == NULL) {
- return 1;
-// abort(); // Kill server?
+
+ if (!(flag == MSG_DEBUG && !SHOW_DEBUG_MSG)) {
+ if (flag != MSG_NONE)
+ printf ("%s ", prefix);
+ vprintf (string, ap);
+ fflush (stdout);
}
- strcpy(output,prefix);
- strcat(output,string);
- printf(output);
- fflush(stdout);
+
+ 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) {
- printf("\033[1;31m[Error]\033[0;0m: Could not open \033[1;29m%s\033[0;0m, file not found.\n",OUTPUT_MESSAGES_LOG);
+ printf(CL_RED"[Error]"CL_RESET": Could not open '"CL_WHITE"%s"CL_RESET"', file not found.\n",OUTPUT_MESSAGES_LOG);
fflush(stdout);
return;
}
@@ -71,3 +74,67 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
*/
return 0;
}
+
+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
index 1c4a2dfcb..b5f4d4bfd 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -1,50 +1,57 @@
#ifndef _SHOWMSG_H_
#define _SHOWMSG_H_
-extern char tmp_output[1024];
-
-enum msg_type {MSG_STATUS,/* MSG_SQL, */MSG_INFORMATION,MSG_NOTICE,MSG_WARNING,MSG_ERROR,MSG_FATALERROR};
-
-extern int _ShowMessage(const char *string, enum msg_type flag);
-
-/* MSG_XX */
- #define ShowMsg(string,flag) _ShowMessage(string,flag)
-// #define DisplayMsg(string,flag) _ShowMessage(string,flag)
- #define ShowMessage(string,flag) _ShowMessage(string,flag)
-
-/* MSG_STATUS */
- #define ShowStatus(string) _ShowMessage(string,MSG_STATUS)
-// #define DisplayStatus(string) _ShowMessage(string,MSG_STATUS)
-
-/* MSG_SQL*/
-// #define ShowSQL(string) _ShowMessage(string,MSG_SQL)
-// #define DisplaySQL(string) _ShowMessage(string,MSG_SQL)
-
-/* MSG_INFORMATION */
- #define ShowInfo(string) _ShowMessage(string,MSG_INFORMATION)
-// #define DisplayInfo(string) _ShowMessage(string,MSG_INFORMATION)
-// #define ShowInformation(string) _ShowMessage(string,MSG_INFORMATION)
-// #define DisplayInformation(string) _ShowMessage(string,MSG_INFORMATION)
-
-/* MSG_NOTICE */
- #define ShowNotice(string) _ShowMessage(string,MSG_NOTICE)
-// #define DisplayNotice(string) _ShowMessage(string,MSG_NOTICE)
-
-/* */
- #define ShowWarning(string) _ShowMessage(string,MSG_WARNING)
-// #define DisplayWarning(string) _ShowMessage(string,MSG_WARNING)
-// #define Warn(string) _ShowMessage(string,MSG_WARNING)
+//davidsiaw, 'lookee' here!
+#define SHOW_DEBUG_MSG 1
+
+#ifdef _WIN32
+#define CL_RESET ""
+#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 ""
+#else
+#define CL_RESET "\033[0;0m"
+#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"
+#endif
-/* MSG_ERROR */
- #define ShowError(string) _ShowMessage(string,MSG_ERROR)
-// #define DisplayError(string) _ShowMessage(string,MSG_ERROR)
-// #define OutputError(string) _ShowMessage(string,MSG_ERROR)
+extern char tmp_output[1024];
-/* MSG_FATALERROR */
- #define ShowFatalError(string) _ShowMessage(string,MSG_FATALERROR)
-// #define DisplayFatalError(string) _ShowMessage(string,MSG_ERROR)
-// #define Terminate(string) _ShowMessage(string,MSG_FATALERROR)
-// #define Kill(string) _ShowMessage(string,MSG_FATALERROR)
-// #define AbortEx(string) _ShowMessage(string,MSG_FATALERROR)
+enum msg_type {
+ MSG_NONE,
+ MSG_STATUS,
+ MSG_SQL,
+ MSG_INFORMATION,
+ MSG_NOTICE,
+ MSG_WARNING,
+ MSG_DEBUG,
+ MSG_ERROR,
+ MSG_FATALERROR
+};
+
+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
index 4afcf50d4..64f660a11 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -3,11 +3,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
+#include <errno.h>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
+#include <io.h>
+typedef int socklen_t;
#else
#include <sys/socket.h>
#include <netinet/in.h>
@@ -16,14 +19,21 @@
#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 "mmo.h" // [Valaris] thanks to fov
#include "socket.h"
-#include "utils.h"
+#include "../common/dll.h"
+#include "../common/mmo.h" // [Valaris] thanks to fov
+#include "../common/timer.h"
+#include "../common/utils.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -31,6 +41,27 @@
fd_set readfds;
int fd_max;
+time_t tick_;
+time_t stall_time_ = 60;
+int ip_rules = 1;
+
+// #define UPNP
+
+#ifdef UPNP
+#if defined(CYGWIN) || defined(_WIN32)
+DLL upnp_dll;
+int (*upnp_init)();
+int (*upnp_final)();
+int (*firewall_addport)(char *desc, int port);
+int (*upnp_addport)(char *desc, char *ip, int port);
+extern char *argp;
+
+int release_mappings = 1;
+int close_ports = 1;
+#else
+#error This doesnt work with non-Windows yet
+#endif
+#endif
int rfifo_size = 65536;
int wfifo_size = 65536;
@@ -39,6 +70,8 @@ int wfifo_size = 65536;
#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);
@@ -46,6 +79,7 @@ static int (*default_func_parse)(int) = null_parse;
static int null_console_parse(char *buf);
static int (*default_console_parse)(char*) = null_console_parse;
+static int connect_check(unsigned int ip);
/*======================================
* CORE : Set function
@@ -56,7 +90,10 @@ void set_defaultparse(int (*defaultparse)(int))
default_func_parse = defaultparse;
}
-#ifdef NSOCKET
+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
@@ -65,13 +102,12 @@ static void setsocketopts(int fd)
#ifdef SO_REUSEPORT
setsockopt(fd,SOL_SOCKET,SO_REUSEPORT,(char *)&yes,sizeof yes);
#endif
- setsockopt(fd,IPPROTO_TCP,TCP_NODELAY,(char *)&yes,sizeof yes);
+ set_nonblocking(fd, yes);
setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *) &wfifo_size , sizeof(rfifo_size ));
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *) &rfifo_size , sizeof(rfifo_size ));
}
-#endif /* NSOCKET */
/*======================================
* CORE : Socket Sub Function
*--------------------------------------
@@ -98,19 +134,10 @@ static int recv_to_fifo(int fd)
//{ int i; printf("recv %d : ",fd); for(i=0;i<len;i++){ printf("%02x ",RFIFOB(fd,session[fd]->rdata_size+i)); } printf("\n");}
if(len>0){
session[fd]->rdata_size+=len;
+ session[fd]->rdata_tick = tick_;
} else if(len<=0){
// value of connection is not necessary the same
-// if (fd == 4) // Removed [Yor]
-// printf("Char-Server Has Disconnected.\n");
-// else if (fd == 5) // Removed [Yor]
-// printf("Attempt To Log In Successful.\n");
-// else if (fd == 7) // Removed [Yor]
-// printf("Char-Server Has Disconnected.\n");
-// else if (fd == 8) // Removed [Valaris]
-// printf("%s has logged off your server.\n",RFIFOP(fd,6)); // Removed [Valaris]
-
-// else if (fd != 8) // [Valaris]
- printf("set eof : connection #%d\n", fd);
+// printf("set eof : connection #%d\n", fd);
session[fd]->eof=1;
}
return 0;
@@ -121,8 +148,10 @@ static int send_from_fifo(int fd)
int len;
//printf("send_from_fifo : %d\n",fd);
- if(session[fd]->eof)
+ if(session[fd]->eof || session[fd]->wdata == 0)
return -1;
+ if (session[fd]->wdata_size == 0)
+ return 0;
#ifdef _WIN32
len=send(fd, session[fd]->wdata,session[fd]->wdata_size, 0);
@@ -141,13 +170,22 @@ static int send_from_fifo(int fd)
} else {
session[fd]->wdata_size=0;
}
- } else {
- printf("set eof :%d\n",fd);
+ } else if (errno != EAGAIN) {
+// printf("set eof :%d\n",fd);
session[fd]->eof=1;
}
return 0;
}
+void flush_fifos()
+{
+ int i;
+ for(i=0;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)
{
printf("null_parse : %d\n",fd);
@@ -165,45 +203,40 @@ static int connect_client(int listen_fd)
int fd;
struct sockaddr_in client_address;
int len;
+#ifndef _WIN32
int result;
-#ifndef NSOCKET
- int yes = 1; // reuse fix
-#endif /* not NSOCKET */
+#endif
//printf("connect_client : %d\n",listen_fd);
len=sizeof(client_address);
- fd=accept(listen_fd,(struct sockaddr*)&client_address,&len);
+ fd = accept(listen_fd,(struct sockaddr*)&client_address,(socklen_t*)&len);
if(fd_max<=fd) fd_max=fd+1;
-#ifndef NSOCKET
- 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);
-#else /* NSOCKET */
setsocketopts(fd);
-#endif /* NSOCKET */
- if(fd==-1)
+ if(fd==-1) {
perror("accept");
- else
+ return -1;
+ } else if (ip_rules && !connect_check(*(unsigned int*)(&client_address.sin_addr))) {
+ close(fd);
+ return -1;
+ } else
FD_SET(fd,&readfds);
#ifdef _WIN32
- {
- unsigned long val = 1;
- ioctlsocket(fd, FIONBIO, &val);
- }
+ {
+ unsigned long val = 1;
+ ioctlsocket(fd, FIONBIO, &val);
+ }
#else
result = fcntl(fd, F_SETFL, O_NONBLOCK);
#endif
CREATE(session[fd], struct socket_data, 1);
- CREATE(session[fd]->rdata, char, rfifo_size);
- CREATE(session[fd]->wdata, char, wfifo_size);
+ CREATE_A(session[fd]->rdata, unsigned char, rfifo_size);
+ CREATE_A(session[fd]->wdata, unsigned char, wfifo_size);
session[fd]->max_rdata = rfifo_size;
session[fd]->max_wdata = wfifo_size;
@@ -211,6 +244,7 @@ static int connect_client(int listen_fd)
session[fd]->func_send = send_from_fifo;
session[fd]->func_parse = default_func_parse;
session[fd]->client_addr = client_address;
+ session[fd]->rdata_tick = tick_;
//printf("new_session : %d %d\n",fd,session[fd]->eof);
return fd;
@@ -221,9 +255,6 @@ int make_listen_port(int port)
struct sockaddr_in server_address;
int fd;
int result;
-#ifndef NSOCKET
- int yes = 1; // reuse fix
-#endif /* not NSOCKET */
fd = socket( AF_INET, SOCK_STREAM, 0 );
if(fd_max<=fd) fd_max=fd+1;
@@ -237,19 +268,11 @@ int make_listen_port(int port)
result = fcntl(fd, F_SETFL, O_NONBLOCK);
#endif
-#ifndef NSOCKET
- 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);
-#else /* NSOCKET */
setsocketopts(fd);
-#endif /* NSOCKET */
server_address.sin_family = AF_INET;
server_address.sin_addr.s_addr = htonl( INADDR_ANY );
- server_address.sin_port = htons(port);
+ server_address.sin_port = htons((unsigned short)port);
result = bind(fd, (struct sockaddr*)&server_address, sizeof(server_address));
if( result == -1 ) {
@@ -276,16 +299,83 @@ int make_listen_port(int port)
return fd;
}
+int make_listen_bind(long ip,int port)
+{
+ struct sockaddr_in server_address;
+ int fd;
+ int result;
+
+ fd = socket( AF_INET, SOCK_STREAM, 0 );
+ if(fd_max<=fd) fd_max=fd+1;
+
+#ifdef _WIN32
+ {
+ unsigned long val = 1;
+ ioctlsocket(fd, FIONBIO, &val);
+ }
+#else
+ result = fcntl(fd, F_SETFL, O_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);
+
+#ifdef UPNP
+ if (upnp_dll) {
+ int localaddr = ntohl(addr_[0]);
+ unsigned char *natip = (unsigned char *)&localaddr;
+ char buf[16];
+ sprintf(buf, "%d.%d.%d.%d", natip[0], natip[1], natip[2], natip[3]);
+ //printf("natip=%d.%d.%d.%d\n", natip[0], natip[1], natip[2], natip[3]);
+ if (firewall_addport(argp, port))
+ printf ("Firewall port %d successfully opened\n", port);
+ if (natip[0] == 192 && natip[1] == 168) {
+ if (upnp_addport(argp, natip, port))
+ printf ("Upnp mappings successfull\n");
+ else printf ("Upnp mapping failed\n");
+ }
+ }
+#endif
+
+ result = bind(fd, (struct sockaddr*)&server_address, sizeof(server_address));
+ if( result == -1 ) {
+ perror("bind");
+ exit(1);
+ }
+ result = listen( fd, 5 );
+ if( result == -1 ) { /* error */
+ perror("listen");
+ exit(1);
+ }
+
+ FD_SET(fd, &readfds );
+
+ CREATE(session[fd], struct socket_data, 1);
+
+ if(session[fd]==NULL){
+ printf("out of memory : make_listen_bind\n");
+ exit(1);
+ }
+ memset(session[fd],0,sizeof(*session[fd]));
+ session[fd]->func_recv = connect_client;
+
+ return fd;
+}
+
// Console Reciever [Wizputer]
int console_recieve(int i) {
int n;
char *buf;
-
- CREATE(buf, char , 64);
-
+
+ CREATE_A(buf, char , 64);
+
memset(buf,0,sizeof(64));
n = read(0, buf , 64);
+
if ( n < 0 )
printf("Console input read error\n");
else
@@ -307,48 +397,36 @@ static int null_console_parse(char *buf)
// Console Input [Wizputer]
int start_console(void) {
FD_SET(0,&readfds);
-
+
CREATE(session[0], struct socket_data, 1);
if(session[0]==NULL){
printf("out of memory : start_console\n");
exit(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;
-#ifndef NSOCKET
- int yes = 1; // reuse fix
-#endif /* not NSOCKET */
fd = socket( AF_INET, SOCK_STREAM, 0 );
-#ifndef NSOCKET
- if(fd_max<=fd) fd_max=fd+1;
- 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);
-#else /* NSOCKET */
- if(fd_max<=fd)
+ if(fd_max<=fd)
fd_max=fd+1;
setsocketopts(fd);
-#endif /* NSOCKET */
server_address.sin_family = AF_INET;
server_address.sin_addr.s_addr = ip;
- server_address.sin_port = htons(port);
+ server_address.sin_port = htons((unsigned short)port);
#ifdef _WIN32
{
@@ -364,31 +442,32 @@ int make_connection(long ip,int port)
FD_SET(fd,&readfds);
CREATE(session[fd], struct socket_data, 1);
- CREATE(session[fd]->rdata, char, rfifo_size);
- CREATE(session[fd]->wdata, char, wfifo_size);
+ CREATE_A(session[fd]->rdata, unsigned char, rfifo_size);
+ CREATE_A(session[fd]->wdata, unsigned char, wfifo_size);
session[fd]->max_rdata = rfifo_size;
session[fd]->max_wdata = 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 = tick_;
return fd;
}
int delete_session(int fd)
{
- if(fd<0 || fd>=FD_SETSIZE)
+ if(fd<=0 || fd>=FD_SETSIZE)
return -1;
FD_CLR(fd,&readfds);
if(session[fd]){
if(session[fd]->rdata)
- free(session[fd]->rdata);
+ aFree(session[fd]->rdata);
if(session[fd]->wdata)
- free(session[fd]->wdata);
+ aFree(session[fd]->wdata);
if(session[fd]->session_data)
- free(session[fd]->session_data);
- free(session[fd]);
+ aFree(session[fd]->session_data);
+ aFree(session[fd]);
}
session[fd]=NULL;
//printf("delete_session:%d\n",fd);
@@ -397,13 +476,16 @@ int delete_session(int fd)
int realloc_fifo(int fd,int rfifo_size,int wfifo_size)
{
- struct socket_data *s=session[fd];
+ struct socket_data *s;
+
+ if (fd <= 0) return 0;
+ s = session[fd];
if( s->max_rdata != rfifo_size && s->rdata_size < rfifo_size){
- RECREATE(s->rdata, char, rfifo_size);
+ RECREATE(s->rdata, unsigned char, rfifo_size);
s->max_rdata = rfifo_size;
}
if( s->max_wdata != wfifo_size && s->wdata_size < wfifo_size){
- RECREATE(s->wdata, char, wfifo_size);
+ RECREATE(s->wdata, unsigned char, wfifo_size);
s->max_wdata = wfifo_size;
}
return 0;
@@ -411,11 +493,12 @@ int realloc_fifo(int fd,int rfifo_size,int wfifo_size)
int WFIFOSET(int fd,int len)
{
- struct socket_data *s=session[fd];
-#ifdef NSOCKET
+ struct socket_data *s;
+
+ if (fd <= 0) return 0;
+ s = session[fd];
if (s == NULL || s->wdata == NULL)
return 0;
-#endif /* NSOCKET */
if( s->wdata_size+len+16384 > s->max_wdata ){
unsigned char *sin_addr = (unsigned char *)&s->client_addr.sin_addr;
realloc_fifo(fd,s->max_rdata, s->max_wdata <<1 );
@@ -423,10 +506,8 @@ int WFIFOSET(int fd,int len)
}
s->wdata_size=(s->wdata_size+(len)+2048 < s->max_wdata) ?
s->wdata_size+len : (printf("socket: %d wdata lost !!\n",fd),s->wdata_size);
-#ifdef NSOCKET
- if (s->wdata_size > (TCP_FRAME_LEN))
+ if (s->wdata_size > (TCP_FRAME_LEN))
send_from_fifo(fd);
-#endif /* NSOCKET */
return 0;
}
@@ -436,7 +517,10 @@ int do_sendrecv(int next)
struct timeval timeout;
int ret,i;
- rfd=readfds;
+ tick_ = time(0);
+
+ memcpy(&rfd, &readfds, sizeof(rfd));
+
FD_ZERO(&wfd);
for(i=0;i<fd_max;i++){
if(!session[i] && FD_ISSET(i,&readfds)){
@@ -460,13 +544,11 @@ int do_sendrecv(int next)
if(FD_ISSET(i,&wfd)){
//printf("write:%d\n",i);
if(session[i]->func_send)
- //send_from_fifo(i);
session[i]->func_send(i);
}
if(FD_ISSET(i,&rfd)){
//printf("read:%d\n",i);
if(session[i]->func_recv)
- //recv_to_fifo(i);
session[i]->func_recv(i);
}
}
@@ -479,6 +561,8 @@ int do_parsepacket(void)
for(i=0;i<fd_max;i++){
if(!session[i])
continue;
+ if ((session[i]->rdata_tick != 0) && ((tick_ - session[i]->rdata_tick) > stall_time_))
+ session[i]->eof = 1;
if(session[i]->rdata_size==0 && session[i]->eof==0)
continue;
if(session[i]->func_parse){
@@ -491,14 +575,306 @@ int do_parsepacket(void)
return 0;
}
-void do_socket(void)
+/* DDoS UŒ‚‘Îô */
+
+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) {
+ printf("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) {
+ printf("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) {
+ printf("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;
+ printf("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) {
+ printf("connect_check_clear: Cleared %d of %d from IP list.\n", clear, clear+list);
+ }
+ return list;
+}
+
+// IPƒ}ƒXƒNƒ`ƒFƒbƒN
+int access_ipmask(const char *str,struct _access_control* acc)
{
- FD_ZERO(&readfds);
+ 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) {
+ printf("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) {
+ printf("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;
+}
+
+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){
+ printf("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);
+ } 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);
+ #ifdef UPNP
+ } else if(!strcmpi(w1,"release_mappings")){
+ if(strcmpi(w2,"yes")==0)
+ release_mappings = 1;
+ else if(strcmpi(w2,"no")==0)
+ release_mappings = 0;
+ else release_mappings = atoi(w2);
+ } else if(!strcmpi(w1,"close_ports")){
+ if(strcmpi(w2,"yes")==0)
+ close_ports = 1;
+ else if(strcmpi(w2,"no")==0)
+ close_ports = 0;
+ else close_ports = 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=session[fd];
+ struct socket_data *s;
+
+ if (fd <= 0) return 0;
+ s = session[fd];
if (s->rdata_size-s->rdata_pos-len<0) {
fprintf(stderr,"too many skip\n");
@@ -521,7 +897,7 @@ int Net_Init(void)
unsigned int i;
char fullhost[255];
struct hostent* hent;
-
+
/* Start up the windows networking */
WSADATA wsaData;
@@ -533,7 +909,7 @@ int Net_Init(void)
if(gethostname(fullhost, sizeof(fullhost)) == SOCKET_ERROR) {
printf("Ugg.. no hostname defined!\n");
return 0;
- }
+ }
// XXX This should look up the local IP addresses in the registry
// instead of calling gethostbyname. However, the way IP addresses
@@ -566,7 +942,7 @@ int Net_Init(void)
return 0;
}
- for(pos = 0; pos < ic.ifc_len;)
+ for(pos = 0; pos < ic.ifc_len;)
{
struct ifreq * ir = (struct ifreq *) (ic.ifc_buf + pos);
@@ -593,3 +969,101 @@ int Net_Init(void)
return(0);
}
+
+#ifdef UPNP
+// not implemented yet ^^;
+void do_init_upnp(void)
+{
+ int *_release_mappings;
+ int *_close_ports;
+
+ upnp_dll = DLL_OPEN ("upnp.dll");
+ if (!upnp_dll) {
+ printf ("Cannot open upnp.dll: %s\n", dlerror());
+ return;
+ }
+ DLL_SYM (upnp_init, upnp_dll, "do_init");
+ DLL_SYM (upnp_final, upnp_dll, "do_final");
+ DLL_SYM (firewall_addport, upnp_dll, "Firewall_AddPort");
+ DLL_SYM (upnp_addport, upnp_dll, "UPNP_AddPort");
+ if (!upnp_init || !upnp_final || !firewall_addport || !upnp_addport) {
+ printf ("Cannot load symbol: %s\n", dlerror());
+ DLL_CLOSE (upnp_dll);
+ upnp_dll = NULL;
+ return;
+ }
+
+ DLL_SYM (_release_mappings, upnp_dll, "release_mappings");
+ DLL_SYM (_close_ports, upnp_dll, "close_ports");
+ if (release_mappings && _release_mappings)
+ *_release_mappings = release_mappings;
+ if (close_ports && _close_ports)
+ *_close_ports = close_ports;
+
+ if (upnp_init() == 0) {
+ printf ("Error initialising upnp.dll, unloading...\n");
+ DLL_CLOSE (upnp_dll);
+ upnp_dll = NULL;
+ }
+ return;
+}
+#endif
+
+void do_final_socket(void)
+{
+ int i;
+ struct _connect_history *hist , *hist2;
+ for(i=0; i<fd_max; i++) {
+ if(session[i]) {
+ delete_session(i);
+ }
+ }
+ 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);
+
+ // session[0] ‚̃_ƒ~[ƒf[ƒ^‚ðíœ
+ aFree(session[0]->rdata);
+ aFree(session[0]->wdata);
+ aFree(session[0]);
+
+#ifdef UPNP
+ if (upnp_dll) {
+ upnp_final();
+ DLL_CLOSE(upnp_dll);
+ }
+#endif
+}
+
+void do_socket(void)
+{
+ char *SOCKET_CONF_FILENAME = "conf/packet_athena.conf";
+
+ FD_ZERO(&readfds);
+
+ atexit(do_final_socket);
+ socket_config_read(SOCKET_CONF_FILENAME);
+
+ // session[0] ‚Ƀ_ƒ~[ƒf[ƒ^‚ðŠm•Û‚·‚é
+ CREATE(session[0], struct socket_data, 1);
+ CREATE_A(session[0]->rdata, unsigned char, rfifo_size);
+ CREATE_A(session[0]->wdata, unsigned char, wfifo_size);
+ session[0]->max_rdata = rfifo_size;
+ session[0]->max_wdata = wfifo_size;
+
+ // ‚Æ‚è‚ ‚¦‚¸‚T•ª‚²‚Æ‚É•s—v‚ȃf[ƒ^‚ð휂·‚é
+ add_timer_interval(gettick()+1000,connect_check_clear,0,0,300*1000);
+
+#ifdef UPNP
+ do_init_upnp();
+#endif
+}
diff --git a/src/common/socket.h b/src/common/socket.h
index e3ad0826a..37d41203e 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -5,24 +5,31 @@
#include <stdio.h>
-#ifdef _WIN32
+#ifdef __WIN32
#include <winsock.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#endif
+#include <time.h>
+#include "malloc.h"
+
+extern time_t tick_;
+extern time_t stall_time_;
// define declaration
+#define RFIFOSPACE(fd) (session[fd]->max_rdata-session[fd]->rdata_size)
#define RFIFOP(fd,pos) (session[fd]->rdata+session[fd]->rdata_pos+(pos))
-#define RFIFOB(fd,pos) (*(unsigned char*)(session[fd]->rdata+session[fd]->rdata_pos+(pos)))
-#define RFIFOW(fd,pos) (*(unsigned short*)(session[fd]->rdata+session[fd]->rdata_pos+(pos)))
-#define RFIFOL(fd,pos) (*(unsigned int*)(session[fd]->rdata+session[fd]->rdata_pos+(pos)))
-//#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 RFIFOREST(fd) (session[fd]->rdata_size-session[fd]->rdata_pos)
+// 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 int*)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 RFIFOSPACE(fd) (session[fd]->max_rdata-session[fd]->rdata_size)
+//#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)))
@@ -30,9 +37,9 @@
#define WFIFOSPACE(fd) (session[fd]->max_wdata-session[fd]->wdata_size)
#define WFIFOP(fd,pos) (session[fd]->wdata+session[fd]->wdata_size+(pos))
-#define WFIFOB(fd,pos) (*(unsigned char*)(session[fd]->wdata+session[fd]->wdata_size+(pos)))
-#define WFIFOW(fd,pos) (*(unsigned short*)(session[fd]->wdata+session[fd]->wdata_size+(pos)))
-#define WFIFOL(fd,pos) (*(unsigned int*)(session[fd]->wdata+session[fd]->wdata_size+(pos)))
+#define WFIFOB(fd,pos) (*(unsigned char*)WFIFOP(fd,pos))
+#define WFIFOW(fd,pos) (*(unsigned short*)WFIFOP(fd,pos))
+#define WFIFOL(fd,pos) (*(unsigned int*)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))
@@ -54,6 +61,7 @@ struct socket_data{
unsigned char *rdata,*wdata;
int max_rdata,max_wdata;
int rdata_size,wdata_size;
+ time_t rdata_tick;
int rdata_pos;
struct sockaddr_in client_addr;
int (*func_recv)(int);
@@ -80,6 +88,7 @@ extern int fd_max;
// 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,int rfifo_size,int wfifo_size);
@@ -90,6 +99,9 @@ int do_sendrecv(int next);
int do_parsepacket(void);
void do_socket(void);
+extern void flush_fifos();
+extern void set_nonblocking(int fd, int yes);
+
int start_console(void);
void set_defaultparse(int (*defaultparse)(int));
diff --git a/src/char_sql/strlib.c b/src/common/strlib.c
index b113d96f5..2b130e76d 100644
--- a/src/char_sql/strlib.c
+++ b/src/common/strlib.c
@@ -4,18 +4,19 @@
#include "strlib.h"
#include "utils.h"
+#include "malloc.h"
//-----------------------------------------------
// string lib.
-unsigned char* jstrescape (unsigned char* pt) {
+char* jstrescape (char* pt) {
//copy from here
- unsigned char * ptr;
+ char *ptr;
int i =0, j=0;
-
+
//copy string to temporary
- CREATE(ptr, char, J_MAX_MALLOC_SIZE);
- strcpy (ptr,pt);
-
+ CREATE_A(ptr, char, J_MAX_MALLOC_SIZE);
+ strcpy(ptr,pt);
+
while (ptr[i] != '\0') {
switch (ptr[i]) {
case '\'':
@@ -31,14 +32,14 @@ unsigned char* jstrescape (unsigned char* pt) {
}
}
pt[j++] = '\0';
- free (ptr);
- return (unsigned char*) &pt[0];
+ aFree (ptr);
+ return &pt[0];
}
-unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt) {
+char* jstrescapecpy (char* pt,char* spt) {
//copy from here
int i =0, j=0;
-
+
while (spt[i] != '\0') {
switch (spt[i]) {
case '\'':
@@ -54,12 +55,12 @@ unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt) {
}
}
pt[j++] = '\0';
- return (unsigned char*) &pt[0];
+ return &pt[0];
}
-int jmemescapecpy (unsigned char* pt,unsigned char* spt, int size) {
+int jmemescapecpy (char* pt,char* spt, int size) {
//copy from here
int i =0, j=0;
-
+
while (i < size) {
switch (spt[i]) {
case '\'':
@@ -77,3 +78,21 @@ int jmemescapecpy (unsigned char* pt,unsigned char* spt, int size) {
// 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;
+}
diff --git a/src/char_sql/strlib.h b/src/common/strlib.h
index 6b6169083..55920f823 100644
--- a/src/char_sql/strlib.h
+++ b/src/common/strlib.h
@@ -4,7 +4,10 @@
// String function library.
// code by Jioh L. Jung (ziozzang@4wish.net)
// This code is under license "BSD"
-unsigned char* jstrescape (unsigned char* pt);
-unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt);
-int jmemescapecpy (unsigned char* pt,unsigned char* spt, int size);
+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 *);
#endif
diff --git a/src/common/timer.c b/src/common/timer.c
index 97c162e7f..6a740d47a 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -1,37 +1,34 @@
-// $Id: timer.c,v 1.1.1.1 2004/09/10 17:44:49 MagicalTux Exp $
+// $Id: timer.c,v 1.1.1.1 2004/09/10 17:44:49 Yor Exp $
// original : core.c 2003/02/26 18:03:12 Rev 1.7
+//#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
-#ifdef _WIN32
-#include <winsock.h>
+#ifdef __WIN32
+#define __USE_W32_SOCKETS
+#include <windows.h>
#else
#include <sys/socket.h>
#include <sys/time.h>
#endif
#include "timer.h"
-#include "utils.h"
+#include "malloc.h"
#ifdef MEMWATCH
#include "memwatch.h"
#endif
-// If the server shows no reaction when processing thousands of monsters
-
-// or connected by many clients, please increase TIMER_MIN_INTERVEL.
-
-#define TIMER_MIN_INTERVEL 50
-
static struct TimerData* timer_data;
-static int timer_data_max,timer_data_num;
+static int timer_data_max, timer_data_num;
static int* free_timer_list;
static int free_timer_list_max, free_timer_list_pos;
-static int timer_heap_max=0; //fixed Shinomori from eA forums
+static int timer_heap_num = 0, timer_heap_max = 0;
static int* timer_heap = NULL;
// for debug
@@ -42,38 +39,37 @@ struct timer_func_list {
};
static struct timer_func_list* tfl_root;
-#if defined(_WIN32)
-void gettimeofday(struct timeval *t, struct timezone *dummy)
-{
- DWORD millisec = GetTickCount();
+#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;
+ 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)
-{
+int add_timer_func_list(int (*func)(int,unsigned int,int,int), char* name) {
struct timer_func_list* tfl;
- CREATE(tfl, struct timer_func_list, 1);
- CREATE(tfl->name, char, strlen(name) + 1);
+ //CALLOC(tfl, struct timer_func_list, 1);
+ tfl = (struct timer_func_list*) aCalloc( sizeof(struct timer_func_list) , 1);
+ //MALLOC(tfl->name, char, strlen(name) + 1);
+ tfl->name = (char *) aMalloc( strlen(name) + 1 );
tfl->next = tfl_root;
tfl->func = func;
- strcpy(tfl->name,name);
+ strcpy(tfl->name, name);
tfl_root = tfl;
return 0;
}
-char* search_timer_func_list(int (*func)(int,unsigned int,int,int))
-{
+char* search_timer_func_list(int (*func)(int,unsigned int,int,int)) {
struct timer_func_list* tfl;
- for(tfl = tfl_root;tfl;tfl = tfl->next) {
+
+ for(tfl = tfl_root; tfl; tfl = tfl->next) {
if (func == tfl->func)
return tfl->name;
}
@@ -85,19 +81,21 @@ char* search_timer_func_list(int (*func)(int,unsigned int,int,int))
*----------------------------*/
static unsigned int gettick_cache;
static int gettick_count;
-unsigned int gettick_nocache(void)
-{
+
+unsigned int gettick_nocache(void) {
struct timeval tval;
- gettimeofday(&tval,NULL);
+
+ gettimeofday(&tval, NULL);
gettick_count = 256;
- return gettick_cache = tval.tv_sec * 1000 + tval.tv_usec/1000;
+
+ return gettick_cache = tval.tv_sec * 1000 + tval.tv_usec / 1000;
}
-unsigned int gettick(void)
-{
+unsigned int gettick(void) {
gettick_count--;
- if (gettick_count<0)
+ if (gettick_count < 0)
return gettick_nocache();
+
return gettick_cache;
}
@@ -105,71 +103,66 @@ unsigned int gettick(void)
* CORE : Timer Heap
*--------------------------------------
*/
-static void push_timer_heap(int index)
-{
- int i, h;
-
- if (timer_heap == NULL || timer_heap[0] + 1 >= timer_heap_max) {
- int first = timer_heap == NULL;
-
- timer_heap_max += 256;
- RECREATE(timer_heap, int, timer_heap_max);
- memset(timer_heap + (timer_heap_max - 256), 0, sizeof(int) * 256);
- if (first)
- timer_heap[0] = 0;
- }
-
- timer_heap[0]++;
-
- for (h = timer_heap[0]-1, i = (h - 1) / 2;
- h > 0 && DIFF_TICK(timer_data[index].tick,
- timer_data[timer_heap[i + 1]].tick) < 0;
- i = (h - 1) / 2) {
- timer_heap[h + 1] = timer_heap[i + 1];
- h = i;
- }
- timer_heap[h + 1] = index;
-}
-
-static int top_timer_heap()
-{
- if (timer_heap == NULL || timer_heap[0] <= 0)
- return -1;
-
- return timer_heap[1];
-}
-
-static int pop_timer_heap()
-{
- int i,h,k;
- int ret,last;
-
- if (timer_heap == NULL || timer_heap[0] <= 0)
- return -1;
- ret = timer_heap[1];
- last = timer_heap[timer_heap[0]];
- timer_heap[0]--;
-
- for(h = 0,k = 2;k<timer_heap[0];k = k * 2 + 2) {
- if (DIFF_TICK(timer_data[timer_heap[k + 1]].tick , timer_data[timer_heap[k]].tick)>0)
- k--;
- timer_heap[h + 1] = timer_heap[k + 1], h = k;
+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;
+ //CALLOC(timer_heap, int, 256);
+ timer_heap = (int *) aCalloc( sizeof(int) , 256);
+ } else {
+ timer_heap_max += 256;
+ //REALLOC(timer_heap, int, timer_heap_max);
+ timer_heap = (int *) aRealloc( timer_heap, sizeof(int) * timer_heap_max);
+ memset(timer_heap + (timer_heap_max - 256), 0, sizeof(int) * 256);
+ }
}
- if (k == timer_heap[0])
- timer_heap[h + 1] = timer_heap[k], h = k-1;
- for(i = (h-1)/2;
- h>0 && DIFF_TICK(timer_data[timer_heap[i + 1]].tick , timer_data[last].tick)>0;
- i = (h-1)/2) {
- timer_heap[h + 1] = timer_heap[i + 1],h = i;
+ // 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)
+ 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)
+ 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)
+ 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[h + 1] = last;
- return ret;
+ timer_heap_num++;
}
-int add_timer(unsigned int tick,int (*func)(int,unsigned int,int,int),int id,int data)
-{
+int add_timer(unsigned int tick,int (*func)(int,unsigned int,int,int),int id,int data) {
struct TimerData* td;
int i;
@@ -180,24 +173,18 @@ int add_timer(unsigned int tick,int (*func)(int,unsigned int,int,int),int id,int
} else
i = timer_data_num;
if (i >= timer_data_num)
- for (i = timer_data_num;i<timer_data_max && timer_data[i].type; i++);
+ for (i = timer_data_num; i < timer_data_max && timer_data[i].type; i++);
if (i >= timer_data_num && i >= timer_data_max) {
- int j;
if (timer_data_max == 0) {
timer_data_max = 256;
- CREATE(timer_data, struct TimerData, timer_data_max);
+ //CALLOC(timer_data, struct TimerData, timer_data_max);
+ timer_data = (struct TimerData*) aCalloc( sizeof(struct TimerData) , timer_data_max);
} else {
timer_data_max += 256;
- RECREATE(timer_data, struct TimerData, timer_data_max);
- if (timer_data == NULL) {
- printf("out of memory : add_timer timer_data\n");
- exit(1);
- }
- memset(timer_data + (timer_data_max - 256), 0,
- sizeof(struct TimerData) * 256);
+ //REALLOC(timer_data, struct TimerData, timer_data_max);
+ 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);
}
- for(j = timer_data_max-256;j<timer_data_max; j++)
- timer_data[j].type = 0;
}
td = &timer_data[i];
td->tick = tick;
@@ -209,88 +196,79 @@ int add_timer(unsigned int tick,int (*func)(int,unsigned int,int,int),int id,int
push_timer_heap(i);
if (i >= timer_data_num)
timer_data_num = i + 1;
+
return i;
}
-int add_timer_interval(unsigned int tick,int (*func)(int,unsigned int,int,int),int id,int data,int interval)
-{
+int add_timer_interval(unsigned int tick,int (*func)(int,unsigned int,int,int),int id,int data,int interval) {
int tid;
+
tid = add_timer(tick,func,id,data);
timer_data[tid].type = TIMER_INTERVAL;
timer_data[tid].interval = interval;
+
return tid;
}
-int delete_timer(int id,int (*func)(int,unsigned int,int,int))
-{
+int delete_timer(int id,int (*func)(int,unsigned int,int,int)) {
if (id <= 0 || id >= timer_data_num) {
printf("delete_timer error : no such timer %d\n", id);
return -1;
}
if (timer_data[id].func != func) {
printf("delete_timer error : function dismatch %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));
+ (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;
- timer_data[id].tick -= 60 * 60 * 1000;
+// timer_data[id].tick -= 60 * 60 * 1000;
+
return 0;
}
-int addtick_timer(int tid,unsigned int tick)
-{
+int addtick_timer(int tid,unsigned int tick) {
return timer_data[tid].tick += tick;
}
-struct TimerData* get_timer(int tid)
-{
+
+struct TimerData* get_timer(int tid) {
return &timer_data[tid];
}
+int do_timer(unsigned int tick) {
+ int i, nextmin = 1000;
-int do_timer(unsigned int tick)
-{
- int i,nextmin = 1000;
-
-#if 0
- static int disp_tick = 0;
- if (DIFF_TICK(disp_tick,tick)<-5000 || DIFF_TICK(disp_tick,tick)>5000) {
- printf("timer %d(%d + %d)\n",timer_data_num,timer_heap[0],free_timer_list_pos);
- disp_tick = tick;
- }
-#endif
-
- while((i = top_timer_heap()) >= 0) {
- if (DIFF_TICK(timer_data[i].tick , tick)>0) {
- nextmin = DIFF_TICK(timer_data[i].tick , tick);
+ while(timer_heap_num) {
+ i = timer_heap[timer_heap_num - 1]; // next shorter element
+ if (DIFF_TICK(timer_data[i].tick, tick) > 0) {
+ nextmin = DIFF_TICK(timer_data[i].tick, tick);
break;
}
- pop_timer_heap();
+ 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 (DIFF_TICK(timer_data[i].tick , tick) < -1000) {
+ if (DIFF_TICK(timer_data[i].tick, tick) < -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);
+ 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);
+ 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) {
+ 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;
- RECREATE(free_timer_list, int, free_timer_list_max);
- memset(free_timer_list + (free_timer_list_max - 256), 0,
- 256 * sizeof(free_timer_list[0]));
+ //REALLOC(free_timer_list, int, free_timer_list_max);
+ 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;
@@ -307,13 +285,31 @@ int do_timer(unsigned int tick)
}
}
- if(nextmin < TIMER_MIN_INTERVEL)
+ if (nextmin < 10)
+ nextmin = 10;
- nextmin = TIMER_MIN_INTERVEL;
return nextmin;
}
-void timer_final()
-{
- free(timer_data);
+void timer_final() {
+ struct timer_func_list* tfl = tfl_root, *tfl2;
+
+// while (tfl) {
+// tfl2 = tfl;
+// aFree(tfl->name);
+// aFree(tfl);
+// tfl = tfl2->next; // access on already freed memory
+// }
+
+ 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
index f6fc5c84d..81086cb70 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -3,6 +3,12 @@
#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
@@ -25,6 +31,10 @@ struct TimerData {
// Function prototype declaration
+#ifdef __WIN32
+void gettimeofday(struct timeval *t, void *dummy);
+#endif
+
unsigned int gettick_nocache(void);
unsigned int gettick(void);
@@ -40,6 +50,6 @@ 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));
-extern void timer_final();
+void timer_final();
#endif // _TIMER_H_
diff --git a/src/common/utils.c b/src/common/utils.c
index 2a09f773e..732b1d366 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -1,8 +1,10 @@
#include <string.h>
#include "utils.h"
#include <stdio.h>
-#include <stdlib.h>
#include <stdarg.h>
+#include <stdlib.h>
+#include "malloc.h"
+#include "mmo.h"
void dump(unsigned char *buffer, int num)
{
@@ -111,7 +113,7 @@ void str_lower(char *name)
// Allocate a StringBuf [MouseJstr]
struct StringBuf * StringBuf_Malloc()
{
- struct StringBuf * ret = (struct StringBuf *) malloc(sizeof(struct StringBuf));
+ struct StringBuf * ret = (struct StringBuf *) aMallocA(sizeof(struct StringBuf));
StringBuf_Init(ret);
return ret;
}
@@ -119,7 +121,7 @@ struct StringBuf * StringBuf_Malloc()
// Initialize a previously allocated StringBuf [MouseJstr]
void StringBuf_Init(struct StringBuf * sbuf) {
sbuf->max_ = 1024;
- sbuf->ptr_ = sbuf->buf_ = (char *) malloc(sbuf->max_ + 1);
+ sbuf->ptr_ = sbuf->buf_ = (char *) aMallocA(sbuf->max_ + 1);
}
// printf into a StringBuf, moving the pointer [MouseJstr]
@@ -142,7 +144,7 @@ int StringBuf_Printf(struct StringBuf *sbuf,const char *fmt,...)
/* Else try again with more space. */
sbuf->max_ *= 2; // twice the old size
off = sbuf->ptr_ - sbuf->buf_;
- sbuf->buf_ = (char *) realloc(sbuf->buf_, sbuf->max_ + 1);
+ sbuf->buf_ = (char *) aRealloc(sbuf->buf_, sbuf->max_ + 1);
sbuf->ptr_ = sbuf->buf_ + off;
}
}
@@ -156,7 +158,7 @@ int StringBuf_Append(struct StringBuf *buf1,const struct StringBuf *buf2)
if (size2 >= buf1_avail) {
int off = buf1->ptr_ - buf1->buf_;
buf1->max_ += size2;
- buf1->buf_ = (char *) realloc(buf1->buf_, buf1->max_ + 1);
+ buf1->buf_ = (char *) aRealloc(buf1->buf_, buf1->max_ + 1);
buf1->ptr_ = buf1->buf_ + off;
}
@@ -168,7 +170,7 @@ int StringBuf_Append(struct StringBuf *buf1,const struct StringBuf *buf2)
// Destroy a StringBuf [MouseJstr]
void StringBuf_Destroy(struct StringBuf *sbuf)
{
- free(sbuf->buf_);
+ aFree(sbuf->buf_);
sbuf->ptr_ = sbuf->buf_ = 0;
}
@@ -176,7 +178,7 @@ void StringBuf_Destroy(struct StringBuf *sbuf)
void StringBuf_Free(struct StringBuf *sbuf)
{
StringBuf_Destroy(sbuf);
- free(sbuf);
+ aFree(sbuf);
}
// Return the built string from the StringBuf [MouseJstr]
diff --git a/src/common/utils.h b/src/common/utils.h
index 248bcd867..63c3f21ec 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -1,5 +1,6 @@
-#ifndef UTILS_H
-#define UTILS_H
+#ifndef COMMON_UTILS_H
+#define COMMON_UTILS_H
+
#ifndef NULL
#define NULL (void *)0
@@ -20,16 +21,23 @@
#endif
-void dump(unsigned char *buffer, int num);
+ void dump(unsigned char *buffer, int num);
+
#define CREATE(result, type, number) do {\
if ((number) * sizeof(type) <= 0) \
printf("SYSERR: Zero bytes or less requested at %s:%d.\n", __FILE__, __LINE__); \
- if (!((result) = (type *) calloc ((number), sizeof(type)))) \
+ if (!((result) = (type *) aCalloc ((number), sizeof(type)))) \
+ { perror("SYSERR: malloc failure"); abort(); } } while(0)
+
+#define CREATE_A(result, type, number) do {\
+ if ((number) * sizeof(type) <= 0) \
+ printf("SYSERR: Zero bytes or less requested at %s:%d.\n", __FILE__, __LINE__); \
+ if (!((result) = (type *) aCallocA ((number), sizeof(type)))) \
{ perror("SYSERR: malloc failure"); abort(); } } while(0)
#define RECREATE(result,type,number) do {\
- if (!((result) = (type *) realloc ((result), sizeof(type) * (number))))\
+ if (!((result) = (type *) aRealloc ((result), sizeof(type) * (number))))\
{ printf("SYSERR: realloc failure"); abort(); } } while(0)
struct StringBuf {
diff --git a/src/ladmin/GNUmakefile b/src/ladmin/GNUmakefile
deleted file mode 100644
index 879edaeea..000000000
--- a/src/ladmin/GNUmakefile
+++ /dev/null
@@ -1,14 +0,0 @@
-all: ladmin
-txt: ladmin
-sql: ladmin
-
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h
-
-ladmin: ladmin.o md5calc.o $(COMMON_OBJ)
- $(CC) -o ../../$@ ladmin.o md5calc.o $(COMMON_OBJ)
-ladmin.o: ladmin.c ladmin.h md5calc.h $(COMMON_H)
-md5calc.o: md5calc.c md5calc.h
-
-clean:
- rm -f *.o ../../ladmin
diff --git a/src/ladmin/Makefile b/src/ladmin/Makefile
index 879edaeea..20722350b 100644
--- a/src/ladmin/Makefile
+++ b/src/ladmin/Makefile
@@ -2,11 +2,11 @@ all: ladmin
txt: ladmin
sql: ladmin
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.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/db.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)
+ $(CC) -o ../../$@ ladmin.o md5calc.o $(COMMON_OBJ) $(LIB_S)
ladmin.o: ladmin.c ladmin.h md5calc.h $(COMMON_H)
md5calc.o: md5calc.c md5calc.h
diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c
index 497f3bdab..432a78a95 100644
--- a/src/ladmin/ladmin.c
+++ b/src/ladmin/ladmin.c
@@ -6,27 +6,42 @@
///////////////////////////////////////////////////////////////////////////
#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 <stdio.h>
-#include <stdlib.h>
#include <netinet/in.h>
#include <sys/time.h> // gettimeofday
-#include <time.h>
#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 <arpa/inet.h> // inet_addr
-#include <netdb.h> // gethostbyname
#include <stdarg.h> // valist
#include <ctype.h> // tolower
-#include "core.h"
-#include "socket.h"
+#include "../common/strlib.h"
+#include "../common/core.h"
+#include "../common/socket.h"
#include "ladmin.h"
-#include "version.h"
-#include "mmo.h"
+#include "../common/version.h"
+#include "../common/mmo.h"
#ifdef PASSWORDENC
#include "md5calc.h"
@@ -266,7 +281,7 @@ int ladmin_log(char *fmt, ...) {
fprintf(logfp, RETCODE);
else {
gettimeofday(&tv, NULL);
- strftime(tmpstr, 24, date_format, localtime(&(tv.tv_sec)));
+ 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);
}
@@ -277,23 +292,6 @@ int ladmin_log(char *fmt, ...) {
return 0;
}
-//-----------------------------------------------------
-// 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;
-}
-
//---------------------------------------------
// Function to return ordonal text of a number.
//---------------------------------------------
@@ -367,9 +365,9 @@ int verify_accountname(char* account_name) {
//---------------------------------------------------
// E-mail check: return 0 (not correct) or 1 (valid).
//---------------------------------------------------
-int e_mail_check(unsigned char *email) {
+int e_mail_check(char *email) {
char ch;
- unsigned char* last_arobas;
+ char* last_arobas;
// athena limits
if (strlen(email) < 3 || strlen(email) > 39)
@@ -3252,7 +3250,7 @@ int parse_fromlogin(int fd) {
}
// printf("parse_fromlogin : %d %d %d\n", fd, RFIFOREST(fd), RFIFOW(fd,0));
- sd = session[fd]->session_data;
+ sd = (struct char_session_data*)session[fd]->session_data;
while(RFIFOREST(fd) >= 2) {
switch(RFIFOW(fd,0)) {
@@ -3302,11 +3300,11 @@ int parse_fromlogin(int fd) {
memcpy(md5key, RFIFOP(fd,4), RFIFOW(fd,2) - 4);
md5key[sizeof(md5key)-1] = '0';
if (passenc == 1) {
- strncpy(md5str, RFIFOP(fd,4), RFIFOW(fd,2) - 4);
+ 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, RFIFOP(fd,4));
+ strcat(md5str, (const char*)RFIFOP(fd,4));
}
MD5_String2binary(md5str, md5bin);
WFIFOW(login_fd,0) = 0x7918; // Request for administation login (encrypted password)
@@ -3801,7 +3799,7 @@ int parse_fromlogin(int fd) {
case 0x7947: // answer of an account name search
if (RFIFOREST(fd) < 30)
return 0;
- if (strcmp(RFIFOP(fd,6), "") == 0) {
+ 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", RFIFOL(fd,2));
ladmin_log("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas." RETCODE, RFIFOL(fd,2));
@@ -4018,7 +4016,7 @@ int parse_fromlogin(int fd) {
connect_until_time = (time_t)RFIFOL(fd,140);
ban_until_time = (time_t)RFIFOL(fd,144);
memset(memo, '\0', sizeof(memo));
- strncpy(memo, RFIFOP(fd,150), RFIFOW(fd,148));
+ strncpy(memo, (const char*)RFIFOP(fd,150), RFIFOW(fd,148));
if (RFIFOL(fd,2) == -1) {
if (defaultlanguage == 'F') {
printf("Impossible de trouver le compte [%s]. Le compte n'existe pas.\n", parameters);
@@ -4258,8 +4256,8 @@ int ladmin_config_read(const char *cfgName) {
line[sizeof(line)-1] = '\0';
if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2) {
- remove_control_chars(w1);
- remove_control_chars(w2);
+ remove_control_chars((unsigned char *) w1);
+ remove_control_chars((unsigned char *) w2);
if(strcmpi(w1,"login_ip")==0){
struct hostent *h = gethostbyname (w2);
diff --git a/src/ladmin/md5calc.c b/src/ladmin/md5calc.c
index 7b9a9a2c6..c6c958583 100644
--- a/src/ladmin/md5calc.c
+++ b/src/ladmin/md5calc.c
@@ -96,7 +96,7 @@ static void MD5_Round_Calculate(const unsigned char *block,
//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;
@@ -187,7 +187,7 @@ void MD5_String2binary(const char * string, char * output)
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
+ //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);
@@ -226,7 +226,7 @@ void MD5_String(const char * string, char * output)
{
unsigned char digest[16];
- MD5_String2binary(string,digest);
+ 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],
diff --git a/src/lib/zconf_win32.h b/src/lib/zconf_win32.h
new file mode 100644
index 000000000..6d450fc79
--- /dev/null
+++ b/src/lib/zconf_win32.h
@@ -0,0 +1,279 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-1998 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 inflateInit2_ z_inflateInit2_
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateReset z_inflateReset
+# define compress z_compress
+# define compress2 z_compress2
+# define uncompress z_uncompress
+# define adler32 z_adler32
+# define crc32 z_crc32
+# define get_crc_table z_get_crc_table
+
+# 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(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
+# define WIN32
+#endif
+#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
+# ifndef __32BIT__
+# define __32BIT__
+# endif
+#endif
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#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).
+ */
+#if defined(MSDOS) && !defined(__32BIT__)
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
+# define STDC
+#endif
+#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
+# ifndef STDC
+# define STDC
+# endif
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const
+# 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
+
+/* Old Borland C incorrectly complains about missing returns: */
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
+# define NEED_DUMMY_RETURN
+#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.
+ */
+#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+#endif
+#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
+# ifndef __32BIT__
+# define SMALL_MEDIUM
+# define FAR _far
+# endif
+#endif
+
+/* Compile with -DZLIB_DLL for Windows DLL support */
+#if defined(ZLIB_DLL)
+# if defined(_WINDOWS) || defined(WINDOWS)
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR _cdecl _export
+# endif
+# endif
+# if defined (__BORLANDC__)
+# if (__BORLANDC__ >= 0x0500) && defined (WIN32)
+# include <windows.h>
+# define ZEXPORT __declspec(dllexport) WINAPI
+# define ZEXPORTRVA __declspec(dllexport) WINAPIV
+# else
+# if defined (_Windows) && defined (__DLL__)
+# define ZEXPORT _export
+# define ZEXPORTVA _export
+# endif
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# if defined (ZLIB_DLL)
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+#endif
+
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(MACOS) && !defined(TARGET_OS_MAC)
+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 FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <sys/types.h> /* for off_t */
+# include <unistd.h> /* for SEEK_* and off_t */
+# 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
+
+/* 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(inflateInit_,"ININ")
+# pragma map(inflateInit2_,"ININ2")
+# pragma map(inflateEnd,"INEND")
+# pragma map(inflateSync,"INSY")
+# pragma map(inflateSetDictionary,"INSEDI")
+# pragma map(inflate_blocks,"INBL")
+# pragma map(inflate_blocks_new,"INBLNE")
+# pragma map(inflate_blocks_free,"INBLFR")
+# pragma map(inflate_blocks_reset,"INBLRE")
+# pragma map(inflate_codes_free,"INCOFR")
+# pragma map(inflate_codes,"INCO")
+# pragma map(inflate_fast,"INFA")
+# pragma map(inflate_flush,"INFLU")
+# pragma map(inflate_mask,"INMA")
+# pragma map(inflate_set_dictionary,"INSEDI2")
+# pragma map(inflate_copyright,"INCOPY")
+# pragma map(inflate_trees_bits,"INTRBI")
+# pragma map(inflate_trees_dynamic,"INTRDY")
+# pragma map(inflate_trees_fixed,"INTRFI")
+# pragma map(inflate_trees_free,"INTRFR")
+#endif
+
+#endif /* _ZCONF_H */
diff --git a/src/lib/zlib_win32.h b/src/lib/zlib_win32.h
new file mode 100644
index 000000000..3cd63c939
--- /dev/null
+++ b/src/lib/zlib_win32.h
@@ -0,0 +1,893 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.1.3, July 9th, 1998
+
+ Copyright (C) 1995-1998 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 ftp://ds.internic.net/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef _ZLIB_H
+#define _ZLIB_H
+
+#include "zconf_win32.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.1.3"
+
+/*
+ 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 library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio.
+
+ 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: ascii or binary */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ 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
+/* Allowed flush values; see deflate() 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_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_ASCII 1
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field */
+
+#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.
+
+ 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
+ the 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).
+
+ 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
+ 0.1% larger than avail_in plus 12 bytes. 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 data_type if it can make a good guess about
+ the input data type (Z_ASCII or Z_BINARY). 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).
+*/
+
+
+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 some
+ 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.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much
+ output as possible to the output buffer. The flushing behavior of inflate is
+ not specified for values of the flush parameter other than Z_SYNC_FLUSH
+ and Z_FINISH, but the current implementation actually flushes as much output
+ as possible anyway.
+
+ 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 routine
+ may be used for the single inflate() call.
+
+ If a preset dictionary is needed at this point (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() 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
+ adler32 checksum), 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. In the Z_DATA_ERROR
+ case, the application may then call inflateSync to look for a good
+ compression block.
+*/
+
+
+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.
+
+ 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), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match). 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. The strategy parameter only affects
+ the compression ratio but not the correctness of the compressed output even
+ if it is not set appropriately.
+
+ 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.
+
+ 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.)
+
+ 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 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. 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.
+
+ 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 negative
+ memLevel). 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 this call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the Adler32 value returned by this call of
+ inflate. The compressor and decompressor must use exactly the same
+ dictionary (see deflateSetDictionary).
+
+ 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 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).
+*/
+
+
+ /* 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 0.1% larger than
+ sourceLen plus 12 bytes. 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 0.1% larger than sourceLen plus
+ 12 bytes. 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 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.
+*/
+
+
+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". (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,
+ const voidp 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).
+*/
+
+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 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 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.
+*/
+
+ /* 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 crc32 OF((uLong crc, const Bytef *buf, uInt len));
+/*
+ Update a running crc with the bytes buf[0..len-1] and return the updated
+ crc. If buf is NULL, this function returns the required initial value
+ 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();
+*/
+
+
+ /* 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));
+#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))
+
+
+#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;}; /* hack for buggy compilers */
+#endif
+
+ZEXTERN const char * ZEXPORT zError OF((int err));
+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/src/login/GNUmakefile b/src/login/GNUmakefile
deleted file mode 100644
index 300737cbf..000000000
--- a/src/login/GNUmakefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all: login-server
-txt: login-server
-
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../common/showmsg.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/lock.h ../common/malloc.h ../common/showmsg.h
-
-login-server: login.o md5calc.o $(COMMON_OBJ)
- $(CC) -o ../../$@ login.o md5calc.o $(COMMON_OBJ)
-login.o: login.c login.h md5calc.h $(COMMON_H)
-md5calc.o: md5calc.c md5calc.h
-
-clean:
- rm -f *.o ../../login-server
diff --git a/src/login/Makefile b/src/login/Makefile
index 300737cbf..01810b1d1 100644
--- a/src/login/Makefile
+++ b/src/login/Makefile
@@ -1,11 +1,12 @@
all: login-server
txt: login-server
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../common/showmsg.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/lock.h ../common/malloc.h ../common/showmsg.h
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.o ../common/obj/lock.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/db.h ../common/lock.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
login-server: login.o md5calc.o $(COMMON_OBJ)
- $(CC) -o ../../$@ login.o md5calc.o $(COMMON_OBJ)
+ $(CC) -o ../../$@ login.o md5calc.o $(COMMON_OBJ) $(LIB_S)
+
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
index 8d7ce12a2..733411f56 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -2,20 +2,36 @@
// 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 = t;
+ timenow->tv_sec = t / CLK_TCK;
+ return;
+}
+#define gettimeofday(timenow, dummy) Gettimeofday(timenow)
+#define in_addr_t unsigned long
+#else
#include <sys/socket.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <netinet/in.h>
#include <sys/time.h>
-#include <time.h>
#include <sys/ioctl.h>
-#include <sys/stat.h> // for stat/lstat/fstat
#include <unistd.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/stat.h> // for stat/lstat/fstat
#include <signal.h>
#include <fcntl.h>
#include <string.h>
-#include <arpa/inet.h>
-#include <netdb.h>
#include <stdarg.h>
#include "../common/core.h"
@@ -27,6 +43,8 @@
#include "../common/db.h"
#include "../common/lock.h"
#include "../common/malloc.h"
+#include "../common/buffer.h"
+#include "../common/strlib.h"
#ifdef PASSWORDENC
#include "md5calc.h"
@@ -39,6 +57,8 @@
int account_id_count = START_ACCOUNT_NUM;
int server_num;
int new_account_flag = 0;
+char bind_ip_str[16];
+in_addr_t bind_ip;
int login_port = 6900;
char lan_char_ip[16];
int subneti[4];
@@ -54,15 +74,14 @@ 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 server_freezeflag[MAX_SERVERS]; // Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed
-int anti_freeze_enable = 0;
-int ANTI_FREEZE_INTERVAL = 15;
int login_fd;
@@ -94,6 +113,11 @@ int add_to_unlimited_account = 0; // Give possibility or not to adjust (ladmin c
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 {
int md5keylen;
char md5key[20];
@@ -141,6 +165,8 @@ 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;
@@ -154,31 +180,52 @@ int console = 0;
// Writing function of logs file
//------------------------------
int login_log(char *fmt, ...) {
- va_list ap;
- struct timeval tv;
- char tmpstr[2048];
+ if (log_login) {
+ va_list ap;
+ struct timeval tv;
+ char tmpstr[2048];
- if(!log_fp)
- log_fp = fopen(login_log_filename, "a");
+ if(!log_fp)
+ log_fp = fopen(login_log_filename, "a");
- 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);
- gettimeofday(&tv, NULL);
- strftime(tmpstr, 24, date_format, localtime(&(tv.tv_sec)));
- sprintf(tmpstr + strlen(tmpstr), ".%03d: %s", (int)tv.tv_usec / 1000, fmt);
- vfprintf(log_fp, tmpstr, ap);
- va_end(ap);
+ if (log_fp) {
+ if (fmt[0] == '\0') // jump a line if no message
+ fprintf(log_fp, RETCODE);
+ else {
+ va_start(ap, fmt);
+ 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(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
}
- fflush(log_fp); // under cygwin or windows, if software is stopped, data are not written in the file -> fflush at every line
}
return 0;
}
+//-----------------------------------------------------
+// Online User Database [Wizputer]
+//-----------------------------------------------------
+
+void add_online_user (int account_id) {
+ int *p;
+ p = (int *)aMalloc(sizeof(int));
+ *p = account_id;
+ numdb_insert(online_db, account_id, p);
+}
+int is_user_online (int account_id) {
+ int *p = (int*)numdb_search(online_db, account_id);
+ return (p != NULL);
+}
+void remove_online_user (int account_id) {
+ int *p;
+ p = (int*)numdb_erase(online_db, account_id);
+ aFree(p);
+}
+
//----------------------------------------------------------------------
// 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)
@@ -213,12 +260,12 @@ void addGM(int account_id, int level) {
}
return;
}
-
+
// if new account
if (i == GM_num && do_add) {
if (GM_num >= GM_max) {
GM_max += 256;
- gm_account_db = realloc(gm_account_db, sizeof(struct gm_account) * GM_max);
+ 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;
@@ -242,7 +289,7 @@ int read_gm_account() {
struct stat file_stat;
int start_range = 0, end_range = 0, is_range = 0, current_id = 0;
- if(gm_account_db) free(gm_account_db);
+ 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));
@@ -283,7 +330,7 @@ int read_gm_account() {
printf("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)
printf("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
+ else
for (current_id = start_range;current_id<=end_range;current_id++)
addGM(current_id,level);
} else {
@@ -307,14 +354,14 @@ 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(str, "%d.%d.%d.%d/%n", &a0, &a1, &a2, &a3, &i) != 4 || i == 0)
+ 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(str+i, "%d.%d.%d.%d", &a0, &a1, &a2, &a3) == 4) {
+ 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(str+i, "%d", &m) == 1 && m >= 0 && m <= 32) {
+ } 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 {
@@ -353,7 +400,7 @@ int check_ip(unsigned int ip) {
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, access_ip)) {
+ 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;
@@ -363,7 +410,7 @@ int check_ip(unsigned int ip) {
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, access_ip)) {
+ 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.
}
@@ -401,7 +448,7 @@ int check_ladminip(unsigned int ip) {
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, access_ip)) {
+ if (memcmp(access_ip, buf, strlen(access_ip)) == 0 || check_ipmask(ip, (unsigned char*)access_ip)) {
return 1;
}
}
@@ -409,29 +456,12 @@ int check_ladminip(unsigned int ip) {
return 0;
}
-//-----------------------------------------------------
-// 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;
-}
-
//---------------------------------------------------
// E-mail check: return 0 (not correct) or 1 (valid).
//---------------------------------------------------
-int e_mail_check(unsigned char *email) {
+int e_mail_check(char *email) {
char ch;
- unsigned char* last_arobas;
+ char* last_arobas;
// athena limits
if (strlen(email) < 3 || strlen(email) > 39)
@@ -577,7 +607,7 @@ int mmo_auth_init(void) {
continue;
}
userid[23] = '\0';
- remove_control_chars(userid);
+ remove_control_chars((unsigned char *)userid);
for(j = 0; j < auth_num; j++) {
if (auth_dat[j].account_id == account_id) {
printf("\033[1;31mmmo_auth_init: ******Error: an account has an identical id to another.\n");
@@ -590,8 +620,8 @@ int mmo_auth_init(void) {
printf("\033[1;31mmmo_auth_init: ******Error: account name already exists.\n");
printf(" account name '%s' -> new account not read.\n", userid); // 2 lines, account name can be long.
printf(" Account saved in log file.\033[0m\n");
- 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("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;
}
@@ -601,7 +631,7 @@ int mmo_auth_init(void) {
if (auth_num >= auth_max) {
auth_max += 256;
- auth_dat = realloc(auth_dat, sizeof(struct auth_dat) * auth_max);
+ auth_dat = (struct auth_dat*)aRealloc(auth_dat, sizeof(struct auth_dat) * auth_max);
}
memset(&auth_dat[auth_num], '\0', sizeof(struct auth_dat));
@@ -611,11 +641,11 @@ int mmo_auth_init(void) {
strncpy(auth_dat[auth_num].userid, userid, 24);
pass[23] = '\0';
- remove_control_chars(pass);
+ remove_control_chars((unsigned char *)pass);
strncpy(auth_dat[auth_num].pass, pass, 24);
lastlogin[23] = '\0';
- remove_control_chars(lastlogin);
+ 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');
@@ -636,12 +666,12 @@ int mmo_auth_init(void) {
printf("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(email);
+ remove_control_chars((unsigned char *)email);
strncpy(auth_dat[auth_num].email, email, 40);
}
error_message[19] = '\0';
- remove_control_chars(error_message);
+ 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 {
@@ -656,11 +686,11 @@ int mmo_auth_init(void) {
auth_dat[auth_num].connect_until_time = connect_until_time;
last_ip[15] = '\0';
- remove_control_chars(last_ip);
+ remove_control_chars((unsigned char *)last_ip);
strncpy(auth_dat[auth_num].last_ip, last_ip, 16);
memo[254] = '\0';
- remove_control_chars(memo);
+ remove_control_chars((unsigned char *)memo);
strncpy(auth_dat[auth_num].memo, memo, 255);
for(j = 0; j < ACCOUNT_REG2_NUM; j++) {
@@ -675,7 +705,7 @@ int mmo_auth_init(void) {
break;
}
str[31] = '\0';
- remove_control_chars(str);
+ remove_control_chars((unsigned char *)str);
strncpy(auth_dat[auth_num].account_reg2[j].str, str, 32);
auth_dat[auth_num].account_reg2[j].value = v;
}
@@ -702,7 +732,7 @@ int mmo_auth_init(void) {
continue;
}
userid[23] = '\0';
- remove_control_chars(userid);
+ remove_control_chars((unsigned char *)userid);
for(j = 0; j < auth_num; j++) {
if (auth_dat[j].account_id == account_id) {
printf("\033[1;31mmmo_auth_init: ******Error: an account has an identical id to another.\n");
@@ -726,7 +756,7 @@ int mmo_auth_init(void) {
if (auth_num >= auth_max) {
auth_max += 256;
- auth_dat = realloc(auth_dat, sizeof(struct auth_dat) * auth_max);
+ auth_dat = (struct auth_dat*)aRealloc(auth_dat, sizeof(struct auth_dat) * auth_max);
}
memset(&auth_dat[auth_num], '\0', sizeof(struct auth_dat));
@@ -736,11 +766,11 @@ int mmo_auth_init(void) {
strncpy(auth_dat[auth_num].userid, userid, 24);
pass[23] = '\0';
- remove_control_chars(pass);
+ remove_control_chars((unsigned char *)pass);
strncpy(auth_dat[auth_num].pass, pass, 24);
lastlogin[23] = '\0';
- remove_control_chars(lastlogin);
+ 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');
@@ -783,7 +813,7 @@ int mmo_auth_init(void) {
break;
}
str[31] = '\0';
- remove_control_chars(str);
+ remove_control_chars((unsigned char *)str);
strncpy(auth_dat[auth_num].account_reg2[j].str, str, 32);
auth_dat[auth_num].account_reg2[j].value = v;
}
@@ -852,7 +882,9 @@ void mmo_auth_sync(void) {
FILE *fp;
int i, j, k, lock;
int account_id;
- int id[auth_num];
+ //int id[auth_num];
+ //int *id = (int *)aCalloc(auth_num, sizeof(int));
+ CREATE_BUFFER(id, int, auth_num);
char line[65536];
// Sorting before save
@@ -870,8 +902,11 @@ void mmo_auth_sync(void) {
}
// Data save
- if ((fp = lock_fopen(account_filename, &lock)) == NULL)
+ 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");
@@ -902,6 +937,9 @@ void mmo_auth_sync(void) {
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;
}
@@ -947,7 +985,7 @@ int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len) {
//-----------------------------------------------------
void send_GM_accounts() {
int i;
- char buf[32767];
+ unsigned char buf[32767];
int len;
len = 4;
@@ -1000,8 +1038,7 @@ int mmo_auth_new(struct mmo_account* account, char sex, char* email) {
if (auth_num >= auth_max) {
auth_max += 256;
- auth_dat = realloc(auth_dat, sizeof(struct auth_dat) * auth_max);
- memset(auth_dat, 0, sizeof(struct auth_dat) * auth_max);
+ auth_dat = (struct auth_dat*)aRealloc(auth_dat, sizeof(struct auth_dat) * auth_max);
}
memset(&auth_dat[i], '\0', sizeof(struct auth_dat));
@@ -1086,7 +1123,14 @@ int mmo_auth(struct mmo_account* account, int fd) {
newaccount = 1;
account->userid[len] = '\0';
}
-
+
+ //EXE Version check [Sirius]
+ if(check_client_version == 1 && account->version != 0){
+ if(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)
@@ -1113,7 +1157,7 @@ int mmo_auth(struct mmo_account* account, int fd) {
memcpy(user_password, account->passwd, 25);
encpasswdok = 0;
#ifdef PASSWORDENC
- ld = session[fd]->session_data;
+ ld = (struct login_session_data*)session[fd]->session_data;
if (account->passwdenc > 0) {
int j = account->passwdenc;
if (!ld) {
@@ -1215,7 +1259,7 @@ int mmo_auth(struct mmo_account* account, int fd) {
}
gettimeofday(&tv, NULL);
- strftime(tmpstr, 24, date_format, localtime(&(tv.tv_sec)));
+ strftime(tmpstr, 24, date_format, localtime((const time_t*)&(tv.tv_sec)));
sprintf(tmpstr + strlen(tmpstr), ".%03d", (int)tv.tv_usec / 1000);
account->account_id = auth_dat[i].account_id;
@@ -1235,32 +1279,6 @@ int mmo_auth(struct mmo_account* account, int fd) {
return -1; // account OK
}
-//-------------------------------
-// Char-server anti-freeze system
-//-------------------------------
-int char_anti_freeze_system(int tid, unsigned int tick, int id, int data) {
- int i;
-
- //printf("Entering in char_anti_freeze_system function to check freeze of servers.\n");
- for(i = 0; i < MAX_SERVERS; i++) {
- if (server_fd[i] >= 0) {// if char-server is online
- //printf("char_anti_freeze_system: server #%d '%s', flag: %d.\n", i, server[i].name, server_freezeflag[i]);
- if (server_freezeflag[i]-- < 1) { // Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed
- printf("Char-server anti-freeze system: char-server #%d '%s' is freezed -> disconnection.\n", i, server[i].name);
- login_log("Char-server anti-freeze system: char-server #%d '%s' is freezed -> disconnection." RETCODE,
- i, server[i].name);
- session[server_fd[i]]->eof = 1;
- } else {
- // send alive packet to check connection
- WFIFOW(server_fd[i],0) = 0x2718;
- WFIFOSET(server_fd[i],2);
- }
- }
- }
-
- return 0;
-}
-
//--------------------------------
// Packet parsing for char-servers
//--------------------------------
@@ -1367,13 +1385,15 @@ int parse_fromchar(int fd) {
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);
- if(anti_freeze_enable)
- server_freezeflag[id] = 5; // Char anti-freeze system. Counter. 5 ok, 4...0 freezed
+ // send some answer
+ 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:
+ case 0x2715:
if (RFIFOREST(fd) < 46)
return 0;
{
@@ -1381,7 +1401,7 @@ int parse_fromchar(int fd) {
acc = RFIFOL(fd,2); // speed up
memcpy(email, RFIFOP(fd,6), 40);
email[39] = '\0';
- remove_control_chars(email);
+ 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,
@@ -1439,7 +1459,7 @@ int parse_fromchar(int fd) {
WBUFW(buf,0) = 0x2721;
WBUFL(buf,2) = acc;
WBUFL(buf,6) = 0;
- if (strcmp(RFIFOP(fd,8), gm_pass) == 0) {
+ if (strcmp((char*)RFIFOP(fd,8), gm_pass) == 0) {
// only non-GM can become GM
if (isGM(acc) == 0) {
// if we autorise creation
@@ -1449,7 +1469,7 @@ int parse_fromchar(int fd) {
char tmpstr[24];
struct timeval tv;
gettimeofday(&tv, NULL);
- strftime(tmpstr, 23, date_format, localtime(&(tv.tv_sec)));
+ strftime(tmpstr, 23, date_format, localtime((const time_t*)&(tv.tv_sec)));
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;
@@ -1492,10 +1512,10 @@ int parse_fromchar(int fd) {
acc = RFIFOL(fd,2);
memcpy(actual_email, RFIFOP(fd,6), 40);
actual_email[39] = '\0';
- remove_control_chars(actual_email);
+ remove_control_chars((unsigned char *)actual_email);
memcpy(new_email, RFIFOP(fd,46), 40);
new_email[39] = '\0';
- remove_control_chars(new_email);
+ 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);
@@ -1682,13 +1702,15 @@ int parse_fromchar(int fd) {
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[RFIFOW(fd,2)+1];
+ unsigned char *buf;
+ 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(p = 8, j = 0; p < RFIFOW(fd,2) && j < ACCOUNT_REG2_NUM; p += 36, j++) {
memcpy(auth_dat[i].account_reg2[j].str, RFIFOP(fd,p), 32);
auth_dat[i].account_reg2[j].str[31] = '\0';
- remove_control_chars(auth_dat[i].account_reg2[j].str);
+ remove_control_chars((unsigned char *)auth_dat[i].account_reg2[j].str);
auth_dat[i].account_reg2[j].value = RFIFOL(fd,p+32);
}
auth_dat[i].account_reg2_num = j;
@@ -1699,6 +1721,7 @@ int parse_fromchar(int fd) {
// Save
mmo_auth_sync();
// printf("parse_fromchar: receiving (from the char-server) of account_reg2 (account id: %d).\n", acc);
+ if (buf) free(buf);
break;
}
}
@@ -1735,6 +1758,21 @@ int parse_fromchar(int fd) {
RFIFOSKIP(fd,6);
}
return 0;
+
+ case 0x272b: // Set account_id to online [Wizputer]
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ add_online_user(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 0x3000: //change sex for chrif_changesex()
if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
return 0;
@@ -1774,7 +1812,7 @@ int parse_fromchar(int fd) {
logfp = fopen(login_log_unknown_packets_filename, "a");
if (logfp) {
gettimeofday(&tv, NULL);
- strftime(tmpstr, 23, date_format, localtime(&(tv.tv_sec)));
+ strftime(tmpstr, 23, date_format, localtime((const time_t*)&(tv.tv_sec)));
fprintf(logfp, "%s.%03d: receiving of an unknown packet -> disconnection" RETCODE, tmpstr, (int)tv.tv_usec / 1000);
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);
@@ -1864,7 +1902,9 @@ int parse_admin(int fd) {
return 0;
{
int st, ed, len;
- int id[auth_num];
+ //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);
@@ -1908,6 +1948,8 @@ int parse_admin(int fd) {
}
WFIFOW(fd,2) = len;
WFIFOSET(fd,len);
+ //if (id) free(id);
+ DELETE_BUFFER(id);
}
break;
@@ -1916,13 +1958,13 @@ int parse_admin(int fd) {
return 0;
{
struct mmo_account ma;
- ma.userid = RFIFOP(fd, 2);
+ ma.userid = (char*)RFIFOP(fd, 2);
memcpy(ma.passwd, RFIFOP(fd, 26), 24);
ma.passwd[24] = '\0';
memcpy(ma.lastlogin, "-", 2);
ma.sex = RFIFOB(fd,50);
WFIFOW(fd,0) = 0x7931;
- WFIFOL(fd,2) = -1;
+ 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,
@@ -1937,8 +1979,8 @@ int parse_admin(int fd) {
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(ma.userid);
- remove_control_chars(ma.passwd);
+ 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,
@@ -1951,7 +1993,7 @@ int parse_admin(int fd) {
char email[40];
memcpy(email, RFIFOP(fd,51), 40);
email[39] = '\0';
- remove_control_chars(email);
+ 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);
@@ -1968,10 +2010,10 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 26)
return 0;
WFIFOW(fd,0) = 0x7933;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF;
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ 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).
@@ -1985,7 +2027,7 @@ int parse_admin(int fd) {
// 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(buf, &auth_dat[i]);
+ 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));
@@ -2004,16 +2046,16 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 50)
return 0;
WFIFOW(fd,0) = 0x7935;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ 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(account_name);
+ 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(auth_dat[i].pass);
+ 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);
@@ -2034,14 +2076,14 @@ int parse_admin(int fd) {
char error_message[20];
int statut;
WFIFOW(fd,0) = 0x7937;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ 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(error_message);
+ 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, "-");
}
@@ -2095,7 +2137,7 @@ int parse_admin(int fd) {
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;
+ WFIFOW(fd,4+server_num*32+30) = server[i].new_;
server_num++;
}
}
@@ -2109,17 +2151,17 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 50)
return 0;
WFIFOW(fd,0) = 0x793b;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ 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(pass);
+ 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,
@@ -2141,10 +2183,10 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 27)
return 0;
WFIFOW(fd,0) = 0x793d;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ remove_control_chars((unsigned char *)account_name);
memcpy(WFIFOP(fd,6), account_name, 24);
{
char sex;
@@ -2193,10 +2235,10 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 27)
return 0;
WFIFOW(fd,0) = 0x793f;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ remove_control_chars((unsigned char *)account_name);
memcpy(WFIFOP(fd,6), account_name, 24);
{
char new_gm_level;
@@ -2221,7 +2263,7 @@ int parse_admin(int fd) {
if ((fp2 = lock_fopen(GM_account_filename, &lock)) != NULL) {
if ((fp = fopen(GM_account_filename, "r")) != NULL) {
gettimeofday(&tv, NULL);
- strftime(tmpstr, 23, date_format, localtime(&(tv.tv_sec)));
+ strftime(tmpstr, 23, date_format, localtime((const time_t*)&(tv.tv_sec)));
modify_flag = 0;
// read/write GM file
while(fgets(line, sizeof(line)-1, fp)) {
@@ -2283,10 +2325,10 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 66)
return 0;
WFIFOW(fd,0) = 0x7941;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ remove_control_chars((unsigned char *)account_name);
memcpy(WFIFOP(fd,6), account_name, 24);
{
char email[40];
@@ -2295,7 +2337,7 @@ int parse_admin(int fd) {
login_log("'ladmin': Attempt to give an invalid e-mail (account: %s, ip: %s)" RETCODE,
account_name, ip);
} else {
- remove_control_chars(email);
+ remove_control_chars((unsigned char *)email);
i = search_account_index(account_name);
if (i != -1) {
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
@@ -2318,10 +2360,10 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 28 || RFIFOREST(fd) < (28 + RFIFOW(fd,26)))
return 0;
WFIFOW(fd,0) = 0x7943;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ 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);
@@ -2335,7 +2377,7 @@ int parse_admin(int fd) {
memcpy(auth_dat[i].memo, RFIFOP(fd,28), RFIFOW(fd,26));
}
auth_dat[i].memo[size_of_memo - 1] = '\0';
- remove_control_chars(auth_dat[i].memo);
+ 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);
@@ -2353,10 +2395,10 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 26)
return 0;
WFIFOW(fd,0) = 0x7945;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ 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);
@@ -2380,7 +2422,7 @@ int parse_admin(int fd) {
memset(WFIFOP(fd,6), '\0', 24);
for(i = 0; i < auth_num; i++) {
if (auth_dat[i].account_id == RFIFOL(fd,2)) {
- strncpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ 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;
@@ -2389,7 +2431,7 @@ int parse_admin(int fd) {
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(WFIFOP(fd,6), "", 24);
+ strncpy((char*)WFIFOP(fd,6), "", 24);
}
WFIFOSET(fd,30);
RFIFOSKIP(fd,6);
@@ -2402,10 +2444,10 @@ int parse_admin(int fd) {
time_t timestamp;
char tmpstr[2048];
WFIFOW(fd,0) = 0x7949;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ 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);
@@ -2434,10 +2476,10 @@ int parse_admin(int fd) {
time_t timestamp;
char tmpstr[2048];
WFIFOW(fd,0) = 0x794b;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ remove_control_chars((unsigned char *)account_name);
timestamp = (time_t)RFIFOL(fd,26);
if (timestamp <= time(NULL))
timestamp = 0;
@@ -2482,10 +2524,10 @@ int parse_admin(int fd) {
struct tm *tmtime;
char tmpstr[2048];
WFIFOW(fd,0) = 0x794d;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ remove_control_chars((unsigned char *)account_name);
i = search_account_index(account_name);
if (i != -1) {
WFIFOL(fd,2) = auth_dat[i].account_id;
@@ -2544,7 +2586,7 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 8 || RFIFOREST(fd) < (8 + RFIFOL(fd,4)))
return 0;
WFIFOW(fd,0) = 0x794f;
- WFIFOW(fd,2) = -1;
+ 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);
@@ -2557,13 +2599,13 @@ int parse_admin(int fd) {
login_log("'ladmin': Receiving a message for broadcast, but no char-server is online (ip: %s)" RETCODE,
ip);
} else {
- char buf[32000];
+ 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(message);
+ 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);
@@ -2589,10 +2631,10 @@ int parse_admin(int fd) {
char tmpstr[2048];
char tmpstr2[2048];
WFIFOW(fd,0) = 0x7951;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ remove_control_chars((unsigned char *)account_name);
i = search_account_index(account_name);
if (i != -1) {
WFIFOL(fd,2) = auth_dat[i].account_id;
@@ -2643,10 +2685,10 @@ int parse_admin(int fd) {
if (RFIFOREST(fd) < 26)
return 0;
WFIFOW(fd,0) = 0x7953;
- WFIFOL(fd,2) = -1;
- account_name = RFIFOP(fd,2);
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
account_name[23] = '\0';
- remove_control_chars(account_name);
+ remove_control_chars((unsigned char *)account_name);
i = search_account_index(account_name);
if (i != -1) {
WFIFOL(fd,2) = auth_dat[i].account_id;
@@ -2710,7 +2752,7 @@ int parse_admin(int fd) {
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(WFIFOP(fd,7), "", 24);
+ strncpy((char*)WFIFOP(fd,7), "", 24);
WFIFOW(fd,148) = 0;
WFIFOSET(fd,150);
}
@@ -2733,7 +2775,7 @@ int parse_admin(int fd) {
logfp = fopen(login_log_unknown_packets_filename, "a");
if (logfp) {
gettimeofday(&tv, NULL);
- strftime(tmpstr, 23, date_format, localtime(&(tv.tv_sec)));
+ strftime(tmpstr, 23, date_format, localtime((const time_t*)&(tv.tv_sec)));
fprintf(logfp, "%s.%03d: receiving of an unknown packet -> disconnection" RETCODE, tmpstr, (int)tv.tv_usec / 1000);
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);
@@ -2809,6 +2851,8 @@ int parse_login(int fd) {
sprintf(ip, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+ memset(&account, 0, sizeof(account));
+
if (session[fd]->eof) {
close(fd);
delete_session(fd);
@@ -2826,7 +2870,7 @@ int parse_login(int fd) {
} else
printf("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)
@@ -2844,10 +2888,11 @@ int parse_login(int fd) {
case 0x01dd: // Ask connection of a client (encryption mode)
if (RFIFOREST(fd) < ((RFIFOW(fd,0) == 0x64) ? 55 : 47))
return 0;
-
- account.userid = RFIFOP(fd,6);
+
+ account.version = RFIFOL(fd, 2); //for exe version check [Sirius]
+ account.userid = (char*)RFIFOP(fd,6);
account.userid[23] = '\0';
- remove_control_chars(account.userid);
+ remove_control_chars((unsigned char *)account.userid);
if (RFIFOW(fd,0) == 0x64) {
memcpy(account.passwd, RFIFOP(fd,30), 24);
account.passwd[24] = '\0';
@@ -2855,7 +2900,7 @@ int parse_login(int fd) {
memcpy(account.passwd, RFIFOP(fd,30), 32);
account.passwd[32] = '\0';
}
- remove_control_chars(account.passwd);
+ remove_control_chars((unsigned char *)account.passwd);
#ifdef PASSWORDENC
account.passwdenc = (RFIFOW(fd,0) == 0x64) ? 0 : PASSWORDENC;
#else
@@ -2901,7 +2946,7 @@ int parse_login(int fd) {
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;
+ WFIFOW(fd,47+server_num*32+30) = server[i].new_;
server_num++;
}
}
@@ -2965,7 +3010,8 @@ int parse_login(int fd) {
session[fd]->eof = 1;
return 0;
}
- ld = session[fd]->session_data = (struct login_session_data*)aCalloc(1, sizeof(struct login_session_data));
+ ld = (struct login_session_data*)aCalloc(1, sizeof(struct login_session_data));
+ session[fd]->session_data = ld;
if (!ld) {
printf("login: Request for md5 key: memory allocation failure (malloc)!\n");
session[fd]->eof = 1;
@@ -2993,17 +3039,17 @@ int parse_login(int fd) {
return 0;
{
int GM_value, len;
- unsigned char* server_name;
- account.userid = RFIFOP(fd,2);
+ char* server_name;
+ account.userid = (char*)RFIFOP(fd,2);
account.userid[23] = '\0';
- remove_control_chars(account.userid);
+ remove_control_chars((unsigned char *)account.userid);
memcpy(account.passwd, RFIFOP(fd,26), 24);
account.passwd[24] = '\0';
- remove_control_chars(account.passwd);
+ remove_control_chars((unsigned char *)account.passwd);
account.passwdenc = 0;
- server_name = RFIFOP(fd,60);
+ server_name = (char*)RFIFOP(fd,60);
server_name[19] = '\0';
- remove_control_chars(server_name);
+ 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);
@@ -3017,10 +3063,8 @@ int parse_login(int fd) {
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[account.account_id].new_ = RFIFOW(fd,84);
server_fd[account.account_id] = fd;
- if(anti_freeze_enable)
- server_freezeflag[account.account_id] = 5; // Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed
WFIFOW(fd,0) = 0x2711;
WFIFOB(fd,2) = 0;
WFIFOSET(fd,3);
@@ -3042,10 +3086,8 @@ int parse_login(int fd) {
if (server_fd[account.account_id] != -1) {
printf("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);
- printf("You must probably wait that the freeze system detect the disconnection.\n");
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);
- login_log("You must probably wait that the freeze system detect the disconnection." RETCODE);
} else {
printf("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,
@@ -3086,12 +3128,12 @@ int parse_login(int fd) {
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 = session[fd]->session_data;
+ struct login_session_data *ld = (struct login_session_data*)session[fd]->session_data;
if (RFIFOW(fd,2) == 0) { // non encrypted password
- unsigned char* password="";
+ char* password="";
memcpy(password, RFIFOP(fd,4), 24);
password[24] = '\0';
- remove_control_chars(password);
+ 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);
@@ -3138,7 +3180,7 @@ int parse_login(int fd) {
logfp = fopen(login_log_unknown_packets_filename, "a");
if (logfp) {
gettimeofday(&tv, NULL);
- strftime(tmpstr, 23, date_format, localtime(&(tv.tv_sec)));
+ strftime(tmpstr, 23, date_format, localtime((const time_t*)&(tv.tv_sec)));
fprintf(logfp, "%s.%03d: receiving of an unknown packet -> disconnection" RETCODE, tmpstr, (int)tv.tv_usec / 1000);
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);
@@ -3186,9 +3228,9 @@ 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 ||
@@ -3260,8 +3302,8 @@ int login_lan_config_read(const char *lancfgName) {
if (sscanf(line,"%[^:]: %[^\r\n]", w1, w2) != 2)
continue;
- remove_control_chars(w1);
- remove_control_chars(w2);
+ 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);
@@ -3328,6 +3370,9 @@ int login_lan_config_read(const char *lancfgName) {
int login_config_read(const char *cfgName) {
char line[1024], w1[1024], w2[1024];
FILE *fp;
+ struct hostent *h = NULL;
+
+ bind_ip_str[0] = '\0';
if ((fp = fopen(cfgName, "r")) == NULL) {
printf("Configuration file (%s) not found.\n", cfgName);
@@ -3342,8 +3387,8 @@ int login_config_read(const char *cfgName) {
line[sizeof(line)-1] = '\0';
memset(w2, 0, sizeof(w2));
if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2) {
- remove_control_chars(w1);
- remove_control_chars(w2);
+ remove_control_chars((unsigned char *)w1);
+ remove_control_chars((unsigned char *)w2);
if (strcmpi(w1, "admin_state") == 0) {
admin_state = config_switch(w2);
@@ -3353,22 +3398,22 @@ int login_config_read(const char *cfgName) {
admin_pass[sizeof(admin_pass)-1] = '\0';
} else if (strcmpi(w1, "ladminallowip") == 0) {
if (strcmpi(w2, "clear") == 0) {
- if (access_ladmin_allow)
- free(access_ladmin_allow);
+ 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)
- free(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 = realloc(access_ladmin_allow, (access_ladmin_allownum+1) * ACO_STRSIZE);
+ 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);
@@ -3383,6 +3428,14 @@ int login_config_read(const char *cfgName) {
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) {
+ printf("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) {
@@ -3401,6 +3454,8 @@ int login_config_read(const char *cfgName) {
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));
@@ -3448,21 +3503,21 @@ int login_config_read(const char *cfgName) {
} else if (strcmpi(w1, "allow") == 0) {
if (strcmpi(w2, "clear") == 0) {
if (access_allow)
- free(access_allow);
+ aFree(access_allow);
access_allow = NULL;
access_allownum = 0;
} else {
if (strcmpi(w2, "all") == 0) {
// reset all previous values
if (access_allow)
- free(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 = realloc(access_allow, (access_allownum+1) * ACO_STRSIZE);
+ 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);
@@ -3472,21 +3527,21 @@ int login_config_read(const char *cfgName) {
} else if (strcmpi(w1, "deny") == 0) {
if (strcmpi(w2, "clear") == 0) {
if (access_deny)
- free(access_deny);
+ aFree(access_deny);
access_deny = NULL;
access_denynum = 0;
} else {
if (strcmpi(w2, "all") == 0) {
// reset all previous values
if (access_deny)
- free(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 = realloc(access_deny, (access_denynum+1) * ACO_STRSIZE);
+ 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);
@@ -3502,13 +3557,6 @@ int login_config_read(const char *cfgName) {
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);
- // Anti-Freeze
- } else if(strcmpi(w1,"anti_freeze_enable")==0){
- anti_freeze_enable = config_switch(w2);
- } else if (strcmpi(w1, "anti_freeze_interval") == 0) {
- ANTI_FREEZE_INTERVAL = atoi(w2);
- if (ANTI_FREEZE_INTERVAL < 5)
- ANTI_FREEZE_INTERVAL = 5; // minimum 5 seconds
} else if (strcmpi(w1, "import") == 0) {
login_config_read(w2);
} else if(strcmpi(w1,"imalive_on")==0) { //Added by Mugendai for I'm Alive mod
@@ -3519,6 +3567,15 @@ int login_config_read(const char *cfgName) {
flush_on = atoi(w2); //Added by Mugendai for GUI
} else if(strcmpi(w1,"flush_time")==0) { //Added by Mugendai for GUI
flush_time = atoi(w2); //Added by Mugendai for GUI
+ } 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;
@@ -3850,32 +3907,42 @@ int flush_timer(int tid, unsigned int tick, int id, int data){
//--------------------------------------
// Function called at exit of the server
//--------------------------------------
+static int online_db_final(void *key,void *data,va_list ap)
+{
+ int *p = (int *) data;
+ if (p) aFree(p);
+ return 0;
+}
void do_final(void) {
int i, fd;
-
+ printf("Terminating...\n");
+ fflush(stdout);
mmo_auth_sync();
+ numdb_final(online_db, online_db_final);
- if(auth_dat) free(auth_dat);
- if(gm_account_db) free(gm_account_db);
- if(access_ladmin_allow) free(access_ladmin_allow);
- if(access_allow) free(access_allow);
- if(access_deny) free(access_deny);
+ 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));
close(fd);
delete_session(fd);
- if(session[fd]->session_data) free(session[fd]->session_data);
}
}
close(login_fd);
delete_session(login_fd);
+ exit_dbn();
+ timer_final();
login_log("----End of login-server (normal end with closing of all files)." RETCODE);
if(log_fp)
fclose(log_fp);
+ printf("Finished.\n");
}
//------------------------------
@@ -3884,6 +3951,7 @@ void do_final(void) {
int do_init(int argc, char **argv) {
int i, j;
+ SERVER_TYPE = SERVER_LOGIN;
// 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
@@ -3905,12 +3973,17 @@ int do_init(int argc, char **argv) {
read_gm_account();
// set_termfunc(mmo_auth_sync);
set_defaultparse(parse_login);
- login_fd = make_listen_port(login_port);
-
- if(anti_freeze_enable > 0) {
- add_timer_func_list(char_anti_freeze_system, "char_anti_freeze_system");
- i = add_timer_interval(gettick() + 1000, char_anti_freeze_system, 0, 0, ANTI_FREEZE_INTERVAL * 1000);
- }
+ // Online user database init
+ online_db = numdb_init();
+
+ if (bind_ip_str[0] != '\0')
+ bind_ip = inet_addr(bind_ip_str);
+ else
+ bind_ip = INADDR_ANY;
+
+ //login_fd = make_listen_port(login_port);
+ login_fd = make_listen_bind(bind_ip,login_port);
+
add_timer_func_list(check_auth_sync, "check_auth_sync");
i = 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)
@@ -3934,7 +4007,7 @@ int do_init(int argc, char **argv) {
set_defaultconsoleparse(parse_console);
start_console();
}
-
+
login_log("The login-server is ready (Server is listening on the port %d)." RETCODE, login_port);
printf("The login-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n", login_port);
diff --git a/src/login/login.h b/src/login/login.h
index 9ae4734fe..c08952383 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -13,8 +13,9 @@
#define START_ACCOUNT_NUM 2000000
#define END_ACCOUNT_NUM 100000000
-int login_port;
+extern int login_port;
struct mmo_account {
+ int version; //Added for version check [Sirius]
char* userid;
char passwd[33];
int passwdenc;
@@ -33,9 +34,9 @@ struct mmo_char_server {
short port;
int users;
int maintenance;
- int new;
+ int new_;
};
-struct mmo_char_server server[MAX_SERVERS];
-int server_fd[MAX_SERVERS];
+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
index 96bfc34d0..0ee64476d 100644
--- a/src/login/md5calc.c
+++ b/src/login/md5calc.c
@@ -96,7 +96,7 @@ static void MD5_Round_Calculate(const unsigned char *block,
//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;
@@ -187,7 +187,7 @@ void MD5_String2binary(const char * string, char * output)
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
+ //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);
@@ -226,7 +226,7 @@ void MD5_String(const char * string, char * output)
{
unsigned char digest[16];
- MD5_String2binary(string,digest);
+ 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],
diff --git a/src/login_sql/GNUmakefile b/src/login_sql/GNUmakefile
deleted file mode 100644
index e941469e1..000000000
--- a/src/login_sql/GNUmakefile
+++ /dev/null
@@ -1,18 +0,0 @@
-all: login-server_sql
-sql: login-server_sql
-
-shared_libs=all
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/nullpo.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/nullpo.h
-
-login-server_sql: login.o char_int.o login_int.o md5calc.o strlib.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $^ $(LIB_S)
-
-login.o: login.c login.h md5calc.h strlib.h char_int.h login_int.h $(COMMON_H)
-char_int.o: char_int.c login.h char_int.h $(COMMON_H)
-login_int.o: login_int.c login.h login_int.h char_int.h $(COMMON_H)
-md5calc.o: md5calc.c md5calc.h
-strlib.o: strlib.c strlib.h
-
-clean:
- rm -f *.o ../../login-server_sql \ No newline at end of file
diff --git a/src/login_sql/Makefile b/src/login_sql/Makefile
index e941469e1..20b01c66d 100644
--- a/src/login_sql/Makefile
+++ b/src/login_sql/Makefile
@@ -2,17 +2,15 @@ all: login-server_sql
sql: login-server_sql
shared_libs=all
-COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/nullpo.o
-COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/nullpo.h
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/db.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/db.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
-login-server_sql: login.o char_int.o login_int.o md5calc.o strlib.o $(COMMON_OBJ)
+login-server_sql: login.o md5calc.o $(COMMON_OBJ)
$(CC) -o ../../$@ $^ $(LIB_S)
-login.o: login.c login.h md5calc.h strlib.h char_int.h login_int.h $(COMMON_H)
-char_int.o: char_int.c login.h char_int.h $(COMMON_H)
-login_int.o: login_int.c login.h login_int.h char_int.h $(COMMON_H)
+login.o: login.c login.h md5calc.h $(COMMON_H)
md5calc.o: md5calc.c md5calc.h
-strlib.o: strlib.c strlib.h
clean:
- rm -f *.o ../../login-server_sql \ No newline at end of file
+ rm -f *.o ../../login-server_sql
+
diff --git a/src/login_sql/char_int.c b/src/login_sql/char_int.c
deleted file mode 100644
index 30153737a..000000000
--- a/src/login_sql/char_int.c
+++ /dev/null
@@ -1,512 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <string.h>
-
-#include "login.h"
-
-//--------------------------------
-// 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 < servers_connected; i++) {
- if ((fd = server_fd[i]) > 0 && fd != sfd) {
- memcpy(WFIFOP(fd,0), buf, len);
- WFIFOSET(fd,len);
- c++;
- }
- }
-
- return c;
-}
-
-//--------------------------------
-// Char-server anti-freeze system
-//--------------------------------
-int char_anti_freeze_system(int tid, unsigned int tick, int id, int data) {
- int i;
-
- for(i = 0; i < MAX_SERVERS && i < servers_connected; i++) {
- if (server_fd[i] >= 0) {// if char-server is online
-// printf("char_anti_freeze_system: server #%d '%s', flag: %d.\n", i, server[i].name, server_freezeflag[i]);
- if (server_freezeflag[i]-- < 1) {// Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed
- session[server_fd[i]]->eof = 1;
- }
- }
- }
-
- return 0;
-}
-
-//-------------------------------------------
-// Request for account reg from char-server [Edit: Wizputer]
-//-------------------------------------------
-int send_account_reg(int fd, int len) {
- if (RFIFOREST(fd) < 19)
- return -1;
-
- int account_id = RFIFOL(fd,2);
- int i;
-
- 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;
- #ifdef DEBUG
- printf("Client: [%d] Auth Number: [%d]\n",fd, i);
- #endif
- break;
- }
- }
-
- if (i != AUTH_FIFO_SIZE) { // send account_reg
- int p;
- time_t connect_until_time = 0;
- char email[40] = "";
-
- sprintf(tmpsql, "SELECT `email`,`connect_until` FROM `%s` WHERE `%s`='%d'", login_db, login_db_account_id, account_id);
- sql_query(tmpsql,"send_account_reg");
-
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- if((sql_row = mysql_fetch_row(sql_res))) {
- connect_until_time = atol(sql_row[1]);
- strcpy(email, sql_row[0]);
- }
- }
- mysql_free_result(sql_res);
-
- if (account_id > 0) {
- sprintf(tmpsql, "SELECT `str`,`value` FROM `global_reg_value` WHERE `type`='1' AND `account_id`='%d'",account_id);
- sql_query(tmpsql,"send_account_reg");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- WFIFOW(fd,0) = 0x2729;
- WFIFOL(fd,4) = account_id;
- for(p = 8; (sql_row = mysql_fetch_row(sql_res));p+=36){
- memcpy(WFIFOP(fd,p), sql_row[0], 32);
- WFIFOL(fd,p+32) = atoi(sql_row[1]);
- }
- WFIFOW(fd,2) = p;
- WFIFOSET(fd,p);
- #ifdef DEBUG
- printf("account_reg2 send : login->char (auth fifo)\n");
- #endif
- 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);
- }
- mysql_free_result(sql_res);
- }
- } else {
- WFIFOW(fd,0) = 0x2713;
- WFIFOL(fd,2) = account_id;
- WFIFOB(fd,6) = 1;
- WFIFOSET(fd,51);
- }
- RFIFOSKIP(fd,19);
-
- return 0;
-}
-
-//----------------------------------------------------------
-// Number of users in the world (connected char-server(s)) [Edit: Wizputer]
-//----------------------------------------------------------
-int number_world_users(int fd, int len, int id) {
- if (len < 6)
- return -1;
-
- #ifdef DEBUG
- if (server[id].users != RFIFOL(fd,2))
- printf("set number users %s : %d\n", server[id].name, RFIFOL(fd,2));
- #endif
-
- server[id].users = RFIFOL(fd,2);
- if(anti_freeze_enable)
- server_freezeflag[id] = 5; // Char anti-freeze system. Counter. 5 ok, 4...0 freezed
-
- sprintf(tmpsql,"UPDATE `sstatus` SET `user` = '%d' WHERE `index` = '%d'", server[id].users, id);
- sql_query(tmpsql,"number_world_users");
-
- RFIFOSKIP(fd,6);
-
- return 0;
-}
-
-//-----------------------------------------
-// Email and Time request from char-server [Edit: Wizputer]
-//-----------------------------------------
-int email_time_request(int fd, int len, int id) {
- if (len < 6)
- return -1;
-
- int account_id=RFIFOL(fd,2);
- time_t connect_until_time = 0;
- char email[40] = "";
-
- sprintf(tmpsql,"SELECT `email`,`connect_until` FROM `%s` WHERE `%s`='%d'",login_db, login_db_account_id, account_id);
- sql_query(tmpsql,"email_time_request");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- if((sql_row = mysql_fetch_row(sql_res))) {
- connect_until_time = atol(sql_row[1]);
- strcpy(email, sql_row[0]);
- }
- }
- mysql_free_result(sql_res);
-
- #ifdef DEBUG
- printf("parse_fromchar: E-mail/limited time request from '%s' server (concerned account: %d)\n", server[id].name, account_id);
- #endif
-
- WFIFOW(fd,0) = 0x2717;
- WFIFOL(fd,2) = account_id;
- memcpy(WFIFOP(fd, 6), email, 40);
- WFIFOL(fd,46) = (unsigned long) connect_until_time;
- WFIFOSET(fd,50);
-
- RFIFOSKIP(fd,6);
-
- return 0;
-}
-
-//--------------------------------
-// Request to change email [Edit: Wizputer]
-//--------------------------------
-int change_account_email(int fd, int len, int id, char ip[16]) {
- if (len < 86)
- return -1;
-
- int acc = RFIFOL(fd,2);
- char actual_email[40], new_email[40];
-
- memcpy(actual_email, RFIFOP(fd,6), 40);
- memcpy(new_email, RFIFOP(fd,46), 40);
-
- if (e_mail_check(actual_email) == 0) {
- #ifdef DEBUG
- printf("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);
- #endif
- } else if (e_mail_check(new_email) == 0) {
- #ifdef DEBUG
- printf("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);
- #endif
- } else if (strcmpi(new_email, "athena@athena.com") == 0) {
- #ifdef DEBUG
- printf("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);
- #endif
- } else {
- sprintf(tmpsql, "SELECT `%s`,`email` FROM `%s` WHERE `%s` = '%d'", login_db_userid, login_db, login_db_account_id, acc);
- sql_query(tmpsql,"change_account_email");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- if((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);
- sql_query(tmpsql,"change_account_email");
-
- #ifdef DEBUG
- printf("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);
- #endif
- }
- }
- }
-
- }
-
- RFIFOSKIP(fd, 86);
-
- return 0;
-}
-
-//-----------------------------------------------
-// State change request from map server (By Yor) [Edit: Wizputer]
-//-----------------------------------------------
-int status_change_request(int fd, int len) {
- if (len < 10)
- return -1;
-
- int acc = RFIFOL(fd,2), status = RFIFOL(fd,6);
-
- sprintf(tmpsql, "SELECT `state` FROM `%s` WHERE `%s` = '%d'", login_db, login_db_account_id, acc);
- sql_query(tmpsql,"status_change_request");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- if((sql_row = mysql_fetch_row(sql_res))) { // row fetching
- if (atoi(sql_row[0]) != status && status != 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) = status; // status or final date of a banishment
- charif_sendallwos(-1, buf, 11);
- }
- }
-
- sprintf(tmpsql,"UPDATE `%s` SET `state` = '%d' WHERE `%s` = '%d'", login_db, status,login_db_account_id,acc);
- sql_query(tmpsql,"status_change_request");
- }
-
- RFIFOSKIP(fd,10);
-
- return 0;
-}
-//--------------------------------------
-// Ban request from map-server (By Yor) [Edit: Wizputer]
-//--------------------------------------
-int ban_request(int fd, int len) {
- if (len < 18)
- return -1;
-
- int acc=RFIFOL(fd,2);
- struct tm *tmtime;
- time_t timestamp, tmptime;
-
- sprintf(tmpsql, "SELECT `ban_until` FROM `%s` WHERE `%s` = '%d'",login_db,login_db_account_id,acc);
- sql_query(tmpsql,"ban_request");
-
- if ((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
- 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) = timestamp; // status or final date of a banishment
- charif_sendallwos(-1, buf, 11);
- }
- #ifdef DEBUG
- printf("Account: [%d] Banned until: [%ld]\n", acc, timestamp);
- #endif
-
- sprintf(tmpsql, "UPDATE `%s` SET `ban_until` = '%ld', `state`='7' WHERE `%s` = '%d'", login_db, timestamp, login_db_account_id, acc);
- sql_query(tmpsql,"ban_request");
- }
- }
- }
-
- RFIFOSKIP(fd,18);
-
- return 0;
-}
-
-//-----------------------------
-// Change sex [Edit: Wizputer]
-//-----------------------------
-int change_sex(int fd,int len) {
- if (len < 6)
- return -1;
-
- int sex,acc=RFIFOL(fd,4);
- unsigned char buf[16];
-
- sprintf(tmpsql,"SELECT `sex` FROM `%s` WHERE `%s` = '%d'",login_db,login_db_account_id,acc);
- sql_query(tmpsql,"change_sex");
-
- if ((sql_res = mysql_store_result(&mysql_handle)) && (sql_row = mysql_fetch_row(sql_res))) {
- 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);
- sql_query(tmpsql,"change_sex");
-
- WBUFW(buf,0) = 0x2723;
- WBUFL(buf,2) = acc;
- WBUFB(buf,6) = sex;
- charif_sendallwos(-1, buf, 7);
- }
-
- RFIFOSKIP(fd,6);
-
- return 0;
-}
-
-//-------------------------------
-// Save Account Reg [Edit: Wizputer]
-//-------------------------------
-int save_account_reg(int fd, int len){
- if (len < 4 || len < RFIFOW(fd,2))
- return -1;
-
- int p,j,value,acc=RFIFOL(fd,4);
- char str[32];
- char temp_str[32];
-
- if (acc>0){
- unsigned char buf[RFIFOW(fd,2)+1];
- for(p=8,j=0;p<RFIFOW(fd,2) && j<ACCOUNT_REG2_NUM;p+=36,j++){
- memcpy(str,RFIFOP(fd,p),32);
- value=RFIFOL(fd,p+32);
-
- sprintf(tmpsql,"REPLACE INTO `global_reg_value` (`type`, `account_id`, `str`, `value`) VALUES ( 1 , '%d' , '%s' , '%d');", acc, jstrescapecpy(temp_str,str), value);
- sql_query(tmpsql,"save_account_reg");
- }
-
- // Send to char
- memcpy(WBUFP(buf,0),RFIFOP(fd,0),RFIFOW(fd,2));
- WBUFW(buf,0)=0x2729;
- charif_sendallwos(fd,buf,WBUFW(buf,2));
- }
-
- RFIFOSKIP(fd,RFIFOW(fd,2));
-
- #ifdef DEBUG
- printf("login: save account_reg (from char)\n");
- #endif
-
- return 0;
-}
-
-//------------------------------------------------
-// Recieve unban request from map-server (by Yor) [Edit: Wizputer]
-//------------------------------------------------
-int unban_request(int fd, int len) {
- if (len < 6)
- return -1;
-
- int acc = RFIFOL(fd,2);
-
- sprintf(tmpsql,"UPDATE `%s` SET `ban_until` = '0', `state`='0' WHERE `%s` = '%d' AND `state`='6'", login_db,login_db_account_id,acc);
- sql_query(tmpsql,"unban_request");
-
- RFIFOSKIP(fd,6);
-
- return 0;
-}
-
-//---------------------------------------
-// Map-server Add Online User [Wizputer]
-//---------------------------------------
-int map_add_online_user(int fd, int len) {
- if (len < 6)
- return -1;
-
- add_online_user(RFIFOL(fd,2));
-
- RFIFOSKIP(fd,6);
-
- return 0;
-}
-
-//---------------------------------------
-// Map-server Remove Online User [Wizputer]
-//---------------------------------------
-int map_rem_online_user(int fd, int len) {
- if (len < 6)
- return -1;
-
- remove_online_user(RFIFOL(fd,2));
-
- RFIFOSKIP(fd,6);
-
- return 0;
-}
-
-//-----------------------------------------------------
-// char-server packet parse [Edit: Wizputer]
-//-----------------------------------------------------
-int parse_fromchar(int fd){
- int id, len, res=0;
-
- 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 < servers_connected; id++)
- if (server_fd[id] == fd)
- break;
-
- if (id == MAX_SERVERS)
- session[fd]->eof = 1;
-
- if(session[fd]->eof) {
- if (id < MAX_SERVERS) {
- printf("Char-server '%s' has disconnected.\n", server[id].name);
- server_fd[id] = -1;
- memset(&server[id], 0, sizeof(struct mmo_char_server));
- servers_connected--;
- // server delete
- sprintf(tmpsql, "DELETE FROM `sstatus` WHERE `index`='%d'", id);
- sql_query(tmpsql,"parse_fromchar");
- }
- close(fd);
- delete_session(fd);
- return 0;
- }
-
- len = RFIFOREST(fd);
-
- while(len >= 2 && res == 0) {
- #ifdef DEBUG_PACKETS
- printf("char_parse: %d %d packet case=%x\n", fd, RFIFOREST(fd), RFIFOW(fd, 0));
- #endif
-
- switch (RFIFOW(fd,0)) {
- case 0x2712: res = send_account_reg(fd,len); break;
- case 0x2714: res = number_world_users(fd,len,id); break;
- case 0x2716: res = email_time_request(fd,len,id); break;
- case 0x2722: res = change_account_email(fd,len,id,ip); break;
- case 0x2724: res = status_change_request(fd,len); break;
- case 0x2725: res = ban_request(fd,len); break;
- case 0x2727: res = change_sex(fd,len); break;
- case 0x2728: res = save_account_reg(fd,len); break;
- case 0x272a: res = unban_request(fd,len); break;
- case 0x272b: res = map_add_online_user(fd,len); break;
- case 0x272c: res = map_rem_online_user(fd,len); break;
-
- default:
- #ifdef DEBUG
- printf("login: unknown packet %x! (from char).\n", RFIFOW(fd,0));
- #endif
- session[fd]->eof = 1;
- }
-
- len = RFIFOREST(fd);
- }
-
- return 0;
-}
diff --git a/src/login_sql/char_int.h b/src/login_sql/char_int.h
deleted file mode 100644
index 195d1be42..000000000
--- a/src/login_sql/char_int.h
+++ /dev/null
@@ -1,2 +0,0 @@
-int char_anti_freeze_system(int, unsigned int, int, int);
-int parse_fromchar(int);
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 3785d33d8..ff9e4706a 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -4,18 +4,56 @@
#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 = t;
+ timenow->tv_sec = t / CLK_TCK;
+ return;
+}
+#define gettimeofday(timenow, dummy) Gettimeofday(timenow)
+#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 <time.h>
+#include <sys/stat.h> // for stat/lstat/fstat
#include <signal.h>
#include <fcntl.h>
#include <string.h>
-#include "timer.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/version.h"
#include "login.h"
-#include "login_int.h"
-#include "char_int.h"
#ifdef PASSWORDENC
#include "md5calc.h"
@@ -26,66 +64,42 @@
#endif
#define J_MAX_MALLOC_SIZE 65535
-// Login Listening Port
-int login_port = 6900;
-
-struct auth_fifo auth_fifo[AUTH_FIFO_SIZE];
-
-int auth_fifo_pos;
-
-// MySQL Query
-char tmpsql[65535], prev_query[65535];
-
-// MySQL Connection Handle
-MYSQL mysql_handle;
-MYSQL_RES* sql_res ;
-MYSQL_ROW sql_row ;
-
-// It's to check IP of a player between login-server and char-server (part of anti-hacking system)
-int check_ip_flag;
-
-// Login's FD
-int login_fd;
-// LAN IP of char-server and subnet mask(Kashy)
-char lan_char_ip[16];
-int subnetmaski[4];
+//-----------------------------------------------------
+// global variable
+//-----------------------------------------------------
+int account_id_count = START_ACCOUNT_NUM;
+int server_num;
+int new_account_flag = 0; //Set from config too XD [Sirius]
+char bind_ip_str[16];
+in_addr_t bind_ip;
+int login_port = 6900;
+char lan_char_ip[128]; // Lan char ip added by kashy
+int subnetmaski[4]; // Subnetmask added by kashy
-// Char-server data
struct mmo_char_server server[MAX_SERVERS];
int server_fd[MAX_SERVERS];
-unsigned char servers_connected = 0;
-
-// Anti-freeze Data
-int server_freezeflag[MAX_SERVERS];
-int anti_freeze_enable = 0;
-int ANTI_FREEZE_INTERVAL = 15;
-
-// MD5 Key Data for encrypted login
-char md5key[20];
-int md5keylen = 16;
-// Auth FIFO Position
-int auth_fifo_pos = 0;
+int login_fd;
//Added for Mugendai's I'm Alive mod
int imalive_on=0;
int imalive_time=60;
-
//Added by Mugendai for GUI
int flush_on=1;
int flush_time=100;
-// Date format for bans
char date_format[32] = "%Y-%m-%d %H:%M:%S";
+int auth_num = 0, auth_max = 0;
-// minimum level of player/GM (0: player, 1-99: gm) to connect on the server
-int min_level_to_connect = 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)
+int register_users_online = 1;
-// It's to check IP of a player between login-server and char-server (part of anti-hacking system)
-int check_ip_flag = 1;
+MYSQL mysql_handle;
-// Dynamic IP Ban config
int ipban = 1;
int dynamic_account_ban = 1;
int dynamic_account_ban_class = 0;
@@ -94,160 +108,116 @@ int dynamic_pass_failure_ban_time = 5;
int dynamic_pass_failure_ban_how_many = 3;
int dynamic_pass_failure_ban_how_long = 60;
-// MySQL Config
int login_server_port = 3306;
-char login_server_ip[16] = "127.0.0.1";
-char login_server_id[16] = "ragnarok";
-char login_server_pw[16] = "ragnarok";
-char login_server_db[16] = "ragnarok";
+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";
int use_md5_passwds = 0;
+char login_db[256] = "login";
+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";
-// MySQL custom table and column names
-char login_db[32] = "login";
-char loginlog_db[32] = "loginlog";
-char login_db_account_id[32] = "account_id";
-char login_db_userid[32] = "userid";
-char login_db_user_pass[32] = "user_pass";
-char login_db_level[32] = "level";
+char tmpsql[65535], tmp_sql[65535];
-// Console interface on/off
int console = 0;
-// Online User DB
-struct dbt *online_db;
+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;
-// GM Database
-struct dbt *gm_db;
-int lowest_gm_level = 1;
+
+//-----------------------------------------------------
+
+static char md5key[20], md5keylen = 16;
+
+struct dbt *online_db;
//-----------------------------------------------------
// Online User Database [Wizputer]
//-----------------------------------------------------
void add_online_user(int account_id) {
- int *p;
- p = malloc(sizeof(int));
- if (p == NULL) {
- printf("add_online_user: memory allocation failure (malloc)!\n");
- exit(0);
- }
- p = &account_id;
- numdb_insert(online_db, account_id, p);
+ int *p;
+ if(register_users_online <= 0)
+ return;
+ p = (int*)aMalloc(sizeof(int));
+ *p = account_id;
+ numdb_insert(online_db, account_id, p);
}
int is_user_online(int account_id) {
- int *p;
-
- p = numdb_search(online_db, account_id);
- if (p == NULL)
+ int *p;
+ if(register_users_online <= 0)
return 0;
- #ifdef DEBUG
- printf("Acccount [%d] Online\n",*p);
- #endif
- return 1;
+ p = (int*)numdb_search(online_db, account_id);
+ if (p != NULL)
+ printf("Acccount %d\n",*p);
+
+ return (p != NULL);
}
void remove_online_user(int account_id) {
- int *p;
- p = numdb_erase(online_db,account_id);
- free(p);
-}
-
-//----------------------------------------------
-//SQL Commands ( Original by Clownisius ) [Edit: Wizputer]
-//----------------------------------------------
-
-void sql_query(char* query,char function[32]) {
- if(mysql_query(&mysql_handle, query)){
- printf("---------- SQL error report ----------\n");
- printf("MySQL Server Error: %s\n", mysql_error(&mysql_handle));
- printf("Query: %s\n", query);
- printf("In function: %s \n", function);
- printf("\nPrevious query: %s\n", prev_query);
-// if (strcmp(mysql_error(&mysql_handle),"CR_COMMANDS_OUT_OF_SYNC") !=0) printf(" - = Shutting down Char Server = - \n\n");
- printf("-------- End SQL Error Report --------\n");
-// printf("Uncontrolled param: %s",&mysql_handle);
-// if (strcmp(mysql_error(&mysql_handle),"CR_COMMANDS_OUT_OF_SYNC") !=0) exit(1);
- }
-
- strcpy(prev_query,query);
-
+ int *p;
+ if(register_users_online <= 0)
+ return;
+ p = (int*)numdb_erase(online_db,account_id);
+ aFree(p);
}
//-----------------------------------------------------
-// check user level [Wizputer]
+// check user level
//-----------------------------------------------------
-unsigned char isGM(int account_id) {
- unsigned char *level;
-
- level = numdb_search(gm_db, account_id);
- if (level == NULL)
- return 0;
-
- return *level;
-}
-
-static int gmdb_final(void *key,void *data,va_list ap) {
- unsigned char *level;
-
- nullpo_retr(0, level=data);
-
- free(level);
-
- return 0;
-}
+int isGM(int account_id) {
+ int level;
-void do_final_gmdb(void) {
- if(gm_db){
- numdb_final(gm_db,gmdb_final);
- gm_db=NULL;
+ 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)) {
+ printf("DB server Error (select GM Level to Memory)- %s\n", mysql_error(&mysql_handle));
+ }
+ 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;
}
-}
-
-void read_GMs(int fd) {
- unsigned char *level;
- int i=0;
-
- if(gm_db)
- do_final_gmdb();
-
- gm_db = numdb_init();
-
- sprintf(tmpsql,"SELECT `%s`,`%s` FROM `%s` WHERE `%s` > '%d'", login_db_account_id, login_db_level, login_db,login_db_level,lowest_gm_level);
- sql_query(tmpsql,"read_GMs");
-
- WFIFOW(fd, 0) = 0x2732;
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- for(i=0;(sql_row = mysql_fetch_row(sql_res));i++) {
- level = malloc(sizeof(unsigned char));
-
- if( (*level = atoi(sql_row[1])) > 99 )
- *level = 99;
-
- numdb_insert(gm_db, atoi(sql_row[0]), level);
-
- WFIFOL(fd,6+5*i) = atoi(sql_row[0]);
- WFIFOB(fd,10+5*i) = *level;
- }
- WFIFOW(fd,2) = i;
- }
+ if (level == 0) {
+ return 0;
+ //not GM
+ }
- WFIFOSET(fd,6+5*i);
+ mysql_free_result(sql_res);
- mysql_free_result(sql_res);
+ return level;
}
-
//---------------------------------------------------
// E-mail check: return 0 (not correct) or 1 (valid).
//---------------------------------------------------
-int e_mail_check(unsigned char *email) {
+int e_mail_check(char *email) {
char ch;
- unsigned char* last_arobas;
+ char* last_arobas;
// athena limits
if (strlen(email) < 3 || strlen(email) > 39)
@@ -282,56 +252,69 @@ int e_mail_check(unsigned char *email) {
}
//-----------------------------------------------------
-// Connect to MySQL
+// Read Account database - mysql db
//-----------------------------------------------------
int mmo_auth_sqldb_init(void) {
- printf("Login-server starting...\n");
+ printf("Login server init....\n");
// memory initialize
- #ifdef DEBUG
printf("memory initialize....\n");
- #endif
mysql_init(&mysql_handle);
// DB connection start
- printf("Connecting to Login Database Server...\n");
+ printf("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
printf("%s\n", mysql_error(&mysql_handle));
exit(1);
} else {
- printf("Connected to MySQL Server\n");
+ printf("connect success!\n");
}
- //delete all server status
- sprintf(tmpsql,"TRUNCATE TABLE `sstatus`");
- sql_query(tmpsql,"mmo_db_close");
-
sprintf(tmpsql, "INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '', 'lserver', '100','login server started')", loginlog_db);
- sql_query(tmpsql,"mmo_auth_sqldb_init");
+
+ //query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
return 0;
}
//-----------------------------------------------------
-// Close MySQL and Close all sessions
+// 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.
sprintf(tmpsql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '', 'lserver','100', 'login server shutdown')", loginlog_db);
- sql_query(tmpsql,"mmo_db_close");
+
+ //query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
//delete all server status
- sprintf(tmpsql,"TRUNCATE TABLE `sstatus`");
- sql_query(tmpsql,"mmo_db_close");
+ sprintf(tmpsql,"DELETE FROM `sstatus`");
+ //query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
mysql_close(&mysql_handle);
- printf("MySQL Connection closed\n");
+ printf("close DB connect....\n");
for (i = 0; i < MAX_SERVERS; i++) {
if ((fd = server_fd[i]) >= 0)
@@ -341,96 +324,274 @@ void mmo_db_close(void) {
}
//-----------------------------------------------------
-// Auth account
+// Make new account
+//-----------------------------------------------------
+int mmo_auth_sqldb_new(struct mmo_account* account,const char *tmpstr, char sex) {
+ //no need on DB version
+
+ printf("Request new account.... - not support on this version\n");
+
+ return 0;
+}
+
+//-----------------------------------------------------
+// Make new account
+//-----------------------------------------------------
+int mmo_auth_new(struct mmo_account* account, const char *tmpstr, char sex) {
+
+ return 0;
+}
+
+#ifdef LCCWIN32
+extern void gettimeofday(struct timeval *t, struct timezone *dummy);
+#endif
+
+//-----------------------------------------------------
+// Auth
//-----------------------------------------------------
int mmo_auth( struct mmo_account* account , int fd){
struct timeval tv;
+ time_t ban_until_time;
char tmpstr[256];
- char t_uid[32], t_pass[32];
- char user_password[32];
+ char t_uid[256], t_pass[256];
+ char user_password[256];
- char ip[16];
+ //added for account creation _M _F
+ int len;
- int encpasswdok = 0;
- int state;
+ MYSQL_RES* sql_res;
+ MYSQL_ROW sql_row;
+ //int sql_fields, sql_cnt;
+ char md5str[64], md5bin[32];
- #ifdef PASSWORDENC
- char logbuf[1024], *p = logbuf;
- char md5str[64],md5bin[32];
- int j;
- #endif
+ 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]);
- #ifdef DEBUG
- printf ("Starting auth for [%s]...\n",ip);
- #endif
- // auth start : time seed
+ printf ("auth start...\n");
+ sprintf(ip, "%d.%d.%d.%d", sin_addr[0], sin_addr[1], sin_addr[2], sin_addr[3]);
+
+ //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') && new_account_flag == 1 &&
+ account_id_count <= END_ACCOUNT_NUM && len >= 4 && strlen(account->passwd) >= 4) {
+ if (new_account_flag == 1)
+ account->userid[len] = '\0';
+ sprintf(tmp_sql, "SELECT `%s` FROM `%s` WHERE `userid` = '%s'", login_db_userid, login_db, account->userid);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ printf("SQL error (_M/_F reg): %s", mysql_error(&mysql_handle));
+ }else{
+ sql_res = mysql_store_result(&mysql_handle);
+ if(mysql_num_rows(sql_res) == 0){
+ //ok no existing acc,
+ printf("Adding a new account user: %s with passwd: %s sex: %c (ip: %s)\n", account->userid, account->passwd, account->userid[len+1], ip);
+ 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, account->passwd, account->userid[len+1], "a@a.com");
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ //Failed to insert new acc :/
+ printf("SQL Error (_M/_F reg) .. insert ..: %s", mysql_error(&mysql_handle));
+ }//sql query check to insert
+ }//rownum check (0!)
+ mysql_free_result(sql_res);
+ }//sqlquery
+ }//all values for NEWaccount ok ?
+
+
+
+ // auth start : time seed
gettimeofday(&tv, NULL);
- strftime(tmpstr, 24, "%Y-%m-%d %H:%M:%S",localtime(&(tv.tv_sec)));
+ strftime(tmpstr, 24, "%Y-%m-%d %H:%M:%S",localtime((const time_t*)&(tv.tv_sec)));
sprintf(tmpstr+19, ".%03d", (int)tv.tv_usec/1000);
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'", login_db_account_id, login_db_userid, login_db_user_pass, login_db_level, login_db, login_db_userid, t_uid);
+ " 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}
- sql_query(tmpsql,"mmo_auth");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- if(!(sql_row = mysql_fetch_row(sql_res))) {
- #ifdef DEBUG
- printf ("Auth failed: No Account Time: [%s] Username: [%s] Password: [%s]\n", tmpstr, account->userid, account->passwd);
- #endif
+ // query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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.
+ printf ("auth failed no account %s %s %s\n", tmpstr, account->userid, account->passwd);
mysql_free_result(sql_res);
return 0;
}
} else {
- #ifdef DEBUG
- printf("mmo_auth DB result error\n");
- #endif
+ printf("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 6;
+ }
+ }
+
+ // 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;
- account->ban_until_time = atol(sql_row[8]);
- state = atoi(sql_row[9]);
+ 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 (state) {
- switch(state) { // packet 0x006a value + 1
+ if (use_md5_passwds) {
+ MD5_String(account->passwd,user_password);
+ } else {
+ jstrescapecpy(user_password, account->passwd);
+ }
+ printf("account id ok encval:%d\n",account->passwdenc);
+#ifdef PASSWORDENC
+ if (account->passwdenc > 0) {
+ int j = account->passwdenc;
+ printf ("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;
+ printf("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);
+ printf("client [%s] accountpass [%s]\n", user_password, sql_row[2]);
+ printf ("end md5calc..\n");
+ }
+#endif
+ if ((strcmp(user_password, sql_row[2]) && !encpasswdok)) {
+ if (account->passwdenc == 0) {
+ printf ("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);
+ printf("%s\n", p);
+#endif
+ }
+ return 1;
+ }
+ printf("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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ }
+
+ 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 MSG (actually, all states after 9 except 99 are No MSG, use only this)
case 100: // 99 = This ID has been totally erased
- #ifdef DEBUG
- printf("Auth Error #%d\n", state);
- #endif
- mysql_free_result(sql_res);
- return state;
+ printf("Auth Error #%d\n", atoi(sql_row[9]));
+ return atoi(sql_row[9]) - 1;
break;
- case 7: // 6 = Your are Prohibited to log in until %s
- strftime(tmpstr, 20, date_format, localtime(&account->ban_until_time));
- tmpstr[19] = '\0';
- if (account->ban_until_time > time(NULL)) { // always banned
- mysql_free_result(sql_res);
- return 7;
- } else { // ban is finished
- // reset the ban time
- sprintf(tmpsql, "UPDATE `%s` SET `ban_until`='0',`state`='0' WHERE BINARY `%s`='%s'", login_db, login_db_userid, t_uid);
- sql_query(tmpsql,"mmo_auth");
- }
- break;
default:
- return 100; // 99 = ID has been totally erased
+ return 99; // 99 = ID has been totally erased
break;
}
}
@@ -439,117 +600,492 @@ int mmo_auth( struct mmo_account* account , int fd){
return 2; // 2 = This ID is expired
}
- if ( is_user_online(atol(sql_row[0])) ) {
- printf("User [%s] is already online - Rejected.\n",sql_row[1]);
- return 3; // Rejected
- }
+ if ( is_user_online(atol(sql_row[0])) && register_users_online > 0) {
+ printf("User [%s] is already online - Rejected.\n",sql_row[1]);
+#ifndef TWILIGHT
+ return 3; // Rejected
+#endif
+ }
- if (use_md5_passwds) {
- MD5_String(account->passwd,user_password);
- } else {
- jstrescapecpy(user_password, account->passwd);
+ 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';
+
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
}
- #ifdef DEBUG
- printf("Account [ok] Pass Encode Value: [%d]\n",account->passwdenc);
- #endif
+ return -1;
+}
-#ifdef PASSWORDENC
- if (account->passwdenc > 0) {
- j = account->passwdenc;
+// 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) {
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd,len);
+ c++;
+ }
+ }
+ return c;
+}
- #ifdef DEBUG
- printf ("Starting md5calc..\n");
- #endif
+//-----------------------------------------------------
+// char-server packet parse
+//-----------------------------------------------------
+int parse_fromchar(int fd){
+ int i, id;
+ MYSQL_RES* sql_res;
+ MYSQL_ROW sql_row = NULL;
- if (j > 2)
- j = 1;
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ char ip[16];
- 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;
- #ifdef DEBUG
- printf("j: [%d] mdstr: [%s]\n", j, md5str);
- #endif
+ sprintf(ip, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
- MD5_String2binary(md5str, md5bin);
- encpasswdok = (memcmp(user_password, md5bin, 16) == 0);
- } while (j < 2 && !encpasswdok && (j++) != account->passwdenc);
+ for(id = 0; id < MAX_SERVERS; id++)
+ if (server_fd[id] == fd)
+ break;
- #ifdef DEBUG
- printf("key [%s] md5 [%s] ", md5key, md5str);
- printf("client [%s] accountpass [%s]\n", user_password, sql_row[2]);
- printf ("end md5calc..\n");
- #endif
+ if (id == MAX_SERVERS)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
+ if (id < MAX_SERVERS) {
+ printf("Char-server '%s' has disconnected.\n", server[id].name);
+ server_fd[id] = -1;
+ memset(&server[id], 0, sizeof(struct mmo_char_server));
+ // server delete
+ sprintf(tmpsql, "DELETE FROM `sstatus` WHERE `index`='%d'", id);
+ // query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ close(fd);
+ delete_session(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 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
- if ((strcmp(user_password, sql_row[2]) && !encpasswdok)) {
- if (account->passwdenc == 0) {
- #ifdef DEBUG
- printf ("auth failed pass error %s %s %s" RETCODE, tmpstr, account->userid, user_password);
- #endif
-#ifdef PASSWORDENC
- } else {
- p += sprintf(p, "auth failed pass error %s %s recv-md5[", tmpstr, account->userid);
+ 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;
+ printf("auth -> %d\n", i);
+ break;
+ }
+ }
- for(j = 0; j < 16; j++)
- p += sprintf(p, "%02x", ((unsigned char *)user_password)[j]);
+ if (i != AUTH_FIFO_SIZE) { // send account_reg
+ int p;
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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);
+ if (account_id > 0) {
+ sprintf(tmpsql, "SELECT `str`,`value` FROM `global_reg_value` WHERE `type`='1' AND `account_id`='%d'",account_id);
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res) {
+ WFIFOW(fd,0) = 0x2729;
+ WFIFOL(fd,4) = account_id;
+ for(p = 8; (sql_row = mysql_fetch_row(sql_res));p+=36){
+ memcpy(WFIFOP(fd,p), sql_row[0], 32);
+ WFIFOL(fd,p+32) = atoi(sql_row[1]);
+ }
+ WFIFOW(fd,2) = p;
+ WFIFOSET(fd,p);
+ //printf("account_reg2 send : login->char (auth fifo)\n");
+ 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);
+ }
+ mysql_free_result(sql_res);
+ }
+ } else {
+ WFIFOW(fd,0) = 0x2713;
+ WFIFOL(fd,2) = account_id;
+ WFIFOB(fd,6) = 1;
+ WFIFOSET(fd,51);
+ }
+ }
+ RFIFOSKIP(fd,19);
+ break;
- p += sprintf(p, "] calc-md5[");
+ case 0x2714:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ // how many users on world? (update)
+ if (server[id].users != RFIFOL(fd,2))
+ {
+ printf("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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
- for(j = 0; j < 16; j++)
- p += sprintf(p, "%02x", ((unsigned char *)md5bin)[j]);
+ // send some answer
+ WFIFOW(fd,0) = 0x2718;
+ WFIFOSET(fd,2);
- p += sprintf(p, "] md5key[");
+ RFIFOSKIP(fd,6);
+ break;
- for(j = 0; j < md5keylen; j++)
- p += sprintf(p, "%02x", ((unsigned char *)md5key)[j]);
+ // 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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;
- p += sprintf(p, "]" RETCODE);
+ case 0x2720: // GM
+ if (RFIFOREST(fd) < 4)
+ return 0;
+ if (RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ //oldacc = RFIFOL(fd,4);
+ printf("change GM isn't support in this login server version.\n");
+ printf("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;
- #ifdef DEBUG
- printf("%s\n", p);
- #endif
-#endif
- }
- return 2;
- }
+ // 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)
+ printf("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)
+ printf("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)
+ printf("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))
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ printf("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);
+ }
+ }
- #ifdef DEBUG
- printf("Auth ok: Time: [%s] Username: [%s]\n" RETCODE, tmpstr, account->userid);
- #endif
+ }
+ }
+ RFIFOSKIP(fd, 86);
+ break;
- 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';
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ RFIFOSKIP(fd,10);
+ }
+ return 0;
- sprintf(tmpsql, "UPDATE `%s` SET `lastlogin` = NOW(), `logincount`=`logincount` +1, `last_ip`='%s' WHERE BINARY `%s` = '%s'",
- login_db, ip, login_db_userid, sql_row[1]);
- sql_query(tmpsql,"mmo_auth");
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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) = timestamp; // status or final date of a banishment
+ charif_sendallwos(-1, buf, 11);
+ }
+ printf("Account: %d Banned until: %ld\n", acc, timestamp);
+ sprintf(tmpsql, "UPDATE `%s` SET `ban_until` = '%ld', `state`='7' WHERE `%s` = '%d'", login_db, timestamp, login_db_account_id, acc);
+ // query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ }
+ RFIFOSKIP(fd,18);
+ break;
+ }
+ return 0;
- mysql_free_result(sql_res) ; //resource free
+ case 0x2727:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ {
+ int acc,sex;
+ unsigned char buf[16];
+ acc=RFIFOL(fd,4);
+ sprintf(tmpsql,"SELECT `sex` FROM `%s` WHERE `%s` = '%d'",login_db,login_db_account_id,acc);
+
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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_reg
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ int acc,p,j;
+ char str[32];
+ char temp_str[32];
+ int value;
+ acc=RFIFOL(fd,4);
+
+ if (acc>0){
+ unsigned char buf[RFIFOW(fd,2)+1];
+ for(p=8,j=0;p<RFIFOW(fd,2) && j<ACCOUNT_REG2_NUM;p+=36,j++){
+ memcpy(str,RFIFOP(fd,p),32);
+ value=RFIFOL(fd,p+32);
+ sprintf(tmpsql,"DELETE FROM `global_reg_value` WHERE `type`='1' AND `account_id`='%d' AND `str`='%s';",acc,jstrescapecpy(temp_str,str));
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ sprintf(tmpsql,"INSERT INTO `global_reg_value` (`type`, `account_id`, `str`, `value`) VALUES ( 1 , '%d' , '%s' , '%d');", acc, jstrescapecpy(temp_str,str), value);
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
+
+ // Send to char
+ memcpy(WBUFP(buf,0),RFIFOP(fd,0),RFIFOW(fd,2));
+ WBUFW(buf,0)=0x2729;
+ charif_sendallwos(fd,buf,WBUFW(buf,2));
+ }
+ }
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ break;
+ }
+ RFIFOSKIP(fd,6);
+ }
+ return 0;
- return -1;
+ case 0x272b: // Set account_id to online [Wizputer]
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ add_online_user(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;
+
+ default:
+ printf("login: unknown packet %x! (from char).\n", RFIFOW(fd,0));
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+
+ return 0;
}
-//-----------------------------------------
-// Lan ip check ( added by Kashy )
-//-----------------------------------------
+//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;
@@ -558,35 +1094,392 @@ int lan_ip_check(unsigned char *p) {
lancheck = 0;
break; }
- #ifdef DEBUG
printf("LAN check: %s.\n", (lancheck) ? "\033[1;32mLAN\033[0m" : "\033[1;31mWAN\033[0m");
- #endif
-
return lancheck;
}
+//----------------------------------------------------------------------------------------
+// Default packet parsing (normal players or administation/char-server connection requests)
+//----------------------------------------------------------------------------------------
+int parse_login(int fd) {
+ //int len;
-//-----------------------------------------------------
-// BANNED IP CHECK.
-//-----------------------------------------------------
-int ip_ban_check(int tid, unsigned int tick, int id, int data){
+ MYSQL_RES* sql_res ;
+ MYSQL_ROW sql_row = NULL;
- //query
- if(mysql_query(&mysql_handle, "DELETE FROM `ipbanlist` WHERE `rtime` <= NOW()")) {
- printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+
+ 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.
+ printf ("packet from banned ip : %d.%d.%d.%d" RETCODE, p[0], p[1], p[2], p[3]);
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ printf ("close session connection...\n");
+
+ // close connection
+ session[fd]->eof = 1;
+
+ } else {
+ printf ("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;
+ close(fd);
+ delete_session(fd);
+ return 0;
+ }
+
+ while(RFIFOREST(fd)>=2){
+ printf("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(RFIFOREST(fd)< ((RFIFOW(fd, 0) ==0x64)?55:47))
+ return 0;
+
+ printf("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.passwd = (char*)RFIFOP(fd, 30);
+#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){
+ int gm_level = isGM(account.account_id);
+
+ if (min_level_to_connect > gm_level) {
+ WFIFOW(fd,0) = 0x81;
+ WFIFOL(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ } else {
+
+ if (p[0] != 127) {
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ if (gm_level)
+ printf("Connection of the GM (level:%d) account '%s' accepted.\n", gm_level, account.userid);
+ else
+ printf("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;
+ WFIFOL(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ }
+ }
+ } else {
+ char tmp_sql[512];
+ char error[64];
+ 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 MSG (actually, all states after 9 except 99 are No MSG, use only this)
+ sprintf(tmpsql,tmp_sql," ");
+ sprintf(error," ");
+ break;
+ case 100: // 99 = This ID has been totally erased
+ sprintf(tmpsql,tmp_sql,"Account gone.");
+ sprintf(error,"Account gone.");
+ break;
+ default:
+ sprintf(tmpsql,tmp_sql,"Uknown Error.");
+ sprintf(error,"Uknown Error.");
+ break;
+ }
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ if ((result == 1) && (dynamic_pass_failure_ban != 0)){ // 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ //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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ }
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ 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) {
+ printf("login: abnormal request of MD5 key (already opened session).\n");
+ session[fd]->eof = 1;
+ return 0;
+ }
+ printf("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;
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ printf("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.passwd = (char*)RFIFOP(fd, 26);
+ 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){
+ printf("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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+
+ 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)) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+ WFIFOW(fd,0)=0x2711;
+ WFIFOB(fd,2)=0;
+ WFIFOSET(fd,3);
+ session[fd]->func_parse=parse_fromchar;
+ realloc_fifo(fd,FIFOSIZE_SERVERLINK,FIFOSIZE_SERVERLINK);
+ } 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);
+ printf ("Athena version check...\n");
+ break;
+
+ case 0x7532:
+ default:
+ printf ("End of connection (ip: %s)" RETCODE, ip);
+ session[fd]->eof = 1;
+ return 0;
+ }
}
return 0;
}
-//------------------------------------
// Console Command Parser [Wizputer]
-//------------------------------------
int parse_console(char *buf) {
char *type,*command;
- type = (char *)malloc(64);
- command = (char *)malloc(64);
+ type = (char *)aMalloc(64);
+ command = (char *)aMalloc(64);
memset(type,0,64);
memset(command,0,64);
@@ -598,9 +1491,9 @@ int parse_console(char *buf) {
printf("Type of command: %s || Command: %s \n",type,command);
- if(buf) free(buf);
- if(type) free(type);
- if(command) free(command);
+ if(buf) aFree(buf);
+ if(type) aFree(type);
+ if(command) aFree(command);
return 0;
}
@@ -619,9 +1512,7 @@ int config_switch(const char *str) {
}
-//-------------------------------
-// LAN Support Config (Kashy)
-//-------------------------------
+//Lan Support conf reading added by Kashy
int login_lan_config_read(const char *lancfgName){
int i;
char subnetmask[128];
@@ -676,12 +1567,28 @@ int login_lan_config_read(const char *lancfgName){
}
//-----------------------------------------------------
-// Login configuration
+//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()")) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle));
+ }
+
+ return 0;
+}
+
+//-----------------------------------------------------
+// reading configuration
//-----------------------------------------------------
int login_config_read(const char *cfgName){
int i;
char line[1024], w1[1024], w2[1024];
FILE *fp;
+ struct hostent *h = NULL;
+
+ bind_ip_str[0] = '\0';
fp=fopen(cfgName,"r");
@@ -689,7 +1596,7 @@ int login_config_read(const char *cfgName){
printf("Configuration file (%s) not found.\n", cfgName);
return 1;
}
- printf("Start reading login configuration: %s\n", cfgName);
+ printf ("start reading configuration...\n");
while(fgets(line, sizeof(line)-1, fp)){
if(line[0] == '/' && line[1] == '/')
continue;
@@ -697,8 +1604,15 @@ int login_config_read(const char *cfgName){
i=sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
if(i!=2)
continue;
-
- else if(strcmpi(w1,"login_port")==0){
+ else if (strcmpi(w1, "bind_ip") == 0) {
+ //bind_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if (h != NULL) {
+ printf("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);
printf ("set login_port : %s\n",w2);
}
@@ -731,15 +1645,7 @@ int login_config_read(const char *cfgName){
else if(strcmpi(w1,"dynamic_pass_failure_ban_how_long")==0){
dynamic_pass_failure_ban_how_long=atoi(w2);
printf ("set dynamic_pass_failure_ban_how_long : %d\n",dynamic_pass_failure_ban_how_long);
- }
- else if(strcmpi(w1,"anti_freeze_enable")==0){
- anti_freeze_enable = config_switch(w2);
- }
- else if (strcmpi(w1, "anti_freeze_interval") == 0) {
- ANTI_FREEZE_INTERVAL = atoi(w2);
- if (ANTI_FREEZE_INTERVAL < 5)
- ANTI_FREEZE_INTERVAL = 5; // minimum 5 seconds
- }
+ }
else if (strcmpi(w1, "import") == 0) {
login_config_read(w2);
} else if(strcmpi(w1,"imalive_on")==0) { //Added by Mugendai for I'm Alive mod
@@ -750,8 +1656,19 @@ int login_config_read(const char *cfgName){
flush_on = atoi(w2); //Added by Mugendai for GUI
} else if(strcmpi(w1,"flush_time")==0) { //Added by Mugendai for GUI
flush_time = atoi(w2); //Added by Mugendai for GUI
- }
- else if(strcmpi(w1,"use_MD5_passwords")==0){
+ } 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;
+ }
+ 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")){
@@ -785,15 +1702,21 @@ int login_config_read(const char *cfgName){
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 if(strcmpi(w1, "register_users_online") == 0) {
+ register_users_online = config_switch(w2);
+ }
}
fclose(fp);
- printf ("End reading login configuration...\n");
+ printf ("End reading configuration...\n");
return 0;
}
-//-----------------------------------------------------
-// SQL configuration
-//-----------------------------------------------------
void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
int i;
char line[1024], w1[1024], w2[1024];
@@ -802,7 +1725,7 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
printf("file not found: %s\n",cfgName);
exit(1);
}
- printf("Start reading SQL configuration: %s\n", cfgName);
+ printf("reading configure: %s\n", cfgName);
while(fgets(line, sizeof(line)-1, fp)){
if(line[0] == '/' && line[1] == '/')
continue;
@@ -850,16 +1773,13 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
else if (strcmpi(w1, "loginlog_db") == 0) {
strcpy(loginlog_db, w2);
}
- else if(strcmpi(w1,"lowest_gm_level")==0){
- lowest_gm_level = atoi(w2);
- }
//support the import command, just like any other config
else if(strcmpi(w1,"import")==0){
sql_config_read(w2);
}
- }
- fclose(fp);
- printf("reading SQL configuration done.....\n");
+ }
+ fclose(fp);
+ printf("reading configure done.....\n");
}
@@ -882,64 +1802,67 @@ int flush_timer(int tid, unsigned int tick, int id, int data){
return 0;
}
+//--------------------------------------
+// Function called at exit of the server
+//--------------------------------------
+static int online_db_final(void *key,void *data,va_list ap)
+{
+ int *p = (int *) data;
+ if (p) aFree(p);
+ return 0;
+}
+void do_final(void) {
+ //sync account when terminating.
+ //but no need when you using DBMS (mysql)
+ mmo_db_close();
+ numdb_final(online_db, online_db_final);
+ exit_dbn();
+ timer_final();
+}
+
int do_init(int argc,char **argv){
+ //initialize login server
int i;
- //read login configuration
+ SERVER_TYPE = SERVER_LOGIN;
+ //read login configue
login_config_read( (argc>1)?argv[1]:LOGIN_CONF_NAME );
-
- //read SQL configuration
sql_config_read(SQL_CONF_NAME);
-
- //read LAN support configuation
login_lan_config_read((argc > 1) ? argv[1] : LAN_CONF_NAME);
-
//Generate Passworded Key.
- #ifdef DEBUG
- printf ("memset value: [0] var: [md5key] \n");
- #endif
-
+ printf ("memset md5key \n");
memset(md5key, 0, sizeof(md5key));
-
- #ifdef DEBUG
- printf ("memset var: [md5key] complete\n");
- printf ("Set MD5 key length\n");
- #endif
-
+ printf ("memset md5key complete\n");
+ printf ("memset keyleng\n");
md5keylen=rand()%4+12;
for(i=0;i<md5keylen;i++)
md5key[i]=rand()%255+1;
+ printf ("memset keyleng complete\n");
- #ifdef DEBUG
- printf ("Set MD5 key length complete\n");
- printf ("Set Auth FIFO Size\n");
- #endif
-
+ printf ("set FIFO Size\n");
for(i=0;i<AUTH_FIFO_SIZE;i++)
auth_fifo[i].delflag=1;
+ printf ("set FIFO Size complete\n");
- #ifdef DEBUG
- printf ("Set Auth FIFO Size complete\n");
- printf ("Set max number servers\n");
- #endif
-
+ printf ("set max servers\n");
for(i=0;i<MAX_SERVERS;i++)
server_fd[i]=-1;
-
- #ifdef DEBUG
- printf ("Set max number servers complete\n");
- #endif
-
+ printf ("set max servers complete\n");
//server port open & binding
- login_fd=make_listen_port(login_port);
+ if (bind_ip_str[0] != '\0')
+ bind_ip = inet_addr(bind_ip_str);
+ else
+ bind_ip = INADDR_ANY;
- printf ("Initializing SQL DB\n");
- mmo_auth_sqldb_init();
- printf ("SQL DB Initialized\n");
+ //login_fd=make_listen_port(login_port);
+ login_fd=make_listen_bind(bind_ip,login_port);
- // Close connection to SQL DB at termiantion
- set_termfunc(mmo_db_close);
+ //Auth start
+ printf ("Running mmo_auth_sqldb_init()\n");
+ mmo_auth_sqldb_init();
+ printf ("finished mmo_auth_sqldb_init()\n");
+ set_termfunc(do_final);
//set default parser as parse_login function
set_defaultparse(parse_login);
@@ -952,15 +1875,8 @@ int do_init(int argc,char **argv){
if(flush_on)
add_timer_interval(gettick()+10, flush_timer,0,0,flush_time);
- if(anti_freeze_enable > 0) {
- add_timer_func_list(char_anti_freeze_system, "char_anti_freeze_system");
- i = add_timer_interval(gettick()+1000, char_anti_freeze_system, 0, 0, ANTI_FREEZE_INTERVAL * 1000);
- }
-
// ban deleter timer - 1 minute term
- #ifdef DEBUG
- printf("add interval tic (ip_ban_check)...\n");
- #endif
+ printf("add interval tic (ip_ban_check)....\n");
i=add_timer_interval(gettick()+10, ip_ban_check,0,0,60*1000);
if (console) {
@@ -969,10 +1885,12 @@ int do_init(int argc,char **argv){
}
// Online user database init
- free(online_db);
+ aFree(online_db);
online_db = numdb_init();
printf("The login-server is \033[1;32mready\033[0m (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
index 075284450..725c02ada 100644
--- a/src/login_sql/login.h
+++ b/src/login_sql/login.h
@@ -15,126 +15,19 @@
#define START_ACCOUNT_NUM 2000000
#define END_ACCOUNT_NUM 100000000
-//add include for DBMS(mysql)
-#include <mysql.h>
-
-#include "../common/socket.h"
-#include "../common/core.h"
-#include "../common/mmo.h"
-#include "../common/version.h"
-#include "../common/db.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-
-#include "strlib.h"
-
-#ifdef LCCWIN32
-#include <winsock.h>
-#pragma lib <libmysql.lib>
-extern void gettimeofday(struct timeval *t, struct timezone *dummy);
-#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 = t;
- timenow->tv_sec = t / CLK_TCK;
- return;
-}
-#define gettimeofday(timenow, dummy) Gettimeofday(timenow)
-#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 <unistd.h>
-#endif
-#endif
-
-// Auth Data
-#define AUTH_FIFO_SIZE 256
-extern struct auth_fifo {
- int account_id,login_id1,login_id2;
- int ip,sex,delflag;
-} auth_fifo[AUTH_FIFO_SIZE];
-
-extern int auth_fifo_pos;
-
-// MySQL Query
-extern char tmpsql[65535], prev_query[65535];
-
-// MySQL Connection Handle
-extern MYSQL mysql_handle;
-extern MYSQL_RES* sql_res ;
-extern MYSQL_ROW sql_row ;
-
-// MySQL custom table and column names
-extern char login_db[32];
-extern char loginlog_db[32];
-extern char login_db_account_id[32];
-extern char login_db_userid[32];
-extern char login_db_user_pass[32];
-extern char login_db_level[32];
-
-// MD5 Key Data for encrypted login
-extern int md5keylen;
-extern char md5key[20];
-
-// Dynamic IP Ban config
-extern int ipban;
-extern int dynamic_account_ban;
-extern int dynamic_account_ban_class;
-extern int dynamic_pass_failure_ban;
-extern int dynamic_pass_failure_ban_time;
-extern int dynamic_pass_failure_ban_how_many;
-extern int dynamic_pass_failure_ban_how_long;
-
-// Date format for bans
-extern char date_format[32];
-
-// minimum level of player/GM (0: player, 1-99: gm) to connect on the server
-extern int min_level_to_connect;
-
-// It's to check IP of a player between login-server and char-server (part of anti-hacking system)
-extern int check_ip_flag;
-
-// Login's FD
-extern int login_fd;
-
-// LAN IP of char-server and subnet mask(Kashy)
-extern char lan_char_ip[16];
-extern int subnetmaski[4];
-
-// Char-server data
-extern struct mmo_char_server server[MAX_SERVERS];
-extern int server_fd[MAX_SERVERS];
-extern unsigned char servers_connected;
-
-// Anti-freeze Data
-extern int server_freezeflag[MAX_SERVERS];
-extern int anti_freeze_enable;
-extern int ANTI_FREEZE_INTERVAL;
-
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;
-
- time_t ban_until_time;
};
struct mmo_char_server {
@@ -143,17 +36,8 @@ struct mmo_char_server {
short port;
int users;
int maintenance;
- int new;
+ int new_;
};
-void sql_query(char*,char*);
-int e_mail_check(unsigned char*);
-void add_online_user(int);
-int is_user_online(int);
-void remove_online_user(int);
-int mmo_auth( struct mmo_account*, int);
-unsigned char isGM(int);
-int lan_ip_check(unsigned char *);
-
#endif
diff --git a/src/login_sql/login_int.c b/src/login_sql/login_int.c
deleted file mode 100644
index 4a3220521..000000000
--- a/src/login_sql/login_int.c
+++ /dev/null
@@ -1,376 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <string.h>
-
-#include "login.h"
-#include "char_int.h"
-
-//----------------------
-// Client requesting login [Edit: Wizputer]
-//----------------------
-int client_request_login(int fd,int len,unsigned char *p ) {
- if(len < ((RFIFOW(fd, 0) ==0x64)?55:47))
- return -1;
-
- struct mmo_account account;
- char t_uid[32];
- int server_num = 0,result,i;
-
- if( !servers_connected) {
- WFIFOW(fd,0) = 0x81;
- WFIFOL(fd,2) = 1; // 01 = Server closed
- WFIFOSET(fd,3);
- }
-
- #ifdef DEBUG
- printf("client connection request %s from %d.%d.%d.%d\n", RFIFOP(fd, 6), p[0], p[1], p[2], p[3]);
- #endif
-
- account.userid = RFIFOP(fd, 6);
- account.passwd = RFIFOP(fd, 30);
-#ifdef PASSWORDENC
- account.passwdenc= (RFIFOW(fd,0)==0x64)?0:PASSWORDENC;
-#else
- account.passwdenc=0;
-#endif
- result=mmo_auth(&account, fd);
-
- jstrescapecpy(t_uid,RFIFOP(fd, 6));
- if(result==-1){
- unsigned char gm_level = isGM(account.account_id);
- if (min_level_to_connect > gm_level || !servers_connected) {
- WFIFOW(fd,0) = 0x81;
- WFIFOL(fd,2) = 1; // 01 = Server closed
- WFIFOSET(fd,3);
- } else {
- if (p[0] != 127) {
- 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);
- sql_query(tmpsql,"client_request_login");
- }
-
- if (gm_level) {
- #ifdef DEBUG
- printf("Connection of the GM (level:%d) account '%s' accepted.\n", gm_level, account.userid);
- #endif
- } else {
- #ifdef DEBUG
- printf("Connection of the account '%s' accepted.\n", account.userid);
- #endif
- }
-
- for(i = 0; i < MAX_SERVERS || server_num < servers_connected ; 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++;
- }
-
- 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 {
- char error[32];
-
- sprintf(tmpsql,"SELECT `error` FROM `errors` WHERE `result`='%d'",result);
- sql_query(tmpsql,"client_request_login");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- if ((sql_row = mysql_fetch_row(sql_res))) {
- sprintf(error,sql_row[0]);
- } else {
- sprintf(error,"No Error!");
- }
- }
-
-
- sprintf(tmpsql,"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, error);
-
-
- sql_query(tmpsql,"client_request_login");
-
- if ((result == 1) && (dynamic_pass_failure_ban != 0)){ // 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.
- sql_query(tmpsql,"client_request_login");
-
- if ((sql_res = mysql_store_result(&mysql_handle))) {
- if ((sql_row = mysql_fetch_row(sql_res))) {
- 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);
- sql_query(tmpsql,"client_request_login");
- }
- }
- }
-
-
- mysql_free_result(sql_res);
-
- }
-
- //cannot connect login failed
- memset(WFIFOP(fd,0),'\0',23);
- WFIFOW(fd,0)=0x6a;
- WFIFOB(fd,2)=result-1;
- if (result == 6) { // 6 = Your are Prohibited to log in until %s
- char tmpstr[256];
- strftime(tmpstr, 20, date_format, localtime(&account.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);
-
- return 0;
-}
-
-//------------------------------------------------------
-// MD5 Key requested for encypted login [Edit: Wizputer
-//------------------------------------------------------
-int md5_key_request(int fd, int len) {
- if (session[fd]->session_data) {
- #ifdef DEBUG
- printf("login: abnormal request of MD5 key (already opened session).\n");
- #endif
- session[fd]->eof = 1;
- return -1;
- }
-
- #ifdef DEBUG
- printf("Request Password key -%s\n",md5key);
- #endif
-
- RFIFOSKIP(fd,2);
- WFIFOW(fd,0)=0x01dc;
- WFIFOW(fd,2)=4+md5keylen;
- memcpy(WFIFOP(fd,4),md5key,md5keylen);
- WFIFOSET(fd,WFIFOW(fd,2));
-
- return 0;
-}
-
-//----------------------------------------------------
-// Char-server requesting connection [Edit: Wizputer]
-//-----------------------------------------------------
-int char_request_login(int fd, int len, unsigned char *p) {
- if(len<86)
- return -1;
-
- struct mmo_account account;
- unsigned char* server_name;
- char t_uid[32];
- int result;
-
- 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));
- sql_query(tmpsql,"char_request_login");
-
- #ifdef DEBUG
- printf("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]);
- #endif
-
- account.userid = RFIFOP(fd, 2);
- account.passwd = RFIFOP(fd, 26);
- account.passwdenc = 0;
- server_name = RFIFOP(fd,60);
- result = mmo_auth(&account, fd);
-
- #ifdef DEBUG
- printf("Result: %d - Sex: %d - Account ID: %d\n",result,account.sex,(int) account.account_id);
- #endif
-
- if(result == -1 && account.sex==2 && account.account_id<MAX_SERVERS && server_fd[account.account_id]==-1){
- printf("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;
-
- if(anti_freeze_enable)
- server_freezeflag[account.account_id] = 5; // Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed
-
- jstrescapecpy(t_uid,server[account.account_id].name);
-
- sprintf(tmpsql,"REPLACE DELAYED INTO `sstatus`(`index`,`name`,`user`) VALUES ( '%ld', '%s', '%d')",
- account.account_id, server[account.account_id].name,0);
- sql_query(tmpsql,"char_request_login");
-
- WFIFOW(fd,0)=0x2711;
- WFIFOB(fd,2)=0;
- WFIFOSET(fd,3);
- session[fd]->func_parse=parse_fromchar;
- realloc_fifo(fd,FIFOSIZE_SERVERLINK,FIFOSIZE_SERVERLINK);
-
- servers_connected++;
- } else {
- WFIFOW(fd, 0) =0x2711;
- WFIFOB(fd, 2)=3;
- WFIFOSET(fd, 3);
- }
-
- RFIFOSKIP(fd, 86);
-
- return 0;
-}
-
-//---------------------------------------------
-// Athena Version Info Request [Edit: Wizputer]
-//---------------------------------------------
-int request_athena_info(int fd, int len) {
- #ifdef DEBUG
- printf ("Athena version check...\n");
- #endif
-
- 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);
-
- return 0;
-}
-
-//----------------------------------------------------------------------------------------
-// Default packet parsing (normal players or administation/char-server connection requests)
-//----------------------------------------------------------------------------------------
-int parse_login(int fd) {
- char ip[16];
- int len,res=0;
-
- unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
- sprintf(ip, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
-
- 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]);
- sql_query(tmpsql,"parse_login");
-
- if((sql_res = mysql_store_result(&mysql_handle))) {
- if((sql_row = mysql_fetch_row(sql_res))) {//row fetching
- if (atoi(sql_row[0]) >0) {
- // ip ban ok.
- printf ("packet from banned ip : %d.%d.%d.%d" RETCODE, p[0], p[1], p[2], p[3]);
-
- 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]);
- sql_query(tmpsql,"parse_login");
-
- #ifdef DEBUG
- printf ("close session connection...\n");
- #endif
-
- // close connection
- session[fd]->eof = 1;
- } else {
- #ifdef DEBUG
- printf ("packet from ip (ban check ok) : %d.%d.%d.%d" RETCODE, p[0], p[1], p[2], p[3]);
- #endif
- }
- }
- }
-
- mysql_free_result(sql_res);
- }
-
- if (session[fd]->eof) {
- int i;
- for(i = 0; i < MAX_SERVERS && i < servers_connected; i++)
- if (server_fd[i] == fd) {
- server_fd[i] = -1;
- servers_connected--;
- }
- close(fd);
- delete_session(fd);
- return 0;
- }
-
- len = RFIFOREST(fd);
-
- while(len>=2 && res == 0){
- #ifdef DEBUG_PACKETS
- printf("parse_login : %d %d packet case=%x\n", fd, RFIFOREST(fd), RFIFOW(fd,0));
- #endif
-
- 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:
- case 0x01dd: res = client_request_login(fd,len,p); break;
- case 0x01db: res = md5_key_request(fd,len); break;
- case 0x2710: res = char_request_login(fd,len,p); break;
- case 0x7530: res = request_athena_info(fd,len); break;
-
- case 0x7532:
- default:
- #ifdef DEBUG
- printf ("End of connection (ip: %s)" RETCODE, ip);
- #endif
- session[fd]->eof = 1;
- return 0;
- }
-
- len = RFIFOREST(fd);
- }
-
- return 0;
-}
-
diff --git a/src/login_sql/login_int.h b/src/login_sql/login_int.h
deleted file mode 100644
index 712585616..000000000
--- a/src/login_sql/login_int.h
+++ /dev/null
@@ -1 +0,0 @@
-int parse_login(int);
diff --git a/src/login_sql/md5calc.c b/src/login_sql/md5calc.c
index 58cea1246..856c7ecb0 100644
--- a/src/login_sql/md5calc.c
+++ b/src/login_sql/md5calc.c
@@ -95,7 +95,7 @@ static void MD5_Round_Calculate(const unsigned char *block,
//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;
@@ -186,7 +186,7 @@ void MD5_String2binary(const char * string, char * output)
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
+ //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);
@@ -225,7 +225,7 @@ void MD5_String(const char * string, char * output)
{
unsigned char digest[16];
- MD5_String2binary(string,digest);
+ 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],
diff --git a/src/login_sql/strlib.c b/src/login_sql/strlib.c
deleted file mode 100644
index fd8c90ef0..000000000
--- a/src/login_sql/strlib.c
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "strlib.h"
-#include "utils.h"
-
-//-----------------------------------------------
-// string lib.
-unsigned char* jstrescape (unsigned char* pt) {
- //copy from here
- unsigned char * ptr;
- int i =0, j=0;
-
- //copy string to temporary
- CREATE(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;
- default:
- pt[j++] = ptr[i++];
- }
- }
- pt[j++] = '\0';
- if(ptr) free(ptr);
- return (unsigned char*) &pt[0];
-}
-
-unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt) {
- //copy from here
- 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;
- default:
- pt[j++] = spt[i++];
- }
- }
- pt[j++] = '\0';
- return (unsigned char*) &pt[0];
-}
diff --git a/src/login_sql/strlib.h b/src/login_sql/strlib.h
deleted file mode 100644
index ddf29ab18..000000000
--- a/src/login_sql/strlib.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#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"
-unsigned char* jstrescape (unsigned char* pt);
-unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt);
-#endif
diff --git a/src/map/GNUmakefile b/src/map/GNUmakefile
deleted file mode 100644
index 03f520f37..000000000
--- a/src/map/GNUmakefile
+++ /dev/null
@@ -1,75 +0,0 @@
-all: txt sql
-
-txt: txtobj map-server
-
-sql: sqlobj map-server_sql
-
-txtobj:
- mkdir txtobj
-
-sqlobj:
- mkdir sqlobj
-
-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
-LIBS = -lz -lm
-
-map-server: txtobj/map.o txtobj/chrif.o txtobj/clif.o txtobj/pc.o txtobj/npc.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 $(COMMON_OBJ)
- $(CC) -o ../../$@ $^ $(LIBS)
-
-map-server_sql: sqlobj/map.o sqlobj/chrif.o sqlobj/clif.o sqlobj/pc.o sqlobj/npc.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/mail.o sqlobj/log.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $^ $(LIB_S)
-
-txtobj/%.o: %.c
- $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $<
-
-sqlobj/%.o: %.c
- $(COMPILE.c) $(OUTPUT_OPTION) $<
-
-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 charcommand.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 ../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 ../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/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/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.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 charcommand.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 ../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 ../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/mail.o: mail.c mail.h ../common/showmsg.h
-sqlobj/log.o: log.c log.h map.h ../common/nullpo.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/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
-
-clean:
- rm -rf *.o ../../map-server ../../map-server_sql sqlobj txtobj
diff --git a/src/map/Makefile b/src/map/Makefile
index 4786887ae..b413c8a62 100644
--- a/src/map/Makefile
+++ b/src/map/Makefile
@@ -10,13 +10,15 @@ txtobj:
sqlobj:
mkdir sqlobj
-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_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o ../common/obj/grfio.o ../common/obj/db.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_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/grfio.h ../common/db.h ../common/lock.h ../common/nullpo.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h
LIBS = -lz -lm
-map-server: txtobj/map.o txtobj/chrif.o txtobj/clif.o txtobj/pc.o txtobj/npc.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 $(COMMON_OBJ)
- $(CC) -o ../../$@ $> $(LIBS)
+map-server: 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 $(COMMON_OBJ)
+ $(CC) -o ../../$@ $> $(LIBS) $(LIB_S)
-map-server_sql: sqlobj/map.o sqlobj/chrif.o sqlobj/clif.o sqlobj/pc.o sqlobj/npc.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/mail.o sqlobj/log.o $(COMMON_OBJ)
+map-server_sql: 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/mail.o sqlobj/log.o $(COMMON_OBJ)
$(CC) -o ../../$@ $> $(LIB_S)
txtobj/%.o: %.c
@@ -25,51 +27,56 @@ txtobj/%.o: %.c
sqlobj/%.o: %.c
$(COMPILE.c) $(OUTPUT_OPTION) $<
-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 charcommand.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 ../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 ../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/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/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+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 $(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 $(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)
-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 charcommand.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 ../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 ../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/mail.o: mail.c mail.h ../common/showmsg.h
-sqlobj/log.o: log.c log.h map.h ../common/nullpo.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/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.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 $(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 $(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)
clean:
rm -rf *.o ../../map-server ../../map-server_sql sqlobj txtobj
diff --git a/src/map/Makefile.win32 b/src/map/Makefile.win32
index ed4b4e95a..2fa1861ac 100644
--- a/src/map/Makefile.win32
+++ b/src/map/Makefile.win32
@@ -15,25 +15,28 @@ txtobj:
sqlobj:
mkdir sqlobj
-ZLIBDIR = C:/eathena/zlib122
-PACKETDEF = -DPACKETVER=5 -DNEW_006b -D__WIN32
+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_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/npc.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/battle.o txtobj/intif.o txtobj/trade.o txtobj/party.o txtobj/vending.o txtobj/guild.o txtobj/pet.o $(COMMON_OBJ) $(ZLIBDIR)/inflate.o $(ZLIBDIR)/adler32.o $(ZLIBDIR)/crc32.o $(ZLIBDIR)/inftrees.o $(ZLIBDIR)/zutil.o $(ZLIBDIR)/inffast.o
+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 $(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 $(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: sqlobj/map.o sqlobj/chrif.o sqlobj/clif.o sqlobj/pc.o sqlobj/npc.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/battle.o sqlobj/intif.o sqlobj/trade.o sqlobj/party.o sqlobj/vending.o sqlobj/guild.o sqlobj/pet.o sqlobj/mail.o $(COMMON_OBJ)
+map-server_sql: $(SQLOBJS)
link $(LINKOPT) /out:../../$@.exe $> $(LIBS)
txtobj/%.o: %.c
@@ -86,7 +89,7 @@ sqlobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h ../common/db.
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/mail.o: mail.c mail.h ../common/showmsg.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
clean:
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 34bf0150d..79e3ec675 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8,6 +8,9 @@
#include "../common/socket.h"
#include "../common/timer.h"
#include "../common/nullpo.h"
+#include "../common/mmo.h"
+#include "../common/db.h"
+#include "../common/core.h"
#include "log.h"
#include "clif.h"
@@ -16,6 +19,7 @@
#include "itemdb.h"
#include "map.h"
#include "pc.h"
+#include "status.h"
#include "skill.h"
#include "mob.h"
#include "pet.h"
@@ -26,7 +30,6 @@
#include "script.h"
#include "npc.h"
#include "trade.h"
-#include "core.h"
#ifndef TXT_ONLY
#include "mail.h"
@@ -36,201 +39,233 @@
static char command_symbol = '@'; // first char of the commands (by [Yor])
-static char msg_table[1000][1024]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
-
-#define ATCOMMAND_FUNC(x) int atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message)
-ATCOMMAND_FUNC(broadcast);
-ATCOMMAND_FUNC(localbroadcast);
-ATCOMMAND_FUNC(rurap);
-ATCOMMAND_FUNC(rura);
-ATCOMMAND_FUNC(where);
-ATCOMMAND_FUNC(jumpto);
-ATCOMMAND_FUNC(jump);
-ATCOMMAND_FUNC(who);
-ATCOMMAND_FUNC(who2);
-ATCOMMAND_FUNC(who3);
-ATCOMMAND_FUNC(whomap);
-ATCOMMAND_FUNC(whomap2);
-ATCOMMAND_FUNC(whomap3);
-ATCOMMAND_FUNC(whogm); // by Yor
-ATCOMMAND_FUNC(whozeny); // [Valaris]
-ATCOMMAND_FUNC(happyhappyjoyjoy); // [Valaris]
-ATCOMMAND_FUNC(save);
-ATCOMMAND_FUNC(load);
-ATCOMMAND_FUNC(speed);
-ATCOMMAND_FUNC(storage);
-ATCOMMAND_FUNC(guildstorage);
-ATCOMMAND_FUNC(option);
-ATCOMMAND_FUNC(hide);
-ATCOMMAND_FUNC(jobchange);
-ATCOMMAND_FUNC(die);
-ATCOMMAND_FUNC(kill);
-ATCOMMAND_FUNC(alive);
-ATCOMMAND_FUNC(kami);
-ATCOMMAND_FUNC(heal);
-ATCOMMAND_FUNC(item);
-ATCOMMAND_FUNC(item2);
-ATCOMMAND_FUNC(itemreset);
-ATCOMMAND_FUNC(itemcheck);
-ATCOMMAND_FUNC(baselevelup);
-ATCOMMAND_FUNC(joblevelup);
-ATCOMMAND_FUNC(help);
-ATCOMMAND_FUNC(gm);
-ATCOMMAND_FUNC(pvpoff);
-ATCOMMAND_FUNC(pvpon);
-ATCOMMAND_FUNC(gvgoff);
-ATCOMMAND_FUNC(gvgon);
-ATCOMMAND_FUNC(model);
-ATCOMMAND_FUNC(go);
-ATCOMMAND_FUNC(monster);
-ATCOMMAND_FUNC(monstersmall);
-ATCOMMAND_FUNC(monsterbig);
-ATCOMMAND_FUNC(spawn);
-ATCOMMAND_FUNC(killmonster);
-ATCOMMAND_FUNC(killmonster2);
-ATCOMMAND_FUNC(refine);
-ATCOMMAND_FUNC(produce);
-ATCOMMAND_FUNC(memo);
-ATCOMMAND_FUNC(gat);
-ATCOMMAND_FUNC(packet);
-ATCOMMAND_FUNC(statuspoint);
-ATCOMMAND_FUNC(skillpoint);
-ATCOMMAND_FUNC(zeny);
-ATCOMMAND_FUNC(param);
-ATCOMMAND_FUNC(guildlevelup);
-ATCOMMAND_FUNC(makeegg);
-ATCOMMAND_FUNC(hatch);
-ATCOMMAND_FUNC(petfriendly);
-ATCOMMAND_FUNC(pethungry);
-ATCOMMAND_FUNC(petrename);
-ATCOMMAND_FUNC(recall);
-ATCOMMAND_FUNC(recallall);
-ATCOMMAND_FUNC(revive);
-ATCOMMAND_FUNC(character_stats_all);
-ATCOMMAND_FUNC(character_save);
-ATCOMMAND_FUNC(night);
-ATCOMMAND_FUNC(day);
-ATCOMMAND_FUNC(doom);
-ATCOMMAND_FUNC(doommap);
-ATCOMMAND_FUNC(raise);
-ATCOMMAND_FUNC(raisemap);
-ATCOMMAND_FUNC(character_baselevel);
-ATCOMMAND_FUNC(character_joblevel);
-ATCOMMAND_FUNC(kick);
-ATCOMMAND_FUNC(kickall);
-ATCOMMAND_FUNC(allskill);
-ATCOMMAND_FUNC(questskill);
-ATCOMMAND_FUNC(charquestskill);
-ATCOMMAND_FUNC(lostskill);
-ATCOMMAND_FUNC(charlostskill);
-ATCOMMAND_FUNC(spiritball);
-ATCOMMAND_FUNC(party);
-ATCOMMAND_FUNC(guild);
-ATCOMMAND_FUNC(charskreset);
-ATCOMMAND_FUNC(charstreset);
-ATCOMMAND_FUNC(charreset);
-ATCOMMAND_FUNC(charstpoint);
-ATCOMMAND_FUNC(charmodel);
-ATCOMMAND_FUNC(charskpoint);
-ATCOMMAND_FUNC(charzeny);
-ATCOMMAND_FUNC(agitstart);
-ATCOMMAND_FUNC(agitend);
-ATCOMMAND_FUNC(reloaditemdb);
-ATCOMMAND_FUNC(reloadmobdb);
-ATCOMMAND_FUNC(reloadskilldb);
-#ifndef TXT_ONLY
-ATCOMMAND_FUNC(rehash);// by Fr3DBr
-#else /* TXT_ONLY */
-ATCOMMAND_FUNC(reloadscript);
-#endif /* TXT_ONLY */
-ATCOMMAND_FUNC(reloadgmdb); // by Yor
-ATCOMMAND_FUNC(mapexit);
-ATCOMMAND_FUNC(idsearch);
-ATCOMMAND_FUNC(mapinfo);
-ATCOMMAND_FUNC(dye); //** by fritz
-ATCOMMAND_FUNC(hair_style); //** by fritz
-ATCOMMAND_FUNC(hair_color); //** by fritz
-ATCOMMAND_FUNC(stat_all); //** by fritz
-ATCOMMAND_FUNC(char_change_sex); // by Yor
-ATCOMMAND_FUNC(char_block); // by Yor
-ATCOMMAND_FUNC(char_ban); // by Yor
-ATCOMMAND_FUNC(char_unblock); // by Yor
-ATCOMMAND_FUNC(char_unban); // by Yor
-ATCOMMAND_FUNC(mount_peco); // by Valaris
-ATCOMMAND_FUNC(char_mount_peco); // by Yor
-ATCOMMAND_FUNC(guildspy); // [Syrus22]
-ATCOMMAND_FUNC(partyspy); // [Syrus22]
-ATCOMMAND_FUNC(repairall); // [Valaris]
-ATCOMMAND_FUNC(guildrecall); // by Yor
-ATCOMMAND_FUNC(partyrecall); // by Yor
-//ATCOMMAND_FUNC(nuke); // [Valaris]
-ATCOMMAND_FUNC(enablenpc);
-ATCOMMAND_FUNC(disablenpc);
-ATCOMMAND_FUNC(servertime); // by Yor
-ATCOMMAND_FUNC(chardelitem); // by Yor
-ATCOMMAND_FUNC(jail); // by Yor
-ATCOMMAND_FUNC(unjail); // by Yor
-ATCOMMAND_FUNC(disguise); // [Valaris]
-ATCOMMAND_FUNC(undisguise); // by Yor
-ATCOMMAND_FUNC(chardisguise); // Kalaspuff
-ATCOMMAND_FUNC(charundisguise); // Kalaspuff
-ATCOMMAND_FUNC(email); // by Yor
-ATCOMMAND_FUNC(effect);//by Apple
-ATCOMMAND_FUNC(character_item_list); // by Yor
-ATCOMMAND_FUNC(character_storage_list); // by Yor
-ATCOMMAND_FUNC(character_cart_list); // by Yor
-ATCOMMAND_FUNC(addwarp); // by MouseJstr
-ATCOMMAND_FUNC(follow); // by MouseJstr
-ATCOMMAND_FUNC(skillon); // by MouseJstr
-ATCOMMAND_FUNC(skilloff); // by MouseJstr
-ATCOMMAND_FUNC(killer); // by MouseJstr
-ATCOMMAND_FUNC(npcmove); // by MouseJstr
-ATCOMMAND_FUNC(killable); // by MouseJstr
-ATCOMMAND_FUNC(charkillable); // by MouseJstr
-ATCOMMAND_FUNC(chareffect); // by MouseJstr
-ATCOMMAND_FUNC(chardye); // by MouseJstr
-ATCOMMAND_FUNC(charhairstyle); // by MouseJstr
-ATCOMMAND_FUNC(charhaircolor); // by MouseJstr
-ATCOMMAND_FUNC(dropall); // by MouseJstr
-ATCOMMAND_FUNC(chardropall); // by MouseJstr
-ATCOMMAND_FUNC(storeall); // by MouseJstr
-ATCOMMAND_FUNC(charstoreall); // by MouseJstr
-ATCOMMAND_FUNC(skillid); // by MouseJstr
-ATCOMMAND_FUNC(useskill); // by MouseJstr
-ATCOMMAND_FUNC(summon);
-ATCOMMAND_FUNC(rain);
-ATCOMMAND_FUNC(snow);
-ATCOMMAND_FUNC(sakura);
-ATCOMMAND_FUNC(fog);
-ATCOMMAND_FUNC(leaves);
-ATCOMMAND_FUNC(adjgmlvl); // by MouseJstr
-ATCOMMAND_FUNC(adjcmdlvl); // by MouseJstr
-ATCOMMAND_FUNC(trade); // by MouseJstr
-ATCOMMAND_FUNC(send); // by davidsiaw
-ATCOMMAND_FUNC(setbattleflag); // by MouseJstr
-ATCOMMAND_FUNC(unmute); // [Valaris]
-ATCOMMAND_FUNC(uptime); // by MC Cameri
-ATCOMMAND_FUNC(changesex); // by MC Cameri
-ATCOMMAND_FUNC(mute); // celest
-ATCOMMAND_FUNC(refresh); // by MC Cameri
-ATCOMMAND_FUNC(petid); // by MC Cameri
-ATCOMMAND_FUNC(identify); // by MC Cameri
-ATCOMMAND_FUNC(gmotd); // Added by MC Cameri, created by davidsiaw
-ATCOMMAND_FUNC(misceffect); // by MC Cameri
+#define MAX_MSG 1000
+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(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(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(character_stats_all);
+ACMD_FUNC(character_save);
+ACMD_FUNC(night);
+ACMD_FUNC(day);
+ACMD_FUNC(doom);
+ACMD_FUNC(doommap);
+ACMD_FUNC(raise);
+ACMD_FUNC(raisemap);
+ACMD_FUNC(character_baselevel);
+ACMD_FUNC(character_joblevel);
+ACMD_FUNC(kick);
+ACMD_FUNC(kickall);
+ACMD_FUNC(allskill);
+ACMD_FUNC(questskill);
+ACMD_FUNC(charquestskill);
+ACMD_FUNC(lostskill);
+ACMD_FUNC(charlostskill);
+ACMD_FUNC(spiritball);
+ACMD_FUNC(party);
+ACMD_FUNC(guild);
+ACMD_FUNC(charskreset);
+ACMD_FUNC(charstreset);
+ACMD_FUNC(charreset);
+ACMD_FUNC(charstpoint);
+ACMD_FUNC(charmodel);
+ACMD_FUNC(charskpoint);
+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(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_change_sex); // by Yor
+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(enablenpc);
+ACMD_FUNC(hidenpc);
+ACMD_FUNC(disablenpc);
+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(fog);
+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); // by Upa-Kun
#ifndef TXT_ONLY
-ATCOMMAND_FUNC(checkmail); // [Valaris]
-ATCOMMAND_FUNC(listmail); // [Valaris]
-ATCOMMAND_FUNC(listnewmail); // [Valaris]
-ATCOMMAND_FUNC(readmail); // [Valaris]
-ATCOMMAND_FUNC(sendmail); // [Valaris]
-ATCOMMAND_FUNC(sendprioritymail); // [Valaris]
-ATCOMMAND_FUNC(deletemail); // [Valaris]
-ATCOMMAND_FUNC(sound); // [Valaris]
-ATCOMMAND_FUNC(refreshonline); // [Valaris]
+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(sound); // [Valaris]
+ACMD_FUNC(refreshonline); // [Valaris]
#endif /* TXT_ONLY */
-ATCOMMAND_FUNC(skilltree); // by MouseJstr
+ACMD_FUNC(skilltree); // by MouseJstr
+
+ACMD_FUNC(marry); // by MouseJstr
+ACMD_FUNC(divorce); // by MouseJstr
+ACMD_FUNC(rings); // 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
/*==========================================
*AtCommandInfo atcommand_info[]\‘¢‘Ì‚Ì’è‹`
@@ -240,8 +275,6 @@ ATCOMMAND_FUNC(skilltree); // by MouseJstr
// 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_RuraP, "@rura+", 60, atcommand_rurap },
- { AtCommand_RuraP, "@charwarp", 60, atcommand_rurap },
{ AtCommand_Rura, "@rura", 40, atcommand_rura },
{ AtCommand_Warp, "@warp", 40, atcommand_rura },
{ AtCommand_Where, "@where", 1, atcommand_where },
@@ -359,16 +392,15 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_ReloadItemDB, "@reloaditemdb", 99, atcommand_reloaditemdb }, // admin command
{ AtCommand_ReloadMobDB, "@reloadmobdb", 99, atcommand_reloadmobdb }, // admin command
{ AtCommand_ReloadSkillDB, "@reloadskilldb", 99, atcommand_reloadskilldb }, // admin command
-#ifndef TXT_ONLY
- { AtCommand_Rehash, "@rehash", 99, atcommand_rehash }, // admin command
-#else /* TXT_ONLY */
{ AtCommand_ReloadScript, "@reloadscript", 99, atcommand_reloadscript }, // admin command
-#endif /* TXT_ONLY */
{ 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_CharModel, "@charmodel", 50, atcommand_charmodel },
{ AtCommand_CharSKPoint, "@charskpoint", 60, atcommand_charskpoint },
{ AtCommand_CharSTPoint, "@charstpoint", 60, atcommand_charstpoint },
- { AtCommand_CharZeny, "@charzeny", 60, atcommand_charzeny },
{ AtCommand_MapInfo, "@mapinfo", 99, atcommand_mapinfo },
{ AtCommand_Dye, "@dye", 40, atcommand_dye }, // by fritz
{ AtCommand_Dye, "@ccolor", 40, atcommand_dye }, // by fritz
@@ -380,7 +412,7 @@ static AtCommandInfo atcommand_info[] = {
{ 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_CharChangeSex, "@charchangesex", 60, atcommand_char_change_sex }, // by Yor
+// { AtCommand_CharChangeSex, "@charchangesex", 60, atcommand_char_change_sex }, // by Yor
{ 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
@@ -400,8 +432,9 @@ static AtCommandInfo atcommand_info[] = {
{ 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_Nuke, "@nuke", 60, atcommand_nuke }, // [Valaris]
{ AtCommand_Enablenpc, "@enablenpc", 80, atcommand_enablenpc }, // []
+ { AtCommand_Hidenpc, "@hidenpc", 80, atcommand_hidenpc }, // []
{ AtCommand_Disablenpc, "@disablenpc", 80, atcommand_disablenpc }, // []
{ AtCommand_ServerTime, "@time", 0, atcommand_servertime }, // by Yor
{ AtCommand_ServerTime, "@date", 0, atcommand_servertime }, // by Yor
@@ -419,8 +452,8 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_CharUnDisguise, "@charundisguise", 60, atcommand_charundisguise }, // Kalaspuff
{ AtCommand_EMail, "@email", 0, atcommand_email }, // by Yor
{ AtCommand_Effect, "@effect", 40, atcommand_effect }, // by Apple
- { AtCommand_Char_Item_List, "@charitemlist", 40, atcommand_character_item_list }, // by Yor
- { AtCommand_Char_Storage_List, "@charstoragelist", 40, atcommand_character_storage_list }, // by Yor
+// { AtCommand_Char_Item_List, "@charitemlist", 40, atcommand_character_item_list }, // by Yor, now #itemlist
+// { AtCommand_Char_Storage_List, "@charstoragelist", 40, atcommand_character_storage_list }, // by Yor, now #storagelist
{ AtCommand_Char_Cart_List, "@charcartlist", 40, atcommand_character_cart_list }, // by Yor
{ AtCommand_Follow, "@follow", 10, atcommand_follow }, // by MouseJstr
{ AtCommand_AddWarp, "@addwarp", 20, atcommand_addwarp }, // by MouseJstr
@@ -430,12 +463,6 @@ static AtCommandInfo atcommand_info[] = {
{ 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_Chareffect, "@chareffect", 40, atcommand_chareffect }, // MouseJstr
-/*
- { AtCommand_Chardye, "@chardye", 40, atcommand_chardye }, // MouseJstr
- { AtCommand_Charhairstyle, "@charhairstyle", 40, atcommand_charhairstyle }, // MouseJstr
- { AtCommand_Charhaircolor, "@charhaircolor", 40, atcommand_charhaircolor }, // MouseJstr
-*/
{ AtCommand_Dropall, "@dropall", 40, atcommand_dropall }, // MouseJstr
{ AtCommand_Chardropall, "@chardropall", 40, atcommand_chardropall }, // MouseJstr
{ AtCommand_Storeall, "@storeall", 40, atcommand_storeall }, // MouseJstr
@@ -459,8 +486,9 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_Send, "@send", 60, atcommand_send },
{ AtCommand_SetBattleFlag, "@setbattleflag", 60, atcommand_setbattleflag },
{ AtCommand_UnMute, "@unmute", 60, atcommand_unmute }, // [Valaris]
+ { AtCommand_Clearweather, "@clearweather", 99, atcommand_clearweather }, // Dexity
{ AtCommand_UpTime, "@uptime", 0, atcommand_uptime }, // by MC Cameri
- { AtCommand_ChangeSex, "@changesex", 1, atcommand_changesex }, // by MC Cameri
+// { AtCommand_ChangeSex, "@changesex", 1, atcommand_changesex }, // by MC Cameri
{ AtCommand_Mute, "@mute", 99, atcommand_mute }, // [celest]
{ AtCommand_Mute, "@red", 99, atcommand_mute }, // [celest]
{ AtCommand_WhoZeny, "@whozeny", 20, atcommand_whozeny }, // [Valaris]
@@ -470,6 +498,12 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_Identify, "@identify", 40, atcommand_identify }, // by MC Cameri
{ AtCommand_Gmotd, "@gmotd", 0, atcommand_gmotd }, // Added by MC Cameri, created by davidsiaw
{ AtCommand_MiscEffect, "@misceffect", 50, atcommand_misceffect }, // by MC Cameri
+ { AtCommand_MobSearch, "@mobsearch", 0, atcommand_mobsearch },
+ { AtCommand_CleanMap, "@cleanmap", 0, atcommand_cleanmap },
+ { AtCommand_NpcTalk, "@npctalk", 0, atcommand_npctalk },
+ { AtCommand_PetTalk, "@pettalk", 0, atcommand_pettalk },
+ { AtCommand_Users, "@users", 0, atcommand_users },
+ { AtCommand_ResetState, "/reset", 40, NULL },
#ifndef TXT_ONLY // sql-only commands
{ AtCommand_CheckMail, "@checkmail", 1, atcommand_listmail }, // [Valaris]
@@ -483,17 +517,60 @@ static AtCommandInfo atcommand_info[] = {
#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_Rings, "@rings", 40, atcommand_rings }, // [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]
+
// add new commands before this line
{ AtCommand_Unknown, NULL, 1, NULL }
};
+/*=========================================
+ * Generic variables
+ *-----------------------------------------
+ */
+char atcmd_output[200];
+char atcmd_player_name[100];
+
/*====================================================
* This function return the name of the job (by [Yor])
*----------------------------------------------------
*/
-char * job_name(int class) {
- switch (class) {
+char * job_name(int class_) {
+ switch (class_) {
case 0: return "Novice";
case 1: return "Swordsman";
case 2: return "Mage";
@@ -597,7 +674,7 @@ int lowtohigh_compare (const void * a, const void * b)
// Return the message string of the specified number by [Yor]
//-----------------------------------------------------------
char * msg_txt(int msg_number) {
- if (msg_number >= 0 && msg_number < (int)(sizeof(msg_table) / sizeof(msg_table[0])) &&
+ if (msg_number >= 0 && msg_number < MAX_MSG &&
msg_table[msg_number] != NULL && msg_table[msg_number][0] != '\0')
return msg_table[msg_number];
@@ -607,9 +684,9 @@ char * msg_txt(int msg_number) {
//------------------------------------------------------------
// E-mail check: return 0 (not correct) or 1 (valid). by [Yor]
//------------------------------------------------------------
-int e_mail_check(unsigned char *email) {
+int e_mail_check(char *email) {
char ch;
- unsigned char* last_arobas;
+ char* last_arobas;
// athena limits
if (strlen(email) < 3 || strlen(email) > 39)
@@ -670,6 +747,11 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
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;
@@ -683,13 +765,12 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
if (!*str)
return AtCommand_None;
- type = atcommand(gmlvl > 0 ? gmlvl : pc_isGM(sd), str, &info);
+ type = atcommand(sd, gmlvl > 0 ? gmlvl : pc_isGM(sd), str, &info);
if (type != AtCommand_None) {
char command[100];
- char output[200];
const char* p = str;
memset(command, '\0', sizeof(command));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
while (*p && !isspace(*p))
p++;
if (p - str >= sizeof(command)) // too long
@@ -699,20 +780,16 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
p++;
if (type == AtCommand_Unknown || info.proc == NULL) {
- sprintf(output, msg_table[153], command); // %s is Unknown Command.
- clif_displaymessage(fd, output);
+ 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(output, msg_table[154], command); // %s failed.
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[154], command); // %s failed.
+ clif_displaymessage(fd, atcmd_output);
}
}
- // ToDo: Fix Logs :)
- //if((log_config.gm) && (info.level >= log_config.gm))
- // log_atcommand(sd, message);
-
return info.type;
}
@@ -723,7 +800,7 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
*
*------------------------------------------
*/
-AtCommandType atcommand(const int level, const char* message, struct AtCommandInfo* info) {
+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)
@@ -756,6 +833,8 @@ AtCommandType atcommand(const int level, const char* message, struct AtCommandIn
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 {
@@ -770,49 +849,73 @@ AtCommandType atcommand(const int level, const char* message, struct AtCommandIn
*------------------------------------------
*/
static int atkillmonster_sub(struct block_list *bl, va_list ap) {
- int flag = va_arg(ap, int);
-
- nullpo_retr(0, bl);
+ 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, (struct mob_data *)bl, ((struct mob_data *)bl)->hp, 2);
+ mob_damage(NULL, md, md->hp, 2);
else
- mob_delete((struct mob_data *)bl);
-
+ mob_delete(md);
+
return 0;
}
-
-#ifndef TXT_ONLY
-static int atkillnpc_sub(struct block_list *bl, va_list ap)
+/*==========================================
+ * Mob search
+ *------------------------------------------
+ */
+static int atmobsearch_sub(struct block_list *bl,va_list ap)
{
- int flag = va_arg(ap,int);
+ int mob_id,fd;
+ static int number=0;
+ struct mob_data *md;
- nullpo_retr(0, bl);
+ nullpo_retr(0, bl);
- npc_delete((struct npc_data *)bl);
+ if(!ap){
+ number=0;
+ return 0;
+ }
+ mob_id = va_arg(ap,int);
+ fd = va_arg(ap,int);
- flag = 0;
+ md = (struct mob_data *)bl;
- return 0;
+ 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;
}
-
-void rehash( const int fd, struct map_session_data* sd )
+/*==========================================
+ * cleanmap
+ *------------------------------------------
+ */
+static int atcommand_cleanmap_sub(struct block_list *bl,va_list ap)
{
- int map_id = 0;
+ struct flooritem_data *fitem;
- int LOADED_MAPS = map_num;
-
- for (map_id = 0; map_id < LOADED_MAPS;map_id++) {
+ nullpo_retr(0, bl);
- if (map_id > LOADED_MAPS)
- break;
+ fitem = (struct flooritem_data *)bl;
+ if(fitem==NULL || fitem->bl.type!=BL_ITEM){
+ if(battle_config.error_log)
+ printf("map_clearflooritem_timer : error\n");
+ return 1;
+ }
+ delete_timer(fitem->cleartimer,map_clearflooritem_timer);
+ if(fitem->item_data.card[0] == (short)0xff00)
+ intif_delete_petdata(*((long *)(&fitem->item_data.card[1])));
+ clif_clearflooritem(fitem,0);
+ map_delobject(fitem->bl.id);
- map_foreachinarea(atkillmonster_sub, map_id, 0, 0, map[map_id].xs, map[map_id].ys, BL_MOB, 0);
- map_foreachinarea(atkillnpc_sub, map_id, 0, 0, map[map_id].xs, map[map_id].ys, BL_NPC, 0);
- }
+ return 0;
}
-#endif /* not TXT_ONLY */
/*==========================================
* Read Message Data
*------------------------------------------
@@ -821,12 +924,15 @@ 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) {
printf("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;
@@ -835,9 +941,13 @@ int msg_config_read(const char *cfgName) {
msg_config_read(w2);
} else {
msg_number = atoi(w1);
- if (msg_number >= 0 && msg_number < (int)(sizeof(msg_table) / sizeof(msg_table[0])))
- strcpy(msg_table[msg_number], w2);
+ 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]);
+ }
}
}
}
@@ -847,6 +957,17 @@ int msg_config_read(const char *cfgName) {
}
/*==========================================
+ * Cleanup Message Data
+ *------------------------------------------
+ */
+void do_final_msg () {
+ int i;
+ for (i = 0; i < MAX_MSG; i++)
+ aFree(msg_table[i]);
+ return;
+}
+
+/*==========================================
*
*------------------------------------------
*/
@@ -932,73 +1053,7 @@ int atcommand_send(
case 4:
WBUFW(buf,0)=0x190;
}
-
-
- }
- return 0;
-}
-
-/*==========================================
- * @rura+
- *------------------------------------------
- */
-int atcommand_rurap(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
-{
- char map_name[100];
- char character[100];
- int x = 0, y = 0;
- struct map_session_data *pl_sd;
- int m;
-
- memset(map_name, '\0', sizeof(map_name));
- memset(character, '\0', sizeof(character));
-
- if (!message || !*message || sscanf(message, "%99s %d %d %99[^\n]", map_name, &x, &y, character) < 4) {
- clif_displaymessage(fd, "Usage: @charwarp/@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) < 13) // 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_name, 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;
}
@@ -1015,6 +1070,8 @@ int atcommand_rura(
int x = 0, y = 0;
int m;
+ nullpo_retr(-1, sd);
+
memset(map_name, '\0', sizeof(map_name));
if (!message || !*message || sscanf(message, "%99s %d %d", map_name, &x, &y) < 1) {
@@ -1033,11 +1090,11 @@ int atcommand_rura(
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 you to this map.");
+ 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, "You are not authorised to warp you from your actual map.");
+ clif_displaymessage(fd, msg_table[248]);
return -1;
}
if (pc_setpos(sd, map_name, x, y, 3) == 0)
@@ -1062,30 +1119,28 @@ int atcommand_where(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
- char output[200];
struct map_session_data *pl_sd = NULL;
nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
- memset(character, '\0', sizeof character);
- if (sscanf(message, "%99[^\n]", character) < 1)
+ memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
+ if (sscanf(message, "%99[^\n]", atcmd_player_name) < 1)
return -1;
- if(strncmp(sd->status.name,character,24)==0)
+ if(strncmp(sd->status.name,atcmd_player_name,24)==0)
return -1;
- if ((pl_sd = map_nick2sd(character)) == NULL) {
- snprintf(output, sizeof output, "%s %d %d",
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL) {
+ snprintf(atcmd_output, sizeof atcmd_output, "%s %d %d",
sd->mapname, sd->bl.x, sd->bl.y);
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
return -1;
}
- snprintf(output, sizeof output, "%s %s %d %d",
- character, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
- clif_displaymessage(fd, output);
-
+ snprintf(atcmd_output, sizeof atcmd_output, "%s %s %d %d",
+ atcmd_player_name, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
+
return 0;
}
@@ -1097,35 +1152,33 @@ int atcommand_jumpto(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
- char output[200];
struct map_session_data *pl_sd = NULL;
nullpo_retr(-1, sd);
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ 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(character, '\0', sizeof character);
- if (sscanf(message, "%99[^\n]", character) < 1)
+
+ memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
+ if (sscanf(message, "%99[^\n]", atcmd_player_name) < 1)
return -1;
- if(strncmp(sd->status.name,character,24)==0) //Yourself mate? Tsk tsk tsk.
+ if(strncmp(sd->status.name,atcmd_player_name,24)==0) //Yourself mate? Tsk tsk tsk.
return -1;
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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, "You are not authorised to warp you to the map of this player.");
+ 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, "You are not authorised to warp you from your actual map.");
+ clif_displaymessage(fd, msg_table[248]);
return -1;
}
pc_setpos(sd, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y, 3);
- sprintf(output, msg_table[4], character); // Jump to %s
- clif_displaymessage(fd, output);
+ 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;
@@ -1142,10 +1195,11 @@ int atcommand_jump(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
int x = 0, y = 0;
- memset(output, '\0', sizeof(output));
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
sscanf(message, "%d %d", &x, &y);
@@ -1154,17 +1208,13 @@ int atcommand_jump(
if (y <= 0)
y = rand() % 399 + 1;
if (x > 0 && x < 400 && y > 0 && y < 400) {
- 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 you to your actual map.");
- 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, "You are not authorised to warp you from your actual map.");
+ 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->mapname, x, y, 3);
- sprintf(output, msg_table[5], x, y); // Jump to %d %d
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[5], x, y); // Jump to %d %d
+ clif_displaymessage(fd, atcmd_output);
} else {
clif_displaymessage(fd, msg_table[2]); // Coordinates out of range.
return -1;
@@ -1181,14 +1231,15 @@ int atcommand_who(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
struct map_session_data *pl_sd;
int i, j, count;
int pl_GM_level, GM_level;
char match_text[100];
char player_name[24];
- memset(output, '\0', sizeof(output));
+ 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));
@@ -1200,7 +1251,7 @@ int atcommand_who(
count = 0;
GM_level = pc_isGM(sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
pl_GM_level = pc_isGM(pl_sd);
if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_HIDE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
memcpy(player_name, pl_sd->status.name, 24);
@@ -1208,10 +1259,10 @@ int atcommand_who(
player_name[j] = tolower(player_name[j]);
if (strstr(player_name, match_text) != NULL) { // search with no case sensitive
if (pl_GM_level > 0)
- sprintf(output, "Name: %s (GM:%d) | Location: %s %d %d", pl_sd->status.name, pl_GM_level, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
+ sprintf(atcmd_output, "(CID:%d/AID:%d) Name: %s (GM:%d) | Location: %s %d %d", pl_sd->status.char_id, pl_sd->status.account_id, pl_sd->status.name, pl_GM_level, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
else
- sprintf(output, "Name: %s | Location: %s %d %d", pl_sd->status.name, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "(CID:%d/AID:%d) Name: %s | Location: %s %d %d", pl_sd->status.char_id, pl_sd->status.account_id, pl_sd->status.name, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
count++;
}
}
@@ -1223,8 +1274,8 @@ int atcommand_who(
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);
+ sprintf(atcmd_output, msg_table[30], count); // %d players found.
+ clif_displaymessage(fd, atcmd_output);
}
return 0;
@@ -1238,14 +1289,15 @@ int atcommand_who2(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
struct map_session_data *pl_sd;
int i, j, count;
int pl_GM_level, GM_level;
char match_text[100];
char player_name[24];
- memset(output, '\0', sizeof(output));
+ 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));
@@ -1257,7 +1309,7 @@ int atcommand_who2(
count = 0;
GM_level = pc_isGM(sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
pl_GM_level = pc_isGM(pl_sd);
if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_HIDE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
memcpy(player_name, pl_sd->status.name, 24);
@@ -1265,10 +1317,10 @@ int atcommand_who2(
player_name[j] = tolower(player_name[j]);
if (strstr(player_name, match_text) != NULL) { // search with no case sensitive
if (pl_GM_level > 0)
- sprintf(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);
+ 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(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, output);
+ 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++;
}
}
@@ -1280,8 +1332,8 @@ int atcommand_who2(
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);
+ sprintf(atcmd_output, msg_table[30], count); // %d players found.
+ clif_displaymessage(fd, atcmd_output);
}
return 0;
@@ -1297,7 +1349,6 @@ int atcommand_who3(
{
char temp0[100];
char temp1[100];
- char output[200];
struct map_session_data *pl_sd;
int i, j, count;
int pl_GM_level, GM_level;
@@ -1306,9 +1357,11 @@ int atcommand_who3(
struct guild *g;
struct party *p;
+ nullpo_retr(-1, sd);
+
memset(temp0, '\0', sizeof(temp0));
memset(temp1, '\0', sizeof(temp1));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(match_text, '\0', sizeof(match_text));
memset(player_name, '\0', sizeof(player_name));
@@ -1320,7 +1373,7 @@ int atcommand_who3(
count = 0;
GM_level = pc_isGM(sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
pl_GM_level = pc_isGM(pl_sd);
if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_HIDE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
memcpy(player_name, pl_sd->status.name, 24);
@@ -1338,10 +1391,10 @@ int atcommand_who3(
else
sprintf(temp0, "%s", p->name);
if (pl_GM_level > 0)
- sprintf(output, "Name: %s (GM:%d) | Party: '%s' | Guild: '%s'", pl_sd->status.name, pl_GM_level, temp0, temp1);
+ sprintf(atcmd_output, "Name: %s (GM:%d) | Party: '%s' | Guild: '%s'", pl_sd->status.name, pl_GM_level, temp0, temp1);
else
- sprintf(output, "Name: %s | Party: '%s' | Guild: '%s'", pl_sd->status.name, temp0, temp1);
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "Name: %s | Party: '%s' | Guild: '%s'", pl_sd->status.name, temp0, temp1);
+ clif_displaymessage(fd, atcmd_output);
count++;
}
}
@@ -1353,8 +1406,8 @@ int atcommand_who3(
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);
+ sprintf(atcmd_output, msg_table[30], count); // %d players found.
+ clif_displaymessage(fd, atcmd_output);
}
return 0;
@@ -1368,14 +1421,13 @@ int atcommand_whomap(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
struct map_session_data *pl_sd;
int i, count;
int pl_GM_level, GM_level;
int map_id;
char map_name[100];
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(map_name, '\0', sizeof(map_name));
if (!message || !*message)
@@ -1391,15 +1443,15 @@ int atcommand_whomap(
count = 0;
GM_level = pc_isGM(sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
pl_GM_level = pc_isGM(pl_sd);
if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_HIDE)) && (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(output, "Name: %s (GM:%d) | Location: %s %d %d", pl_sd->status.name, pl_GM_level, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
+ sprintf(atcmd_output, "Name: %s (GM:%d) | Location: %s %d %d", pl_sd->status.name, pl_GM_level, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
else
- sprintf(output, "Name: %s | Location: %s %d %d", pl_sd->status.name, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "Name: %s | Location: %s %d %d", pl_sd->status.name, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
count++;
}
}
@@ -1407,13 +1459,13 @@ int atcommand_whomap(
}
if (count == 0)
- sprintf(output, msg_table[54], map[map_id].name); // No player found in map '%s'.
+ sprintf(atcmd_output, msg_table[54], map[map_id].name); // No player found in map '%s'.
else if (count == 1)
- sprintf(output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
+ sprintf(atcmd_output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
else {
- sprintf(output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
+ sprintf(atcmd_output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
}
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -1426,14 +1478,15 @@ int atcommand_whomap2(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
struct map_session_data *pl_sd;
int i, count;
int pl_GM_level, GM_level;
int map_id = 0;
char map_name[100];
- memset(output, '\0', sizeof(output));
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(map_name, '\0', sizeof(map_name));
if (!message || !*message)
@@ -1449,15 +1502,15 @@ int atcommand_whomap2(
count = 0;
GM_level = pc_isGM(sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
pl_GM_level = pc_isGM(pl_sd);
if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_HIDE)) && (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(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);
+ 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(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, output);
+ 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++;
}
}
@@ -1465,13 +1518,13 @@ int atcommand_whomap2(
}
if (count == 0)
- sprintf(output, msg_table[54], map[map_id].name); // No player found in map '%s'.
+ sprintf(atcmd_output, msg_table[54], map[map_id].name); // No player found in map '%s'.
else if (count == 1)
- sprintf(output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
+ sprintf(atcmd_output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
else {
- sprintf(output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
+ sprintf(atcmd_output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
}
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -1486,7 +1539,6 @@ int atcommand_whomap3(
{
char temp0[100];
char temp1[100];
- char output[200];
struct map_session_data *pl_sd;
int i, count;
int pl_GM_level, GM_level;
@@ -1495,9 +1547,11 @@ int atcommand_whomap3(
struct guild *g;
struct party *p;
+ nullpo_retr(-1, sd);
+
memset(temp0, '\0', sizeof(temp0));
memset(temp1, '\0', sizeof(temp1));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(map_name, '\0', sizeof(map_name));
if (!message || !*message)
@@ -1513,7 +1567,7 @@ int atcommand_whomap3(
count = 0;
GM_level = pc_isGM(sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
pl_GM_level = pc_isGM(pl_sd);
if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_HIDE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
if (pl_sd->bl.m == map_id) {
@@ -1528,10 +1582,10 @@ int atcommand_whomap3(
else
sprintf(temp0, "%s", p->name);
if (pl_GM_level > 0)
- sprintf(output, "Name: %s (GM:%d) | Party: '%s' | Guild: '%s'", pl_sd->status.name, pl_GM_level, temp0, temp1);
+ sprintf(atcmd_output, "Name: %s (GM:%d) | Party: '%s' | Guild: '%s'", pl_sd->status.name, pl_GM_level, temp0, temp1);
else
- sprintf(output, "Name: %s | Party: '%s' | Guild: '%s'", pl_sd->status.name, temp0, temp1);
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "Name: %s | Party: '%s' | Guild: '%s'", pl_sd->status.name, temp0, temp1);
+ clif_displaymessage(fd, atcmd_output);
count++;
}
}
@@ -1539,13 +1593,13 @@ int atcommand_whomap3(
}
if (count == 0)
- sprintf(output, msg_table[54], map[map_id].name); // No player found in map '%s'.
+ sprintf(atcmd_output, msg_table[54], map[map_id].name); // No player found in map '%s'.
else if (count == 1)
- sprintf(output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
+ sprintf(atcmd_output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
else {
- sprintf(output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
+ sprintf(atcmd_output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
}
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -1560,7 +1614,6 @@ int atcommand_whogm(
{
char temp0[100];
char temp1[100];
- char output[200];
struct map_session_data *pl_sd;
int i, j, count;
int pl_GM_level, GM_level;
@@ -1569,9 +1622,11 @@ int atcommand_whogm(
struct guild *g;
struct party *p;
+ nullpo_retr(-1, sd);
+
memset(temp0, '\0', sizeof(temp0));
memset(temp1, '\0', sizeof(temp1));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(match_text, '\0', sizeof(match_text));
memset(player_name, '\0', sizeof(player_name));
@@ -1583,7 +1638,7 @@ int atcommand_whogm(
count = 0;
GM_level = pc_isGM(sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
pl_GM_level = pc_isGM(pl_sd);
if (pl_GM_level > 0) {
if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_HIDE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
@@ -1591,10 +1646,10 @@ int atcommand_whogm(
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(output, "Name: %s (GM:%d) | Location: %s %d %d", pl_sd->status.name, pl_GM_level, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y);
- clif_displaymessage(fd, output);
- sprintf(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, output);
+ sprintf(atcmd_output, "Name: %s (GM:%d) | Location: %s %d %d", pl_sd->status.name, pl_GM_level, pl_sd->mapname, 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");
@@ -1605,8 +1660,8 @@ int atcommand_whogm(
sprintf(temp0, "None");
else
sprintf(temp0, "%s", p->name);
- sprintf(output, " Party: '%s' | Guild: '%s'", temp0, temp1);
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, " Party: '%s' | Guild: '%s'", temp0, temp1);
+ clif_displaymessage(fd, atcmd_output);
count++;
}
}
@@ -1619,8 +1674,8 @@ int atcommand_whogm(
else if (count == 1)
clif_displaymessage(fd, msg_table[151]); // 1 GM found.
else {
- sprintf(output, msg_table[152], count); // %d GMs found.
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[152], count); // %d GMs found.
+ clif_displaymessage(fd, atcmd_output);
}
return 0;
@@ -1630,15 +1685,18 @@ int atcommand_whozeny(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
struct map_session_data *pl_sd;
int i, j, count,c;
char match_text[100];
char player_name[24];
- int zeny[clif_countusers()];
- int counted[clif_countusers()];
+ //int zeny[clif_countusers()];
+ //int counted[clif_countusers()];
+ int *zeny = (int *)aCallocA(clif_countusers(), sizeof(int));
+ int *counted = (int *)aCallocA(clif_countusers(), sizeof(int));
+
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(match_text, '\0', sizeof(match_text));
memset(player_name, '\0', sizeof(player_name));
@@ -1649,7 +1707,7 @@ int atcommand_whozeny(
count = 0;
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
memcpy(player_name, pl_sd->status.name, 24);
for (j = 0; player_name[j]; j++)
player_name[j] = tolower(player_name[j]);
@@ -1668,10 +1726,10 @@ int atcommand_whozeny(
for (i = 0; i < fd_max; i++) {
if(!zeny[c])
continue;
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && zeny[c] && counted[i]==0) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && zeny[c] && counted[i]==0) {
if(pl_sd->status.zeny==zeny[c]) {
- sprintf(output, "Name: %s | Zeny: %d", pl_sd->status.name, pl_sd->status.zeny);
- clif_displaymessage(fd, output);
+ 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;
}
@@ -1684,10 +1742,13 @@ int atcommand_whozeny(
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);
+ sprintf(atcmd_output, msg_table[30], count); // %d players found.
+ clif_displaymessage(fd, atcmd_output);
}
+ aFree(zeny);
+ aFree(counted);
+
return 0;
}
@@ -1697,14 +1758,15 @@ int atcommand_happyhappyjoyjoy(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
-
struct map_session_data *pl_sd;
int i,e;
+ nullpo_retr(-1, sd);
+
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
e=rand()%40;
- if(e==34)
+ if(e==34)
e = 0;
clif_emotion(&pl_sd->bl,e);
}
@@ -1721,6 +1783,8 @@ 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->mapname, sd->bl.x, sd->bl.y);
if (sd->status.pet_id > 0 && sd->pd)
intif_save_petdata(sd->status.account_id, &sd->pet);
@@ -1742,13 +1806,15 @@ int atcommand_load(
{
int m;
+ nullpo_retr(-1, sd);
+
m = map_mapname2mapid(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, "You are not authorised to warp you to your save map.");
+ 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, "You are not authorised to warp you from your actual map.");
+ clif_displaymessage(fd, msg_table[248]);
return -1;
}
@@ -1766,14 +1832,15 @@ int atcommand_speed(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
int speed;
- memset(output, '\0', sizeof(output));
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
- sprintf(output, "Please, enter a speed value (usage: @speed <%d-%d>).", MIN_WALK_SPEED, MAX_WALK_SPEED);
- clif_displaymessage(fd, output);
+ 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;
}
@@ -1785,8 +1852,8 @@ int atcommand_speed(
clif_updatestatus(sd, SP_SPEED);
clif_displaymessage(fd, msg_table[8]); // Speed changed.
} else {
- sprintf(output, "Please, enter a valid speed value (usage: @speed <%d-%d>).", MIN_WALK_SPEED, MAX_WALK_SPEED);
- clif_displaymessage(fd, output);
+ 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;
}
@@ -1801,11 +1868,25 @@ 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 == 1) {
+ 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;
}
+
/*==========================================
*
*------------------------------------------
@@ -1814,8 +1895,23 @@ int atcommand_guildstorage(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- if (sd->status.guild_id > 0)
+ struct storage *stor; //changes from Freya/Yor
+ nullpo_retr(-1, sd);
+
+ if (sd->status.guild_id > 0) {
+ if (sd->state.storage_flag == 1) {
+ 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;
}
@@ -1829,6 +1925,7 @@ int atcommand_option(
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+>).");
@@ -1844,30 +1941,30 @@ int atcommand_option(
}
sd->status.option = param3;
// fix pecopeco display
- if (sd->status.class == 13 || sd->status.class == 21 || sd->status.class == 4014 || sd->status.class == 4022) {
+ if (sd->status.class_ == 13 || sd->status.class_ == 21 || sd->status.class_ == 4014 || sd->status.class_ == 4022) {
if (!pc_isriding(sd)) { // sd have the new value...
- if (sd->status.class == 13)
- sd->status.class = sd->view_class = 7;
- else if (sd->status.class == 21)
- sd->status.class = sd->view_class = 14;
- else if (sd->status.class == 4014)
- sd->status.class = sd->view_class = 4008;
- else if (sd->status.class == 4022)
- sd->status.class = sd->view_class = 4015;
+ if (sd->status.class_ == 13)
+ sd->status.class_ = sd->view_class = 7;
+ else if (sd->status.class_ == 21)
+ sd->status.class_ = sd->view_class = 14;
+ else if (sd->status.class_ == 4014)
+ sd->status.class_ = sd->view_class = 4008;
+ else if (sd->status.class_ == 4022)
+ sd->status.class_ = sd->view_class = 4015;
}
} else {
if (pc_isriding(sd)) { // sd have the new value...
if (sd->disguise > 0) { // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris] (code added by [Yor])
sd->status.option &= ~0x0020;
} else {
- if (sd->status.class == 7)
- sd->status.class = sd->view_class = 13;
- else if (sd->status.class == 14)
- sd->status.class = sd->view_class = 21;
- else if (sd->status.class == 4008)
- sd->status.class = sd->view_class = 4014;
- else if (sd->status.class == 4015)
- sd->status.class = sd->view_class = 4022;
+ if (sd->status.class_ == 7)
+ sd->status.class_ = sd->view_class = 13;
+ else if (sd->status.class_ == 14)
+ sd->status.class_ = sd->view_class = 21;
+ else if (sd->status.class_ == 4008)
+ sd->status.class_ = sd->view_class = 4014;
+ else if (sd->status.class_ == 4015)
+ sd->status.class_ = sd->view_class = 4022;
else
sd->status.option &= ~0x0020;
}
@@ -1875,7 +1972,7 @@ int atcommand_option(
}
clif_changeoption(&sd->bl);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
clif_displaymessage(fd, msg_table[9]); // Options changed.
return 0;
@@ -1889,6 +1986,7 @@ 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_HIDE) {
sd->status.option &= ~OPTION_HIDE;
clif_displaymessage(fd, msg_table[10]); // Invisible: Off
@@ -1909,32 +2007,116 @@ int atcommand_jobchange(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- int job = 0, upper = -1;
+ int job = 0, upper = 0;
+ nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) {
- clif_displaymessage(fd, "Please, enter job ID (usage: @job/@jobchange <job ID>).");
- return -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 },
+ };
+
+ 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;
// fix pecopeco display
if ((job != 13 && job != 21 && job != 4014 && job != 4022)) {
if (pc_isriding(sd)) {
- if (sd->status.class == 13)
- sd->status.class = sd->view_class = 7;
- if (sd->status.class == 21)
- sd->status.class = sd->view_class = 14;
- if (sd->status.class == 4014)
- sd->status.class = sd->view_class = 4008;
- if (sd->status.class == 4022)
- sd->status.class = sd->view_class = 4015;
+ if (sd->status.class_ == 13)
+ sd->status.class_ = sd->view_class = 7;
+ if (sd->status.class_ == 21)
+ sd->status.class_ = sd->view_class = 14;
+ if (sd->status.class_ == 4014)
+ sd->status.class_ = sd->view_class = 4008;
+ if (sd->status.class_ == 4022)
+ sd->status.class_ = sd->view_class = 4015;
sd->status.option &= ~0x0020;
clif_changeoption(&sd->bl);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
}
} else {
if (!pc_isriding(sd)) {
@@ -1948,7 +2130,10 @@ int atcommand_jobchange(
job = 4015;
}
}
-
+ 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 {
@@ -1971,6 +2156,7 @@ 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 + 1);
clif_displaymessage(fd, msg_table[13]); // A pity! You've died.
@@ -1986,17 +2172,17 @@ int atcommand_kill(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @kill <char name>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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 + 1);
clif_displaymessage(fd, msg_table[14]); // Character killed.
@@ -2020,6 +2206,7 @@ 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;
@@ -2032,9 +2219,8 @@ int atcommand_alive(
clif_resurrection(&sd->bl, 1);
clif_displaymessage(fd, msg_table[16]); // You've been revived! It's a miracle!
return 0;
- }
+ }
return -1;
-
}
/*==========================================
@@ -2045,17 +2231,17 @@ int atcommand_kami(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
clif_displaymessage(fd, "Please, enter a message (usage: @kami <message>).");
return -1;
}
- sscanf(message, "%199[^\n]", output);
- intif_GMmessage(output, strlen(output) + 1, (*(command + 5) == 'b') ? 0x10 : 0);
+ sscanf(message, "%199[^\n]", atcmd_output);
+ intif_GMmessage(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b') ? 0x10 : 0);
return 0;
}
@@ -2069,6 +2255,7 @@ int atcommand_heal(
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);
@@ -2120,6 +2307,7 @@ int atcommand_item(
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));
@@ -2147,10 +2335,10 @@ int atcommand_item(
for (i = 0; i < number; i += get_count) {
// if pet egg
if (pet_id >= 0) {
- sd->catch_target_class = pet_db[pet_id].class;
+ sd->catch_target_class = pet_db[pet_id].class_;
intif_create_pet(sd->status.account_id, sd->status.char_id,
- pet_db[pet_id].class, mob_db[pet_db[pet_id].class].lv,
- pet_db[pet_id].EggID, 0, pet_db[pet_id].intimate,
+ (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 {
@@ -2186,6 +2374,7 @@ int atcommand_item2(
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));
@@ -2253,6 +2442,7 @@ int atcommand_itemreset(
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)
@@ -2271,6 +2461,7 @@ 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;
@@ -2285,6 +2476,7 @@ int atcommand_baselevelup(
const char* command, const char* message)
{
int level, i;
+ nullpo_retr(-1, sd);
if (!message || !*message || (level = atoi(message)) == 0) {
clif_displaymessage(fd, "Please, enter a level adjustement (usage: @lvup/@blevel/@baselvlup <number of levels>).");
@@ -2296,7 +2488,7 @@ int atcommand_baselevelup(
clif_displaymessage(fd, msg_table[47]); // Base level can't go any higher.
return -1;
} // End Addition
- if (level > battle_config.maximum_level || level > (battle_config.maximum_level - sd->status.base_level)) // fix positiv overflow
+ if ((unsigned int)level > battle_config.maximum_level || (unsigned int)level > (battle_config.maximum_level - sd->status.base_level)) // fix positiv overflow
level = battle_config.maximum_level - sd->status.base_level;
for (i = 1; i <= level; i++)
sd->status.status_point += (sd->status.base_level + i + 14) / 5;
@@ -2304,7 +2496,7 @@ int atcommand_baselevelup(
clif_updatestatus(sd, SP_BASELEVEL);
clif_updatestatus(sd, SP_NEXTBASEEXP);
clif_updatestatus(sd, SP_STATUSPOINT);
- pc_calcstatus(sd, 0);
+ 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.
@@ -2313,7 +2505,7 @@ int atcommand_baselevelup(
clif_displaymessage(fd, msg_table[158]); // Base level can't go any lower.
return -1;
}
- if (level < -battle_config.maximum_level || level < (1 - sd->status.base_level)) // fix negativ overflow
+ if (level < -(int)battle_config.maximum_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--)
@@ -2325,7 +2517,7 @@ int atcommand_baselevelup(
sd->status.base_level += level;
clif_updatestatus(sd, SP_BASELEVEL);
clif_updatestatus(sd, SP_NEXTBASEEXP);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
clif_displaymessage(fd, msg_table[22]); // Base level lowered.
}
@@ -2340,16 +2532,23 @@ int atcommand_joblevelup(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- int up_level = 50, level;
+ unsigned int up_level = 50;
+ int level;
+ struct pc_base_job s_class;
+ nullpo_retr(-1, sd);
+ s_class = pc_calc_base_job(sd->status.class_);
if (!message || !*message || (level = atoi(message)) == 0) {
clif_displaymessage(fd, "Please, enter a level adjustement (usage: @joblvup/@jlevel/@joblvlup <number of levels>).");
return -1;
}
- if (sd->status.class == 0 || sd->status.class == 4001)
+ if (s_class.job == 0)
up_level -= 40;
- else if ((sd->status.class > 4007 && sd->status.class < 4024) || sd->status.class == 23)
+ // super novices can go up to 99 [celest]
+ else if (s_class.job == 23)
+ up_level += 49;
+ else if (sd->status.class_ > 4007 && sd->status.class_ < 4023)
up_level += 20;
if (level > 0) {
@@ -2357,14 +2556,14 @@ int atcommand_joblevelup(
clif_displaymessage(fd, msg_table[23]); // Job level can't go any higher.
return -1;
}
- if (level > up_level || level > (up_level - sd->status.job_level)) // fix positiv overflow
+ 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);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
clif_misceffect(&sd->bl, 1);
clif_displaymessage(fd, msg_table[24]); // Job level raised.
} else {
@@ -2372,7 +2571,7 @@ int atcommand_joblevelup(
clif_displaymessage(fd, msg_table[159]); // Job level can't go any lower.
return -1;
}
- if (level < -up_level || level < (1 - sd->status.job_level)) // fix negativ overflow
+ 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);
@@ -2383,7 +2582,7 @@ int atcommand_joblevelup(
sd->status.skill_point = 0;
clif_updatestatus(sd, SP_SKILLPOINT);
} // to add: remove status points from skills
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
clif_displaymessage(fd, msg_table[25]); // Job level lowered.
}
@@ -2401,6 +2600,7 @@ int atcommand_help(
char buf[2048], w1[2048], w2[2048];
int i, gm_level;
FILE* fp;
+ nullpo_retr(-1, sd);
memset(buf, '\0', sizeof(buf));
@@ -2439,6 +2639,7 @@ int atcommand_gm(
const char* command, const char* message)
{
char password[100];
+ nullpo_retr(-1, sd);
memset(password, '\0', sizeof(password));
@@ -2466,6 +2667,7 @@ int atcommand_pvpoff(
{
struct map_session_data *pl_sd;
int i;
+ 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.
@@ -2476,7 +2678,7 @@ int atcommand_pvpoff(
map[sd->bl.m].flag.pvp = 0;
clif_send0199(sd->bl.m, 0);
for (i = 0; i < fd_max; i++) { //l”•ªƒ‹[ƒv
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
if (sd->bl.m == pl_sd->bl.m) {
clif_pvpset(pl_sd, 0, 0, 2);
if (pl_sd->pvp_timer != -1) {
@@ -2505,6 +2707,7 @@ int atcommand_pvpon(
{
struct map_session_data *pl_sd;
int i;
+ 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.
@@ -2515,7 +2718,7 @@ int atcommand_pvpon(
map[sd->bl.m].flag.pvp = 1;
clif_send0199(sd->bl.m, 1);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
if (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);
@@ -2542,6 +2745,7 @@ 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);
@@ -2562,6 +2766,7 @@ 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);
@@ -2583,14 +2788,14 @@ int atcommand_model(
const char* command, const char* message)
{
int hair_style = 0, hair_color = 0, cloth_color = 0;
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d %d %d", &hair_style, &hair_color, &cloth_color) < 1) {
- sprintf(output, "Please, enter at least a value (usage: @model <hair ID: %d-%d> <hair color: %d-%d> <clothes color: %d-%d>).",
+ 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, output);
+ clif_displaymessage(fd, atcmd_output);
return -1;
}
@@ -2598,7 +2803,7 @@ int atcommand_model(
hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR &&
cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
//•ž‚ÌF•ÏX
- if (cloth_color != 0 && sd->status.sex == 1 && (sd->status.class == 12 || sd->status.class == 17)) {
+ if (cloth_color != 0 && sd->status.sex == 1 && (sd->status.class_ == 12 || sd->status.class_ == 17)) {
//•ž‚ÌF–¢ŽÀ‘•E‚Ì”»’è
clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
return -1;
@@ -2623,24 +2828,19 @@ int atcommand_model(
int atcommand_dye(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int cloth_color = 0;
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &cloth_color) < 1) {
- sprintf(output, "Please, enter a clothes color (usage: @dye/@ccolor <clothes color: %d-%d>).", MIN_CLOTH_COLOR, MAX_CLOTH_COLOR);
- clif_displaymessage(fd, output);
+ 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) {
- if (cloth_color != 0 && sd->status.sex == 1 && (sd->status.class == 12 || sd->status.class == 17)) {
- clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
- return -1;
- } else {
- pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif_displaymessage(fd, msg_table[36]); // Appearence changed.
- }
+ 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;
@@ -2650,35 +2850,24 @@ int atcommand_dye(const int fd, struct map_session_data* sd, const char* command
}
/*==========================================
- * @chardye by [MouseJstr]
- *------------------------------------------
- */
-int
-atcommand_chardye(const int fd, struct map_session_data* sd,
- const char* command, const char* message)
-{
- 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;
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &hair_style) < 1) {
- sprintf(output, "Please, enter a hair style (usage: @hairstyle/@hstyle <hair ID: %d-%d>).", MIN_HAIR_STYLE, MAX_HAIR_STYLE);
- clif_displaymessage(fd, output);
+ 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) {
- if (hair_style != 0 && sd->status.sex == 1 && (sd->status.class == 12 || sd->status.class == 17)) {
+ if (hair_style != 0 && sd->status.sex == 1 && (sd->status.class_ == 12 || sd->status.class_ == 17)) {
clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
return -1;
} else {
@@ -2701,7 +2890,8 @@ int
atcommand_charhairstyle(const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- return 0;
+ nullpo_retr(-1, sd);
+ return 0;
}
/*==========================================
@@ -2711,18 +2901,18 @@ atcommand_charhairstyle(const int fd, struct map_session_data* sd,
int atcommand_hair_color(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
int hair_color = 0;
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &hair_color) < 1) {
- sprintf(output, "Please, enter a hair color (usage: @haircolor/@hcolor <hair color: %d-%d>).", MIN_HAIR_COLOR, MAX_HAIR_COLOR);
- clif_displaymessage(fd, output);
+ 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) {
- if (hair_color != 0 && sd->status.sex == 1 && (sd->status.class == 12 || sd->status.class == 17)) {
+ if (hair_color != 0 && sd->status.sex == 1 && (sd->status.class_ == 12 || sd->status.class_ == 17)) {
clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
return -1;
} else {
@@ -2738,17 +2928,6 @@ int atcommand_hair_color(const int fd, struct map_session_data* sd, const char*
}
/*==========================================
- * @charhaircolor by [MouseJstr]
- *------------------------------------------
- */
-int
-atcommand_charhaircolor(const int fd, struct map_session_data* sd,
- const char* command, const char* message)
-{
- return 0;
-}
-
-/*==========================================
* @go [city_number/city_name]: improved by [yor] to add city names and help
*------------------------------------------
*/
@@ -2759,15 +2938,9 @@ int atcommand_go(
int i;
int town;
char map_name[100];
- char output[200];
int m;
- if(map[sd->bl.m].flag.nogo) {
- clif_displaymessage(sd->fd,"You can not use @go on this map.");
- return 0;
- }
-
- struct { char map[16]; int x, y; } data[] = {
+ const struct { char map[16]; int x, y; } data[] = {
{ "prontera.gat", 156, 191 }, // 0=Prontera
{ "morocc.gat", 156, 93 }, // 1=Morroc
{ "geffen.gat", 119, 59 }, // 2=Geffen
@@ -2785,10 +2958,19 @@ int atcommand_go(
{ "louyang.gat", 217, 40 }, // 14=Lou Yang
{ "new_1-1.gat", 53, 111 }, // 15=Start point
{ "sec_pri.gat", 23, 61 }, // 16=Prison
+ { "jawaii.gat", 249, 127 }, // 17=Jawaii
+ { "ayothaya.gat", 151, 117 }, // 18=Ayothaya
};
+ 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(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
// get the number
town = atoi(message);
@@ -2803,7 +2985,8 @@ int atcommand_go(
clif_displaymessage(fd, " 0=Prontera 7=Lutie 14=Lou Yang");
clif_displaymessage(fd, " 1=Morroc 8=Comodo 15=Start point");
clif_displaymessage(fd, " 2=Geffen 9=Yuno 16=Prison");
- clif_displaymessage(fd, " 3=Payon 10=Amatsu");
+ clif_displaymessage(fd, " 3=Payon 10=Amatsu 17=Jawaii");
+ clif_displaymessage(fd, " 18=Ayothaya");
return -1;
} else {
// get possible name of the city and add .gat if not in the name
@@ -2858,17 +3041,23 @@ int atcommand_go(
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", 4) == 0 || // 3 first characters
+ strncmp(map_name, "ayotaya.gat", 4) == 0) { // writing error (3 first characters)
+ town = 18;
}
if (town >= -3 && town <= -1) {
if (sd->status.memo_point[-town-1].map[0]) {
m = map_mapname2mapid(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, "You are not authorised to warp you to this memo map.");
+ 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, "You are not authorised to warp you from your actual map.");
+ 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) {
@@ -2878,21 +3067,21 @@ int atcommand_go(
return -1;
}
} else {
- sprintf(output, msg_table[164], -town-1); // Your memo point #%d doesn't exist.
- clif_displaymessage(fd, output);
+ 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(data[town].map);
+ 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, "You are not authorised to warp you to this destination map.");
+ 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, "You are not authorised to warp you from your actual map.");
+ clif_displaymessage(fd, msg_table[248]);
return -1;
}
- if (pc_setpos(sd, data[town].map, data[town].x, data[town].y, 3) == 0) {
+ if (pc_setpos(sd, (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.
@@ -2917,17 +3106,17 @@ int atcommand_monster(
{
char name[100];
char monster[100];
- char output[200];
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(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message ||
(sscanf(message, "\"%[^\"]\" %99s %d %d %d", name, monster, &number, &x, &y) < 2 &&
@@ -2964,7 +3153,7 @@ int atcommand_monster(
printf("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, x, y);
count = 0;
- range = sqrt(number) / 2;
+ 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;
@@ -2987,8 +3176,8 @@ int atcommand_monster(
if (number == count)
clif_displaymessage(fd, msg_table[39]); // All monster summoned!
else {
- sprintf(output, msg_table[240], count); // %d monster(s) summoned!
- clif_displaymessage(fd, output);
+ 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.
@@ -3007,7 +3196,6 @@ int atcommand_spawn(
const char* command, const char* message) {
char name[100];
char monster[100];
- char output[200];
int mob_id;
int number = 0;
int x = 0, y = 0;
@@ -3015,9 +3203,10 @@ int atcommand_spawn(
int i, j, k;
int mx, my, range;
+ nullpo_retr(-1, sd);
memset(name, '\0', sizeof(name));
memset(monster, '\0', sizeof(monster));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message ||
(sscanf(message, "\"%[^\"]\" %99s %d %d %d", name, monster, &number, &x, &y) < 2 &&
@@ -3055,7 +3244,7 @@ int atcommand_spawn(
printf("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, x, y);
count = 0;
- range = sqrt(number) / 2;
+ 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;
@@ -3078,8 +3267,8 @@ int atcommand_spawn(
if (number == count)
clif_displaymessage(fd, msg_table[39]); // All monster summoned!
else {
- sprintf(output, msg_table[240], count); // %d monster(s) summoned!
- clif_displaymessage(fd, output);
+ 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.
@@ -3254,6 +3443,8 @@ void atcommand_killmonster_sub(
int map_id;
char map_name[100];
+ if (!sd) return;
+
memset(map_name, '\0', sizeof(map_name));
if (!message || !*message || sscanf(message, "%99s", map_name) < 1)
@@ -3280,6 +3471,7 @@ 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;
@@ -3293,6 +3485,7 @@ 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;
@@ -3308,9 +3501,9 @@ int atcommand_refine(
{
int i, position = 0, refine = 0, current_position, final_refine;
int count;
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ 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>).");
@@ -3337,7 +3530,7 @@ int atcommand_refine(
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, 0, BF_NORMAL);
+ 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);
@@ -3353,8 +3546,8 @@ int atcommand_refine(
else if (count == 1)
clif_displaymessage(fd, msg_table[167]); // 1 item has been refined!
else {
- sprintf(output, msg_table[168], count); // %d items have been refined!
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[168], count); // %d items have been refined!
+ clif_displaymessage(fd, atcmd_output);
}
return 0;
@@ -3373,9 +3566,9 @@ int atcommand_produce(
int flag = 0;
struct item_data *item_data;
struct item tmp_item;
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ 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) {
@@ -3412,10 +3605,10 @@ int atcommand_produce(
if (battle_config.error_log)
printf("@produce NOT WEAPON [%d]\n", item_id);
if (item_id != 0 && itemdb_exists(item_id))
- sprintf(output, msg_table[169], item_id, item_data->name); // This item (%d: '%s') is not an equipment.
+ sprintf(atcmd_output, msg_table[169], item_id, item_data->name); // This item (%d: '%s') is not an equipment.
else
- sprintf(output, msg_table[170]); // This item is not an equipment.
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[170]); // This item is not an equipment.
+ clif_displaymessage(fd, atcmd_output);
return -1;
}
@@ -3428,17 +3621,18 @@ int atcommand_produce(
*/
void atcommand_memo_sub(struct map_session_data* sd) {
int i;
- char output[200];
- memset(output, '\0', sizeof(output));
+ 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[0])
- sprintf(output, "%d - %s (%d,%d)", i, sd->status.memo_point[i].map, sd->status.memo_point[i].x, sd->status.memo_point[i].y);
+ sprintf(atcmd_output, "%d - %s (%d,%d)", i, sd->status.memo_point[i].map, sd->status.memo_point[i].x, sd->status.memo_point[i].y);
else
- sprintf(output, msg_table[171], i); // %d - void
- clif_displaymessage(sd->fd, output);
+ sprintf(atcmd_output, msg_table[171], i); // %d - void
+ clif_displaymessage(sd->fd, atcmd_output);
}
return;
@@ -3453,21 +3647,21 @@ int atcommand_memo(
const char* command, const char* message)
{
int position = 0;
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ 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 && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
- clif_displaymessage(fd, "You are not authorised to memo this map.");
+ clif_displaymessage(fd, msg_table[253]);
return -1;
}
if (sd->status.memo_point[position].map[0]) {
- sprintf(output, msg_table[172], position, 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, output);
+ sprintf(atcmd_output, msg_table[172], position, 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);
}
memcpy(sd->status.memo_point[position].map, map[sd->bl.m].name, 24);
sd->status.memo_point[position].x = sd->bl.x;
@@ -3477,8 +3671,8 @@ int atcommand_memo(
clif_displaymessage(fd, msg_table[173]); // Note: you don't have the 'Warp' skill level to use it.
atcommand_memo_sub(sd);
} else {
- sprintf(output, "Please, enter a valid position (usage: @memo <memo_position:%d-%d>).", MIN_PORTAL_MEMO, MAX_PORTAL_MEMO);
- clif_displaymessage(fd, output);
+ 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;
}
@@ -3495,20 +3689,21 @@ int atcommand_gat(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
int y;
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
for (y = 2; y >= -2; y--) {
- sprintf(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),
- map_getcell(sd->bl.m, sd->bl.x - 1, sd->bl.y + y),
- map_getcell(sd->bl.m, sd->bl.x, sd->bl.y + y),
- map_getcell(sd->bl.m, sd->bl.x + 1, sd->bl.y + y),
- map_getcell(sd->bl.m, sd->bl.x + 2, sd->bl.y + y));
- clif_displaymessage(fd, output);
+ 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;
@@ -3523,6 +3718,7 @@ int atcommand_packet(
const char* command, const char* message)
{
int x = 0, y = 0;
+ nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d", &x, &y) < 2) {
clif_displaymessage(fd, "Please, enter a status type/flag (usage: @packet <status type> <flag>).");
@@ -3579,6 +3775,7 @@ int atcommand_skillpoint(
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>).");
@@ -3615,6 +3812,7 @@ int atcommand_zeny(
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>).");
@@ -3656,13 +3854,13 @@ int atcommand_param(
&sd->status.str, &sd->status.agi, &sd->status.vit,
&sd->status.int_, &sd->status.dex, &sd->status.luk
};
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) {
- sprintf(output, "Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustement>).");
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustement>).");
+ clif_displaymessage(fd, atcmd_output);
return -1;
}
@@ -3674,22 +3872,22 @@ int atcommand_param(
}
}
if (index < 0 || index > MAX_STATUS_TYPE) { // normaly impossible...
- sprintf(output, "Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustement>).");
- clif_displaymessage(fd, output);
+ 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 > battle_config.max_parameter || new_value > battle_config.max_parameter)) // fix positiv overflow
+ if (value > 0 && ((unsigned int)value > battle_config.max_parameter || (unsigned int)new_value > battle_config.max_parameter)) // fix positiv overflow
new_value = battle_config.max_parameter;
- else if (value < 0 && (value < -battle_config.max_parameter || new_value < 1)) // fix negativ overflow
+ else if (value < 0 && (value < -(int)battle_config.max_parameter || 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);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
clif_displaymessage(fd, msg_table[42]); // Stat changed.
} else {
if (value < 0)
@@ -3716,6 +3914,7 @@ int atcommand_stat_all(
&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 = battle_config.max_parameter;
@@ -3724,16 +3923,16 @@ int atcommand_stat_all(
for (index = 0; index < (int)(sizeof(status) / sizeof(status[0])); index++) {
new_value = (int)*status[index] + value;
- if (value > 0 && (value > battle_config.max_parameter || new_value > battle_config.max_parameter)) // fix positiv overflow
+ if (value > 0 && ((unsigned int)value > battle_config.max_parameter || (unsigned int)new_value > battle_config.max_parameter)) // fix positiv overflow
new_value = battle_config.max_parameter;
- else if (value < 0 && (value < -battle_config.max_parameter || new_value < 1)) // fix negativ overflow
+ else if (value < 0 && (value < -(int)battle_config.max_parameter || 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);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
count++;
}
}
@@ -3762,6 +3961,7 @@ int atcommand_guildlevelup(
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>).");
@@ -3804,6 +4004,7 @@ int atcommand_makeegg(
{
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>).");
@@ -3819,11 +4020,11 @@ int atcommand_makeegg(
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;
+ sd->catch_target_class = pet_db[pet_id].class_;
intif_create_pet(
sd->status.account_id, sd->status.char_id,
- pet_db[pet_id].class, mob_db[pet_db[pet_id].class].lv,
- pet_db[pet_id].EggID, 0, pet_db[pet_id].intimate,
+ (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.
@@ -3841,6 +4042,7 @@ 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 {
@@ -3861,6 +4063,7 @@ int atcommand_petfriendly(
{
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>).");
@@ -3877,9 +4080,9 @@ int atcommand_petfriendly(
if ((sd->pet.intimate > 0 && t <= 0) ||
(sd->pet.intimate <= 0 && t > 0)) {
if (sd->bl.prev != NULL)
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
else
- pc_calcstatus(sd, 2);
+ status_calc_pc(sd, 2);
}
}
clif_displaymessage(fd, msg_table[182]); // Pet friendly value changed!
@@ -3908,6 +4111,7 @@ int atcommand_pethungry(
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>).");
@@ -3944,6 +4148,7 @@ 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;
@@ -3971,24 +4176,22 @@ atcommand_recall(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
- char output[200];
struct map_session_data *pl_sd = NULL;
-
+
nullpo_retr(-1, sd);
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @recall <char name>).");
return -1;
}
-
- memset(character, '\0', sizeof character);
- if(sscanf(message, "%99[^\n]", character) < 1)
+
+ memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
+ if(sscanf(message, "%99[^\n]", atcmd_player_name) < 1)
return -1;
- if(strncmp(sd->status.name,character,24)==0)
+ if(strncmp(sd->status.name,atcmd_player_name,24)==0)
return -1;
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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.");
@@ -3999,8 +4202,8 @@ atcommand_recall(
return -1;
}
pc_setpos(pl_sd, sd->mapname, sd->bl.x, sd->bl.y, 2);
- sprintf(output, msg_table[46], character); // %s recalled!
- clif_displaymessage(fd, output);
+ 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;
@@ -4021,23 +4224,23 @@ int atcommand_revive(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @revive <char name>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
- if (pc_isdead(sd)) {
+ 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(sd, battle_config.pc_invincible_time);
+ 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);
@@ -4061,24 +4264,24 @@ int atcommand_char_change_sex(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @charchangesex <name>).");
return -1;
}
// check player name
- if (strlen(character) < 4) {
+ 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(character) > 23) {
+ } 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, character, 5, 0, 0, 0, 0, 0, 0); // type: 5 - changesex
+ chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 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.
}
@@ -4094,24 +4297,24 @@ int atcommand_char_block(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ 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(character) < 4) {
+ 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(character) > 23) {
+ } 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, character, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
+ 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.
}
@@ -4138,22 +4341,21 @@ int atcommand_char_ban(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char modif[100], character[100];
char * modif_p;
int year, month, day, hour, minute, second, value;
+ nullpo_retr(-1, sd);
- memset(modif, '\0', sizeof(modif));
- memset(character, '\0', sizeof(character));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%s %99[^\n]", modif, character) < 2) {
+ 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;
}
- modif[sizeof(modif)-1] = '\0';
- character[sizeof(character)-1] = '\0';
+ atcmd_output[sizeof(atcmd_output)-1] = '\0';
- modif_p = modif;
+ modif_p = atcmd_output;
year = month = day = hour = minute = second = 0;
while (modif_p[0] != '\0') {
value = atoi(modif_p);
@@ -4193,14 +4395,14 @@ int atcommand_char_ban(
}
// check player name
- if (strlen(character) < 4) {
+ 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(character) > 23) {
+ } 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, character, 2, year, month, day, hour, minute, second); // type: 2 - ban
+ 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.
}
@@ -4215,25 +4417,25 @@ int atcommand_char_unblock(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ 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(character) < 4) {
+ 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(character) > 23) {
+ } 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, character, 3, 0, 0, 0, 0, 0, 0); // type: 3 - unblock
+ 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.
}
@@ -4248,25 +4450,25 @@ int atcommand_char_unban(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ 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(character) < 4) {
+ 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(character) > 23) {
+ } 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, character, 4, 0, 0, 0, 0, 0, 0); // type: 4 - unban
+ 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.
}
@@ -4283,11 +4485,12 @@ int atcommand_night(
{
struct map_session_data *pl_sd;
int i;
+ nullpo_retr(-1, sd);
if (night_flag != 1) {
night_flag = 1; // 0=day, 1=night [Yor]
for(i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && !map[sd->bl.m].flag.indoors) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && !map[sd->bl.m].flag.indoors) {
//pl_sd->opt2 |= STATE_BLIND;
//clif_changeoption(&pl_sd->bl);
if (battle_config.night_darkness_level > 0)
@@ -4318,13 +4521,18 @@ int atcommand_day(
{
struct map_session_data *pl_sd;
int i;
+ nullpo_retr(-1, sd);
if (night_flag != 0) {
night_flag = 0; // 0=day, 1=night [Yor]
for(i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
- pl_sd->opt2 &= ~STATE_BLIND;
- clif_changeoption(&pl_sd->bl);
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
+ if (battle_config.night_darkness_level > 0)
+ clif_refresh (pl_sd);
+ else {
+ pl_sd->opt2 &= ~STATE_BLIND;
+ clif_changeoption(&pl_sd->bl);
+ }
clif_displaymessage(pl_sd->fd, msg_table[60]); // Day has arrived.
}
}
@@ -4346,9 +4554,10 @@ int atcommand_doom(
{
struct map_session_data *pl_sd;
int i;
+ nullpo_retr(-1, sd);
clif_specialeffect(&sd->bl,450,2);
for(i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && i != fd &&
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && i != 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 + 1);
clif_displaymessage(pl_sd->fd, msg_table[61]); // The holy messenger has given judgement.
@@ -4369,9 +4578,10 @@ int atcommand_doommap(
{
struct map_session_data *pl_sd;
int i;
+ nullpo_retr(-1, sd);
clif_specialeffect(&sd->bl,450,3);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && i != fd && sd->bl.m == pl_sd->bl.m &&
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && i != 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 + 1);
// clif_specialeffect(&pl_sd->bl,450,1);
@@ -4412,10 +4622,11 @@ int atcommand_raise(
const char* command, const char* message)
{
int i;
+ nullpo_retr(-1, sd);
for (i = 0; i < fd_max; i++) {
if (session[i])
- atcommand_raise_sub(session[i]->session_data);
+ atcommand_raise_sub((struct map_session_data *) session[i]->session_data);
}
clif_displaymessage(fd, msg_table[64]); // Mercy has been granted.
@@ -4433,8 +4644,10 @@ int atcommand_raisemap(
struct map_session_data *pl_sd;
int i;
+ nullpo_retr(-1, sd);
+
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && sd->bl.m == pl_sd->bl.m)
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && sd->bl.m == pl_sd->bl.m)
atcommand_raise_sub(pl_sd);
}
clif_displaymessage(fd, msg_table[64]); // Mercy has been granted.
@@ -4451,17 +4664,17 @@ int atcommand_character_baselevel(
const char* command, const char* message)
{
struct map_session_data *pl_sd;
- char character[100];
int level = 0, i;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &level, character) < 2 || level == 0) {
+ if (!message || !*message || sscanf(message, "%d %99[^\n]", &level, atcmd_player_name) < 2 || level == 0) {
clif_displaymessage(fd, "Please, enter a level adjustement and a player name (usage: @charbaselvl <#> <nickname>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change base level only lower or same gm level
if (level > 0) {
@@ -4469,7 +4682,7 @@ int atcommand_character_baselevel(
clif_displaymessage(fd, msg_table[91]); // Character's base level can't go any higher.
return 0;
} // End Addition
- if (level > battle_config.maximum_level || level > (battle_config.maximum_level - pl_sd->status.base_level)) // fix positiv overflow
+ if ((unsigned int)level > battle_config.maximum_level || (unsigned int)level > (battle_config.maximum_level - pl_sd->status.base_level)) // fix positiv overflow
level = battle_config.maximum_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;
@@ -4477,7 +4690,7 @@ int atcommand_character_baselevel(
clif_updatestatus(pl_sd, SP_BASELEVEL);
clif_updatestatus(pl_sd, SP_NEXTBASEEXP);
clif_updatestatus(pl_sd, SP_STATUSPOINT);
- pc_calcstatus(pl_sd, 0);
+ 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.
@@ -4486,7 +4699,7 @@ int atcommand_character_baselevel(
clif_displaymessage(fd, msg_table[193]); // Character's base level can't go any lower.
return -1;
}
- if (level < -battle_config.maximum_level || level < (1 - pl_sd->status.base_level)) // fix negativ overflow
+ if (level < -(int)battle_config.maximum_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--)
@@ -4498,7 +4711,7 @@ int atcommand_character_baselevel(
pl_sd->status.base_level += level;
clif_updatestatus(pl_sd, SP_BASELEVEL);
clif_updatestatus(pl_sd, SP_NEXTBASEEXP);
- pc_calcstatus(pl_sd, 0);
+ status_calc_pc(pl_sd, 0);
clif_displaymessage(fd, msg_table[66]); // Character's base level lowered.
}
} else {
@@ -4522,25 +4735,28 @@ int atcommand_character_joblevel(
const char* command, const char* message)
{
struct map_session_data *pl_sd;
- char character[100];
- int max_level = 50, level = 0;
+ unsigned int max_level = 50;
+ int level = 0;
//“]¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
struct pc_base_job pl_s_class;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &level, character) < 2 || level == 0) {
+ if (!message || !*message || sscanf(message, "%d %99[^\n]", &level, atcmd_player_name) < 2 || level == 0) {
clif_displaymessage(fd, "Please, enter a level adjustement and a player name (usage: @charjlvl <#> <nickname>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
- pl_s_class = pc_calc_base_job(pl_sd->status.class);
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ pl_s_class = pc_calc_base_job(pl_sd->status.class_);
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change job level only lower or same gm level
if (pl_s_class.job == 0)
max_level -= 40;
- if ((pl_s_class.job == 23) || (pl_s_class.upper == 1 && pl_s_class.type == 2)) //ƒXƒpƒmƒr‚Æ“]¶E‚ÍJobƒŒƒxƒ‹‚ÌÅ‚‚ª70
- // To-do: super novices has max level 99 - celest
+ // super novices can go up to 99 [celest]
+ else if (pl_s_class.job == 23)
+ max_level += 49;
+ else if (pl_sd->status.class_ > 4007 && pl_sd->status.class_ < 4023)
max_level += 20;
if (level > 0) {
@@ -4555,7 +4771,7 @@ int atcommand_character_joblevel(
clif_updatestatus(pl_sd, SP_NEXTJOBEXP);
pl_sd->status.skill_point += level;
clif_updatestatus(pl_sd, SP_SKILLPOINT);
- pc_calcstatus(pl_sd, 0);
+ status_calc_pc(pl_sd, 0);
clif_misceffect(&pl_sd->bl, 1);
clif_displaymessage(fd, msg_table[68]); // character's job level raised.
} else {
@@ -4574,7 +4790,7 @@ int atcommand_character_joblevel(
pl_sd->status.skill_point = 0;
clif_updatestatus(pl_sd, SP_SKILLPOINT);
} // to add: remove status points from skills
- pc_calcstatus(pl_sd, 0);
+ status_calc_pc(pl_sd, 0);
clif_displaymessage(fd, msg_table[69]); // Character's job level lowered.
}
} else {
@@ -4598,16 +4814,16 @@ int atcommand_kick(
const char* command, const char* message)
{
struct map_session_data *pl_sd;
- char character[100];
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @kick <charname>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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 {
@@ -4632,9 +4848,10 @@ int atcommand_kickall(
{
struct map_session_data *pl_sd;
int i;
+ nullpo_retr(-1, sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth &&
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth &&
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);
@@ -4654,6 +4871,7 @@ 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
@@ -4671,6 +4889,7 @@ int atcommand_questskill(
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+>).");
@@ -4706,20 +4925,20 @@ int atcommand_charquestskill(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
struct map_session_data *pl_sd;
int skill_id = 0;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &skill_id, character) < 2 || skill_id < 0) {
+ if (!message || !*message || sscanf(message, "%d %99[^\n]", &skill_id, atcmd_player_name) < 2 || skill_id < 0) {
clif_displaymessage(fd, "Please, enter a quest skill number and a player name (usage: @charquestskill <#:0+> <char_name>).");
return -1;
}
if (skill_id >= 0 && skill_id < MAX_SKILL_DB) {
if (skill_get_inf2(skill_id) & 0x01) {
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != 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.
@@ -4752,6 +4971,7 @@ int atcommand_lostskill(
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+>).");
@@ -4789,20 +5009,20 @@ int atcommand_charlostskill(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
struct map_session_data *pl_sd;
int skill_id = 0;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &skill_id, character) < 2 || skill_id < 0) {
+ if (!message || !*message || sscanf(message, "%d %99[^\n]", &skill_id, atcmd_player_name) < 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) & 0x01) {
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != 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;
@@ -4837,6 +5057,7 @@ int atcommand_spiritball(
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>).");
@@ -4877,6 +5098,7 @@ int atcommand_party(
const char* command, const char* message)
{
char party[100];
+ nullpo_retr(-1, sd);
memset(party, '\0', sizeof(party));
@@ -4885,7 +5107,7 @@ int atcommand_party(
return -1;
}
- party_create(sd, party);
+ party_create(sd, party, 0, 0);
return 0;
}
@@ -4900,6 +5122,7 @@ int atcommand_guild(
{
char guild[100];
int prev;
+ nullpo_retr(-1, sd);
memset(guild, '\0', sizeof(guild));
@@ -4924,6 +5147,7 @@ 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;
@@ -4944,6 +5168,7 @@ 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;
@@ -4966,14 +5191,17 @@ int atcommand_mapexit(
{
struct map_session_data *pl_sd;
int i;
+ nullpo_retr(-1, sd);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
if (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;
@@ -4989,30 +5217,30 @@ int atcommand_idsearch(
const char* command, const char* message)
{
char item_name[100];
- char output[200];
- int i, match;
+ unsigned int i, match;
struct item_data *item;
+ nullpo_retr(-1, sd);
memset(item_name, '\0', sizeof(item_name));
- memset(output, '\0', sizeof(output));
+ 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(output, msg_table[77], item_name); // The reference result of '%s' (name: id):
- clif_displaymessage(fd, output);
+ 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(output, msg_table[78], item->jname, item->nameid); // %s: %d
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[78], item->jname, item->nameid); // %s: %d
+ clif_displaymessage(fd, atcmd_output);
}
}
- sprintf(output, msg_table[79], match); // It is %d affair above.
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[79], match); // It is %d affair above.
+ clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -5025,23 +5253,22 @@ int atcommand_charskreset(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
- char output[200];
struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @charskreset <charname>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != 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(output, msg_table[206], character); // '%s' skill points reseted!
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[206], atcmd_player_name); // '%s' skill points reseted!
+ 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;
@@ -5062,23 +5289,22 @@ int atcommand_charstreset(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
- char output[200];
struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @charstreset <charname>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != 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(output, msg_table[207], character); // '%s' stats points reseted!
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, msg_table[207], atcmd_player_name); // '%s' stats points reseted!
+ 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;
@@ -5101,27 +5327,26 @@ int atcommand_charmodel(
{
int hair_style = 0, hair_color = 0, cloth_color = 0;
struct map_session_data *pl_sd;
- char character[100];
- char output[200];
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
- if (!message || !*message || sscanf(message, "%d %d %d %99[^\n]", &hair_style, &hair_color, &cloth_color, character) < 4 || hair_style < 0 || hair_color < 0 || cloth_color < 0) {
- sprintf(output, "Please, enter a valid model and a player name (usage: @charmodel <hair ID: %d-%d> <hair color: %d-%d> <clothes color: %d-%d> <name>).",
+ if (!message || !*message || sscanf(message, "%d %d %d %99[^\n]", &hair_style, &hair_color, &cloth_color, atcmd_player_name) < 4 || hair_style < 0 || hair_color < 0 || cloth_color < 0) {
+ sprintf(atcmd_output, "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, output);
+ clif_displaymessage(fd, atcmd_output);
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != 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) {
if (cloth_color != 0 &&
pl_sd->status.sex == 1 &&
- (pl_sd->status.class == 12 || pl_sd->status.class == 17)) {
+ (pl_sd->status.class_ == 12 || pl_sd->status.class_ == 17)) {
clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
return -1;
} else {
@@ -5151,18 +5376,18 @@ int atcommand_charskpoint(
const char* command, const char* message)
{
struct map_session_data *pl_sd;
- char character[100];
int new_skill_point;
int point = 0;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &point, character) < 2 || point == 0) {
+ if (!message || !*message || sscanf(message, "%d %99[^\n]", &point, atcmd_player_name) < 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(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != 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;
@@ -5196,18 +5421,18 @@ int atcommand_charstpoint(
const char* command, const char* message)
{
struct map_session_data *pl_sd;
- char character[100];
int new_status_point;
int point = 0;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &point, character) < 2 || point == 0) {
+ if (!message || !*message || sscanf(message, "%d %99[^\n]", &point, atcmd_player_name) < 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(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != 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;
@@ -5233,50 +5458,6 @@ int atcommand_charstpoint(
}
/*==========================================
- * Character Zeny Point (Rewritten by [Yor])
- *------------------------------------------
- */
-int atcommand_charzeny(
- const int fd, struct map_session_data* sd,
- const char* command, const char* message)
-{
- struct map_session_data *pl_sd;
- char character[100];
- int zeny = 0, new_zeny;
-
- memset(character, '\0', sizeof(character));
-
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &zeny, character) < 2 || zeny == 0) {
- clif_displaymessage(fd, "Please, enter a number and a player name (usage: @charzeny <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;
-}
-
-/*==========================================
* Recall All Characters Online To Your Location
*------------------------------------------
*/
@@ -5287,9 +5468,9 @@ int atcommand_recallall(
struct map_session_data *pl_sd;
int i;
int count;
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ 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.");
@@ -5298,7 +5479,7 @@ int atcommand_recallall(
count = 0;
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && sd->status.account_id != pl_sd->status.account_id &&
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && 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++;
@@ -5309,8 +5490,8 @@ int atcommand_recallall(
clif_displaymessage(fd, msg_table[92]); // All characters recalled!
if (count) {
- sprintf(output, "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.", count);
- clif_displaymessage(fd, output);
+ 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;
@@ -5327,12 +5508,12 @@ int atcommand_guildrecall(
struct map_session_data *pl_sd;
int i;
char guild_name[100];
- char output[200];
struct guild *g;
int count;
+ nullpo_retr(-1, sd);
memset(guild_name, '\0', sizeof(guild_name));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%99[^\n]", guild_name) < 1) {
clif_displaymessage(fd, "Please, enter a guild name/id (usage: @guildrecall <guild_name/id>).");
@@ -5348,7 +5529,7 @@ int atcommand_guildrecall(
(g = guild_search(atoi(message))) != NULL) {
count = 0;
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth &&
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth &&
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))
@@ -5357,11 +5538,11 @@ int atcommand_guildrecall(
pc_setpos(pl_sd, sd->mapname, sd->bl.x, sd->bl.y, 2);
}
}
- sprintf(output, msg_table[93], g->name); // All online characters of the %s guild are near you.
- clif_displaymessage(fd, output);
+ 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(output, "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.", count);
- clif_displaymessage(fd, output);
+ 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.
@@ -5382,12 +5563,12 @@ int atcommand_partyrecall(
int i;
struct map_session_data *pl_sd;
char party_name[100];
- char output[200];
struct party *p;
int count;
+ nullpo_retr(-1, sd);
memset(party_name, '\0', sizeof(party_name));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%99[^\n]", party_name) < 1) {
clif_displaymessage(fd, "Please, enter a party name/id (usage: @partyrecall <party_name/id>).");
@@ -5403,7 +5584,7 @@ int atcommand_partyrecall(
(p = party_search(atoi(message))) != NULL) {
count = 0;
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth &&
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth &&
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))
@@ -5412,11 +5593,11 @@ int atcommand_partyrecall(
pc_setpos(pl_sd, sd->mapname, sd->bl.x, sd->bl.y, 2);
}
}
- sprintf(output, msg_table[95], p->name); // All online characters of the %s party are near you.
- clif_displaymessage(fd, output);
+ 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(output, "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.", count);
- clif_displaymessage(fd, output);
+ 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.
@@ -5434,6 +5615,7 @@ 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.
@@ -5448,7 +5630,9 @@ int atcommand_reloadmobdb(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
+ nullpo_retr(-1, sd);
mob_reload();
+ read_petdb();
clif_displaymessage(fd, msg_table[98]); // Monster database reloaded.
return 0;
@@ -5462,6 +5646,7 @@ 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.
@@ -5469,28 +5654,92 @@ int atcommand_reloadskilldb(
}
/*==========================================
+ * @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);
+ 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;
+}
+
+/*==========================================
*
*------------------------------------------
*/
-#ifndef TXT_ONLY
-int atcommand_rehash(
-#else /* TXT_ONLY */
+void rehash(void)
+{
+ int map_id;
+
+ for (map_id = 0; map_id < map_num; map_id++) {
+ map_foreachinarea(cleanup_sub, map_id, 0, 0, map[map_id].xs, map[map_id].ys, BL_MOB);
+ map_foreachinarea(cleanup_sub, map_id, 0, 0, map[map_id].xs, map[map_id].ys, BL_NPC);
+ }
+}
int atcommand_reloadscript(
-#endif /* TXT_ONLY */
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
-#ifndef TXT_ONLY
- atcommand_broadcast( fd, sd, "@broadcast", "eAthena SQL Server is Rehashing..." );
+ 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 !" );
-
- rehash( fd, sd );
+
+ rehash();
atcommand_broadcast( fd, sd, "@broadcast", "Reloading NPCs..." );
-#endif /* not TXT_ONLY */
- do_init_npc();
+ //do_init_npc();
do_init_script();
-
+ npc_reload();
npc_event_do_oninit();
clif_displaymessage(fd, msg_table[100]); // Scripts reloaded.
@@ -5506,6 +5755,7 @@ 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.
@@ -5529,71 +5779,71 @@ int atcommand_mapinfo(
struct map_session_data *pl_sd;
struct npc_data *nd = NULL;
struct chat_data *cd = NULL;
- char output[200], map_name[100];
char direction[12];
int m_id, i, chat_num, list = 0;
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
- memset(map_name, '\0', sizeof(map_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
memset(direction, '\0', sizeof(direction));
- sscanf(message, "%d %99[^\n]", &list, map_name);
+ sscanf(message, "%d %99[^\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 (map_name[0] == '\0')
- strcpy(map_name, sd->mapname);
- if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < 13) // 16 - 4 (.gat)
- strcat(map_name, ".gat");
+ if (atcmd_player_name[0] == '\0')
+ strcpy(atcmd_player_name, sd->mapname);
+ if (strstr(atcmd_player_name, ".gat") == NULL && strstr(atcmd_player_name, ".afm") == NULL && strlen(atcmd_player_name) < 13) // 16 - 4 (.gat)
+ strcat(atcmd_player_name, ".gat");
- if ((m_id = map_mapname2mapid(map_name)) < 0) {
+ if ((m_id = map_mapname2mapid(atcmd_player_name)) < 0) {
clif_displaymessage(fd, msg_table[1]); // Map not found.
return -1;
}
clif_displaymessage(fd, "------ Map Info ------");
- sprintf(output, "Map Name: %s", map_name);
- clif_displaymessage(fd, output);
- sprintf(output, "Players In Map: %d", map[m_id].users);
- clif_displaymessage(fd, output);
- sprintf(output, "NPCs In Map: %d", map[m_id].npc_num);
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "Map Name: %s", atcmd_player_name);
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "Players In Map: %d", map[m_id].users);
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "NPCs In Map: %d", map[m_id].npc_num);
+ clif_displaymessage(fd, atcmd_output);
chat_num = 0;
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth &&
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth &&
(cd = (struct chat_data*)map_id2bl(pl_sd->chatID))) {
chat_num++;
}
}
- sprintf(output, "Chats In Map: %d", chat_num);
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "Chats In Map: %d", chat_num);
+ clif_displaymessage(fd, atcmd_output);
clif_displaymessage(fd, "------ Map Flags ------");
- sprintf(output, "Player vs Player: %s | No Guild: %s | No Party: %s",
+ sprintf(atcmd_output, "Player vs Player: %s | No Guild: %s | No Party: %s",
(map[m_id].flag.pvp) ? "True" : "False",
(map[m_id].flag.pvp_noguild) ? "True" : "False",
(map[m_id].flag.pvp_noparty) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "Guild vs Guild: %s | No Party: %s", (map[m_id].flag.gvg) ? "True" : "False", (map[m_id].flag.gvg_noparty) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "No Dead Branch: %s", (map[m_id].flag.nobranch) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "No Memo: %s", (map[m_id].flag.nomemo) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "No Penalty: %s", (map[m_id].flag.nopenalty) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "No Return: %s", (map[m_id].flag.noreturn) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "No Save: %s", (map[m_id].flag.nosave) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "No Teleport: %s", (map[m_id].flag.noteleport) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "No Monster Teleport: %s", (map[m_id].flag.monster_noteleport) ? "True" : "False");
- clif_displaymessage(fd, output);
- sprintf(output, "No Zeny Penalty: %s", (map[m_id].flag.nozenypenalty) ? "True" : "False");
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "Guild vs Guild: %s | No Party: %s", (map[m_id].flag.gvg) ? "True" : "False", (map[m_id].flag.gvg_noparty) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "No Dead Branch: %s", (map[m_id].flag.nobranch) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "No Memo: %s", (map[m_id].flag.nomemo) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "No Penalty: %s", (map[m_id].flag.nopenalty) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "No Return: %s", (map[m_id].flag.noreturn) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "No Save: %s", (map[m_id].flag.nosave) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "No Teleport: %s", (map[m_id].flag.noteleport) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "No Monster Teleport: %s", (map[m_id].flag.monster_noteleport) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, "No Zeny Penalty: %s", (map[m_id].flag.nozenypenalty) ? "True" : "False");
+ clif_displaymessage(fd, atcmd_output);
switch (list) {
case 0:
@@ -5602,10 +5852,10 @@ int atcommand_mapinfo(
case 1:
clif_displaymessage(fd, "----- Players in Map -----");
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && strcmp(pl_sd->mapname, map_name) == 0) {
- sprintf(output, "Player '%s' (session #%d) | Location: %d,%d",
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && strcmp(pl_sd->mapname, atcmd_player_name) == 0) {
+ sprintf(atcmd_output, "Player '%s' (session #%d) | Location: %d,%d",
pl_sd->status.name, i, pl_sd->bl.x, pl_sd->bl.y);
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
}
}
break;
@@ -5625,24 +5875,24 @@ int atcommand_mapinfo(
case 9: strcpy(direction, "North"); break;
default: strcpy(direction, "Unknown"); break;
}
- sprintf(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, output);
+ 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 < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth &&
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth &&
(cd = (struct chat_data*)map_id2bl(pl_sd->chatID)) &&
- strcmp(pl_sd->mapname, map_name) == 0 &&
+ strcmp(pl_sd->mapname, atcmd_player_name) == 0 &&
cd->usersd[0] == pl_sd) {
- sprintf(output, "Chat %d: %s | Player: %s | Location: %d %d",
+ 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, output);
- sprintf(output, " Users: %d/%d | Password: %s | Public: %s",
+ 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, output);
+ clif_displaymessage(fd, atcmd_output);
}
}
break;
@@ -5663,21 +5913,22 @@ int atcommand_mount_peco(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
+ nullpo_retr(-1, sd);
if (sd->disguise > 0) { // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris]
clif_displaymessage(fd, msg_table[212]); // Cannot mount a Peco while in disguise.
return -1;
}
if (!pc_isriding(sd)) { // if actually no peco
- if (sd->status.class == 7 || sd->status.class == 14 || sd->status.class == 4008 || sd->status.class == 4015) {
- if (sd->status.class == 7)
- sd->status.class = sd->view_class = 13;
- else if (sd->status.class == 14)
- sd->status.class = sd->view_class = 21;
- else if (sd->status.class == 4008)
- sd->status.class = sd->view_class = 4014;
- else if (sd->status.class == 4015)
- sd->status.class = sd->view_class = 4022;
+ if (sd->status.class_ == 7 || sd->status.class_ == 14 || sd->status.class_ == 4008 || sd->status.class_ == 4015) {
+ if (sd->status.class_ == 7)
+ sd->status.class_ = sd->view_class = 13;
+ else if (sd->status.class_ == 14)
+ sd->status.class_ = sd->view_class = 21;
+ else if (sd->status.class_ == 4008)
+ sd->status.class_ = sd->view_class = 4014;
+ else if (sd->status.class_ == 4015)
+ sd->status.class_ = sd->view_class = 4022;
pc_setoption(sd, sd->status.option | 0x0020);
clif_displaymessage(fd, msg_table[102]); // Mounted Peco.
} else {
@@ -5685,14 +5936,14 @@ int atcommand_mount_peco(
return -1;
}
} else {
- if (sd->status.class == 13)
- sd->status.class = sd->view_class = 7;
- else if (sd->status.class == 21)
- sd->status.class = sd->view_class = 14;
- else if (sd->status.class == 4014)
- sd->status.class = sd->view_class = 4008;
- else if (sd->status.class == 4022)
- sd->status.class = sd->view_class = 4015;
+ if (sd->status.class_ == 13)
+ sd->status.class_ = sd->view_class = 7;
+ else if (sd->status.class_ == 21)
+ sd->status.class_ = sd->view_class = 14;
+ else if (sd->status.class_ == 4014)
+ sd->status.class_ = sd->view_class = 4008;
+ else if (sd->status.class_ == 4022)
+ sd->status.class_ = sd->view_class = 4015;
pc_setoption(sd, sd->status.option & ~0x0020);
clif_displaymessage(fd, msg_table[214]); // Unmounted Peco.
}
@@ -5708,32 +5959,32 @@ int atcommand_char_mount_peco(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @charmountpeco <char_name>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
if (pl_sd->disguise > 0) { // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris]
clif_displaymessage(fd, msg_table[215]); // This player cannot mount a Peco while in disguise.
return -1;
}
if (!pc_isriding(pl_sd)) { // if actually no peco
- if (pl_sd->status.class == 7 || pl_sd->status.class == 14 || pl_sd->status.class == 4008 || pl_sd->status.class == 4015) {
- if (pl_sd->status.class == 7)
- pl_sd->status.class = pl_sd->view_class = 13;
- else if (pl_sd->status.class == 14)
- pl_sd->status.class = pl_sd->view_class = 21;
- else if (pl_sd->status.class == 4008)
- pl_sd->status.class = pl_sd->view_class = 4014;
- else if (pl_sd->status.class == 4015)
- pl_sd->status.class = pl_sd->view_class = 4022;
+ if (pl_sd->status.class_ == 7 || pl_sd->status.class_ == 14 || pl_sd->status.class_ == 4008 || pl_sd->status.class_ == 4015) {
+ if (pl_sd->status.class_ == 7)
+ pl_sd->status.class_ = pl_sd->view_class = 13;
+ else if (pl_sd->status.class_ == 14)
+ pl_sd->status.class_ = pl_sd->view_class = 21;
+ else if (pl_sd->status.class_ == 4008)
+ pl_sd->status.class_ = pl_sd->view_class = 4014;
+ else if (pl_sd->status.class_ == 4015)
+ pl_sd->status.class_ = pl_sd->view_class = 4022;
pc_setoption(pl_sd, pl_sd->status.option | 0x0020);
clif_displaymessage(fd, msg_table[216]); // Now, this player mounts a peco.
} else {
@@ -5741,14 +5992,14 @@ int atcommand_char_mount_peco(
return -1;
}
} else {
- if (pl_sd->status.class == 13)
- pl_sd->status.class = pl_sd->view_class = 7;
- else if (pl_sd->status.class == 21)
- pl_sd->status.class = pl_sd->view_class = 14;
- else if (pl_sd->status.class == 4014)
- pl_sd->status.class = pl_sd->view_class = 4008;
- else if (pl_sd->status.class == 4022)
- pl_sd->status.class = pl_sd->view_class = 4015;
+ if (pl_sd->status.class_ == 13)
+ pl_sd->status.class_ = pl_sd->view_class = 7;
+ else if (pl_sd->status.class_ == 21)
+ pl_sd->status.class_ = pl_sd->view_class = 14;
+ else if (pl_sd->status.class_ == 4014)
+ pl_sd->status.class_ = pl_sd->view_class = 4008;
+ else if (pl_sd->status.class_ == 4022)
+ pl_sd->status.class_ = pl_sd->view_class = 4015;
pc_setoption(pl_sd, pl_sd->status.option & ~0x0020);
clif_displaymessage(fd, msg_table[218]); // Now, this player has not more peco.
}
@@ -5769,11 +6020,11 @@ int atcommand_guildspy(
const char* command, const char* message)
{
char guild_name[100];
- char output[200];
struct guild *g;
+ nullpo_retr(-1, sd);
memset(guild_name, '\0', sizeof(guild_name));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%99[^\n]", guild_name) < 1) {
clif_displaymessage(fd, "Please, enter a guild name/id (usage: @guildspy <guild_name/id>).");
@@ -5784,12 +6035,12 @@ int atcommand_guildspy(
(g = guild_search(atoi(message))) != NULL) {
if (sd->guildspy == g->guild_id) {
sd->guildspy = 0;
- sprintf(output, msg_table[103], g->name); // No longer spying on the %s guild.
- clif_displaymessage(fd, output);
+ 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(output, msg_table[104], g->name); // Spying on the %s guild.
- clif_displaymessage(fd, output);
+ 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.
@@ -5808,11 +6059,11 @@ int atcommand_partyspy(
const char* command, const char* message)
{
char party_name[100];
- char output[200];
struct party *p;
+ nullpo_retr(-1, sd);
memset(party_name, '\0', sizeof(party_name));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%99[^\n]", party_name) < 1) {
clif_displaymessage(fd, "Please, enter a party name/id (usage: @partyspy <party_name/id>).");
@@ -5823,12 +6074,12 @@ int atcommand_partyspy(
(p = party_search(atoi(message))) != NULL) {
if (sd->partyspy == p->party_id) {
sd->partyspy = 0;
- sprintf(output, msg_table[105], p->name); // No longer spying on the %s party.
- clif_displaymessage(fd, output);
+ 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(output, msg_table[106], p->name); // Spying on the %s party.
- clif_displaymessage(fd, output);
+ 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.
@@ -5847,6 +6098,7 @@ int atcommand_repairall(
const char* command, const char* message)
{
int count, i;
+ nullpo_retr(-1, sd);
count = 0;
for (i = 0; i < MAX_INVENTORY; i++) {
@@ -5869,22 +6121,22 @@ int atcommand_repairall(
return 0;
}
-/* Removed @nuke for now in favor of alchemist marine sphere skill [Valaris]
+// 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)
{
- char character[100];
struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @nuke <char name>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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!
@@ -5899,7 +6151,7 @@ int atcommand_nuke(
return 0;
}
-*/
+
/*==========================================
*
@@ -5909,11 +6161,12 @@ int atcommand_enablenpc(const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
char NPCname[100];
+ nullpo_retr(-1, sd);
memset(NPCname, '\0', sizeof(NPCname));
if (!message || !*message || sscanf(message, "%99[^\n]", NPCname) < 1) {
- clif_displaymessage(fd, "Please, enter a NPC name (usage: @npcon <NPC_name>).");
+ clif_displaymessage(fd, "Please, enter a NPC name (usage: @enablenpc <NPC_name>).");
return -1;
}
@@ -5932,10 +6185,11 @@ int atcommand_enablenpc(const int fd, struct map_session_data* sd,
*
*------------------------------------------
*/
-int atcommand_disablenpc(const int fd, struct map_session_data* sd,
+int atcommand_hidenpc(const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
char NPCname[100];
+ nullpo_retr(-1, sd);
memset(NPCname, '\0', sizeof(NPCname));
@@ -5955,6 +6209,31 @@ int atcommand_disablenpc(const int fd, struct map_session_data* sd,
return 0;
}
+int atcommand_disablenpc(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct npc_data *nd;
+ char NPCname[100];
+ nullpo_retr(-1, sd);
+
+ memset(NPCname, '\0', sizeof(NPCname));
+
+ if (!message || !*message || sscanf(message, "%99[^\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])
*------------------------------------------
@@ -6010,6 +6289,7 @@ int atcommand_servertime(const int fd, struct map_session_data* sd,
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));
@@ -6082,17 +6362,16 @@ int atcommand_chardelitem(const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
struct map_session_data *pl_sd;
- char character[100];
char item_name[100];
int i, number = 0, item_id, item_position, count;
- char output[200];
struct item_data *item_data;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
memset(item_name, '\0', sizeof(item_name));
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
- if (!message || !*message || sscanf(message, "%s %d %99[^\n]", item_name, &number, character) < 3 || number < 1) {
+ 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;
}
@@ -6103,7 +6382,7 @@ int atcommand_chardelitem(const int fd, struct map_session_data* sd,
item_id = item_data->nameid;
if (item_id > 500) {
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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) {
@@ -6113,13 +6392,13 @@ int atcommand_chardelitem(const int fd, struct map_session_data* sd,
count++;
item_position = pc_search_inventory(pl_sd, item_id); // for next loop
}
- sprintf(output, msg_table[113], count); // %d item(s) removed by a GM.
- clif_displaymessage(pl_sd->fd, output);
+ 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(output, msg_table[114], count); // %d item(s) removed from the player.
+ sprintf(atcmd_output, msg_table[114], count); // %d item(s) removed from the player.
else
- sprintf(output, msg_table[115], count, count, number); // %d item(s) removed. Player had only %d on %d items.
- clif_displaymessage(fd, output);
+ 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;
@@ -6149,18 +6428,18 @@ int atcommand_jail(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
struct map_session_data *pl_sd;
int x, y;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @jail <char_name>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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:
@@ -6201,23 +6480,22 @@ int atcommand_unjail(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
struct map_session_data *pl_sd;
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\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(character)) != NULL) {
+ 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
if (pl_sd->bl.m != map_mapname2mapid("sec_pri.gat")) {
clif_displaymessage(fd, msg_table[119]); // This player is not in jails.
return -1;
- } else if (pc_setpos(pl_sd, "prontera.gat", 156, 191, 3) == 0) {
- pc_setsavepoint(pl_sd, "prontera.gat", 156, 191); // Save char respawn point in Prontera
+ } else if (pc_setpos(pl_sd, "prontera.gat", 0, 0, 3) == 0) { //old coords: 156,191
+ pc_setsavepoint(pl_sd, "prontera.gat", 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 {
@@ -6245,6 +6523,7 @@ int atcommand_disguise(
const char* command, const char* message)
{
int mob_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>).");
@@ -6257,7 +6536,7 @@ int atcommand_disguise(
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 <= 834) || // NPC
- (mob_id > 1000 && mob_id < 1521)) { // monsters
+ (mob_id > 1000 && mob_id < 1582)) { // monsters
if (pc_isriding(sd)) { // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris]
clif_displaymessage(fd, msg_table[227]); // Cannot wear disguise while riding a Peco.
return -1;
@@ -6275,6 +6554,50 @@ int atcommand_disguise(
}
/*==========================================
+ * DisguiseAll
+ *------------------------------------------
+ */
+
+int atcommand_disguiseall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int mob_id=0, i=0;
+ struct map_session_data *pl_sd;
+ 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 ((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 <= 834) || // NPC
+ (mob_id > 1000 && mob_id < 1582)) { // monsters
+ 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_isriding(pl_sd)) { // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris]
+ clif_displaymessage(fd, msg_table[227]); // Cannot wear disguise while riding a Peco.
+ } else {
+ pl_sd->disguiseflag = 1; // set to override items with disguise script [Valaris]
+ pl_sd->disguise = mob_id;
+ pc_setpos(pl_sd, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y, 3);
+ }
+ }
+ }
+ clif_displaymessage(fd, msg_table[122]); // Disguise applied.
+ } else {
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
* @undisguise by [Yor]
*------------------------------------------
*/
@@ -6282,6 +6605,7 @@ int atcommand_undisguise(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
+ nullpo_retr(-1, sd);
if (sd->disguise) {
clif_clearchar(&sd->bl, 9);
sd->disguise = 0;
@@ -6296,6 +6620,30 @@ int atcommand_undisguise(
}
/*==========================================
+ * UndisguiseAll
+ *------------------------------------------
+ */
+int atcommand_undisguiseall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ int i;
+ nullpo_retr(-1, sd);
+
+ 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->disguise) {
+ clif_clearchar(&pl_sd->bl, 9);
+ pl_sd->disguise = 0;
+ pc_setpos(pl_sd, pl_sd->mapname, pl_sd->bl.x, pl_sd->bl.y, 3);
+ }
+ }
+ clif_displaymessage(fd, msg_table[124]); // Undisguise applied.
+
+ return 0;
+}
+
+/*==========================================
* @broadcast by [Valaris]
*------------------------------------------
*/
@@ -6303,17 +6651,17 @@ int atcommand_broadcast(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
clif_displaymessage(fd, "Please, enter a message (usage: @broadcast <message>).");
return -1;
}
- sprintf(output, "%s : %s", sd->status.name, message);
- intif_GMmessage(output, strlen(output) + 1, 0);
+ sprintf(atcmd_output, "%s : %s", sd->status.name, message);
+ intif_GMmessage(atcmd_output, strlen(atcmd_output) + 1, 0);
return 0;
}
@@ -6326,18 +6674,18 @@ int atcommand_localbroadcast(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
+ nullpo_retr(-1, sd);
- memset(output, '\0', sizeof(output));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
clif_displaymessage(fd, "Please, enter a message (usage: @localbroadcast <message>).");
return -1;
}
- sprintf(output, "%s : %s", sd->status.name, message);
+ sprintf(atcmd_output, "%s : %s", sd->status.name, message);
- clif_GMmessage(&sd->bl, output, strlen(output) + 1, 1); // 1: ALL_SAMEMAP
+ clif_GMmessage(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 1); // 1: ALL_SAMEMAP
return 0;
}
@@ -6351,14 +6699,14 @@ int atcommand_chardisguise(
const char* command, const char* message)
{
int mob_id;
- char character[100];
char mob_name[100];
struct map_session_data* pl_sd;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
memset(mob_name, '\0', sizeof(mob_name));
- if (!message || !*message || sscanf(message, "%s %99[^\n]", mob_name, character) < 2) {
+ if (!message || !*message || sscanf(message, "%s %99[^\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;
}
@@ -6366,7 +6714,7 @@ int atcommand_chardisguise(
if ((mob_id = mobdb_searchname(mob_name)) == 0) // check name first (to avoid possible name begining by a number)
mob_id = atoi(mob_name);
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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
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
@@ -6404,17 +6752,17 @@ int atcommand_charundisguise(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
struct map_session_data* pl_sd;
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @charundisguise <char name>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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) {
clif_clearchar(&pl_sd->bl, 9);
@@ -6447,6 +6795,7 @@ int atcommand_email(
{
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));
@@ -6486,6 +6835,7 @@ int atcommand_effect(
{
struct map_session_data *pl_sd;
int type = 0, flag = 0, i;
+ 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+>).");
@@ -6497,7 +6847,7 @@ int atcommand_effect(
}
else{
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
clif_specialeffect(&pl_sd->bl, type, flag);
clif_displaymessage(pl_sd->fd, msg_table[229]); // Your effect has changed.
}
@@ -6508,203 +6858,6 @@ int atcommand_effect(
}
/*==========================================
- * @charitemlist <character>: Displays the list of a player's items.
- *------------------------------------------
- */
-int
-atcommand_character_item_list(
- 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[100], output[200], equipstr[100], outputtmp[200];
-
- 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, "%99[^\n]", character) < 1) {
- clif_displaymessage(fd, "Please, enter a player name (usage: @charitemlist <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;
-}
-
-/*==========================================
- * @charstoragelist <character>: Displays the items list of a player's storage.
- *------------------------------------------
- */
-int
-atcommand_character_storage_list(
- 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[100], output[200], outputtmp[200];
-
- memset(character, '\0', sizeof(character));
- memset(output, '\0', sizeof(output));
- memset(outputtmp, '\0', sizeof(outputtmp));
-
- if (!message || !*message || sscanf(message, "%99[^\n]", character) < 1) {
- clif_displaymessage(fd, "Please, enter a player name (usage: @charitemlist <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;
-}
-
-/*==========================================
* @charcartlist <character>: Displays the items list of a player's cart.
*------------------------------------------
*/
@@ -6713,21 +6866,22 @@ 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;
- char character[100], output[200], outputtmp[200];
+ nullpo_retr(-1, sd);
- memset(character, '\0', sizeof(character));
- memset(output, '\0', sizeof(output));
+ 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, "%99[^\n]", character) < 1) {
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
clif_displaymessage(fd, "Please, enter a player name (usage: @charitemlist <char name>).");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ 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;
@@ -6736,39 +6890,39 @@ atcommand_character_cart_list(
counter = counter + pl_sd->status.cart[i].amount;
count++;
if (count == 1) {
- sprintf(output, "------ Cart items list of '%s' ------", pl_sd->status.name);
- clif_displaymessage(fd, output);
+ 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(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);
+ 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(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, output);
- memset(output, '\0', sizeof(output));
+ 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 (output[0] == '\0')
+ 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(output, outputtmp);
+ strcat(atcmd_output, outputtmp);
}
}
}
- if (output[0] != '\0') {
- output[strlen(output) - 2] = ')';
- output[strlen(output) - 1] = '\0';
- clif_displaymessage(fd, output);
+ 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(output, "%d item(s) found in %d kind(s) of items.", counter, count);
- clif_displaymessage(fd, output);
+ 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.
@@ -6792,6 +6946,7 @@ 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)
@@ -6812,6 +6967,7 @@ 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)
@@ -6833,6 +6989,7 @@ atcommand_charkillable(
const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
@@ -6861,6 +7018,7 @@ 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;
@@ -6876,6 +7034,7 @@ 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;
@@ -6891,31 +7050,29 @@ int
atcommand_npcmove(const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char character[100];
int x = 0, y = 0;
struct npc_data *nd = 0;
-
- if( sd == NULL )
- return -1;
+ nullpo_retr(-1, sd);
+
if (!message || !*message)
return -1;
- memset(character, '\0', sizeof character);
+ memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
- if (sscanf(message, "%d %d %99[^\n]", &x, &y, character) < 4)
+ if (sscanf(message, "%d %d %99[^\n]", &x, &y, atcmd_player_name) < 3) {
+ clif_displaymessage(fd, "Usage: @npcmove <X> <Y> <npc_name>");
return -1;
+ }
- nd=npc_name2id(character);
- if (nd==NULL)
- return -1;
+ nullpo_retr(-1, (nd = npc_name2id(atcmd_player_name)));
- npc_enable(character, 0);
- nd->bl.x = x;
- nd->bl.y = y;
- npc_enable(character, 1);
+ npc_enable(atcmd_player_name, 0);
+ nd->bl.x = x;
+ nd->bl.y = y;
+ npc_enable(atcmd_player_name, 1);
- return 0;
+ return 0;
}
/*==========================================
@@ -6929,24 +7086,24 @@ atcommand_addwarp(const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
char w1[64], w3[64], w4[64];
- char map[30], output[200];
int x,y,ret;
+ nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
- if (sscanf(message, "%99s %d %d[^\n]", map, &x, &y ) < 3)
+ if (sscanf(message, "%99s %d %d[^\n]", atcmd_player_name, &x, &y ) < 3)
return -1;
sprintf(w1,"%s,%d,%d", sd->mapname, sd->bl.x, sd->bl.y);
- sprintf(w3,"%s%d%d%d%d", map,sd->bl.x, sd->bl.y, x, y);
- sprintf(w4,"1,1,%s.gat,%d,%d", map, x, 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(output, "New warp NPC => %s",w3);
+ sprintf(atcmd_output, "New warp NPC => %s",w3);
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
return ret;
}
@@ -6962,6 +7119,7 @@ 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)
return -1;
@@ -6974,33 +7132,6 @@ atcommand_follow(const int fd, struct map_session_data* sd,
/*==========================================
- * @chareffect by [MouseJstr]
- *
- * Create a effect localized on another character
- *------------------------------------------
- */
-int
-atcommand_chareffect(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;
-
- if (!message || !*message || sscanf(message, "%d %s", &type, target) != 2) {
- clif_displaymessage(fd, "usage: @chareffect <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;
-}
-/*==========================================
* @dropall by [MouseJstr]
*
* Drop all your possession on the ground
@@ -7011,10 +7142,11 @@ 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, 0, BF_NORMAL);
+ pc_unequipitem(sd, i, 3);
pc_dropitem(sd, i, sd->status.inventory[i].amount);
}
}
@@ -7022,7 +7154,7 @@ atcommand_dropall(const int fd, struct map_session_data* sd,
}
/*==========================================
* @chardropall by [MouseJstr]
- *
+ *
* Throw all the characters possessions on the ground. Normally
* done in response to them being disrespectful of a GM
*------------------------------------------
@@ -7033,6 +7165,7 @@ atcommand_chardropall(const int fd, struct map_session_data* sd,
{
int i;
struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
@@ -7041,7 +7174,7 @@ atcommand_chardropall(const int fd, struct map_session_data* sd,
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, 0, BF_NORMAL);
+ pc_unequipitem(pl_sd, i, 3);
pc_dropitem(pl_sd, i, pl_sd->status.inventory[i].amount);
}
}
@@ -7064,6 +7197,7 @@ 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;
@@ -7071,7 +7205,7 @@ atcommand_storeall(const int fd, struct map_session_data* 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, 0, BF_NORMAL);
+ pc_unequipitem(sd, i, 3);
storage_storageadd(sd, i, sd->status.inventory[i].amount);
}
}
@@ -7092,10 +7226,11 @@ atcommand_charstoreall(const int fd, struct map_session_data* sd,
{
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)
+ if((pl_sd=map_nick2sd((char *) message)) == NULL)
return -1;
if (storage_storageopen(pl_sd) == 1) {
@@ -7106,7 +7241,7 @@ atcommand_charstoreall(const int fd, struct map_session_data* sd,
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, 0, BF_NORMAL);
+ pc_unequipitem(pl_sd, i, 3);
storage_storageadd(pl_sd, i, sd->status.inventory[i].amount);
}
}
@@ -7131,15 +7266,15 @@ atcommand_skillid(const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
int skillen = 0, idx = 0;
+ nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
skillen = strlen(message);
while (skill_names[idx].id != 0) {
if ((strnicmp(skill_names[idx].name, message, skillen) == 0) ||
(strnicmp(skill_names[idx].desc, message, skillen) == 0)) {
- char output[255];
- sprintf(output, "skill %d: %s", skill_names[idx].id, skill_names[idx].desc);
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "skill %d: %s", skill_names[idx].id, skill_names[idx].desc);
+ clif_displaymessage(fd, atcmd_output);
}
idx++;
}
@@ -7161,10 +7296,11 @@ atcommand_useskill(const int fd, struct map_session_data* sd,
int skilllv;
int inf;
char target[255];
+ nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
- if(sscanf(message, "%d %d %s", &skillnum, &skilllv, target) != 3) {
+ if(sscanf(message, "%d %d %99[^\n]", &skillnum, &skilllv, target) != 3) {
clif_displaymessage(fd, "Usage: @useskill <skillnum> <skillv> <target>");
return -1;
}
@@ -7197,7 +7333,8 @@ atcommand_skilltree(const int fd, struct map_session_data* sd,
int meets = 1, j, c=0, s=0;
struct pc_base_job s_class;
char target[255], *tbl;
- char output[255];
+ struct skill_tree_entry *ent;
+ nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
@@ -7206,10 +7343,10 @@ atcommand_skilltree(const int fd, struct map_session_data* sd,
clif_displaymessage(fd, "Usage: @skilltree <skillnum> <target>");
return -1;
}
- if((pl_sd=map_nick2sd(target)) == NULL)
+ if((pl_sd=map_nick2sd(target)) == NULL)
return -1;
- s_class = pc_calc_base_job(pl_sd->status.class);
+ s_class = pc_calc_base_job(pl_sd->status.class_);
c = s_class.job;
s = s_class.upper;
@@ -7217,52 +7354,295 @@ atcommand_skilltree(const int fd, struct map_session_data* sd,
tbl = job_name(c);
- sprintf(output, "Player is using %s %s skill tree (%d basic points)",
- s_class.upper ? "upper" : "lower",
+ sprintf(atcmd_output, "Player is using %s %s skill tree (%d basic points)",
+ s_class.upper ? "upper" : "lower",
tbl, pc_checkskill(pl_sd, 1));
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
- for (j = 0; j < MAX_SKILL; j++) {
+ for (j = 0; skill_tree[s][c][j].id != 0; j++) {
if (skill_tree[s][c][j].id == skillnum) {
skillidx = j;
break;
}
}
-
+
if (skillidx == -1) {
- sprintf(output, "I do not believe the player can use that skill");
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "I do not believe the player can use that skill");
+ clif_displaymessage(fd, atcmd_output);
return 0;
}
- struct skill_tree_entry *ent = &skill_tree[s][c][skillidx];
+ ent = &skill_tree[s][c][skillidx];
- for(j=0;j<5;j++)
+ for(j=0;j<5;j++)
if( ent->need[j].id &&
- pc_checkskill(sd,ent->need[j].id) < ent->need[j].lv)
+ pc_checkskill(sd,ent->need[j].id) < ent->need[j].lv)
{
int idx = 0;
char *desc;
- while (skill_names[idx].id != 0 && skill_names[idx].id != ent->need[j].id)
+ while (skill_names[idx].id != 0 && skill_names[idx].id != ent->need[j].id)
idx++;
if (skill_names[idx].id == 0)
desc = "Unknown skill";
else
desc = skill_names[idx].desc;
- sprintf(output, "player requires level %d of skill %s",
+ sprintf(atcmd_output, "player requires level %d of skill %s",
ent->need[j].lv, desc);
- clif_displaymessage(fd, output);
+ clif_displaymessage(fd, atcmd_output);
meets = 0;
}
if (meets == 1) {
- sprintf(output, "I believe the player meets all the requirements for that skill");
- clif_displaymessage(fd, output);
+ sprintf(atcmd_output, "I believe the player meets all the requirements for that skill");
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 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[255], player2[255];
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%[^,],%[^\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]
+ 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, "%[^\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;
+}
+
+/*==========================================
+ * @rings by [MouseJstr]
+ *
+ * Give two players rings
+ *------------------------------------------
+ */
+int
+atcommand_rings(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct item item_tmp;
+ int flag;
+
+ memset(&item_tmp, 0, sizeof(item_tmp));
+
+ item_tmp.nameid = 2634;
+ item_tmp.identify = 1;
+
+ if ((flag = pc_additem((struct map_session_data*)sd, &item_tmp, 1)))
+ clif_additem((struct map_session_data*)sd, 0, 0, flag);
+
+ item_tmp.nameid = 2635;
+ item_tmp.identify = 1;
+ if ((flag = pc_additem((struct map_session_data*)sd, &item_tmp, 1)))
+ clif_additem((struct map_session_data*)sd, 0, 0, flag);
+
+ clif_displaymessage(fd, "You have rings! Give them to the lovers.");
+
+ return 0;
+}
+
+#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[255];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ if(sscanf(message, "%s", 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 == 2) || (inf == 1))
+ skill_use_pos(sd, pl_sd->bl.x+5, pl_sd->bl.y+5, skillnum, 1);
+ else
+ 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 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)
+{
+ nullpo_retr(-1, sd);
+ if (sd->autoloot)
+ {
+ sd->autoloot = 0;
+ clif_displaymessage(fd, "Autoloot is now off.");
+ }
+ else
+ {
+ sd->autoloot = 1;
+ clif_displaymessage(fd, "Autoloot is now on.");
+ }
+ return 0;
+}
+
+
/*==========================================
* It is made to rain.
*------------------------------------------
@@ -7273,13 +7653,16 @@ atcommand_rain(
const char* command, const char* message)
{
int effno = 0;
- effno = 161;
nullpo_retr(-1, sd);
- if (effno < 0 || map[sd->bl.m].flag.rain)
- return -1;
-
- map[sd->bl.m].flag.rain=1;
- clif_specialeffect(&sd->bl,effno,2);
+ effno = 161;
+ if (map[sd->bl.m].flag.rain) {
+ map[sd->bl.m].flag.rain=0;
+ clif_displaymessage(fd, "The rain has stopped.");
+ } else {
+ map[sd->bl.m].flag.rain=1;
+ clif_specialeffect(&sd->bl,effno,2);
+ clif_displaymessage(fd, "It is made to rain.");
+ }
return 0;
}
/*==========================================
@@ -7294,11 +7677,15 @@ atcommand_snow(
int effno = 0;
effno = 162;
nullpo_retr(-1, sd);
- if (effno < 0 || map[sd->bl.m].flag.snow)
- return -1;
+ if (map[sd->bl.m].flag.snow) {
+ map[sd->bl.m].flag.snow=0;
+ clif_displaymessage(fd, "Snow has stopped falling.");
+ } else {
+ map[sd->bl.m].flag.snow=1;
+ clif_specialeffect(&sd->bl,effno,2);
+ clif_displaymessage(fd, "It is made to snow.");
+ }
- map[sd->bl.m].flag.snow=1;
- clif_specialeffect(&sd->bl,effno,2);
return 0;
}
@@ -7314,11 +7701,14 @@ atcommand_sakura(
int effno = 0;
effno = 163;
nullpo_retr(-1, sd);
- if (effno < 0 || map[sd->bl.m].flag.sakura)
- return -1;
-
- map[sd->bl.m].flag.sakura=1;
- clif_specialeffect(&sd->bl,effno,2);
+ if (map[sd->bl.m].flag.sakura) {
+ map[sd->bl.m].flag.sakura=0;
+ clif_displaymessage(fd, "Cherry tree leaves is made to fall.");
+ } else {
+ map[sd->bl.m].flag.sakura=1;
+ clif_specialeffect(&sd->bl,effno,2);
+ clif_displaymessage(fd, "Cherry tree leaves is made to fall.");
+ }
return 0;
}
@@ -7334,11 +7724,14 @@ atcommand_fog(
int effno = 0;
effno = 233;
nullpo_retr(-1, sd);
- if (effno < 0 || map[sd->bl.m].flag.fog)
- return -1;
-
- map[sd->bl.m].flag.fog=1;
- clif_specialeffect(&sd->bl,effno,2);
+ if (map[sd->bl.m].flag.fog) {
+ map[sd->bl.m].flag.fog=0;
+ clif_displaymessage(fd, "The fog has gone.");
+ } else {
+ map[sd->bl.m].flag.fog=1;
+ clif_specialeffect(&sd->bl,effno,2);
+ clif_displaymessage(fd, "Fog hangs over.");
+ }
return 0;
}
@@ -7355,15 +7748,211 @@ atcommand_leaves(
int effno = 0;
effno = 333;
nullpo_retr(-1, sd);
- if (effno < 0 || map[sd->bl.m].flag.leaves)
+ if (map[sd->bl.m].flag.leaves) {
+ map[sd->bl.m].flag.leaves=0;
+ clif_displaymessage(fd, "Leaves no longer fall.");
+ } else {
+ map[sd->bl.m].flag.leaves=1;
+ clif_specialeffect(&sd->bl,effno,2);
+ clif_displaymessage(fd, "Fallen leaves fall.");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Clearing Weather Effects by Dexity
+ *------------------------------------------
+ */
+int
+atcommand_clearweather(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ //int effno = 0;
+ 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.fog=0;
+ map[sd->bl.m].flag.leaves=0;
+ //clif_specialeffect(&sd->bl,effno,2); // not required. [celest]
+ 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
+ *------------------------------------------
+ */
+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 !=-1 && (mob_id <= 1000 || mob_id >= 2000)){
+ 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, sd->mapname);
+ clif_displaymessage(fd, atcmd_output);
+
+ map_foreachinarea(atmobsearch_sub, map_id, 0, 0,
+ map[map_id].xs, map[map_id].ys, BL_MOB, mob_id, fd);
+
+ atmobsearch_sub(&sd->bl,0); // ”Ô†ƒŠƒZƒbƒg
+
+ return 0;
+}
+/*==========================================
+ * ƒhƒƒbƒvƒAƒCƒeƒ€‚Ì‘|œ
+ *------------------------------------------
+ */
+int
+atcommand_cleanmap(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i=0;
+ 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,sd,&i);
+ 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[100],mes[100];
+ struct npc_data *nd;
+
+ if (sscanf(message, "%s %99[^\n]", name, mes) < 2)
+ return -1;
+
+ if (!(nd = npc_name2id(name)))
+ return -1;
+
+ clif_message(&nd->bl, mes);
+ 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;
- map[sd->bl.m].flag.leaves=1;
- clif_specialeffect(&sd->bl,effno,2);
+ 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;
+static int users_all;
+
+static int atcommand_users_sub1(struct map_session_data* sd,va_list va) {
+ int users = (int)strdb_search(users_db,sd->mapname) + 1;
+ users_all++;
+ strdb_insert(users_db,sd->mapname,(void *)users);
+ return 0;
+}
+
+static int atcommand_users_sub2(void* 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%%)",(char *)key,(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 = strdb_init(24);
+ clif_foreachclient(atcommand_users_sub1);
+ strdb_foreach(users_db,atcommand_users_sub2,sd);
+ sprintf(buf,"all : %d",users_all);
+ clif_displaymessage(fd,buf);
+ strdb_final(users_db,NULL);
+ return 0;
+}
+
+/*==========================================
+ *
*------------------------------------------
*/
int
@@ -7378,14 +7967,14 @@ atcommand_summon(
int id = 0;
struct mob_data *md;
unsigned int tick=gettick();
-
+
nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
if (sscanf(message, "%99s", name) < 1)
return -1;
-
+
if ((mob_id = atoi(name)) == 0)
mob_id = mobdb_searchname(name);
if(mob_id == 0)
@@ -7398,7 +7987,7 @@ atcommand_summon(
if((md=(struct mob_data *)map_id2bl(id))){
md->master_id=sd->bl.id;
md->state.special_mob_ai=1;
- md->mode=mob_db[md->class].mode|0x04;
+ md->mode=mob_db[md->class_].mode|0x04;
md->deletetimer=add_timer(tick+60000,mob_timer_delete,id,0);
clif_misceffect2(&md->bl,344);
}
@@ -7424,9 +8013,10 @@ atcommand_adjcmdlvl(
{
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>.");
+ clif_displaymessage(fd, "Usage: @adjcmdlvl <lvl> <command>.");
return -1;
}
@@ -7458,13 +8048,14 @@ atcommand_adjgmlvl(
int newlev;
char user[100];
struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %[^\r\n]", &newlev, user) != 2) {
- clif_displaymessage(fd, "usage: @adjgmlvl <lvl> <user>.");
+ clif_displaymessage(fd, "Usage: @adjgmlvl <lvl> <user>.");
return -1;
}
- if((pl_sd=map_nick2sd((char *) user)) == NULL)
+ if((pl_sd=map_nick2sd((char *) user)) == NULL)
return -1;
pc_set_gm_level(pl_sd->status.account_id, newlev);
@@ -7478,7 +8069,7 @@ atcommand_adjgmlvl(
*
* Open a trade window with a remote player
*
- * If I have to jump to a remote player one more time, I am
+ * If I have to jump to a remote player one more time, I am
* gonna scream!
*------------------------------------------
*/
@@ -7488,6 +8079,7 @@ atcommand_trade(
const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
@@ -7509,13 +8101,14 @@ atcommand_setbattleflag(
const char* command, const char* message)
{
char flag[128], value[128];
+ nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%s %s", flag, value) != 2) {
- clif_displaymessage(fd, "usage: @setbattleflag <flag> <value>.");
+ clif_displaymessage(fd, "Usage: @setbattleflag <flag> <value>.");
return -1;
}
- if (battle_set_value(flag, value) == 0)
+ if (battle_set_value(flag, value) == 0)
clif_displaymessage(fd, "unknown battle_config flag");
else
clif_displaymessage(fd, "battle_config set as requested");
@@ -7533,13 +8126,14 @@ int atcommand_unmute(
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) {
if(pl_sd->sc_data[SC_NOCHAT].timer!=-1) {
pl_sd->status.manner = 0; // have to set to 0 first [celest]
- skill_status_change_end(&pl_sd->bl,SC_NOCHAT,-1);
+ status_change_end(&pl_sd->bl,SC_NOCHAT,-1);
clif_displaymessage(sd->fd,"Player unmuted");
}
else
@@ -7558,9 +8152,9 @@ atcommand_uptime(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- char output[200];
long seconds = 0, day = 24*60*60, hour = 60*60,
minute = 60, days = 0, hours = 0, minutes = 0;
+ nullpo_retr(-1, sd);
seconds = (gettick()-ticks)/CLOCKS_PER_SEC;
days = seconds/day;
@@ -7569,9 +8163,11 @@ atcommand_uptime(
seconds -= (seconds/hour>0)?(seconds/hour)*hour:0;
minutes = seconds/minute;
seconds -= (seconds/minute>0)?(seconds/minute)*minute:0;
-
- snprintf(output, sizeof(output), msg_table[245], days, hours, minutes, seconds);
- clif_displaymessage(fd,output);
+
+ snprintf(atcmd_output, sizeof(atcmd_output), msg_table[245], days, hours, minutes, seconds);
+
+ clif_displaymessage(fd,atcmd_output);
+
return 0;
}
@@ -7586,7 +8182,8 @@ atcommand_changesex(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- chrif_changesex(sd->status.account_id, ((sd->status.sex+1)%2));
+ nullpo_retr(-1, sd);
+ chrif_char_ask_name(sd->status.account_id,sd->status.name, 5,0,0,0,0,0,0);
return 0;
}
@@ -7599,18 +8196,18 @@ int atcommand_mute(
const char* command, const char* message)
{
struct map_session_data *pl_sd = NULL;
- char character[100];
int manner;
+ nullpo_retr(-1, sd);
- if (!message || !*message || sscanf(message, "%d %99[^\n]", &manner, character) < 1) {
- clif_displaymessage(fd, "usage: @mute <time> <character name>.");
+ if (!message || !*message || sscanf(message, "%d %99[^\n]", &manner, atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Usage: @mute <time> <character name>.");
return -1;
}
- if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
pl_sd->status.manner -= manner;
if(pl_sd->status.manner < 0)
- skill_status_change_start(&pl_sd->bl,SC_NOCHAT,0,0,0,0,0,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.
@@ -7628,9 +8225,9 @@ int atcommand_refresh(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
-
nullpo_retr(-1, sd);
- pc_setpos(sd, sd->mapname, sd->bl.x, sd->bl.y, 3);
+ //pc_setpos(sd, sd->mapname, sd->bl.x, sd->bl.y, 3);
+ clif_refresh(sd);
return 0;
}
@@ -7647,7 +8244,7 @@ atcommand_petid(const int fd, struct map_session_data* sd,
char temp0[100];
char temp1[100];
int cnt = 0, i = 0;
-
+
nullpo_retr(-1, sd);
if (!message || !*message)
@@ -7663,7 +8260,7 @@ atcommand_petid(const int fd, struct map_session_data* sd,
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,
+ 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"
@@ -7690,15 +8287,17 @@ atcommand_identify(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- nullpo_retr(-1, sd);
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);
+ clif_item_identify_list(sd);
} else {
clif_displaymessage(fd,"There are no items to appraise.");
}
@@ -7706,7 +8305,7 @@ atcommand_identify(
}
/*==========================================
- * @gmotd (Global MOTD)
+ * @gmotd (Global MOTD)
* by davidsiaw :P
*------------------------------------------
*/
@@ -7717,6 +8316,7 @@ atcommand_gmotd(
{
char buf[256];
FILE *fp;
+ nullpo_retr(-1, sd);
if( (fp = fopen(motd_txt, "r"))!=NULL){
while (fgets(buf, 250, fp) != NULL){
int i;
@@ -7744,10 +8344,632 @@ int atcommand_misceffect(
if (sscanf(message, "%d", &effect) < 1)
return -1;
clif_misceffect(&sd->bl,effect);
-
+
return 0;
}
+int charid2sessionid(int charid)
+{
+ int i;
+ int session_id=0;
+ struct map_session_data *pl_sd = NULL;
+
+ 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 (pl_sd->status.char_id==charid) { session_id = i; break; }
+ }
+ }
+
+ return session_id;
+}
+
+int accountid2sessionid(int accountid)
+{
+ int i;
+ int session_id=0;
+ struct map_session_data *pl_sd = NULL;
+
+ 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 (pl_sd->status.account_id==accountid) { session_id = i; break; }
+ }
+ }
+
+ return session_id;
+}
+
+
+/*==========================================
+ * 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->mapname, 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->mapname, 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->mapname, 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->mapname, 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 + 1);
+ 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 + 1);
+ 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 */
/*==========================================
@@ -7767,7 +8989,7 @@ int atcommand_listmail(
mail_check(sd,3);
else if(strlen(command)==9)
mail_check(sd,2);
- else
+ else
mail_check(sd,1);
return 0;
}
@@ -7818,7 +9040,7 @@ int atcommand_sendmail(
if(strlen(command)==17)
mail_send(sd,name,text,1);
- else
+ else
mail_send(sd,name,text,0);
return 0;
@@ -7837,8 +9059,171 @@ int atcommand_refreshonline(
nullpo_retr(-1, sd);
char_online_check();
-
+
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/NPC name/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, "Monster (MVP): '%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 drop.");
+ 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 drop.");
+ else
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @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[255], player2[255], player3[255];
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+
+ if (sscanf(message, "%[^,],%[^,],%[^\r\n]", player1, player2, player3) != 3) {
+ clif_displaymessage(fd, "usage: @adopt <player1> <player2> <player3>.");
+ return -1;
+ }
+
+ 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;
+}
+
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 3d84cd5b9..1160dccb7 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -112,20 +112,20 @@ enum AtCommandType {
AtCommand_CharSkReset,
AtCommand_CharStReset,
//by chbrules
- AtCommand_CharModel,
+ AtCommand_CharModel,
AtCommand_CharSKPoint,
- AtCommand_CharSTPoint,
- AtCommand_CharZeny,
+ AtCommand_CharSTPoint,
+// AtCommand_CharZeny, //now #zeny
AtCommand_RecallAll,
AtCommand_ReloadItemDB,
AtCommand_ReloadMobDB,
AtCommand_ReloadSkillDB,
-#ifndef TXT_ONLY
- AtCommand_Rehash,
-#else /* TXT_ONLY */
AtCommand_ReloadScript,
-#endif /* TXT_ONLY */
AtCommand_ReloadGMDB,
+ AtCommand_ReloadAtcommand,
+ AtCommand_ReloadBattleConf,
+ AtCommand_ReloadStatusDB,
+ AtCommand_ReloadPcDB,
AtCommand_MapInfo,
AtCommand_Dye,
AtCommand_Hstyle,
@@ -143,8 +143,9 @@ enum AtCommandType {
AtCommand_RepairAll, // [Valaris]
AtCommand_GuildRecall, // by Yor
AtCommand_PartyRecall, // by Yor
-// AtCommand_Nuke, // [Valaris]
+ AtCommand_Nuke, // [Valaris]
AtCommand_Enablenpc,
+ AtCommand_Hidenpc,
AtCommand_Disablenpc,
AtCommand_ServerTime, // by Yor
AtCommand_CharDelItem, // by Yor
@@ -157,8 +158,8 @@ enum AtCommandType {
AtCommand_EMail, // by Yor
AtCommand_Hatch,
AtCommand_Effect, // by Apple
- AtCommand_Char_Item_List, // by Yor
- AtCommand_Char_Storage_List, // by Yor
+// AtCommand_Char_Item_List, // by Yor, now #itemlist
+// AtCommand_Char_Storage_List, // by Yor, now #storagelist
AtCommand_Char_Cart_List, // by Yor
AtCommand_AddWarp, // by MouseJstr
AtCommand_Follow, // by MouseJstr
@@ -168,10 +169,7 @@ enum AtCommandType {
AtCommand_NpcMove, // by MouseJstr
AtCommand_Killable, // by MouseJstr
AtCommand_CharKillable, // by MouseJstr
- AtCommand_Chareffect, // by MouseJstr
- AtCommand_Chardye, // by MouseJstr
- AtCommand_Charhairstyle, // by MouseJstr
- AtCommand_Charhaircolor, // by MouseJstr
+// AtCommand_Chareffect, // by MouseJstr, now #effect
AtCommand_Dropall, // by MouseJstr
AtCommand_Chardropall, // by MouseJstr
AtCommand_Storeall, // by MouseJstr
@@ -190,6 +188,7 @@ enum AtCommandType {
AtCommand_Send,
AtCommand_SetBattleFlag,
AtCommand_UnMute,
+ AtCommand_Clearweather, // by Dexity
AtCommand_UpTime, // by MC Cameri
AtCommand_ChangeSex, // by MC Cameri
AtCommand_Mute, // [celest]
@@ -200,9 +199,14 @@ enum AtCommandType {
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
+#ifndef TXT_ONLY
AtCommand_CheckMail, // [Valaris]
AtCommand_ListMail, // [Valaris]
AtCommand_ListNewMail, // [Valaris]
@@ -210,12 +214,40 @@ enum AtCommandType {
AtCommand_SendMail, // [Valaris]
AtCommand_DeleteMail, // [Valaris]
AtCommand_SendPriorityMail, // [Valaris]
- AtCommand_Sound, // [Valaris]
+// AtCommand_Sound, // [Valaris]
AtCommand_RefreshOnline, // [Valaris]
// SQL-only commands end
#endif
AtCommand_SkillTree, // by MouseJstr
-
+ AtCommand_Marry, // by MouseJstr
+ AtCommand_Divorce, // by MouseJstr
+ AtCommand_Rings, // by MouseJstr
+ AtCommand_Grind, // by MouseJstr
+ AtCommand_Grind2, // by MouseJstr
+
+ 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
+
// end
AtCommand_Unknown,
AtCommand_MAX
@@ -235,6 +267,7 @@ 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);
@@ -248,11 +281,12 @@ int atcommand_recall(const int fd, struct map_session_data* sd, const char* comm
int atcommand_config_read(const char *cfgName);
int msg_config_read(const char *cfgName);
+void do_final_msg();
char *estr_lower(char *str);
-char * job_name(int class);
-int e_mail_check(unsigned char *email);
+char * job_name(int class_);
+int e_mail_check(char *email);
#endif
diff --git a/src/map/battle.c b/src/map/battle.c
index 00ca5a9e0..077e5fc9b 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -12,6 +12,7 @@
#include "map.h"
#include "pc.h"
+#include "status.h"
#include "skill.h"
#include "mob.h"
#include "itemdb.h"
@@ -55,1259 +56,21 @@ int battle_counttargeted(struct block_list *bl,struct block_list *src,int target
return mob_counttargeted((struct mob_data *)bl,src,target_lv);
return 0;
}
-/*==========================================
- * ‘ÎÛ‚ÌClass‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_class(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return ((struct mob_data *)bl)->class;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->status.class;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- return ((struct pet_data *)bl)->class;
- else
- return 0;
-}
-/*==========================================
- * ‘ÎÛ‚Ì•ûŒü‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_dir(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return ((struct mob_data *)bl)->dir;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->dir;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- return ((struct pet_data *)bl)->dir;
- else
- return 0;
-}
-/*==========================================
- * ‘Îۂ̃Œƒxƒ‹‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_lv(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return ((struct mob_data *)bl)->level;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->status.base_level;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- return ((struct pet_data *)bl)->msd->pet.level;
- else
- return 0;
-}
-/*==========================================
- * ‘ÎÛ‚ÌŽË’ö‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_range(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return mob_db[((struct mob_data *)bl)->class].range;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->attackrange;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- return mob_db[((struct pet_data *)bl)->class].range;
- else
- return 0;
-}
-/*==========================================
- * ‘ÎÛ‚ÌHP‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_hp(struct block_list *bl)
-{
- nullpo_retr(1, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return ((struct mob_data *)bl)->hp;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->status.hp;
- else
- return 1;
-}
-/*==========================================
- * ‘ÎÛ‚ÌMHP‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_max_hp(struct block_list *bl)
-{
- nullpo_retr(1, bl);
- if(bl->type==BL_PC && ((struct map_session_data *)bl))
- return ((struct map_session_data *)bl)->status.max_hp;
- else {
- struct status_change *sc_data=battle_get_sc_data(bl);
- int max_hp=1;
- if(bl->type==BL_MOB && ((struct mob_data*)bl)) {
- max_hp = mob_db[((struct mob_data*)bl)->class].max_hp;
- if(battle_config.mobs_level_up) // mobs leveling up increase [Valaris]
- max_hp+=(((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv)*battle_get_vit(bl);
- if(mob_db[((struct mob_data*)bl)->class].mexp > 0) {
- if(battle_config.mvp_hp_rate != 100)
- max_hp = (max_hp * battle_config.mvp_hp_rate)/100;
- }
- else {
- if(battle_config.monster_hp_rate != 100)
- max_hp = (max_hp * battle_config.monster_hp_rate)/100;
- }
- }
- else if(bl->type==BL_PET && ((struct pet_data*)bl)) {
- max_hp = mob_db[((struct pet_data*)bl)->class].max_hp;
- if(mob_db[((struct pet_data*)bl)->class].mexp > 0) {
- if(battle_config.mvp_hp_rate != 100)
- max_hp = (max_hp * battle_config.mvp_hp_rate)/100;
- }
- else {
- if(battle_config.monster_hp_rate != 100)
- max_hp = (max_hp * battle_config.monster_hp_rate)/100;
- }
- }
- if(sc_data) {
- if(sc_data[SC_APPLEIDUN].timer!=-1)
- max_hp += ((5+sc_data[SC_APPLEIDUN].val1*2+((sc_data[SC_APPLEIDUN].val2+1)>>1)
- +sc_data[SC_APPLEIDUN].val3/10) * max_hp)/100;
- }
- if(max_hp < 1) max_hp = 1;
- return max_hp;
- }
- return 1;
-}
-/*==========================================
- * ‘ÎÛ‚ÌStr‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_str(struct block_list *bl)
-{
- int str=0;
- struct status_change *sc_data;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_MOB && ((struct mob_data *)bl)) {
- str = mob_db[((struct mob_data *)bl)->class].str;
- if(battle_config.mobs_level_up) // mobs leveling up increase [Valaris]
- str+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
- }
- else if(bl->type==BL_PC && ((struct map_session_data *)bl))
- return ((struct map_session_data *)bl)->paramc[0];
- else if(bl->type==BL_PET && ((struct pet_data *)bl))
- str = mob_db[((struct pet_data *)bl)->class].str;
-
- if(sc_data) {
- if(sc_data[SC_LOUD].timer!=-1 && sc_data[SC_QUAGMIRE].timer == -1 && bl->type != BL_PC)
- str += 4;
- if( sc_data[SC_BLESSING].timer != -1 && bl->type != BL_PC){ // ƒuƒŒƒbƒVƒ“ƒO
- int race=battle_get_race(bl);
- if(battle_check_undead(race,battle_get_elem_type(bl)) || race==6 ) str >>= 1; // ˆ« –‚/•sŽ€
- else str += sc_data[SC_BLESSING].val1; // ‚»‚Ì‘¼
- }
- if(sc_data[SC_TRUESIGHT].timer!=-1 && bl->type != BL_PC) // ƒgƒDƒ‹[ƒTƒCƒg
- str += 5;
- }
- if(str < 0) str = 0;
- return str;
-}
-/*==========================================
- * ‘ÎÛ‚ÌAgi‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-
-int battle_get_agi(struct block_list *bl)
-{
- int agi=0;
- struct status_change *sc_data;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl) {
- agi=mob_db[((struct mob_data *)bl)->class].agi;
- if(battle_config.mobs_level_up) // increase of mobs leveling up [Valaris]
- agi+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
- }
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- agi=((struct map_session_data *)bl)->paramc[1];
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- agi=mob_db[((struct pet_data *)bl)->class].agi;
-
- if(sc_data) {
- if( sc_data[SC_INCREASEAGI].timer!=-1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1 &&
- bl->type != BL_PC) // ‘¬“x‘‰Á(PC‚Ípc.c‚Å)
- agi += 2+sc_data[SC_INCREASEAGI].val1;
-
- if(sc_data[SC_CONCENTRATE].timer!=-1 && sc_data[SC_QUAGMIRE].timer == -1 && bl->type != BL_PC)
- agi += agi*(2+sc_data[SC_CONCENTRATE].val1)/100;
-
- if(sc_data[SC_DECREASEAGI].timer!=-1) // ‘¬“xŒ¸­
- agi -= 2+sc_data[SC_DECREASEAGI].val1;
-
- if(sc_data[SC_QUAGMIRE].timer!=-1 ) { // ƒNƒ@ƒOƒ}ƒCƒA
- //agi >>= 1;
- int agib = agi*(sc_data[SC_QUAGMIRE].val1*10)/100;
- agi -= agib > 50 ? 50 : agib;
- }
- if(sc_data[SC_TRUESIGHT].timer!=-1 && bl->type != BL_PC) // ƒgƒDƒ‹[ƒTƒCƒg
- agi += 5;
- }
- if(agi < 0) agi = 0;
- return agi;
-}
-/*==========================================
- * ‘ÎÛ‚ÌVit‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_vit(struct block_list *bl)
-{
- int vit=0;
- struct status_change *sc_data;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl) {
- vit=mob_db[((struct mob_data *)bl)->class].vit;
- if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
- vit+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
- }
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- vit=((struct map_session_data *)bl)->paramc[2];
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- vit=mob_db[((struct pet_data *)bl)->class].vit;
- if(sc_data) {
- if(sc_data[SC_STRIPARMOR].timer != -1 && bl->type!=BL_PC)
- vit = vit*60/100;
- if(sc_data[SC_TRUESIGHT].timer!=-1 && bl->type != BL_PC) // ƒgƒDƒ‹[ƒTƒCƒg
- vit += 5;
- }
-
- if(vit < 0) vit = 0;
- return vit;
-}
-/*==========================================
- * ‘ÎÛ‚ÌInt‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_int(struct block_list *bl)
-{
- int int_=0;
- struct status_change *sc_data;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl){
- int_=mob_db[((struct mob_data *)bl)->class].int_;
- if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
- int_+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
- }
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- int_=((struct map_session_data *)bl)->paramc[3];
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- int_=mob_db[((struct pet_data *)bl)->class].int_;
-
- if(sc_data) {
- if( sc_data[SC_BLESSING].timer != -1 && bl->type != BL_PC){ // ƒuƒŒƒbƒVƒ“ƒO
- int race=battle_get_race(bl);
- if(battle_check_undead(race,battle_get_elem_type(bl)) || race==6 ) int_ >>= 1; // ˆ« –‚/•sŽ€
- else int_ += sc_data[SC_BLESSING].val1; // ‚»‚Ì‘¼
- }
- if( sc_data[SC_STRIPHELM].timer != -1 && bl->type != BL_PC)
- int_ = int_*60/100;
- if(sc_data[SC_TRUESIGHT].timer!=-1 && bl->type != BL_PC) // ƒgƒDƒ‹[ƒTƒCƒg
- int_ += 5;
- }
- if(int_ < 0) int_ = 0;
- return int_;
-}
-/*==========================================
- * ‘ÎÛ‚ÌDex‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_dex(struct block_list *bl)
-{
- int dex=0;
- struct status_change *sc_data;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl) {
- dex=mob_db[((struct mob_data *)bl)->class].dex;
- if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
- dex+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
- }
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- dex=((struct map_session_data *)bl)->paramc[4];
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- dex=mob_db[((struct pet_data *)bl)->class].dex;
-
- if(sc_data) {
- if(sc_data[SC_CONCENTRATE].timer!=-1 && sc_data[SC_QUAGMIRE].timer == -1 && bl->type != BL_PC)
- dex += dex*(2+sc_data[SC_CONCENTRATE].val1)/100;
-
- if( sc_data[SC_BLESSING].timer != -1 && bl->type != BL_PC){ // ƒuƒŒƒbƒVƒ“ƒO
- int race=battle_get_race(bl);
- if(battle_check_undead(race,battle_get_elem_type(bl)) || race==6 ) dex >>= 1; // ˆ« –‚/•sŽ€
- else dex += sc_data[SC_BLESSING].val1; // ‚»‚Ì‘¼
- }
-
- if(sc_data[SC_QUAGMIRE].timer!=-1 ) { // ƒNƒ@ƒOƒ}ƒCƒA
- // dex >>= 1;
- int dexb = dex*(sc_data[SC_QUAGMIRE].val1*10)/100;
- dex -= dexb > 50 ? 50 : dexb;
- }
- if(sc_data[SC_TRUESIGHT].timer!=-1 && bl->type != BL_PC) // ƒgƒDƒ‹[ƒTƒCƒg
- dex += 5;
- }
- if(dex < 0) dex = 0;
- return dex;
-}
-/*==========================================
- * ‘ÎÛ‚ÌLuk‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_luk(struct block_list *bl)
-{
- int luk=0;
- struct status_change *sc_data;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl) {
- luk=mob_db[((struct mob_data *)bl)->class].luk;
- if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
- luk+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
- }
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- luk=((struct map_session_data *)bl)->paramc[5];
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- luk=mob_db[((struct pet_data *)bl)->class].luk;
-
- if(sc_data) {
- if(sc_data[SC_GLORIA].timer!=-1 && bl->type != BL_PC) // ƒOƒƒŠƒA(PC‚Ípc.c‚Å)
- luk += 30;
- if(sc_data[SC_CURSE].timer!=-1 ) // Žô‚¢
- luk=0;
- if(sc_data[SC_TRUESIGHT].timer!=-1 && bl->type != BL_PC) // ƒgƒDƒ‹[ƒTƒCƒg
- luk += 5;
- }
- if(luk < 0) luk = 0;
- return luk;
-}
-
-/*==========================================
- * ‘ÎÛ‚ÌFlee‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å1ˆÈã
- *------------------------------------------
- */
-int battle_get_flee(struct block_list *bl)
-{
- int flee=1;
- struct status_change *sc_data;
-
- nullpo_retr(1, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- flee=((struct map_session_data *)bl)->flee;
- else
- flee=battle_get_agi(bl) + battle_get_lv(bl);
-
- if(sc_data) {
- if(sc_data[SC_WHISTLE].timer!=-1 && bl->type != BL_PC)
- flee += flee*(sc_data[SC_WHISTLE].val1+sc_data[SC_WHISTLE].val2
- +(sc_data[SC_WHISTLE].val3>>16))/100;
- if(sc_data[SC_BLIND].timer!=-1 && bl->type != BL_PC)
- flee -= flee*25/100;
- if(sc_data[SC_WINDWALK].timer!=-1 && bl->type != BL_PC) // ƒEƒBƒ“ƒhƒEƒH[ƒN
- flee += flee*(sc_data[SC_WINDWALK].val2)/100;
- if(sc_data[SC_SPIDERWEB].timer!=-1 && bl->type != BL_PC) //ƒXƒpƒCƒ_[ƒEƒFƒu
- flee -= flee*50/100;
- }
- if(flee < 1) flee = 1;
- return flee;
-}
-/*==========================================
- * ‘ÎÛ‚ÌHit‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å1ˆÈã
- *------------------------------------------
- */
-int battle_get_hit(struct block_list *bl)
-{
- int hit=1;
- struct status_change *sc_data;
-
- nullpo_retr(1, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- hit=((struct map_session_data *)bl)->hit;
- else
- hit=battle_get_dex(bl) + battle_get_lv(bl);
-
- if(sc_data) {
- if(sc_data[SC_HUMMING].timer!=-1 && bl->type != BL_PC) //
- hit += hit*(sc_data[SC_HUMMING].val1*2+sc_data[SC_HUMMING].val2
- +sc_data[SC_HUMMING].val3)/100;
- if(sc_data[SC_BLIND].timer!=-1 && bl->type != BL_PC) // Žô‚¢
- hit -= hit*25/100;
- if(sc_data[SC_TRUESIGHT].timer!=-1 && bl->type != BL_PC) // ƒgƒDƒ‹[ƒTƒCƒg
- hit += 3*(sc_data[SC_TRUESIGHT].val1);
- if(sc_data[SC_CONCENTRATION].timer!=-1 && bl->type != BL_PC) //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“
- hit += (hit*(10*(sc_data[SC_CONCENTRATION].val1)))/100;
- }
- if(hit < 1) hit = 1;
- return hit;
-}
-/*==========================================
- * ‘ÎÛ‚ÌŠ®‘S‰ñ”ð‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å1ˆÈã
- *------------------------------------------
- */
-int battle_get_flee2(struct block_list *bl)
-{
- int flee2=1;
- struct status_change *sc_data;
-
- nullpo_retr(1, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl){
- flee2 = battle_get_luk(bl) + 10;
- flee2 += ((struct map_session_data *)bl)->flee2 - (((struct map_session_data *)bl)->paramc[5] + 10);
- }
- else
- flee2=battle_get_luk(bl)+1;
-
- if(sc_data) {
- if(sc_data[SC_WHISTLE].timer!=-1 && bl->type != BL_PC)
- flee2 += (sc_data[SC_WHISTLE].val1+sc_data[SC_WHISTLE].val2
- +(sc_data[SC_WHISTLE].val3&0xffff))*10;
- }
- if(flee2 < 1) flee2 = 1;
- return flee2;
-}
-/*==========================================
- * ‘Îۂ̃NƒŠƒeƒBƒJƒ‹‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å1ˆÈã
- *------------------------------------------
- */
-int battle_get_critical(struct block_list *bl)
-{
- int critical=1;
- struct status_change *sc_data;
-
- nullpo_retr(1, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl){
- critical = battle_get_luk(bl)*3 + 10;
- critical += ((struct map_session_data *)bl)->critical - ((((struct map_session_data *)bl)->paramc[5]*3) + 10);
- }
- else
- critical=battle_get_luk(bl)*3 + 1;
-
- if(sc_data) {
- if(sc_data[SC_FORTUNE].timer!=-1 && bl->type != BL_PC)
- critical += (10+sc_data[SC_FORTUNE].val1+sc_data[SC_FORTUNE].val2
- +sc_data[SC_FORTUNE].val3)*10;
- if(sc_data[SC_EXPLOSIONSPIRITS].timer!=-1 && bl->type != BL_PC)
- critical += sc_data[SC_EXPLOSIONSPIRITS].val2;
- if(sc_data[SC_TRUESIGHT].timer!=-1 && bl->type != BL_PC) //ƒgƒDƒ‹[ƒTƒCƒg
- critical += critical*sc_data[SC_TRUESIGHT].val1/100;
- }
- if(critical < 1) critical = 1;
- return critical;
-}
-/*==========================================
- * base_atk‚̎擾
- * –ß‚è‚Í®”‚Å1ˆÈã
- *------------------------------------------
- */
-int battle_get_baseatk(struct block_list *bl)
-{
- struct status_change *sc_data;
- int batk=1;
-
- nullpo_retr(1, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- batk = ((struct map_session_data *)bl)->base_atk; //ݒ肳‚ê‚Ä‚¢‚ébase_atk
- else { //‚»‚êˆÈŠO‚È‚ç
- int str,dstr;
- str = battle_get_str(bl); //STR
- dstr = str/10;
- batk = dstr*dstr + str; //base_atk‚ðŒvŽZ‚·‚é
- }
- if(sc_data) { //ó‘ÔˆÙí‚ ‚è
- if(sc_data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC) //PC‚Ńvƒƒ{ƒbƒN(SM_PROVOKE)ó‘Ô
- batk = batk*(100+2*sc_data[SC_PROVOKE].val1)/100; //base_atk‘‰Á
- if(sc_data[SC_CURSE].timer!=-1 ) //Žô‚í‚ê‚Ä‚¢‚½‚ç
- batk -= batk*25/100; //base_atk‚ª25%Œ¸­
- if(sc_data[SC_CONCENTRATION].timer!=-1 && bl->type != BL_PC) //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“
- batk += batk*(5*sc_data[SC_CONCENTRATION].val1)/100;
- if(sc_data[SC_EDP].timer != -1) // [Celest]
- batk += batk*(50+50*sc_data[SC_EDP].val1)/100;
- }
- if(batk < 1) batk = 1; //base_atk‚ÍÅ’á‚Å‚à1
- return batk;
-}
-/*==========================================
- * ‘ÎÛ‚ÌAtk‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_atk(struct block_list *bl)
-{
- struct status_change *sc_data;
- int atk=0;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- atk = ((struct map_session_data*)bl)->watk;
- else if(bl->type==BL_MOB && (struct mob_data *)bl)
- atk = mob_db[((struct mob_data*)bl)->class].atk1;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- atk = mob_db[((struct pet_data*)bl)->class].atk1;
-
- if(sc_data) {
- if(sc_data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC)
- atk = atk*(100+2*sc_data[SC_PROVOKE].val1)/100;
- if(sc_data[SC_CURSE].timer!=-1 )
- atk -= atk*25/100;
- if(sc_data[SC_CONCENTRATION].timer!=-1 && bl->type != BL_PC) //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“
- atk += atk*(5*sc_data[SC_CONCENTRATION].val1)/100;
- }
- if(atk < 0) atk = 0;
- return atk;
-}
-/*==========================================
- * ‘Îۂ̶ŽèAtk‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_atk_(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl){
- int atk=((struct map_session_data*)bl)->watk_;
-
- if(((struct map_session_data *)bl)->sc_data[SC_CURSE].timer!=-1 )
- atk -= atk*25/100;
- return atk;
- }
- else
- return 0;
-}
-/*==========================================
- * ‘ÎÛ‚ÌAtk2‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_atk2(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data*)bl)->watk2;
- else {
- struct status_change *sc_data=battle_get_sc_data(bl);
- int atk2=0;
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- atk2 = mob_db[((struct mob_data*)bl)->class].atk2;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- atk2 = mob_db[((struct pet_data*)bl)->class].atk2;
- if(sc_data) {
- if( sc_data[SC_IMPOSITIO].timer!=-1)
- atk2 += sc_data[SC_IMPOSITIO].val1*5;
- if( sc_data[SC_PROVOKE].timer!=-1 )
- atk2 = atk2*(100+2*sc_data[SC_PROVOKE].val1)/100;
- if( sc_data[SC_CURSE].timer!=-1 )
- atk2 -= atk2*25/100;
- if(sc_data[SC_DRUMBATTLE].timer!=-1)
- atk2 += sc_data[SC_DRUMBATTLE].val2;
- if(sc_data[SC_NIBELUNGEN].timer!=-1 && (battle_get_element(bl)/10) >= 8 )
- atk2 += sc_data[SC_NIBELUNGEN].val2;
- if(sc_data[SC_STRIPWEAPON].timer!=-1)
- atk2 = atk2*90/100;
- if(sc_data[SC_CONCENTRATION].timer!=-1) //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“
- atk2 += atk2*(5*sc_data[SC_CONCENTRATION].val1)/100;
- }
- if(atk2 < 0) atk2 = 0;
- return atk2;
- }
- return 0;
-}
-/*==========================================
- * ‘Îۂ̶ŽèAtk2‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_atk_2(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data*)bl)->watk_2;
- else
- return 0;
-}
-/*==========================================
- * ‘ÎÛ‚ÌMAtk1‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_matk1(struct block_list *bl)
-{
- struct status_change *sc_data;
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_MOB){
- int matk,int_=battle_get_int(bl);
- matk = int_+(int_/5)*(int_/5);
-
- if(sc_data)
- if(sc_data[SC_MINDBREAKER].timer!=-1 && bl->type != BL_PC)
- matk = matk*(100+2*sc_data[SC_MINDBREAKER].val1)/100;
- return matk;
- }
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->matk1;
- else if(bl->type==BL_PET){
- int matk,int_=battle_get_int(bl);
- matk = int_+(int_/5)*(int_/5);
-
- if(sc_data)
- if(sc_data[SC_MINDBREAKER].timer!=-1 && bl->type != BL_PC)
- matk = matk*(100+2*sc_data[SC_MINDBREAKER].val1)/100;
- return matk;
- }
- else
- return 0;
-}
-/*==========================================
- * ‘ÎÛ‚ÌMAtk2‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_matk2(struct block_list *bl)
-{
- struct status_change *sc_data=battle_get_sc_data(bl);
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB){
- int matk,int_=battle_get_int(bl);
- matk = int_+(int_/7)*(int_/7);
-
- if(sc_data)
- if(sc_data[SC_MINDBREAKER].timer!=-1 && bl->type != BL_PC)
- matk = matk*(100+2*sc_data[SC_MINDBREAKER].val1)/100;
- return matk;
- }
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->matk2;
- else if(bl->type==BL_PET){
- int matk,int_=battle_get_int(bl);
- matk = int_+(int_/7)*(int_/7);
- if(sc_data)
- if(sc_data[SC_MINDBREAKER].timer!=-1 && bl->type != BL_PC)
- matk = matk*(100+2*sc_data[SC_MINDBREAKER].val1)/100;
- return matk;
- }
- else
- return 0;
-}
-/*==========================================
- * ‘ÎÛ‚ÌDef‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_def(struct block_list *bl)
-{
- struct status_change *sc_data;
- int def=0,skilltimer=-1,skillid=0;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl){
- def = ((struct map_session_data *)bl)->def;
- skilltimer = ((struct map_session_data *)bl)->skilltimer;
- skillid = ((struct map_session_data *)bl)->skillid;
- }
- else if(bl->type==BL_MOB && (struct mob_data *)bl) {
- def = mob_db[((struct mob_data *)bl)->class].def;
- skilltimer = ((struct mob_data *)bl)->skilltimer;
- skillid = ((struct mob_data *)bl)->skillid;
- }
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- def = mob_db[((struct pet_data *)bl)->class].def;
-
- if(def < 1000000) {
- if(sc_data) {
- //ƒL[ƒsƒ“ƒOŽž‚ÍDEF100
- if( sc_data[SC_KEEPING].timer!=-1)
- def = 100;
- //ƒvƒƒ{ƒbƒNŽž‚ÍŒ¸ŽZ
- if( sc_data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC)
- def = (def*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100;
- //푾ŒÛ‚Ì‹¿‚«Žž‚͉ÁŽZ
- if( sc_data[SC_DRUMBATTLE].timer!=-1 && bl->type != BL_PC)
- def += sc_data[SC_DRUMBATTLE].val3;
- //“Å‚É‚©‚©‚Á‚Ä‚¢‚鎞‚ÍŒ¸ŽZ
- if(sc_data[SC_POISON].timer!=-1 && bl->type != BL_PC)
- def = def*75/100;
- //ƒXƒgƒŠƒbƒvƒV[ƒ‹ƒhŽž‚ÍŒ¸ŽZ
- if(sc_data[SC_STRIPSHIELD].timer!=-1 && bl->type != BL_PC)
- def = def*85/100;
- //ƒVƒOƒiƒ€ƒNƒ‹ƒVƒXŽž‚ÍŒ¸ŽZ
- if(sc_data[SC_SIGNUMCRUCIS].timer!=-1 && bl->type != BL_PC)
- def = def * (100 - sc_data[SC_SIGNUMCRUCIS].val2)/100;
- //‰i‰“‚̬“׎ž‚ÍDEF0‚É‚È‚é
- if(sc_data[SC_ETERNALCHAOS].timer!=-1 && bl->type != BL_PC)
- def = 0;
- //“€Œ‹AΉ»Žž‚͉EƒVƒtƒg
- if(sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0))
- def >>= 1;
- //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“Žž‚ÍŒ¸ŽZ
- if( sc_data[SC_CONCENTRATION].timer!=-1 && bl->type != BL_PC)
- def = (def*(100 - 5*sc_data[SC_CONCENTRATION].val1))/100;
- }
- //‰r¥’†‚͉r¥ŽžŒ¸ŽZ—¦‚ÉŠî‚¢‚ÄŒ¸ŽZ
- if(skilltimer != -1) {
- int def_rate = skill_get_castdef(skillid);
- if(def_rate != 0)
- def = (def * (100 - def_rate))/100;
- }
- }
- if(def < 0) def = 0;
- return def;
-}
-/*==========================================
- * ‘ÎÛ‚ÌMDef‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_mdef(struct block_list *bl)
-{
- struct status_change *sc_data;
- int mdef=0;
-
- nullpo_retr(0, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- mdef = ((struct map_session_data *)bl)->mdef;
- else if(bl->type==BL_MOB && (struct mob_data *)bl)
- mdef = mob_db[((struct mob_data *)bl)->class].mdef;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- mdef = mob_db[((struct pet_data *)bl)->class].mdef;
-
- if(mdef < 1000000) {
- if(sc_data) {
- //ƒoƒŠƒA[ó‘ÔŽž‚ÍMDEF100
- if(sc_data[SC_BARRIER].timer != -1)
- mdef = 100;
- //“€Œ‹AΉ»Žž‚Í1.25”{
- if(sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0))
- mdef = mdef*125/100;
- if( sc_data[SC_MINDBREAKER].timer!=-1 && bl->type != BL_PC)
- mdef -= (mdef*6*sc_data[SC_MINDBREAKER].val1)/100;
- }
- }
- if(mdef < 0) mdef = 0;
- return mdef;
-}
-/*==========================================
- * ‘ÎÛ‚ÌDef2‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å1ˆÈã
- *------------------------------------------
- */
-int battle_get_def2(struct block_list *bl)
-{
- struct status_change *sc_data;
- int def2=1;
-
- nullpo_retr(1, bl);
- sc_data=battle_get_sc_data(bl);
- if(bl->type==BL_PC)
- def2 = ((struct map_session_data *)bl)->def2;
- else if(bl->type==BL_MOB)
- def2 = mob_db[((struct mob_data *)bl)->class].vit;
- else if(bl->type==BL_PET)
- def2 = mob_db[((struct pet_data *)bl)->class].vit;
-
- if(sc_data) {
- if( sc_data[SC_ANGELUS].timer!=-1 && bl->type != BL_PC)
- def2 = def2*(110+5*sc_data[SC_ANGELUS].val1)/100;
- if( sc_data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC)
- def2 = (def2*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100;
- if(sc_data[SC_POISON].timer!=-1 && bl->type != BL_PC)
- def2 = def2*75/100;
- //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“Žž‚ÍŒ¸ŽZ
- if( sc_data[SC_CONCENTRATION].timer!=-1 && bl->type != BL_PC)
- def2 = def2*(100 - 5*sc_data[SC_CONCENTRATION].val1)/100;
- }
- if(def2 < 1) def2 = 1;
- return def2;
-}
-/*==========================================
- * ‘ÎÛ‚ÌMDef2‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å0ˆÈã
- *------------------------------------------
- */
-int battle_get_mdef2(struct block_list *bl)
-{
- int mdef2=0;
- struct status_change *sc_data=battle_get_sc_data(bl);
-
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB)
- mdef2 = mob_db[((struct mob_data *)bl)->class].int_ + (mob_db[((struct mob_data *)bl)->class].vit>>1);
- else if(bl->type==BL_PC)
- mdef2 = ((struct map_session_data *)bl)->mdef2 + (((struct map_session_data *)bl)->paramc[2]>>1);
- else if(bl->type==BL_PET)
- mdef2 = mob_db[((struct pet_data *)bl)->class].int_ + (mob_db[((struct pet_data *)bl)->class].vit>>1);
- if(sc_data) {
- if( sc_data[SC_MINDBREAKER].timer!=-1 && bl->type != BL_PC)
- mdef2 -= (mdef2*6*sc_data[SC_MINDBREAKER].val1)/100;
- }
- if(mdef2 < 0) mdef2 = 0;
- return mdef2;
-}
-/*==========================================
- * ‘ÎÛ‚ÌSpeed(ˆÚ“®‘¬“x)‚ð•Ô‚·(”Ä—p)
- * –ß‚è‚Í®”‚Å1ˆÈã
- * Speed‚ͬ‚³‚¢‚Ù‚¤‚ªˆÚ“®‘¬“x‚ª‘¬‚¢
- *------------------------------------------
- */
-int battle_get_speed(struct block_list *bl)
-{
- nullpo_retr(1000, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->speed;
- else {
- struct status_change *sc_data=battle_get_sc_data(bl);
- int speed = 1000;
- if(bl->type==BL_MOB && (struct mob_data *)bl) {
- speed = ((struct mob_data *)bl)->speed;
- if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
- speed-=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
- }
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- speed = ((struct pet_data *)bl)->msd->petDB->speed;
-
- if(sc_data) {
- //‘¬“x‘‰ÁŽž‚Í25%Œ¸ŽZ
- if(sc_data[SC_INCREASEAGI].timer!=-1 && sc_data[SC_DONTFORGETME].timer == -1)
- speed -= speed*25/100;
- //‘¬“xŒ¸­Žž‚Í25%‰ÁŽZ
- if(sc_data[SC_DECREASEAGI].timer!=-1)
- speed = speed*125/100;
- //ƒNƒ@ƒOƒ}ƒCƒAŽž‚Í50%‰ÁŽZ
- if(sc_data[SC_QUAGMIRE].timer!=-1)
- speed = speed*3/2;
- //Ž„‚ð–Y‚ê‚È‚¢‚ÅcŽž‚͉ÁŽZ
- if(sc_data[SC_DONTFORGETME].timer!=-1)
- speed = speed*(100+sc_data[SC_DONTFORGETME].val1*2 + sc_data[SC_DONTFORGETME].val2 + (sc_data[SC_DONTFORGETME].val3&0xffff))/100;
- //‹à„Žž‚Í25%‰ÁŽZ
- if(sc_data[SC_STEELBODY].timer!=-1)
- speed = speed*125/100;
- //ƒfƒBƒtƒFƒ“ƒ_[Žž‚͉ÁŽZ
- if(sc_data[SC_DEFENDER].timer!=-1)
- speed = (speed * (155 - sc_data[SC_DEFENDER].val1*5)) / 100;
- //—x‚èó‘Ô‚Í4”{’x‚¢
- if(sc_data[SC_DANCING].timer!=-1 )
- speed*=4;
- //Žô‚¢Žž‚Í450‰ÁŽZ
- if(sc_data[SC_CURSE].timer!=-1)
- speed = speed + 450;
- //ƒEƒBƒ“ƒhƒEƒH[ƒNŽž‚ÍLv*2%Œ¸ŽZ
- if(sc_data[SC_WINDWALK].timer!=-1)
- speed -= (speed*(sc_data[SC_WINDWALK].val1*2))/100;
- if(sc_data[SC_SLOWDOWN].timer!=-1)
- speed = speed*150/100;
- }
- if(speed < 1) speed = 1;
- return speed;
- }
-
- return 1000;
-}
-/*==========================================
- * ‘ÎÛ‚ÌaDelay(UŒ‚ŽžƒfƒBƒŒƒC)‚ð•Ô‚·(”Ä—p)
- * aDelay‚ͬ‚³‚¢‚Ù‚¤‚ªUŒ‚‘¬“x‚ª‘¬‚¢
- *------------------------------------------
- */
-int battle_get_adelay(struct block_list *bl)
-{
- nullpo_retr(4000, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- return (((struct map_session_data *)bl)->aspd<<1);
- else {
- struct status_change *sc_data=battle_get_sc_data(bl);
- int adelay=4000,aspd_rate = 100,i;
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- adelay = mob_db[((struct mob_data *)bl)->class].adelay;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- adelay = mob_db[((struct pet_data *)bl)->class].adelay;
-
- if(sc_data) {
- //ƒc[ƒnƒ“ƒhƒNƒCƒbƒPƒ“Žg—pŽž‚ŃNƒ@ƒOƒ}ƒCƒA‚Å‚àŽ„‚ð–Y‚ê‚È‚¢‚Åc‚Å‚à‚È‚¢Žž‚Í3Š„Œ¸ŽZ
- if(sc_data[SC_TWOHANDQUICKEN].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // 2HQ
- aspd_rate -= 30;
- //ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…Žg—pŽž‚Ńc[ƒnƒ“ƒhƒNƒCƒbƒPƒ“‚Å‚àƒNƒ@ƒOƒ}ƒCƒA‚Å‚àŽ„‚ð–Y‚ê‚È‚¢‚Åc‚Å‚à‚È‚¢Žž‚Í
- if(sc_data[SC_ADRENALINE].timer != -1 && sc_data[SC_TWOHANDQUICKEN].timer == -1 &&
- sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) { // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…
- //Žg—pŽÒ‚ƃp[ƒeƒBƒƒ“ƒo[‚ÅŠi·‚ªo‚éÝ’è‚Å‚È‚¯‚ê‚Î3Š„Œ¸ŽZ
- if(sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penaly)
- aspd_rate -= 30;
- //‚»‚¤‚Å‚È‚¯‚ê‚Î2.5Š„Œ¸ŽZ
- else
- aspd_rate -= 25;
- }
- //ƒXƒsƒAƒNƒBƒbƒPƒ“Žž‚ÍŒ¸ŽZ
- if(sc_data[SC_SPEARSQUICKEN].timer != -1 && sc_data[SC_ADRENALINE].timer == -1 &&
- sc_data[SC_TWOHANDQUICKEN].timer == -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // ƒXƒsƒAƒNƒBƒbƒPƒ“
- aspd_rate -= sc_data[SC_SPEARSQUICKEN].val2;
- //—[“ú‚̃AƒTƒVƒ“ƒNƒƒXŽž‚ÍŒ¸ŽZ
- if(sc_data[SC_ASSNCROS].timer!=-1 && // —[—z‚̃AƒTƒVƒ“ƒNƒƒX
- sc_data[SC_TWOHANDQUICKEN].timer==-1 && sc_data[SC_ADRENALINE].timer==-1 && sc_data[SC_SPEARSQUICKEN].timer==-1 &&
- sc_data[SC_DONTFORGETME].timer == -1)
- aspd_rate -= 5+sc_data[SC_ASSNCROS].val1+sc_data[SC_ASSNCROS].val2+sc_data[SC_ASSNCROS].val3;
- //Ž„‚ð–Y‚ê‚È‚¢‚ÅcŽž‚͉ÁŽZ
- if(sc_data[SC_DONTFORGETME].timer!=-1) // Ž„‚ð–Y‚ê‚È‚¢‚Å
- aspd_rate += sc_data[SC_DONTFORGETME].val1*3 + sc_data[SC_DONTFORGETME].val2 + (sc_data[SC_DONTFORGETME].val3>>16);
- //‹à„Žž25%‰ÁŽZ
- if(sc_data[SC_STEELBODY].timer!=-1) // ‹à„
- aspd_rate += 25;
- //‘‘¬ƒ|[ƒVƒ‡ƒ“Žg—pŽž‚ÍŒ¸ŽZ
- if( sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1)
- aspd_rate -= sc_data[i].val2;
- //ƒfƒBƒtƒFƒ“ƒ_[Žž‚͉ÁŽZ
- if(sc_data[SC_DEFENDER].timer != -1)
- adelay += (1100 - sc_data[SC_DEFENDER].val1*100);
- }
- 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;
- }
- return 4000;
-}
-int battle_get_amotion(struct block_list *bl)
-{
- nullpo_retr(2000, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->amotion;
- else {
- struct status_change *sc_data=battle_get_sc_data(bl);
- int amotion=2000,aspd_rate = 100,i;
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- amotion = mob_db[((struct mob_data *)bl)->class].amotion;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- amotion = mob_db[((struct pet_data *)bl)->class].amotion;
-
- if(sc_data) {
- if(sc_data[SC_TWOHANDQUICKEN].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // 2HQ
- aspd_rate -= 30;
- if(sc_data[SC_ADRENALINE].timer != -1 && sc_data[SC_TWOHANDQUICKEN].timer == -1 &&
- sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) { // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…
- if(sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penaly)
- aspd_rate -= 30;
- else
- aspd_rate -= 25;
- }
- if(sc_data[SC_SPEARSQUICKEN].timer != -1 && sc_data[SC_ADRENALINE].timer == -1 &&
- sc_data[SC_TWOHANDQUICKEN].timer == -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // ƒXƒsƒAƒNƒBƒbƒPƒ“
- aspd_rate -= sc_data[SC_SPEARSQUICKEN].val2;
- if(sc_data[SC_ASSNCROS].timer!=-1 && // —[—z‚̃AƒTƒVƒ“ƒNƒƒX
- sc_data[SC_TWOHANDQUICKEN].timer==-1 && sc_data[SC_ADRENALINE].timer==-1 && sc_data[SC_SPEARSQUICKEN].timer==-1 &&
- sc_data[SC_DONTFORGETME].timer == -1)
- aspd_rate -= 5+sc_data[SC_ASSNCROS].val1+sc_data[SC_ASSNCROS].val2+sc_data[SC_ASSNCROS].val3;
- if(sc_data[SC_DONTFORGETME].timer!=-1) // Ž„‚ð–Y‚ê‚È‚¢‚Å
- aspd_rate += sc_data[SC_DONTFORGETME].val1*3 + sc_data[SC_DONTFORGETME].val2 + (sc_data[SC_DONTFORGETME].val3>>16);
- if(sc_data[SC_STEELBODY].timer!=-1) // ‹à„
- aspd_rate += 25;
- if( sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1)
- aspd_rate -= sc_data[i].val2;
- if(sc_data[SC_DEFENDER].timer != -1)
- amotion += (550 - sc_data[SC_DEFENDER].val1*50);
- }
- 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 battle_get_dmotion(struct block_list *bl)
-{
- int ret;
- struct status_change *sc_data;
-
- nullpo_retr(0, bl);
- sc_data = battle_get_sc_data(bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl){
- ret=mob_db[((struct mob_data *)bl)->class].dmotion;
- if(battle_config.monster_damage_delay_rate != 100)
- ret = ret*battle_config.monster_damage_delay_rate/400;
- }
- else if(bl->type==BL_PC && (struct map_session_data *)bl){
- ret=((struct map_session_data *)bl)->dmotion;
- if(battle_config.pc_damage_delay_rate != 100)
- ret = ret*battle_config.pc_damage_delay_rate/400;
- }
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- ret=mob_db[((struct pet_data *)bl)->class].dmotion;
- else
- return 2000;
-
- if((sc_data && (sc_data[SC_ENDURE].timer!=-1 || sc_data[SC_BERSERK].timer!=-1)) ||
- (bl->type == BL_PC && ((struct map_session_data *)bl)->special_state.infinite_endure))
- ret=0;
-
- return ret;
-}
-int battle_get_element(struct block_list *bl)
-{
- int ret = 20;
- struct status_change *sc_data;
-
- nullpo_retr(ret, bl);
- sc_data = battle_get_sc_data(bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl) // 10‚̈ÊLv*2A‚P‚̈ʑ®«
- ret=((struct mob_data *)bl)->def_ele;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- ret=20+((struct map_session_data *)bl)->def_ele; // –hŒä‘®«Lv1
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- ret = mob_db[((struct pet_data *)bl)->class].element;
-
- if(sc_data) {
- if( sc_data[SC_BENEDICTIO].timer!=-1 ) // ¹‘Ì~•Ÿ
- ret=26;
- if( sc_data[SC_FREEZE].timer!=-1 ) // “€Œ‹
- ret=21;
- if( sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
- ret=22;
- }
-
- return ret;
-}
-int battle_get_attack_element(struct block_list *bl)
-{
- int ret = 0;
- struct status_change *sc_data=battle_get_sc_data(bl);
-
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- ret=0;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- ret=((struct map_session_data *)bl)->atk_ele;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- ret=0;
-
- if(sc_data) {
- if( sc_data[SC_FROSTWEAPON].timer!=-1) // ƒtƒƒXƒgƒEƒFƒ|ƒ“
- ret=1;
- if( sc_data[SC_SEISMICWEAPON].timer!=-1) // ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“
- ret=2;
- if( sc_data[SC_FLAMELAUNCHER].timer!=-1) // ƒtƒŒ[ƒ€ƒ‰ƒ“ƒ`ƒƒ[
- ret=3;
- if( sc_data[SC_LIGHTNINGLOADER].timer!=-1) // ƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[
- ret=4;
- if( sc_data[SC_ENCPOISON].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“
- ret=5;
- if( sc_data[SC_ASPERSIO].timer!=-1) // ƒAƒXƒyƒ‹ƒVƒI
- ret=6;
- }
-
- return ret;
-}
-int battle_get_attack_element2(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl) {
- int ret = ((struct map_session_data *)bl)->atk_ele_;
- struct status_change *sc_data = ((struct map_session_data *)bl)->sc_data;
-
- if(sc_data) {
- if( sc_data[SC_FROSTWEAPON].timer!=-1) // ƒtƒƒXƒgƒEƒFƒ|ƒ“
- ret=1;
- if( sc_data[SC_SEISMICWEAPON].timer!=-1) // ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“
- ret=2;
- if( sc_data[SC_FLAMELAUNCHER].timer!=-1) // ƒtƒŒ[ƒ€ƒ‰ƒ“ƒ`ƒƒ[
- ret=3;
- if( sc_data[SC_LIGHTNINGLOADER].timer!=-1) // ƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[
- ret=4;
- if( sc_data[SC_ENCPOISON].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“
- ret=5;
- if( sc_data[SC_ASPERSIO].timer!=-1) // ƒAƒXƒyƒ‹ƒVƒI
- ret=6;
- }
- return ret;
- }
- return 0;
-}
-int battle_get_party_id(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->status.party_id;
- else if(bl->type==BL_MOB && (struct mob_data *)bl){
- struct mob_data *md=(struct mob_data *)bl;
- if( md->master_id>0 )
- return -md->master_id;
- return -md->bl.id;
- }
- else if(bl->type==BL_SKILL && (struct skill_unit *)bl)
- return ((struct skill_unit *)bl)->group->party_id;
- else
- return 0;
-}
-int battle_get_guild_id(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data *)bl)->status.guild_id;
- else if(bl->type==BL_MOB && (struct mob_data *)bl)
- return ((struct mob_data *)bl)->class;
- else if(bl->type==BL_SKILL && (struct skill_unit *)bl)
- return ((struct skill_unit *)bl)->group->guild_id;
- else
- return 0;
-}
-int battle_get_race(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return mob_db[((struct mob_data *)bl)->class].race;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return 7;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- return mob_db[((struct pet_data *)bl)->class].race;
- else
- return 0;
-}
-int battle_get_size(struct block_list *bl)
-{
- nullpo_retr(1, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return mob_db[((struct mob_data *)bl)->class].size;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return 1;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- return mob_db[((struct pet_data *)bl)->class].size;
- else
- return 1;
-}
-int battle_get_mode(struct block_list *bl)
-{
- nullpo_retr(0x01, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return mob_db[((struct mob_data *)bl)->class].mode;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- return mob_db[((struct pet_data *)bl)->class].mode;
- else
- return 0x01; // ‚Æ‚è‚ ‚¦‚¸“®‚­‚Æ‚¢‚¤‚±‚Æ‚Å1
-}
-
-int battle_get_mexp(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return mob_db[((struct mob_data *)bl)->class].mexp;
- else if(bl->type==BL_PET && (struct pet_data *)bl)
- return mob_db[((struct pet_data *)bl)->class].mexp;
- else
- return 0;
-}
-
-// StatusChangeŒn‚ÌŠ“¾
-struct status_change *battle_get_sc_data(struct block_list *bl)
-{
- nullpo_retr(NULL, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return ((struct mob_data*)bl)->sc_data;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return ((struct map_session_data*)bl)->sc_data;
- return NULL;
-}
-short *battle_get_sc_count(struct block_list *bl)
-{
- nullpo_retr(NULL, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return &((struct mob_data*)bl)->sc_count;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return &((struct map_session_data*)bl)->sc_count;
- return NULL;
-}
-short *battle_get_opt1(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return &((struct mob_data*)bl)->opt1;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return &((struct map_session_data*)bl)->opt1;
- else if(bl->type==BL_NPC && (struct npc_data *)bl)
- return &((struct npc_data*)bl)->opt1;
- return 0;
-}
-short *battle_get_opt2(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return &((struct mob_data*)bl)->opt2;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return &((struct map_session_data*)bl)->opt2;
- else if(bl->type==BL_NPC && (struct npc_data *)bl)
- return &((struct npc_data*)bl)->opt2;
- return 0;
-}
-short *battle_get_opt3(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return &((struct mob_data*)bl)->opt3;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return &((struct map_session_data*)bl)->opt3;
- else if(bl->type==BL_NPC && (struct npc_data *)bl)
- return &((struct npc_data*)bl)->opt3;
- return 0;
-}
-short *battle_get_option(struct block_list *bl)
-{
- nullpo_retr(0, bl);
- if(bl->type==BL_MOB && (struct mob_data *)bl)
- return &((struct mob_data*)bl)->option;
- else if(bl->type==BL_PC && (struct map_session_data *)bl)
- return &((struct map_session_data*)bl)->status.option;
- else if(bl->type==BL_NPC && (struct npc_data *)bl)
- return &((struct npc_data*)bl)->option;
- return 0;
-}
-
-//-------------------------------------------------------------------
// ƒ_ƒ[ƒW‚Ì’x‰„
struct battle_delay_damage_ {
- struct block_list *src,*target;
+ struct block_list *src;
+ int target;
int damage;
int flag;
};
int battle_delay_damage_sub(int tid,unsigned int tick,int id,int data)
{
struct battle_delay_damage_ *dat=(struct battle_delay_damage_ *)data;
- if( dat && map_id2bl(id)==dat->src && dat->target->prev!=NULL)
- battle_damage(dat->src,dat->target,dat->damage,dat->flag);
- free(dat);
+ struct block_list *target=map_id2bl(dat->target);
+ if( dat && map_id2bl(id)==dat->src && target && target->prev!=NULL)
+ battle_damage(dat->src,target,dat->damage,dat->flag);
+ aFree(dat);
return 0;
}
int battle_delay_damage(unsigned int tick,struct block_list *src,struct block_list *target,int damage,int flag)
@@ -1319,7 +82,7 @@ int battle_delay_damage(unsigned int tick,struct block_list *src,struct block_li
dat->src=src;
- dat->target=target;
+ dat->target=target->id;
dat->damage=damage;
dat->flag=flag;
add_timer(tick,battle_delay_damage_sub,src->id,(int)dat);
@@ -1330,7 +93,7 @@ int battle_delay_damage(unsigned int tick,struct block_list *src,struct block_li
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=battle_get_sc_data(target);
+ struct status_change *sc_data=status_get_sc_data(target);
short *sc_count;
int i;
@@ -1353,14 +116,14 @@ int battle_damage(struct block_list *bl,struct block_list *target,int damage,int
if(damage<0)
return battle_heal(bl,target,-damage,0,flag);
- if(!flag && (sc_count=battle_get_sc_count(target))!=NULL && *sc_count>0){
+ if(!flag && (sc_count=status_get_sc_count(target))!=NULL && *sc_count>0){
// “€Œ‹AΉ»A‡–°‚ðÁ‹Ž
if(sc_data[SC_FREEZE].timer!=-1)
- skill_status_change_end(target,SC_FREEZE,-1);
+ status_change_end(target,SC_FREEZE,-1);
if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
- skill_status_change_end(target,SC_STONE,-1);
+ status_change_end(target,SC_STONE,-1);
if(sc_data[SC_SLEEP].timer!=-1)
- skill_status_change_end(target,SC_SLEEP,-1);
+ status_change_end(target,SC_SLEEP,-1);
}
if(target->type==BL_MOB){ // MOB
@@ -1479,29 +242,35 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
struct mob_data *md=NULL;
struct status_change *sc_data,*sc;
short *sc_count;
- int class;
+ int class_;
nullpo_retr(0, bl);
- class = battle_get_class(bl);
+ class_ = status_get_class(bl);
if(bl->type==BL_MOB) md=(struct mob_data *)bl;
else sd=(struct map_session_data *)bl;
- sc_data=battle_get_sc_data(bl);
- sc_count=battle_get_sc_count(bl);
+ sc_data=status_get_sc_data(bl);
+ sc_count=status_get_sc_count(bl);
if(sc_count!=NULL && *sc_count>0){
-
- if(sc_data[SC_SAFETYWALL].timer!=-1 && damage>0 && flag&BF_WEAPON && flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK){
+ if (sc_data[SC_SAFETYWALL].timer!=-1 && damage>0 && flag&BF_WEAPON &&
+ flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK) {
// ƒZ[ƒtƒeƒBƒEƒH[ƒ‹
- struct skill_unit *unit=(struct skill_unit*)sc_data[SC_SAFETYWALL].val2;
- if( unit && unit->alive && (--unit->group->val2)<=0 )
- skill_delunit(unit);
- skill_unit_move(bl,gettick(),1); // d‚ËŠ|‚¯ƒ`ƒFƒbƒN
- damage=0;
+ struct skill_unit *unit;
+ unit = (struct skill_unit *)sc_data[SC_SAFETYWALL].val2;
+ if (unit) {
+ if (unit->group && (--unit->group->val2)<=0)
+ skill_delunit(unit);
+ damage=0;
+ } else {
+ status_change_end(bl,SC_SAFETYWALL,-1);
+ }
}
- if(sc_data[SC_PNEUMA].timer!=-1 && damage>0 && ((flag&BF_WEAPON && flag&BF_LONG && skill_num != NPC_GUIDEDATTACK) ||
- (flag&BF_MISC && (skill_num == HT_BLITZBEAT || skill_num == SN_FALCONASSAULT)))){ // [DracoRPG]
+ if(sc_data[SC_PNEUMA].timer!=-1 && damage>0 &&
+ ((flag&BF_WEAPON && flag&BF_LONG && skill_num != NPC_GUIDEDATTACK) ||
+ (flag&BF_MISC && (skill_num == HT_BLITZBEAT || skill_num == SN_FALCONASSAULT)) ||
+ (flag&BF_MAGIC && skill_num == ASC_BREAKER))){ // [DracoRPG]
// ƒjƒ…[ƒ}
damage=0;
}
@@ -1514,29 +283,35 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if(sc_data[SC_AETERNA].timer!=-1 && damage>0){ // ƒŒƒbƒNƒXƒG[ƒeƒ‹ƒi
damage<<=1;
- skill_status_change_end( bl,SC_AETERNA,-1 );
+ status_change_end( bl,SC_AETERNA,-1 );
}
//‘®«ê‚̃_ƒ[ƒW‘‰Á
if(sc_data[SC_VOLCANO].timer!=-1){ // ƒ{ƒ‹ƒP[ƒm
if(flag&BF_SKILL && skill_get_pl(skill_num)==3)
- damage += damage*sc_data[SC_VOLCANO].val4/100;
- else if(!flag&BF_SKILL && battle_get_attack_element(bl)==3)
- damage += damage*sc_data[SC_VOLCANO].val4/100;
+ //damage += damage*sc_data[SC_VOLCANO].val4/100;
+ damage += damage * enchant_eff[sc_data[SC_VOLCANO].val1-1] /100;
+ else if(!flag&BF_SKILL && status_get_attack_element(bl)==3)
+ //damage += damage*sc_data[SC_VOLCANO].val4/100;
+ damage += damage * enchant_eff[sc_data[SC_VOLCANO].val1-1] /100;
}
if(sc_data[SC_VIOLENTGALE].timer!=-1){ // ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹
if(flag&BF_SKILL && skill_get_pl(skill_num)==4)
- damage += damage*sc_data[SC_VIOLENTGALE].val4/100;
- else if(!flag&BF_SKILL && battle_get_attack_element(bl)==4)
- damage += damage*sc_data[SC_VIOLENTGALE].val4/100;
+ //damage += damage*sc_data[SC_VIOLENTGALE].val4/100;
+ damage += damage * enchant_eff[sc_data[SC_VIOLENTGALE].val1-1] /100;
+ else if(!flag&BF_SKILL && status_get_attack_element(bl)==4)
+ //damage += damage*sc_data[SC_VIOLENTGALE].val4/100;
+ damage += damage * enchant_eff[sc_data[SC_VIOLENTGALE].val1-1] /100;
}
if(sc_data[SC_DELUGE].timer!=-1){ // ƒfƒŠƒ…[ƒW
if(flag&BF_SKILL && skill_get_pl(skill_num)==1)
- damage += damage*sc_data[SC_DELUGE].val4/100;
- else if(!flag&BF_SKILL && battle_get_attack_element(bl)==1)
- damage += damage*sc_data[SC_DELUGE].val4/100;
+ //damage += damage*sc_data[SC_DELUGE].val4/100;
+ damage += damage * enchant_eff[sc_data[SC_DELUGE].val1-1] /100;
+ else if(!flag&BF_SKILL && status_get_attack_element(bl)==1)
+ //damage += damage*sc_data[SC_DELUGE].val4/100;
+ damage += damage * enchant_eff[sc_data[SC_DELUGE].val1-1] /100;
}
if(sc_data[SC_ENERGYCOAT].timer!=-1 && damage>0 && flag&BF_WEAPON){ // ƒGƒiƒW[ƒR[ƒg
@@ -1549,7 +324,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
clif_updatestatus(sd,SP_SP);
}
if(sd->status.sp<=0)
- skill_status_change_end( bl,SC_ENERGYCOAT,-1 );
+ status_change_end( bl,SC_ENERGYCOAT,-1 );
}
else
damage -= damage * (sc_data[SC_ENERGYCOAT].val1 * 6) / 100;
@@ -1563,7 +338,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
else damage=-sc->val2;
}
if((--sc->val3)<=0 || (sc->val2<=0) || skill_num == AL_HOLYLIGHT)
- skill_status_change_end(bl, SC_KYRIE, -1);
+ status_change_end(bl, SC_KYRIE, -1);
}
if(sc_data[SC_BASILICA].timer!=-1 && damage > 0){
@@ -1577,12 +352,21 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if(sc_data[SC_AUTOGUARD].timer != -1 && damage > 0 && flag&BF_WEAPON) {
if(rand()%100 < sc_data[SC_AUTOGUARD].val2) {
+ int delay;
+
damage = 0;
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() + 300;
+ sd->canmove_tick = gettick() + delay;
else if(md)
- md->canmove_tick = gettick() + 300;
+ md->canmove_tick = gettick() + delay;
}
}
// -- moonsoul (chance to block attacks with new Lord Knight skill parrying)
@@ -1595,39 +379,43 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
}
// ƒŠƒWƒFƒNƒgƒ\[ƒh
if(sc_data[SC_REJECTSWORD].timer!=-1 && damage > 0 && flag&BF_WEAPON &&
- ((src->type==BL_PC && ((struct map_session_data *)src)->status.weapon == (1 || 2 || 3)) || src->type==BL_MOB )){
+ // 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)){ //”½ŽËŠm—¦‚Í15*Lv
damage = damage*50/100;
+ clif_damage(bl,src,gettick(),0,0,damage,0,0,0);
battle_damage(bl,src,damage,0);
//ƒ_ƒ[ƒW‚ð—^‚¦‚½‚Ì‚Í—Ç‚¢‚ñ‚¾‚ªA‚±‚±‚©‚ç‚Ç‚¤‚µ‚Ä•\Ž¦‚·‚é‚ñ‚¾‚©‚í‚©‚ñ‚Ë‚¥
//ƒGƒtƒFƒNƒg‚à‚±‚ê‚Å‚¢‚¢‚Ì‚©‚í‚©‚ñ‚Ë‚¥
clif_skill_nodamage(bl,bl,ST_REJECTSWORD,sc_data[SC_REJECTSWORD].val1,1);
if((--sc_data[SC_REJECTSWORD].val2)<=0)
- skill_status_change_end(bl, SC_REJECTSWORD, -1);
+ status_change_end(bl, SC_REJECTSWORD, -1);
}
}
if(sc_data[SC_SPIDERWEB].timer!=-1 && damage > 0) // [Celest]
if ((flag&BF_SKILL && skill_get_pl(skill_num)==3) ||
- (!flag&BF_SKILL && battle_get_attack_element(src)==3)) {
+ (!flag&BF_SKILL && status_get_attack_element(src)==3)) {
damage<<=1;
- skill_status_change_end(bl, SC_SPIDERWEB, -1);
+ status_change_end(bl, SC_SPIDERWEB, -1);
}
-
+
if(sc_data[SC_FOGWALL].timer != -1 && flag&BF_MAGIC)
- if(rand()%100 < sc_data[SC_FOGWALL].val2)
+ if(rand()%100 < 75)
damage = 0;
}
- if(class == 1288 || class == 1287 || class == 1286 || class == 1285) {
-// if(class == 1288) {
- if(class == 1288 && flag&BF_SKILL)
+ if(class_ == 1288 || class_ == 1287 || class_ == 1286 || class_ == 1285) {
+// if(class_ == 1288) {
+ if(class_ == 1288 && (flag&BF_SKILL || skill_num == ASC_BREAKER || skill_num == PA_SACRIFICE))
damage=0;
if(src->type == BL_PC) {
struct guild *g=guild_search(((struct map_session_data *)src)->status.guild_id);
struct guild_castle *gc=guild_mapname2gc(map[bl->m].name);
if(!((struct map_session_data *)src)->status.guild_id)
damage=0;
- if(gc && agit_flag==0 && class != 1288) // guardians cannot be damaged during non-woe [Valaris]
+ if(gc && agit_flag==0 && class_ != 1288) // guardians cannot be damaged during non-woe [Valaris]
damage=0; // end woe check [Valaris]
if(g == NULL)
damage=0;//ƒMƒ‹ƒh–¢‰Á“ü‚È‚çƒ_ƒ[ƒW–³‚µ
@@ -1636,12 +424,18 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
else if(g && guild_checkskill(g,GD_APPROVAL) <= 0)
damage=0;//³‹KƒMƒ‹ƒh³”F‚ª‚È‚¢‚ƃ_ƒ[ƒW–³‚µ
else if (battle_config.guild_max_castles != 0 && guild_checkcastles(g)>=battle_config.guild_max_castles)
- damage = 0; // [MouseJstr]
+ damage = 0; // [MouseJstr]
+ else if (g && gc && guild_check_alliance(gc->guild_id, g->guild_id, 0) == 1)
+ return 0;
}
else damage = 0;
}
if(map[bl->m].flag.gvg && damage > 0) { //GvG
+ if(bl->type == BL_MOB){ //defense‚ª‚ ‚ê‚΃_ƒ[ƒW‚ªŒ¸‚é‚炵‚¢H
+ struct guild_castle *gc=guild_mapname2gc(map[bl->m].name);
+ if (gc) damage -= damage*(gc->defense/100)*(battle_config.castle_defense_rate/100);
+ }
if(flag&BF_WEAPON) {
if(flag&BF_SHORT)
damage=damage*battle_config.gvg_short_damage_rate/100;
@@ -1671,20 +465,47 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
}
/*==========================================
+ * HP/SP‹zŽû‚ÌŒvŽZ
+ *------------------------------------------
+ */
+int battle_calc_drain(int damage, int rate, int per, int val)
+{
+ int diff = 0;
+
+ if (damage <= 0 || rate <= 0)
+ return 0;
+
+ if (per && rand()%100 < rate) {
+ diff = (damage * per) / 100;
+ if (diff == 0) {
+ if (per > 0)
+ diff = 1;
+ else
+ diff = -1;
+ }
+ }
+
+ if (val && rand()%100 < rate) {
+ 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=battle_get_race(target);
+ int race=status_get_race(target);
int weapon;
damage = 0;
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,battle_get_elem_type(target)) || race==6) )
+ 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);
@@ -1698,7 +519,7 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int
weapon = sd->weapontype2;
switch(weapon)
{
- case 0x01: // ’ZŒ• (Updated By AppleGirl)
+ case 0x01: // ’ZŒ• Knife
case 0x02: // 1HS
{
// Œ•C—û(+4 ` +40) •ÐŽèŒ• ’ZŒ•ŠÜ‚Þ
@@ -1716,16 +537,6 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int
break;
}
case 0x04: // 1HL
- {
- // ‘„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 0x05: // 2HL
{
// ‘„C—û(+4 ` +40,+5 ` +50) ‘„
@@ -1737,13 +548,7 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int
}
break;
}
- case 0x06: // •ÐŽè•€
- {
- if((skill = pc_checkskill(sd,AM_AXEMASTERY)) > 0) {
- damage += (skill * 3);
- }
- break;
- }
+ case 0x06: // •ÐŽè•€
case 0x07: // Axe by Tato
{
if((skill = pc_checkskill(sd,AM_AXEMASTERY)) > 0) {
@@ -1765,7 +570,7 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int
break;
case 0x0b: // ‹|
break;
- case 0x00: // ‘fŽè
+ case 0x00: // ‘fŽè Bare Hands
case 0x0c: // Knuckles
{
// “SŒ(+3 ` +30) ‘fŽè,ƒiƒbƒNƒ‹
@@ -1819,14 +624,16 @@ static struct Damage battle_calc_pet_weapon_attack(
struct mob_data *tmd=NULL;
int hitrate,flee,cri = 0,atkmin,atkmax;
int luk,target_count = 1;
- int def1 = battle_get_def(target);
- int def2 = battle_get_def2(target);
- int t_vit = battle_get_vit(target);
+ int def1 = status_get_def(target);
+ int def2 = status_get_def2(target);
+ int t_vit = status_get_vit(target);
struct Damage wd;
int damage,damage2=0,type,div_,blewcount=skill_get_blewcount(skill_num,skill_lv);
int flag,dmg_lv=0;
int t_mode=0,t_race=0,t_size=1,s_race=0,s_ele=0;
struct status_change *t_sc_data;
+ int div_flag=0; // 0: total damage is to be divided by div_
+ // 1: damage is distributed,and has to be multiplied by div_ [celest]
//return‘O‚̈—‚ª‚ ‚é‚Ì‚Åî•ño—Í•”‚Ì‚Ý•ÏX
if( target == NULL || pd == NULL ){ //src‚Í“à—e‚É’¼ÚG‚ê‚Ä‚¢‚È‚¢‚̂ŃXƒ‹[‚µ‚Ä‚Ý‚é
@@ -1835,8 +642,8 @@ static struct Damage battle_calc_pet_weapon_attack(
return wd;
}
- s_race=battle_get_race(src);
- s_ele=battle_get_attack_element(src);
+ s_race=status_get_race(src);
+ s_ele=status_get_attack_element(src);
// ƒ^[ƒQƒbƒg
if(target->type == BL_MOB)
@@ -1845,61 +652,70 @@ static struct Damage battle_calc_pet_weapon_attack(
memset(&wd,0,sizeof(wd));
return wd;
}
- t_race=battle_get_race( target );
- t_size=battle_get_size( target );
- t_mode=battle_get_mode( target );
- t_sc_data=battle_get_sc_data( target );
+ t_race=status_get_race( target );
+ t_size=status_get_size( target );
+ t_mode=status_get_mode( target );
+ t_sc_data=status_get_sc_data( target );
flag=BF_SHORT|BF_WEAPON|BF_NORMAL; // UŒ‚‚ÌŽí—Þ‚ÌÝ’è
// ‰ñ”𗦌vŽZA‰ñ”ð”»’è‚ÍŒã‚Å
- flee = battle_get_flee(target);
- if(battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0)
- target_count += battle_counttargeted(target,src,battle_config.agi_penaly_count_lv);
- if(battle_config.agi_penaly_type > 0) {
- if(target_count >= battle_config.agi_penaly_count) {
- if(battle_config.agi_penaly_type == 1)
- flee = (flee * (100 - (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num))/100;
- else if(battle_config.agi_penaly_type == 2)
- flee -= (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num;
+ flee = status_get_flee(target);
+ if(battle_config.agi_penalty_type > 0 || battle_config.vit_penalty_type > 0)
+ target_count += battle_counttargeted(target,src,battle_config.agi_penalty_count_lv);
+ if(battle_config.agi_penalty_type > 0) {
+ 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 if(battle_config.agi_penalty_type == 2)
+ flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
if(flee < 1) flee = 1;
}
}
- hitrate=battle_get_hit(src) - flee + 80;
+ hitrate=status_get_hit(src) - flee + 80;
type=0; // normal
- div_ = 1; // single attack
+ if (skill_num > 0) {
+ div_ = skill_get_num(skill_num,skill_lv);
+ if (div_ < 1) div_ = 1; //Avoid the rare case where the db says div_ is 0 and below
+ }
+ else div_ = 1; // single attack
- luk=battle_get_luk(src);
+ luk=status_get_luk(src);
if(battle_config.pet_str)
- damage = battle_get_baseatk(src);
+ damage = status_get_baseatk(src);
else
damage = 0;
if(skill_num==HW_MAGICCRASHER){ /* ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ[‚ÍMATK‚ʼn£‚é */
- atkmin = battle_get_matk1(src);
- atkmax = battle_get_matk2(src);
+ atkmin = status_get_matk1(src);
+ atkmax = status_get_matk2(src);
}else{
- atkmin = battle_get_atk(src);
- atkmax = battle_get_atk2(src);
+ atkmin = status_get_atk(src);
+ atkmax = status_get_atk2(src);
}
- if(mob_db[pd->class].range>3 )
+ if(mob_db[pd->class_].range>3 )
flag=(flag&~BF_RANGEMASK)|BF_LONG;
if(atkmin > atkmax) atkmin = atkmax;
- cri = battle_get_critical(src);
- cri -= battle_get_luk(target) * 2; // luk/5*10 => target_luk*2 not target_luk*3
+ cri = status_get_critical(src);
+ cri -= status_get_luk(target) * 2; // luk/5*10 => target_luk*2 not target_luk*3
if(battle_config.enemy_critical_rate != 100) {
cri = cri*battle_config.enemy_critical_rate/100;
if(cri < 1)
cri = 1;
}
- if(t_sc_data != NULL && t_sc_data[SC_SLEEP].timer!=-1 )
- cri <<=1;
+ 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]
+ cri = 1000;
+ }
- if(skill_num == 0 && skill_lv >= 0 && battle_config.enemy_critical && (rand() % 1000) < cri)
+ if(skill_num == 0 && battle_config.enemy_critical && (rand() % 1000) < cri)
{
damage += atkmax;
type = 0x0a;
@@ -1930,14 +746,14 @@ static struct Damage battle_calc_pet_weapon_attack(
hitrate = (hitrate*(100+5*skill_lv))/100;
break;
case SM_MAGNUM: // ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN
- damage = damage*(5*skill_lv +(wflag)?65:115 )/100;
+ damage = damage*(wflag > 1 ? 5*skill_lv+115 : 30*skill_lv+100)/100;
+ hitrate = (hitrate*(100+10*skill_lv))/100;
break;
case MC_MAMMONITE: // ƒƒ}[ƒiƒCƒg
damage = damage*(100+ 50*skill_lv)/100;
break;
case AC_DOUBLE: // ƒ_ƒuƒ‹ƒXƒgƒŒƒCƒtƒBƒ“ƒO
damage = damage*(180+ 20*skill_lv)/100;
- div_=2;
flag=(flag&~BF_RANGEMASK)|BF_LONG;
break;
case AC_SHOWER: // ƒAƒ[ƒVƒƒƒ[
@@ -1952,7 +768,7 @@ static struct Damage battle_calc_pet_weapon_attack(
damage = damage*(100+ 10*skill_lv)/100;
hitrate = hitrate*(100+5*skill_lv)/100;
div_=t_size+1;
- damage*=div_;
+ div_flag = 1;
break;
case KN_SPEARSTAB: // ƒXƒsƒAƒXƒ^ƒu
damage = damage*(100+ 15*skill_lv)/100;
@@ -1970,14 +786,13 @@ static struct Damage battle_calc_pet_weapon_attack(
if(skill_lv>9 && wflag==2) damage2+=damage/4;
if(skill_lv>9 && wflag==3) damage2+=damage/2;
damage +=damage2;
- blewcount=0;
break;
case KN_BOWLINGBASH: // ƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…
damage = damage*(100+ 50*skill_lv)/100;
blewcount=0;
break;
case AS_GRIMTOOTH:
- damage = damage*(100+ 20*skill_lv)/100;
+ damage = damage*(100+ 20*skill_lv)/100;
break;
case AS_POISONREACT: // celest
s_ele = 0;
@@ -1985,7 +800,6 @@ static struct Damage battle_calc_pet_weapon_attack(
break;
case AS_SONICBLOW: // ƒ\ƒjƒbƒNƒuƒƒE
damage = damage*(300+ 50*skill_lv)/100;
- div_=8;
break;
case TF_SPRINKLESAND: // »‚Ü‚«
damage = damage*125/100;
@@ -1995,8 +809,7 @@ static struct Damage battle_calc_pet_weapon_attack(
break;
// ˆÈ‰ºMOB
case NPC_COMBOATTACK: // ‘½’iUŒ‚
- div_=skill_get_num(skill_num,skill_lv);
- damage *= div_;
+ div_flag = 1;
break;
case NPC_RANDOMATTACK: // ƒ‰ƒ“ƒ_ƒ€ATKUŒ‚
damage = damage*(50+rand()%150)/100;
@@ -2009,6 +822,7 @@ static struct Damage battle_calc_pet_weapon_attack(
case NPC_POISONATTACK:
case NPC_HOLYATTACK:
case NPC_DARKNESSATTACK:
+ case NPC_UNDEADATTACK:
case NPC_TELEKINESISATTACK:
div_= pd->skillduration; // [Valaris]
break;
@@ -2043,27 +857,27 @@ static struct Damage battle_calc_pet_weapon_attack(
break;
case CR_HOLYCROSS: // ƒz[ƒŠ[ƒNƒƒX
damage = damage*(100+ 35*skill_lv)/100;
- div_=2;
break;
case CR_GRANDCROSS:
hitrate= 1000000;
break;
case AM_DEMONSTRATION: // ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“
+ hitrate= 1000000;
damage = damage*(100+ 20*skill_lv)/100;
damage2 = damage2*(100+ 20*skill_lv)/100;
break;
case AM_ACIDTERROR: // ƒAƒVƒbƒhƒeƒ‰[
+ hitrate = 1000000;
damage = damage*(100+ 40*skill_lv)/100;
damage2 = damage2*(100+ 40*skill_lv)/100;
break;
case MO_FINGEROFFENSIVE: //Žw’e
damage = damage * (125 + 25 * skill_lv) / 100;
- div_ = 1;
flag=(flag&~BF_RANGEMASK)|BF_LONG; //orn
break;
case MO_INVESTIGATE: // ”­ ™¤
if(def1 < 1000000)
- damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/100;
+ damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/50;
hitrate = 1000000;
s_ele = 0;
break;
@@ -2074,32 +888,30 @@ static struct Damage battle_calc_pet_weapon_attack(
break;
case MO_CHAINCOMBO: // ˜A‘Ŷ
damage = damage*(150+ 50*skill_lv)/100;
- div_=4;
break;
case MO_COMBOFINISH: // –Ò—´Œ
damage = damage*(240+ 60*skill_lv)/100;
break;
case DC_THROWARROW: // –‚¿
- damage = damage*(100+ 50 * skill_lv)/100;
+ damage = damage*(60+ 40 * skill_lv)/100;
flag=(flag&~BF_RANGEMASK)|BF_LONG;
break;
case BA_MUSICALSTRIKE: // ƒ~ƒ…[ƒWƒJƒ‹ƒXƒgƒ‰ƒCƒN
- damage = damage*(100+ 50 * skill_lv)/100;
+ damage = damage*(60+ 40 * skill_lv)/100;
flag=(flag&~BF_RANGEMASK)|BF_LONG;
break;
case CH_TIGERFIST: // •šŒÕŒ
- damage = damage*(100+ 60*skill_lv)/100;
+ damage = damage*(40+ 100*skill_lv)/100;
break;
case CH_CHAINCRUSH: // ˜A’Œ•öŒ‚
- damage = damage*(100+ 60*skill_lv)/100;
- div_=skill_get_num(skill_num,skill_lv);
+ damage = damage*(400+ 100*skill_lv)/100;
break;
case CH_PALMSTRIKE: // –ÒŒÕd”hŽR
- damage = damage*(50+ 100*skill_lv)/100;
+ damage = damage*(200+ 100*skill_lv)/100;
break;
case LK_SPIRALPIERCE: /* ƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒX */
damage = damage*(100+ 50*skill_lv)/100; //‘‰Á—Ê‚ª•ª‚©‚ç‚È‚¢‚Ì‚Å“K“–‚É
- div_=5;
+ flag=(flag&~BF_RANGEMASK)|BF_LONG;
if(target->type == BL_PC)
((struct map_session_data *)target)->canmove_tick = gettick() + 1000;
else if(target->type == BL_MOB)
@@ -2119,31 +931,35 @@ static struct Damage battle_calc_pet_weapon_attack(
break;
case CG_ARROWVULCAN: /* ƒAƒ[ƒoƒ‹ƒJƒ“ */
damage = damage*(200+100*skill_lv)/100;
- div_=9;
break;
case AS_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[ */
damage = damage*(200+20*skill_lv)/100;
+ hitrate = 1000000;
break;
}
+ if (div_flag && div_ > 1) { // [Skotlex]
+ damage *= div_;
+ damage2 *= div_;
+ }
}
if( skill_num!=NPC_CRITICALSLASH ){
// ‘Î Û‚Ì–hŒä—Í‚É‚æ‚éƒ_ƒ[ƒW‚ÌŒ¸­
// ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“i‚±‚±‚Å‚¢‚¢‚Ì‚©‚ÈHj
- if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && def1 < 1000000 ) { //DEF, VIT–³Ž‹
+ if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && skill_num != AM_ACIDTERROR && def1 < 1000000 ) { //DEF, VIT–³Ž‹
int t_def;
- target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penaly_count_lv);
- if(battle_config.vit_penaly_type > 0) {
- if(target_count >= battle_config.vit_penaly_count) {
- if(battle_config.vit_penaly_type == 1) {
- def1 = (def1 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
- def2 = (def2 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
- t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
+ target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penalty_count_lv);
+ if(battle_config.vit_penalty_type > 0) {
+ 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;
+ t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
}
- else if(battle_config.vit_penaly_type == 2) {
- def1 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
- def2 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
- t_vit -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
+ else if(battle_config.vit_penalty_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;
+ t_vit -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
}
if(def1 < 0) def1 = 0;
if(def2 < 1) def2 = 1;
@@ -2168,10 +984,10 @@ static struct Damage battle_calc_pet_weapon_attack(
// ‰ñ”ðC³
if( hitrate < 1000000 && t_sc_data ) { // •K’†UŒ‚
if(t_sc_data[SC_FOGWALL].timer != -1 && flag&BF_LONG)
- hitrate -= 50;
+ hitrate -= 75;
if (t_sc_data[SC_SLEEP].timer!=-1 || // ‡–°‚Í•K’†
t_sc_data[SC_STAN].timer!=-1 || // ƒXƒ^ƒ“‚Í•K’†
- t_sc_data[SC_FREEZE].timer!=-1 ||
+ t_sc_data[SC_FREEZE].timer!=-1 ||
(t_sc_data[SC_STONE].timer!=-1 && t_sc_data[SC_STONE].val2==0)) // “€Œ‹‚Í•K’†
hitrate = 1000000;
}
@@ -2184,13 +1000,13 @@ static struct Damage battle_calc_pet_weapon_attack(
dmg_lv = ATK_DEF;
}
-
+
if(t_sc_data) {
int cardfix=100;
if(t_sc_data[SC_DEFENDER].timer != -1 && flag&BF_LONG)
cardfix=cardfix*(100-t_sc_data[SC_DEFENDER].val2)/100;
if(t_sc_data[SC_FOGWALL].timer != -1 && flag&BF_LONG)
- cardfix=cardfix*(100-t_sc_data[SC_FOGWALL].val2)/100;
+ cardfix=cardfix*50/100;
if(cardfix != 100)
damage=damage*cardfix/100;
}
@@ -2198,22 +1014,22 @@ static struct Damage battle_calc_pet_weapon_attack(
// ‘® «‚Ì“K—p
if(skill_num != 0 || s_ele != 0 || !battle_config.pet_attack_attr_none)
- damage=battle_attr_fix(damage, s_ele, battle_get_element(target) );
+ damage=battle_attr_fix(damage, s_ele, status_get_element(target) );
if(skill_num==PA_PRESSURE) /* ƒvƒŒƒbƒVƒƒ[ •K’†? */
damage = 500+300*skill_lv;
// ƒCƒ“ƒxƒiƒ€C³
if(skill_num==TF_POISON){
- damage = battle_attr_fix(damage + 15*skill_lv, s_ele, battle_get_element(target) );
+ damage = battle_attr_fix(damage + 15*skill_lv, s_ele, status_get_element(target) );
}
if(skill_num==MC_CARTREVOLUTION){
- damage = battle_attr_fix(damage, 0, battle_get_element(target) );
+ damage = battle_attr_fix(damage, 0, status_get_element(target) );
}
// Š®‘S‰ñ”ð‚Ì”»’è
if(battle_config.enemy_perfect_flee) {
- if(skill_num == 0 && skill_lv >= 0 && tmd!=NULL && rand()%1000 < battle_get_flee2(target) ){
+ if(skill_num == 0 && tmd!=NULL && rand()%1000 < status_get_flee2(target) ){
damage=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
@@ -2231,10 +1047,10 @@ static struct Damage battle_calc_pet_weapon_attack(
wd.damage2=0;
wd.type=type;
wd.div_=div_;
- wd.amotion=battle_get_amotion(src);
+ wd.amotion=status_get_amotion(src);
if(skill_num == KN_AUTOCOUNTER)
wd.amotion >>= 1;
- wd.dmotion=battle_get_dmotion(target);
+ wd.dmotion=status_get_dmotion(target);
wd.blewcount=blewcount;
wd.flag=flag;
wd.dmg_lv=dmg_lv;
@@ -2249,16 +1065,18 @@ static struct Damage battle_calc_mob_weapon_attack(
struct mob_data* md=(struct mob_data *)src,*tmd=NULL;
int hitrate,flee,cri = 0,atkmin,atkmax;
int luk,target_count = 1;
- int def1 = battle_get_def(target);
- int def2 = battle_get_def2(target);
- int t_vit = battle_get_vit(target);
+ int def1 = status_get_def(target);
+ int def2 = status_get_def2(target);
+ int t_vit = status_get_vit(target);
struct Damage wd;
int damage,damage2=0,type,div_,blewcount=skill_get_blewcount(skill_num,skill_lv);
int flag,skill,ac_flag = 0,dmg_lv = 0;
- int t_mode=0,t_race=0,t_size=1,s_race=0,s_ele=0;
+ int t_mode=0,t_race=0,t_size=1,s_race=0,s_ele=0,s_size=0,s_race2=0;
struct status_change *sc_data,*t_sc_data;
short *sc_count;
short *option, *opt1, *opt2;
+ int div_flag=0; // 0: total damage is to be divided by div_
+ // 1: damage is distributed,and has to be multiplied by div_ [celest]
//return‘O‚̈—‚ª‚ ‚é‚Ì‚Åî•ño—Í•”‚Ì‚Ý•ÏX
if( src == NULL || target == NULL || md == NULL ){
@@ -2267,35 +1085,37 @@ static struct Damage battle_calc_mob_weapon_attack(
return wd;
}
- s_race=battle_get_race(src);
- s_ele=battle_get_attack_element(src);
- sc_data=battle_get_sc_data(src);
- sc_count=battle_get_sc_count(src);
- option=battle_get_option(src);
- opt1=battle_get_opt1(src);
- opt2=battle_get_opt2(src);
+ s_race = status_get_race(src);
+ s_ele = status_get_attack_element(src);
+ s_size = status_get_size(src);
+ sc_data = status_get_sc_data(src);
+ sc_count = status_get_sc_count(src);
+ option = status_get_option(src);
+ opt1 = status_get_opt1(src);
+ opt2 = status_get_opt2(src);
+ s_race2 = status_get_race2(src);
// ƒ^[ƒQƒbƒg
- if(target->type==BL_PC)
- tsd=(struct map_session_data *)target;
- else if(target->type==BL_MOB)
- tmd=(struct mob_data *)target;
- t_race=battle_get_race( target );
- t_size=battle_get_size( target );
- t_mode=battle_get_mode( target );
- t_sc_data=battle_get_sc_data( target );
-
- if((skill_num == 0 || (target->type == BL_PC && battle_config.pc_auto_counter_type&2) ||
- (target->type == BL_MOB && battle_config.monster_auto_counter_type&2)) && skill_lv >= 0) {
+ if(target->type == BL_PC)
+ tsd = (struct map_session_data *)target;
+ else if(target->type == BL_MOB)
+ tmd = (struct mob_data *)target;
+ t_race = status_get_race( target );
+ t_size = status_get_size( target );
+ t_mode = status_get_mode( target );
+ t_sc_data = status_get_sc_data( target );
+
+ if(skill_num == 0 || (target->type == BL_PC && battle_config.pc_auto_counter_type&2) ||
+ (target->type == BL_MOB && battle_config.monster_auto_counter_type&2)) {
if(skill_num != CR_GRANDCROSS && t_sc_data && t_sc_data[SC_AUTOCOUNTER].timer != -1) {
- int dir = map_calc_dir(src,target->x,target->y),t_dir = battle_get_dir(target);
+ int dir = map_calc_dir(src,target->x,target->y),t_dir = status_get_dir(target);
int dist = distance(src->x,src->y,target->x,target->y);
if(dist <= 0 || map_check_dir(dir,t_dir) ) {
memset(&wd,0,sizeof(wd));
t_sc_data[SC_AUTOCOUNTER].val3 = 0;
t_sc_data[SC_AUTOCOUNTER].val4 = 1;
if(sc_data && sc_data[SC_AUTOCOUNTER].timer == -1) {
- int range = battle_get_range(target);
+ int range = status_get_range(target);
if((target->type == BL_PC && ((struct map_session_data *)target)->status.weapon != 11 && dist <= range+1) ||
(target->type == BL_MOB && range <= 3 && dist <= range+1) )
t_sc_data[SC_AUTOCOUNTER].val3 = src->id;
@@ -2312,37 +1132,40 @@ static struct Damage battle_calc_mob_weapon_attack(
flag=BF_SHORT|BF_WEAPON|BF_NORMAL; // UŒ‚‚ÌŽí—Þ‚ÌÝ’è
// ‰ñ”𗦌vŽZA‰ñ”ð”»’è‚ÍŒã‚Å
- flee = battle_get_flee(target);
- if(battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0)
- target_count += battle_counttargeted(target,src,battle_config.agi_penaly_count_lv);
- if(battle_config.agi_penaly_type > 0) {
- if(target_count >= battle_config.agi_penaly_count) {
- if(battle_config.agi_penaly_type == 1)
- flee = (flee * (100 - (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num))/100;
- else if(battle_config.agi_penaly_type == 2)
- flee -= (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num;
+ flee = status_get_flee(target);
+ if(battle_config.agi_penalty_type > 0 || battle_config.vit_penalty_type > 0)
+ target_count += battle_counttargeted(target,src,battle_config.agi_penalty_count_lv);
+ if(battle_config.agi_penalty_type > 0) {
+ 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 if(battle_config.agi_penalty_type == 2)
+ flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
if(flee < 1) flee = 1;
}
}
- hitrate=battle_get_hit(src) - flee + 80;
+ hitrate=status_get_hit(src) - flee + 80;
type=0; // normal
- div_ = 1; // single attack
+ if (skill_num > 0) {
+ div_ = skill_get_num(skill_num,skill_lv);
+ if (div_ < 1) div_ = 1; //Avoid the rare case where the db says div_ is 0 and below
+ } else div_ = 1; // single attack
- luk=battle_get_luk(src);
+ luk=status_get_luk(src);
if(battle_config.enemy_str)
- damage = battle_get_baseatk(src);
+ damage = status_get_baseatk(src);
else
damage = 0;
if(skill_num==HW_MAGICCRASHER){ /* ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ[‚ÍMATK‚ʼn£‚é */
- atkmin = battle_get_matk1(src);
- atkmax = battle_get_matk2(src);
+ atkmin = status_get_matk1(src);
+ atkmax = status_get_matk2(src);
}else{
- atkmin = battle_get_atk(src);
- atkmax = battle_get_atk2(src);
+ atkmin = status_get_atk(src);
+ atkmax = status_get_atk2(src);
}
- if(mob_db[md->class].range>3 )
+ if(mob_db[md->class_].range>3 )
flag=(flag&~BF_RANGEMASK)|BF_LONG;
if(atkmin > atkmax) atkmin = atkmax;
@@ -2351,15 +1174,20 @@ static struct Damage battle_calc_mob_weapon_attack(
atkmin=atkmax;
}
- cri = battle_get_critical(src);
- cri -= battle_get_luk(target) * 3;
+ cri = status_get_critical(src);
+ cri -= status_get_luk(target) * 3;
if(battle_config.enemy_critical_rate != 100) {
cri = cri*battle_config.enemy_critical_rate/100;
if(cri < 1)
cri = 1;
}
- if(t_sc_data != NULL && t_sc_data[SC_SLEEP].timer!=-1 ) // ‡–°’†‚̓NƒŠƒeƒBƒJƒ‹‚ª”{‚É
- cri <<=1;
+ if(t_sc_data) {
+ if (t_sc_data[SC_SLEEP].timer!=-1 ) // ‡–°’†‚̓NƒŠƒeƒBƒJƒ‹‚ª”{‚É
+ 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]
+ cri = 1000;
+ }
if(ac_flag) cri = 1000;
@@ -2395,9 +1223,9 @@ static struct Damage battle_calc_mob_weapon_attack(
// ƒ\ƒjƒbƒNƒuƒ[
if(sc_data){ //ó‘ÔˆÙí’†‚̃_ƒ[ƒW’ljÁ
if(sc_data[SC_OVERTHRUST].timer!=-1) // ƒI[ƒo[ƒgƒ‰ƒXƒg
- damage += damage*(5*sc_data[SC_OVERTHRUST].val1)/100;
+ damage += damage*(5*sc_data[SC_OVERTHRUST].val1)/100;
if(sc_data[SC_TRUESIGHT].timer!=-1) // ƒgƒDƒ‹[ƒTƒCƒg
- damage += damage*(2*sc_data[SC_TRUESIGHT].val1)/100;
+ damage += damage*(2*sc_data[SC_TRUESIGHT].val1)/100;
if(sc_data[SC_BERSERK].timer!=-1) // ƒo[ƒT[ƒN
damage += damage*2;
if(sc_data && sc_data[SC_AURABLADE].timer!=-1) //[DracoRPG]
@@ -2416,14 +1244,14 @@ static struct Damage battle_calc_mob_weapon_attack(
hitrate = (hitrate*(100+5*skill_lv))/100;
break;
case SM_MAGNUM: // ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN
- damage = damage*(5*skill_lv +(wflag)?65:115 )/100;
+ damage = damage*(wflag > 1 ? 5*skill_lv+115 : 30*skill_lv+100)/100;
+ hitrate = (hitrate*(100+10*skill_lv))/100;
break;
case MC_MAMMONITE: // ƒƒ}[ƒiƒCƒg
damage = damage*(100+ 50*skill_lv)/100;
break;
case AC_DOUBLE: // ƒ_ƒuƒ‹ƒXƒgƒŒƒCƒtƒBƒ“ƒO
damage = damage*(180+ 20*skill_lv)/100;
- div_=2;
flag=(flag&~BF_RANGEMASK)|BF_LONG;
break;
case AC_SHOWER: // ƒAƒ[ƒVƒƒƒ[
@@ -2436,9 +1264,9 @@ static struct Damage battle_calc_mob_weapon_attack(
break;
case KN_PIERCE: // ƒsƒA[ƒX
damage = damage*(100+ 10*skill_lv)/100;
- hitrate=hitrate*(100+5*skill_lv)/100;
- div_=t_size+1;
- damage*=div_;
+ hitrate = hitrate*(100+5*skill_lv)/100;
+ div_ = t_size+1;
+ div_flag = 1;
break;
case KN_SPEARSTAB: // ƒXƒsƒAƒXƒ^ƒu
damage = damage*(100+ 15*skill_lv)/100;
@@ -2456,7 +1284,6 @@ static struct Damage battle_calc_mob_weapon_attack(
if(skill_lv>9 && wflag==2) damage2+=damage/4;
if(skill_lv>9 && wflag==3) damage2+=damage/2;
damage +=damage2;
- blewcount=0;
break;
case KN_BOWLINGBASH: // ƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…
damage = damage*(100+ 50*skill_lv)/100;
@@ -2470,7 +1297,7 @@ static struct Damage battle_calc_mob_weapon_attack(
flag=(flag&~BF_SKILLMASK)|BF_NORMAL;
break;
case AS_GRIMTOOTH:
- damage = damage*(100+ 20*skill_lv)/100;
+ damage = damage*(100+ 20*skill_lv)/100;
break;
case AS_POISONREACT: // celest
s_ele = 0;
@@ -2478,7 +1305,6 @@ static struct Damage battle_calc_mob_weapon_attack(
break;
case AS_SONICBLOW: // ƒ\ƒjƒbƒNƒuƒƒE
damage = damage*(300+ 50*skill_lv)/100;
- div_=8;
break;
case TF_SPRINKLESAND: // »‚Ü‚«
damage = damage*125/100;
@@ -2488,8 +1314,7 @@ static struct Damage battle_calc_mob_weapon_attack(
break;
// ˆÈ‰ºMOB
case NPC_COMBOATTACK: // ‘½’iUŒ‚
- div_=skill_get_num(skill_num,skill_lv);
- damage *= div_;
+ div_flag = 1;
break;
case NPC_RANDOMATTACK: // ƒ‰ƒ“ƒ_ƒ€ATKUŒ‚
damage = damage*(50+rand()%150)/100;
@@ -2502,6 +1327,7 @@ static struct Damage battle_calc_mob_weapon_attack(
case NPC_POISONATTACK:
case NPC_HOLYATTACK:
case NPC_DARKNESSATTACK:
+ case NPC_UNDEADATTACK:
case NPC_TELEKINESISATTACK:
damage = damage*(100+25*(skill_lv-1))/100;
break;
@@ -2536,27 +1362,27 @@ static struct Damage battle_calc_mob_weapon_attack(
break;
case CR_HOLYCROSS: // ƒz[ƒŠ[ƒNƒƒX
damage = damage*(100+ 35*skill_lv)/100;
- div_=2;
break;
case CR_GRANDCROSS:
hitrate= 1000000;
break;
case AM_DEMONSTRATION: // ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“
+ hitrate = 1000000;
damage = damage*(100+ 20*skill_lv)/100;
damage2 = damage2*(100+ 20*skill_lv)/100;
break;
case AM_ACIDTERROR: // ƒAƒVƒbƒhƒeƒ‰[
+ hitrate = 1000000;
damage = damage*(100+ 40*skill_lv)/100;
damage2 = damage2*(100+ 40*skill_lv)/100;
break;
case MO_FINGEROFFENSIVE: //Žw’e
damage = damage * (125 + 25 * skill_lv) / 100;
- div_ = 1;
flag=(flag&~BF_RANGEMASK)|BF_LONG; //orn
break;
case MO_INVESTIGATE: // ”­ ™¤
if(def1 < 1000000)
- damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/100;
+ damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/50;
hitrate = 1000000;
s_ele = 0;
break;
@@ -2567,32 +1393,30 @@ static struct Damage battle_calc_mob_weapon_attack(
break;
case MO_CHAINCOMBO: // ˜A‘Ŷ
damage = damage*(150+ 50*skill_lv)/100;
- div_=4;
break;
case BA_MUSICALSTRIKE: // ƒ~ƒ…[ƒWƒJƒ‹ƒXƒgƒ‰ƒCƒN
- damage = damage*(100+ 50 * skill_lv)/100;
+ damage = damage*(60+ 40 * skill_lv)/100;
flag=(flag&~BF_RANGEMASK)|BF_LONG;
break;
case DC_THROWARROW: // –‚¿
- damage = damage*(100+ 50 * skill_lv)/100;
+ damage = damage*(60+ 40 * skill_lv)/100;
flag=(flag&~BF_RANGEMASK)|BF_LONG;
break;
case MO_COMBOFINISH: // –Ò—´Œ
damage = damage*(240+ 60*skill_lv)/100;
break;
case CH_TIGERFIST: // •šŒÕŒ
- damage = damage*(100+ 20*skill_lv)/100;
+ damage = damage*(40+ 100*skill_lv)/100;
break;
case CH_CHAINCRUSH: // ˜A’Œ•öŒ‚
- damage = damage*(100+ 60*skill_lv)/100;
- div_=skill_get_num(skill_num,skill_lv);
+ damage = damage*(400+ 100*skill_lv)/100;
break;
case CH_PALMSTRIKE: // –ÒŒÕd”hŽR
- damage = damage*(50+ 100*skill_lv)/100;
+ damage = damage*(200+ 100*skill_lv)/100;
break;
case LK_SPIRALPIERCE: /* ƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒX */
damage = damage*(100+ 50*skill_lv)/100; //‘‰Á—Ê‚ª•ª‚©‚ç‚È‚¢‚Ì‚Å“K“–‚É
- div_=5;
+ flag=(flag&~BF_RANGEMASK)|BF_LONG;
if(tsd)
tsd->canmove_tick = gettick() + 1000;
else if(tmd)
@@ -2612,31 +1436,35 @@ static struct Damage battle_calc_mob_weapon_attack(
break;
case CG_ARROWVULCAN: /* ƒAƒ[ƒoƒ‹ƒJƒ“ */
damage = damage*(200+100*skill_lv)/100;
- div_=9;
break;
case AS_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[ */
damage = damage*(200+20*skill_lv)/100;
+ hitrate = 1000000;
break;
}
+ if (div_flag && div_ > 1) { // [Skotlex]
+ damage *= div_;
+ damage2 *= div_;
+ }
}
if( skill_num!=NPC_CRITICALSLASH ){
// ‘Î Û‚Ì–hŒä—Í‚É‚æ‚éƒ_ƒ[ƒW‚ÌŒ¸­
// ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“i‚±‚±‚Å‚¢‚¢‚Ì‚©‚ÈHj
- if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && def1 < 1000000) { //DEF, VIT–³Ž‹
+ if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && skill_num != AM_ACIDTERROR && def1 < 1000000) { //DEF, VIT–³Ž‹
int t_def;
- target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penaly_count_lv);
- if(battle_config.vit_penaly_type > 0) {
- if(target_count >= battle_config.vit_penaly_count) {
- if(battle_config.vit_penaly_type == 1) {
- def1 = (def1 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
- def2 = (def2 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
- t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
+ target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penalty_count_lv);
+ if(battle_config.vit_penalty_type > 0) {
+ 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;
+ t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
}
- else if(battle_config.vit_penaly_type == 2) {
- def1 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
- def2 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
- t_vit -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
+ else if(battle_config.vit_penalty_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;
+ t_vit -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
}
if(def1 < 0) def1 = 0;
if(def2 < 1) def2 = 1;
@@ -2644,7 +1472,7 @@ static struct Damage battle_calc_mob_weapon_attack(
}
}
t_def = def2*8/10;
- if(battle_check_undead(s_race,battle_get_elem_type(src)) || s_race==6)
+ if(battle_check_undead(s_race,status_get_elem_type(src)) || s_race==6)
if(tsd && (skill=pc_checkskill(tsd,AL_DP)) > 0 )
t_def += skill* (int) (3 + (tsd->status.base_level+1)*0.04); // submitted by orn
//t_def += skill*3;
@@ -2666,10 +1494,10 @@ static struct Damage battle_calc_mob_weapon_attack(
// ‰ñ”ðC³
if( hitrate < 1000000 && t_sc_data ) { // •K’†UŒ‚
if(t_sc_data[SC_FOGWALL].timer != -1 && flag&BF_LONG)
- hitrate -= 50;
+ hitrate -= 75;
if (t_sc_data[SC_SLEEP].timer!=-1 || // ‡–°‚Í•K’†
t_sc_data[SC_STAN].timer!=-1 || // ƒXƒ^ƒ“‚Í•K’†
- t_sc_data[SC_FREEZE].timer!=-1 ||
+ t_sc_data[SC_FREEZE].timer!=-1 ||
(t_sc_data[SC_STONE].timer!=-1 && t_sc_data[SC_STONE].val2==0)) // “€Œ‹‚Í•K’†
hitrate = 1000000;
}
@@ -2686,16 +1514,24 @@ static struct Damage battle_calc_mob_weapon_attack(
int cardfix=100,i;
cardfix=cardfix*(100-tsd->subele[s_ele])/100; // ‘® «‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
cardfix=cardfix*(100-tsd->subrace[s_race])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
- if(mob_db[md->class].mode & 0x20)
+ cardfix=cardfix*(100-tsd->subsize[s_size])/100;
+ cardfix=cardfix*(100-tsd->subrace2[s_race2])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
+ if(mob_db[md->class_].mode & 0x20)
cardfix=cardfix*(100-tsd->subrace[10])/100;
else
cardfix=cardfix*(100-tsd->subrace[11])/100;
for(i=0;i<tsd->add_def_class_count;i++) {
- if(tsd->add_def_classid[i] == md->class) {
+ if(tsd->add_def_classid[i] == md->class_) {
cardfix=cardfix*(100-tsd->add_def_classrate[i])/100;
break;
}
}
+ for(i=0;i<tsd->add_damage_class_count2;i++) {
+ if(tsd->add_damage_classid2[i] == md->class_) {
+ cardfix=cardfix*(100+tsd->add_damage_classrate2[i])/100;
+ break;
+ }
+ }
if(flag&BF_LONG)
cardfix=cardfix*(100-tsd->long_attack_def_rate)/100;
if(flag&BF_SHORT)
@@ -2707,7 +1543,7 @@ static struct Damage battle_calc_mob_weapon_attack(
if(t_sc_data[SC_DEFENDER].timer != -1 && flag&BF_LONG)
cardfix=cardfix*(100-t_sc_data[SC_DEFENDER].val2)/100;
if(t_sc_data[SC_FOGWALL].timer != -1 && flag&BF_LONG)
- cardfix=cardfix*(100-t_sc_data[SC_FOGWALL].val2)/100;
+ cardfix=cardfix*50/100;
if(cardfix != 100)
damage=damage*cardfix/100;
}
@@ -2721,11 +1557,11 @@ static struct Damage battle_calc_mob_weapon_attack(
if(damage < 0) damage = 0;
// ‘® «‚Ì“K—p
- if (!((battle_config.mob_ghostring_fix == 1) &&
- (battle_get_element(target) == 8) &&
- (target->type==BL_PC))) // [MouseJstr]
- if(skill_num != 0 || s_ele != 0 || !battle_config.mob_attack_attr_none)
- damage=battle_attr_fix(damage, s_ele, battle_get_element(target) );
+ if (!((battle_config.mob_ghostring_fix == 1) &&
+ (status_get_elem_type(target) == 8) &&
+ (target->type==BL_PC))) // [MouseJstr]
+ if(skill_num != 0 || s_ele != 0 || !battle_config.mob_attack_attr_none)
+ damage=battle_attr_fix(damage, s_ele, status_get_element(target) );
//if(sc_data && sc_data[SC_AURABLADE].timer!=-1) /* ƒI[ƒ‰ƒuƒŒ[ƒh •K’† */
// damage += sc_data[SC_AURABLADE].val1 * 10;
@@ -2734,21 +1570,21 @@ static struct Damage battle_calc_mob_weapon_attack(
// ƒCƒ“ƒxƒiƒ€C³
if(skill_num==TF_POISON){
- damage = battle_attr_fix(damage + 15*skill_lv, s_ele, battle_get_element(target) );
+ damage = battle_attr_fix(damage + 15*skill_lv, s_ele, status_get_element(target) );
}
if(skill_num==MC_CARTREVOLUTION){
- damage = battle_attr_fix(damage, 0, battle_get_element(target) );
+ damage = battle_attr_fix(damage, 0, status_get_element(target) );
}
// Š®‘S‰ñ”ð‚Ì”»’è
- if(skill_num == 0 && skill_lv >= 0 && tsd!=NULL && rand()%1000 < battle_get_flee2(target) ){
+ if(skill_num == 0 && tsd!=NULL && rand()%1000 < status_get_flee2(target) ){
damage=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
}
if(battle_config.enemy_perfect_flee) {
- if(skill_num == 0 && skill_lv >= 0 && tmd!=NULL && rand()%1000 < battle_get_flee2(target) ){
+ if(skill_num == 0 && tmd!=NULL && rand()%1000 < status_get_flee2(target) ){
damage=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
@@ -2769,10 +1605,10 @@ static struct Damage battle_calc_mob_weapon_attack(
wd.damage2=0;
wd.type=type;
wd.div_=div_;
- wd.amotion=battle_get_amotion(src);
+ wd.amotion=status_get_amotion(src);
if(skill_num == KN_AUTOCOUNTER)
wd.amotion >>= 1;
- wd.dmotion=battle_get_dmotion(target);
+ wd.dmotion=status_get_dmotion(target);
wd.blewcount=blewcount;
wd.flag=flag;
wd.dmg_lv=dmg_lv;
@@ -2791,14 +1627,14 @@ static struct Damage battle_calc_pc_weapon_attack(
int hitrate,flee,cri = 0,atkmin,atkmax;
int dex,luk,target_count = 1;
int no_cardfix=0;
- int def1 = battle_get_def(target);
- int def2 = battle_get_def2(target);
-// int mdef1, mdef2;
- int t_vit = battle_get_vit(target);
+ int def1 = status_get_def(target);
+ int def2 = status_get_def2(target);
+ int t_vit = status_get_vit(target);
struct Damage wd;
int damage,damage2,damage3=0,damage4=0,type,div_,blewcount=skill_get_blewcount(skill_num,skill_lv);
int flag,skill,dmg_lv = 0;
- int t_mode=0,t_race=0,t_size=1,s_race=7,s_ele=0;
+ int t_mode=0,t_race=0,t_size=1,s_race=7,s_ele=0,s_size=1;
+ int t_race2=0;
struct status_change *sc_data,*t_sc_data;
short *sc_count;
short *option, *opt1, *opt2;
@@ -2806,6 +1642,8 @@ static struct Damage battle_calc_pc_weapon_attack(
int watk,watk_,cardfix,t_ele;
int da=0,i,t_class,ac_flag = 0;
int idef_flag=0,idef_flag_=0;
+ int div_flag=0; // 0: total damage is to be divided by div_
+ // 1: damage is distributed,and has to be multiplied by div_ [celest]
//return‘O‚̈—‚ª‚ ‚é‚Ì‚Åî•ño—Í•”‚Ì‚Ý•ÏX
if( src == NULL || target == NULL || sd == NULL ){
@@ -2816,14 +1654,16 @@ static struct Damage battle_calc_pc_weapon_attack(
// ƒAƒ^ƒbƒJ[
- s_race=battle_get_race(src); //Ží‘°
- s_ele=battle_get_attack_element(src); //‘®«
- s_ele_=battle_get_attack_element2(src); //¶Žè‘®«
- sc_data=battle_get_sc_data(src); //ƒXƒe[ƒ^ƒXˆÙí
- sc_count=battle_get_sc_count(src); //ƒXƒe[ƒ^ƒXˆÙí‚Ì”
- option=battle_get_option(src); //‘é‚Æ‚©ƒyƒR‚Æ‚©ƒJ[ƒg‚Æ‚©
- opt1=battle_get_opt1(src); //Ή»A“€Œ‹AƒXƒ^ƒ“A‡–°AˆÃˆÅ
- opt2=battle_get_opt2(src); //“ÅAŽô‚¢A’¾–ÙAˆÃˆÅH
+ s_race=status_get_race(src); //Ží‘°
+ s_ele=status_get_attack_element(src); //‘®«
+ s_ele_=status_get_attack_element2(src); //¶Žè‘®«
+ s_size=status_get_size(src);
+ sc_data=status_get_sc_data(src); //ƒXƒe[ƒ^ƒXˆÙí
+ sc_count=status_get_sc_count(src); //ƒXƒe[ƒ^ƒXˆÙí‚Ì”
+ option=status_get_option(src); //‘é‚Æ‚©ƒyƒR‚Æ‚©ƒJ[ƒg‚Æ‚©
+ opt1=status_get_opt1(src); //Ή»A“€Œ‹AƒXƒ^ƒ“A‡–°AˆÃˆÅ
+ opt2=status_get_opt2(src); //“ÅAŽô‚¢A’¾–ÙAˆÃˆÅH
+ t_race2=status_get_race2(target);
if(skill_num != CR_GRANDCROSS) //ƒOƒ‰ƒ“ƒhƒNƒƒX‚Å‚È‚¢‚È‚ç
sd->state.attack_type = BF_WEAPON; //UŒ‚ƒ^ƒCƒv‚Í•ŠíUŒ‚
@@ -2833,24 +1673,24 @@ static struct Damage battle_calc_pc_weapon_attack(
tsd=(struct map_session_data *)target; //tsd‚É‘ã“ü(tmd‚ÍNULL)
else if(target->type==BL_MOB) //‘ÎÛ‚ªMob‚È‚ç
tmd=(struct mob_data *)target; //tmd‚É‘ã“ü(tsd‚ÍNULL)
- t_race=battle_get_race( target ); //‘ÎÛ‚ÌŽí‘°
- t_ele=battle_get_elem_type(target); //‘ÎÛ‚Ì‘®«
- t_size=battle_get_size( target ); //‘Îۂ̃TƒCƒY
- t_mode=battle_get_mode( target ); //‘ÎÛ‚ÌMode
- t_sc_data=battle_get_sc_data( target ); //‘Îۂ̃Xƒe[ƒ^ƒXˆÙí
+ t_race=status_get_race( target ); //‘ÎÛ‚ÌŽí‘°
+ t_ele=status_get_elem_type(target); //‘ÎÛ‚Ì‘®«
+ t_size=status_get_size( target ); //‘Îۂ̃TƒCƒY
+ t_mode=status_get_mode( target ); //‘ÎÛ‚ÌMode
+ t_sc_data=status_get_sc_data( target ); //‘Îۂ̃Xƒe[ƒ^ƒXˆÙí
//ƒI[ƒgƒJƒEƒ“ƒ^[ˆ—‚±‚±‚©‚ç
- if((skill_num == 0 || (target->type == BL_PC && battle_config.pc_auto_counter_type&2) ||
- (target->type == BL_MOB && battle_config.monster_auto_counter_type&2)) && skill_lv >= 0) {
+ if(skill_num == 0 || (target->type == BL_PC && battle_config.pc_auto_counter_type&2) ||
+ (target->type == BL_MOB && battle_config.monster_auto_counter_type&2)) {
if(skill_num != CR_GRANDCROSS && t_sc_data && t_sc_data[SC_AUTOCOUNTER].timer != -1) { //ƒOƒ‰ƒ“ƒhƒNƒƒX‚Å‚È‚­A‘ÎÛ‚ªƒI[ƒgƒJƒEƒ“ƒ^[ó‘Ô‚Ìê‡
- int dir = map_calc_dir(src,target->x,target->y),t_dir = battle_get_dir(target);
+ int dir = map_calc_dir(src,target->x,target->y),t_dir = status_get_dir(target);
int dist = distance(src->x,src->y,target->x,target->y);
if(dist <= 0 || map_check_dir(dir,t_dir) ) { //‘ÎÛ‚Æ‚Ì‹——£‚ª0ˆÈ‰ºA‚Ü‚½‚Í‘Îۂ̳–ÊH
memset(&wd,0,sizeof(wd));
t_sc_data[SC_AUTOCOUNTER].val3 = 0;
t_sc_data[SC_AUTOCOUNTER].val4 = 1;
if(sc_data && sc_data[SC_AUTOCOUNTER].timer == -1) { //Ž©•ª‚ªƒI[ƒgƒJƒEƒ“ƒ^[ó‘Ô
- int range = battle_get_range(target);
+ int range = status_get_range(target);
if((target->type == BL_PC && ((struct map_session_data *)target)->status.weapon != 11 && dist <= range+1) || //‘ÎÛ‚ªPC‚Å•Ší‚ª‹|–î‚Å‚È‚­ŽË’ö“à
(target->type == BL_MOB && range <= 3 && dist <= range+1) ) //‚Ü‚½‚Í‘ÎÛ‚ªMob‚ÅŽË’ö‚ª3ˆÈ‰º‚ÅŽË’ö“à
t_sc_data[SC_AUTOCOUNTER].val3 = src->id;
@@ -2869,32 +1709,35 @@ static struct Damage battle_calc_pc_weapon_attack(
flag=BF_SHORT|BF_WEAPON|BF_NORMAL; // UŒ‚‚ÌŽí—Þ‚ÌÝ’è
// ‰ñ”𗦌vŽZA‰ñ”ð”»’è‚ÍŒã‚Å
- flee = battle_get_flee(target);
- if(battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0) //AGIAVITƒyƒiƒ‹ƒeƒBݒ肪—LŒø
- target_count += battle_counttargeted(target,src,battle_config.agi_penaly_count_lv); //‘ÎÛ‚Ì”‚ðŽZo
- if(battle_config.agi_penaly_type > 0) {
- if(target_count >= battle_config.agi_penaly_count) { //ƒyƒiƒ‹ƒeƒBÝ’è‚æ‚è‘ÎÛ‚ª‘½‚¢
- if(battle_config.agi_penaly_type == 1) //‰ñ”𗦂ªagi_penaly_num%‚¸‚ÂŒ¸­
- flee = (flee * (100 - (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num))/100;
- else if(battle_config.agi_penaly_type == 2) //‰ñ”𗦂ªagi_penaly_num•ªŒ¸­
- flee -= (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num;
+ flee = status_get_flee(target);
+ if(battle_config.agi_penalty_type > 0 || battle_config.vit_penalty_type > 0) //AGIAVITƒyƒiƒ‹ƒeƒBݒ肪—LŒø
+ target_count += battle_counttargeted(target,src,battle_config.agi_penalty_count_lv); //‘ÎÛ‚Ì”‚ðŽZo
+ if(battle_config.agi_penalty_type > 0) {
+ if(target_count >= battle_config.agi_penalty_count) { //ƒyƒiƒ‹ƒeƒBÝ’è‚æ‚è‘ÎÛ‚ª‘½‚¢
+ if(battle_config.agi_penalty_type == 1) //‰ñ”𗦂ªagi_penalty_num%‚¸‚ÂŒ¸­
+ flee = (flee * (100 - (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100;
+ else if(battle_config.agi_penalty_type == 2) //‰ñ”𗦂ªagi_penalty_num•ªŒ¸­
+ flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
if(flee < 1) flee = 1; //‰ñ”𗦂ÍÅ’á‚Å‚à1
}
}
- hitrate=battle_get_hit(src) - flee + 80; //–½’†—¦ŒvŽZ
+ hitrate=status_get_hit(src) - flee + 80; //–½’†—¦ŒvŽZ
type=0; // normal
- div_ = 1; // single attack
+ if (skill_num > 0) {
+ div_=skill_get_num(skill_num,skill_lv);
+ if (div_ < 1) div_ = 1; //Avoid the rare case where the db says div_ is 0 and below
+ } else div_ = 1; // single attack
- dex=battle_get_dex(src); //DEX
- luk=battle_get_luk(src); //LUK
- watk = battle_get_atk(src); //ATK
- watk_ = battle_get_atk_(src); //ATK¶Žè
+ dex=status_get_dex(src); //DEX
+ luk=status_get_luk(src); //LUK
+ watk = status_get_atk(src); //ATK
+ watk_ = status_get_atk_(src); //ATK¶Žè
if(skill_num==HW_MAGICCRASHER){ /* ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ[‚ÍMATK‚ʼn£‚é */
- damage = damage2 = battle_get_matk1(src); //damega,damega2‰“oêAbase_atk‚̎擾
+ damage = damage2 = status_get_matk1(src); //damega,damega2‰“oêAbase_atk‚̎擾
}else{
- damage = damage2 = battle_get_baseatk(&sd->bl); //damega,damega2‰“oêAbase_atk‚̎擾
+ damage = damage2 = status_get_baseatk(&sd->bl); //damega,damega2‰“oêAbase_atk‚̎擾
}
atkmin = atkmin_ = dex; //Å’áATK‚ÍDEX‚ʼnŠú‰»H
sd->state.arrow_atk = 0; //arrow_atk‰Šú‰»
@@ -2942,11 +1785,12 @@ static struct Damage battle_calc_pc_weapon_attack(
}
//ŽO’i¶
- if(skill_num == 0 && skill_lv >= 0 && (skill = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0 && sd->status.weapon <= 16 && !sd->state.arrow_atk) {
+ //if(skill_num == 0 && skill_lv >= 0 && (skill = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0 && sd->status.weapon <= 16 && !sd->state.arrow_atk) {
+ if(skill_num == 0 && (skill = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0 && sd->status.weapon <= 16) { // triple blow works with bows ^^ [celest]
da = (rand()%100 < (30 - skill)) ? 2:0;
}
- if(sd->double_rate > 0 && da == 0 && skill_num == 0 && skill_lv >= 0)
+ if(sd->double_rate > 0 && da == 0 && skill_num == 0)
da = (rand()%100 < sd->double_rate) ? 1:0;
// ‰ß踘Bƒ{[ƒiƒX
@@ -2957,16 +1801,22 @@ static struct Damage battle_calc_pc_weapon_attack(
if(da == 0){ //ƒ_ƒuƒ‹ƒAƒ^ƒbƒN‚ª”­“®‚µ‚Ä‚¢‚È‚¢
// ƒNƒŠƒeƒBƒJƒ‹ŒvŽZ
- cri = battle_get_critical(src);
+ cri = status_get_critical(src);
+ cri += sd->critaddrace[t_race];
if(sd->state.arrow_atk)
cri += sd->arrow_cri;
if(sd->status.weapon == 16)
// ƒJƒ^[ƒ‹‚Ìê‡AƒNƒŠƒeƒBƒJƒ‹‚ð”{‚É
cri <<=1;
- cri -= battle_get_luk(target) * 3;
- if(t_sc_data != NULL && t_sc_data[SC_SLEEP].timer!=-1 ) // ‡–°’†‚̓NƒŠƒeƒBƒJƒ‹‚ª”{‚É
- cri <<=1;
+ cri -= status_get_luk(target) * 3;
+ if(t_sc_data) {
+ if (t_sc_data[SC_SLEEP].timer!=-1 ) // ‡–°’†‚̓NƒŠƒeƒBƒJƒ‹‚ª”{‚É
+ 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]
+ cri = 1000;
+ }
if(ac_flag) cri = 1000;
if(skill_num == KN_AUTOCOUNTER) {
@@ -2975,25 +1825,29 @@ static struct Damage battle_calc_pc_weapon_attack(
else
cri <<= 1;
}
-
- if(skill_num == SN_SHARPSHOOTING && rand()%100 < 50)
+ if(skill_num == SN_SHARPSHOOTING)
cri += 200;
}
if(tsd && tsd->critical_def)
cri = cri * (100-tsd->critical_def) / 100;
- if(da == 0 && (skill_num==0 || skill_num == KN_AUTOCOUNTER || skill_num == SN_SHARPSHOOTING) && skill_lv >= 0 && //ƒ_ƒuƒ‹ƒAƒ^ƒbƒN‚ª”­“®‚µ‚Ä‚¢‚È‚¢
+ if(da == 0 && (skill_num==0 || skill_num == KN_AUTOCOUNTER || skill_num == SN_SHARPSHOOTING) && //ƒ_ƒuƒ‹ƒAƒ^ƒbƒN‚ª”­“®‚µ‚Ä‚¢‚È‚¢
(rand() % 1000) < cri) // ”»’èiƒXƒLƒ‹‚Ìꇂ͖³Ž‹j
{
damage += atkmax;
damage2 += atkmax_;
- if(sd->atk_rate != 100) {
- damage = (damage * sd->atk_rate)/100;
- damage2 = (damage2 * sd->atk_rate)/100;
+ if(sd->atk_rate != 100 || sd->weapon_atk_rate != 0) {
+ if (sd->status.weapon < 16) {
+ damage = (damage * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
+ damage2 = (damage2 * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
+ }
}
if(sd->state.arrow_atk)
damage += sd->arrow_atk;
+
+ damage += damage * sd->crit_atk_rate / 100;
+
type = 0x0a;
/* if(def1 < 1000000) {
@@ -3038,9 +1892,11 @@ static struct Damage battle_calc_pc_weapon_attack(
damage2 += atkmin_ + rand() % (atkmax_-atkmin_ + 1);
else
damage2 += atkmin_ ;
- if(sd->atk_rate != 100) {
- damage = (damage * sd->atk_rate)/100;
- damage2 = (damage2 * sd->atk_rate)/100;
+ if(sd->atk_rate != 100 || sd->weapon_atk_rate != 0) {
+ if (sd->status.weapon < 16) {
+ damage = (damage * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
+ damage2 = (damage2 * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
+ }
}
if(sd->state.arrow_atk) {
@@ -3119,8 +1975,10 @@ static struct Damage battle_calc_pc_weapon_attack(
hitrate = (hitrate*(100+5*skill_lv))/100;
break;
case SM_MAGNUM: // ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN
- damage = damage*(5*skill_lv +(wflag)?65:115 )/100;
- damage2 = damage2*(5*skill_lv +(wflag)?65:115 )/100;
+ // 20*skill level+100? i think this will do for now [based on jRO info]
+ damage = damage*(wflag > 1 ? 5*skill_lv+115 : 30*skill_lv+100)/100;
+ damage2 = damage2*(wflag > 1 ? 5*skill_lv+115 : 30*skill_lv+100)/100;
+ hitrate = (hitrate*(100+10*skill_lv))/100;
break;
case MC_MAMMONITE: // ƒƒ}[ƒiƒCƒg
damage = damage*(100+ 50*skill_lv)/100;
@@ -3134,7 +1992,6 @@ static struct Damage battle_calc_pc_weapon_attack(
}
damage = damage*(180+ 20*skill_lv)/100;
damage2 = damage2*(180+ 20*skill_lv)/100;
- div_=2;
if(sd->arrow_ele > 0) {
s_ele = sd->arrow_ele;
s_ele_ = sd->arrow_ele;
@@ -3177,12 +2034,12 @@ static struct Damage battle_calc_pc_weapon_attack(
damage2 = damage2*(100+ 10*skill_lv)/100;
hitrate=hitrate*(100+5*skill_lv)/100;
div_=t_size+1;
- damage*=div_;
- damage2*=div_;
+ div_flag=1;
break;
case KN_SPEARSTAB: // ƒXƒsƒAƒXƒ^ƒu
damage = damage*(100+ 15*skill_lv)/100;
damage2 = damage2*(100+ 15*skill_lv)/100;
+ blewcount=0;
break;
case KN_SPEARBOOMERANG: // ƒXƒsƒAƒu[ƒƒ‰ƒ“
damage = damage*(100+ 50*skill_lv)/100;
@@ -3206,7 +2063,6 @@ static struct Damage battle_calc_pc_weapon_attack(
if(skill_lv>9 && wflag==2) damage4+=damage2/4;
if(skill_lv>9 && wflag==3) damage4+=damage2/2;
damage2 +=damage4;
- blewcount=0;
break;
case KN_BOWLINGBASH: // ƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…
damage = damage*(100+ 50*skill_lv)/100;
@@ -3233,7 +2089,6 @@ static struct Damage battle_calc_pc_weapon_attack(
hitrate+=30; // hitrate +30, thanks to midas
damage = damage*(300+ 50*skill_lv)/100;
damage2 = damage2*(300+ 50*skill_lv)/100;
- div_=8;
break;
case TF_SPRINKLESAND: // »‚Ü‚«
damage = damage*125/100;
@@ -3241,8 +2096,10 @@ static struct Damage battle_calc_pc_weapon_attack(
break;
case MC_CARTREVOLUTION: // ƒJ[ƒgƒŒƒ{ƒŠƒ…[ƒVƒ‡ƒ“
if(sd->cart_max_weight > 0 && sd->cart_weight > 0) {
- damage = (damage*(150 + pc_checkskill(sd,BS_WEAPONRESEARCH) + (sd->cart_weight*100/sd->cart_max_weight) ) )/100;
- damage2 = (damage2*(150 + pc_checkskill(sd,BS_WEAPONRESEARCH) + (sd->cart_weight*100/sd->cart_max_weight) ) )/100;
+ damage = ( damage*(150 + sd->cart_weight/800) )/100; //fixed CARTREV damage [Lupus] // should be 800, not 80... weight is *10 ^_- [celest]
+ damage2 = ( damage2*(150 + sd->cart_weight/800) )/100;
+ //damage = (damage*(150 + pc_checkskill(sd,BS_WEAPONRESEARCH) + (sd->cart_weight*100/sd->cart_max_weight) ) )/100;
+ //damage2 = (damage2*(150 + pc_checkskill(sd,BS_WEAPONRESEARCH) + (sd->cart_weight*100/sd->cart_max_weight) ) )/100;
}
else {
damage = (damage*150)/100;
@@ -3251,9 +2108,7 @@ static struct Damage battle_calc_pc_weapon_attack(
break;
// ˆÈ‰ºMOB
case NPC_COMBOATTACK: // ‘½’iUŒ‚
- div_=skill_get_num(skill_num,skill_lv);
- damage *= div_;
- damage2 *= div_;
+ div_flag=1;
break;
case NPC_RANDOMATTACK: // ƒ‰ƒ“ƒ_ƒ€ATKUŒ‚
damage = damage*(50+rand()%150)/100;
@@ -3267,6 +2122,7 @@ static struct Damage battle_calc_pc_weapon_attack(
case NPC_POISONATTACK:
case NPC_HOLYATTACK:
case NPC_DARKNESSATTACK:
+ case NPC_UNDEADATTACK:
case NPC_TELEKINESISATTACK:
damage = damage*(100+25*skill_lv)/100;
damage2 = damage2*(100+25*skill_lv)/100;
@@ -3313,7 +2169,6 @@ static struct Damage battle_calc_pc_weapon_attack(
case CR_HOLYCROSS: // ƒz[ƒŠ[ƒNƒƒX
damage = damage*(100+ 35*skill_lv)/100;
damage2 = damage2*(100+ 35*skill_lv)/100;
- div_=2;
break;
case CR_GRANDCROSS:
hitrate= 1000000;
@@ -3324,28 +2179,30 @@ static struct Damage battle_calc_pc_weapon_attack(
case AM_DEMONSTRATION: // ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“
damage = damage*(100+ 20*skill_lv)/100;
damage2 = damage2*(100+ 20*skill_lv)/100;
+ no_cardfix = 1;
break;
case AM_ACIDTERROR: // ƒAƒVƒbƒhƒeƒ‰[
+ hitrate = 1000000;
damage = damage*(100+ 40*skill_lv)/100;
damage2 = damage2*(100+ 40*skill_lv)/100;
+ s_ele = 0;
+ s_ele_ = 0;
+ no_cardfix = 1;
break;
case MO_FINGEROFFENSIVE: //Žw’e
+ damage = damage * (125 + 25 * skill_lv) / 100;
+ damage2 = damage2 * (125 + 25 * skill_lv) / 100;
if(battle_config.finger_offensive_type == 0) {
- damage = damage * (125 + 25 * skill_lv) / 100 * sd->spiritball_old;
- damage2 = damage2 * (125 + 25 * skill_lv) / 100 * sd->spiritball_old;
div_ = sd->spiritball_old;
+ div_flag = 1;
}
- else {
- damage = damage * (125 + 25 * skill_lv) / 100;
- damage2 = damage2 * (125 + 25 * skill_lv) / 100;
- div_ = 1;
- }
+ else div_ = 1;
flag=(flag&~BF_RANGEMASK)|BF_LONG; //orn
break;
case MO_INVESTIGATE: // ”­ ™¤
if(def1 < 1000000) {
- damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/100;
- damage2 = damage2*(100+ 75*skill_lv)/100 * (def1 + def2)/100;
+ damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/50;
+ damage2 = damage2*(100+ 75*skill_lv)/100 * (def1 + def2)/50;
}
hitrate = 1000000;
s_ele = 0;
@@ -3363,26 +2220,19 @@ static struct Damage battle_calc_pc_weapon_attack(
case MO_CHAINCOMBO: // ˜A‘Ŷ
damage = damage*(150+ 50*skill_lv)/100;
damage2 = damage2*(150+ 50*skill_lv)/100;
- div_=4;
break;
case MO_COMBOFINISH: // –Ò—´Œ
damage = damage*(240+ 60*skill_lv)/100;
damage2 = damage2*(240+ 60*skill_lv)/100;
break;
case BA_MUSICALSTRIKE: // ƒ~ƒ…[ƒWƒJƒ‹ƒXƒgƒ‰ƒCƒN
- if(!sd->state.arrow_atk && sd->arrow_atk > 0) {
- int arr = rand()%(sd->arrow_atk+1);
- damage += arr;
- damage2 += arr;
- }
- damage = damage*(100+ 50 * skill_lv)/100;
- damage2 = damage2*(100+ 50 * skill_lv)/100;
+ damage = damage*(60+ 40 * skill_lv)/100;
+ damage2 = damage2*(60+ 40 * skill_lv)/100;
if(sd->arrow_ele > 0) {
s_ele = sd->arrow_ele;
s_ele_ = sd->arrow_ele;
}
flag=(flag&~BF_RANGEMASK)|BF_LONG;
- sd->state.arrow_atk = 1;
break;
case DC_THROWARROW: // –‚¿
if(!sd->state.arrow_atk && sd->arrow_atk > 0) {
@@ -3400,22 +2250,21 @@ static struct Damage battle_calc_pc_weapon_attack(
sd->state.arrow_atk = 1;
break;
case CH_TIGERFIST: // •šŒÕŒ
- damage = damage*(100+ 20*skill_lv)/100;
- damage2 = damage2*(100+ 20*skill_lv)/100;
+ damage = damage*(40+ 100*skill_lv)/100;
+ damage2 = damage*(40+ 100*skill_lv)/100;
break;
case CH_CHAINCRUSH: // ˜A’Œ•öŒ‚
- damage = damage*(100+ 60*skill_lv)/100;
- damage2 = damage2*(100+ 60*skill_lv)/100;
- div_=skill_get_num(skill_num,skill_lv);
+ damage = damage*(400+ 100*skill_lv)/100;
+ damage2 = damage*(400+ 100*skill_lv)/100;
break;
case CH_PALMSTRIKE: // –ÒŒÕd”hŽR
- damage = damage*(50+ 100*skill_lv)/100;
- damage2 = damage2*(50+ 100*skill_lv)/100;
+ damage = damage*(200+ 100*skill_lv)/100;
+ damage2 = damage*(200+ 100*skill_lv)/100;
break;
case LK_SPIRALPIERCE: /* ƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒX */
damage = damage*(100+ 50*skill_lv)/100; //‘‰Á—Ê‚ª•ª‚©‚ç‚È‚¢‚Ì‚Å“K“–‚É
damage2 = damage2*(100+ 50*skill_lv)/100; //‘‰Á—Ê‚ª•ª‚©‚ç‚È‚¢‚Ì‚Å“K“–‚É
- div_=5;
+ flag=(flag&~BF_RANGEMASK)|BF_LONG;
if(tsd)
tsd->canmove_tick = gettick() + 1000;
else if(tmd)
@@ -3441,35 +2290,33 @@ static struct Damage battle_calc_pc_weapon_attack(
case CG_ARROWVULCAN: /* ƒAƒ[ƒoƒ‹ƒJƒ“ */
damage = damage*(200+100*skill_lv)/100;
damage2 = damage2*(200+100*skill_lv)/100;
- div_=9;
+ if(sd->arrow_ele > 0) {
+ s_ele = sd->arrow_ele;
+ s_ele_ = sd->arrow_ele;
+ }
+ flag=(flag&~BF_RANGEMASK)|BF_LONG;
break;
case AS_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[ */
damage = damage*(200+20*skill_lv+20*pc_checkskill(sd,AS_POISONREACT))/100;
damage2 = damage2*(200+20*skill_lv+20*pc_checkskill(sd,AS_POISONREACT))/100;
- break;
- case PA_SACRIFICE:
- if(sd){
- int hp, mhp, damage3;
- hp = battle_get_hp(src);
- mhp = battle_get_max_hp(src);
- damage3 = mhp*9/100;
- damage = damage*damage3*(90+10*skill_lv)/10000;
- damage2 = damage2*damage3*(90+10*skill_lv)/10000;
- }
+ no_cardfix = 1;
+ hitrate = 1000000;
break;
case ASC_BREAKER: // -- moonsoul (special damage for ASC_BREAKER skill)
if(sd){
- int damage3;
- int mdef1=battle_get_mdef(target);
- int mdef2=battle_get_mdef2(target);
- int imdef_flag=0;
-
- damage = ((damage * 5) + (skill_lv * battle_get_int(src) * 5) + rand()%500 + 500) /2;
- damage2 = ((damage2 * 5) + (skill_lv * battle_get_int(src) * 5) + rand()%500 + 500) /2;
- damage3 = damage;
- hitrate = 1000000;
-
- if(sd->ignore_mdef_ele & (1<<t_ele) || sd->ignore_mdef_race & (1<<t_race))
+ // calculate physical part of damage
+#ifndef TWILIGHT
+ damage = damage * skill_lv;
+ damage2 = damage2 * skill_lv;
+#else /* TWILIGHT */
+ damage = damage * skill_lv * 0.5; //Halved by Krel
+ damage2 = damage2 * skill_lv * 0.5; //Halved by Krel
+ // element modifier added right after this
+
+ // calculate magic part of damage
+ damage3 = skill_lv * status_get_int(src) * 5 * 0.5; //Krel
+ // ignores magic defense now [Celest]
+ /*if(sd->ignore_mdef_ele & (1<<t_ele) || sd->ignore_mdef_race & (1<<t_race))
imdef_flag = 1;
if(t_mode & 0x20) {
if(sd->ignore_mdef_race & (1<<10))
@@ -3487,14 +2334,23 @@ static struct Damage battle_calc_pc_weapon_attack(
damage3 = (damage3*(100-mdef1))/100 - mdef2;
}
}
-
+
if(damage3<1)
damage3=1;
- damage3=battle_attr_fix(damage2,s_ele_, battle_get_element(target) );
+ damage3=battle_attr_fix(damage2,s_ele_, status_get_element(target) );*/
+
+#endif /* TWILIGHT */
+ flag=(flag&~BF_RANGEMASK)|BF_LONG;
}
break;
}
+ if (div_flag && div_ > 1) { // [Skotlex]
+ damage *= div_;
+ damage2 *= div_;
+ }
+ if (sd && skill_num > 0 && sd->skillatk[0] == skill_num)
+ damage += damage*sd->skillatk[1]/100;
}
if(da == 2) { //ŽO’i¶‚ª”­“®‚µ‚Ä‚¢‚é‚©
type = 0x08;
@@ -3505,20 +2361,20 @@ static struct Damage battle_calc_pc_weapon_attack(
if( skill_num!=NPC_CRITICALSLASH ){
// ‘Î Û‚Ì–hŒä—Í‚É‚æ‚éƒ_ƒ[ƒW‚ÌŒ¸­
// ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“i‚±‚±‚Å‚¢‚¢‚Ì‚©‚ÈHj
- if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && def1 < 1000000) { //DEF, VIT–³Ž‹
+ if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && skill_num != AM_ACIDTERROR && def1 < 1000000) { //DEF, VIT–³Ž‹
int t_def;
- target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penaly_count_lv);
- if(battle_config.vit_penaly_type > 0) {
- if(target_count >= battle_config.vit_penaly_count) {
- if(battle_config.vit_penaly_type == 1) {
- def1 = (def1 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
- def2 = (def2 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
- t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100;
+ target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penalty_count_lv);
+ if(battle_config.vit_penalty_type > 0) {
+ 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;
+ t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
}
- else if(battle_config.vit_penaly_type == 2) {
- def1 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
- def2 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
- t_vit -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num;
+ else if(battle_config.vit_penalty_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;
+ t_vit -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
}
if(def1 < 0) def1 = 0;
if(def2 < 1) def2 = 1;
@@ -3527,6 +2383,19 @@ static struct Damage battle_calc_pc_weapon_attack(
}
t_def = def2*8/10;
vitbonusmax = (t_vit/20)*(t_vit/20)-1;
+ if (tmd) {
+ if(t_mode & 0x20) {
+ if(sd->ignore_def_mob & 2)
+ idef_flag = 1;
+ if(sd->ignore_def_mob_ & 2)
+ idef_flag_ = 1;
+ } else {
+ if(sd->ignore_def_mob & 1)
+ idef_flag = 1;
+ if(sd->ignore_def_mob_ & 1)
+ idef_flag_ = 1;
+ }
+ }
if(sd->ignore_def_ele & (1<<t_ele) || sd->ignore_def_race & (1<<t_race))
idef_flag = 1;
if(sd->ignore_def_ele_ & (1<<t_ele) || sd->ignore_def_race_ & (1<<t_race))
@@ -3567,24 +2436,39 @@ static struct Damage battle_calc_pc_weapon_attack(
// ó‘ÔˆÙí’†‚̃_ƒ[ƒW’ljÁ‚ŃNƒŠƒeƒBƒJƒ‹‚É‚à—LŒø‚ȃXƒLƒ‹
if (sc_data) {
// ƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“
- if(sc_data[SC_EDP].timer != -1) {
+ if(!no_cardfix && sc_data[SC_EDP].timer != -1 && skill_num != ASC_BREAKER && skill_num != ASC_METEORASSAULT) {
damage += damage * (150 + sc_data[SC_EDP].val1 * 50) / 100;
- damage2 += damage2 * (150 + sc_data[SC_EDP].val1 * 50) / 100;
no_cardfix = 1;
}
+ // sacrifice works on boss monsters, and does 9% damage to self [Celest]
+ if (!skill_num && /*!(t_mode&0x20) &&*/ sc_data[SC_SACRIFICE].timer != -1) {
+ int mhp = status_get_max_hp(src);
+ int dmg = mhp * 9/100;
+ pc_heal(sd, -dmg, 0);
+ damage = dmg * (90 + sc_data[SC_SACRIFICE].val1 * 10) / 100;
+ damage2 = 0;
+ hitrate = 1000000;
+ s_ele = 0;
+ s_ele_ = 0;
+ skill_num = PA_SACRIFICE;
+ //clif_skill_nodamage(src,target,skill_num,skill_lv,1); // this doesn't show effect either.. hmm =/
+ sc_data[SC_SACRIFICE].val2 --;
+ if (sc_data[SC_SACRIFICE].val2 == 0)
+ status_change_end(src, SC_SACRIFICE,-1);
+ }
}
// ¸˜Bƒ_ƒ[ƒW‚̒ljÁ
if( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST) { //DEF, VIT–³Ž‹
- damage += battle_get_atk2(src);
- damage2 += battle_get_atk_2(src);
+ damage += status_get_atk2(src);
+ damage2 += status_get_atk_2(src);
}
if(skill_num == CR_SHIELDBOOMERANG) {
if(sd->equip_index[8] >= 0) {
int index = sd->equip_index[8];
if(sd->inventory_data[index] && sd->inventory_data[index]->type == 5) {
damage += sd->inventory_data[index]->weight/10;
- damage += sd->status.inventory[index].refine * pc_getrefinebonus(0,1);
+ damage += sd->status.inventory[index].refine * status_getrefinebonus(0,1);
}
}
}
@@ -3593,7 +2477,7 @@ static struct Damage battle_calc_pc_weapon_attack(
int index = sd->equip_index[9];
if(sd->inventory_data[index] && sd->inventory_data[index]->type == 4) {
damage += (int)(double)(sd->inventory_data[index]->weight*(0.8*skill_lv*4/10));
- damage += sd->status.inventory[index].refine * pc_getrefinebonus(0,1);
+ damage += sd->status.inventory[index].refine * status_getrefinebonus(0,1);
}
}
}
@@ -3617,10 +2501,10 @@ static struct Damage battle_calc_pc_weapon_attack(
// ‰ñ”ðC³
if( hitrate < 1000000 && t_sc_data ) { // •K’†UŒ‚
if(t_sc_data[SC_FOGWALL].timer != -1 && flag&BF_LONG)
- hitrate -= 50;
+ hitrate -= 75;
if (t_sc_data[SC_SLEEP].timer!=-1 || // ‡–°‚Í•K’†
t_sc_data[SC_STAN].timer!=-1 || // ƒXƒ^ƒ“‚Í•K’†
- t_sc_data[SC_FREEZE].timer!=-1 ||
+ t_sc_data[SC_FREEZE].timer!=-1 ||
(t_sc_data[SC_STONE].timer!=-1 && t_sc_data[SC_STONE].val2==0)) // “€Œ‹‚Í•K’†
hitrate = 1000000;
}
@@ -3653,17 +2537,20 @@ static struct Damage battle_calc_pc_weapon_attack(
cardfix=cardfix*(100+sd->addrace[t_race])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒWC³
cardfix=cardfix*(100+sd->addele[t_ele])/100; // ‘®«‚É‚æ‚éƒ_ƒ[ƒWC³
cardfix=cardfix*(100+sd->addsize[t_size])/100; // ƒTƒCƒY‚É‚æ‚éƒ_ƒ[ƒWC³
+ cardfix=cardfix*(100+sd->addrace2[t_race2])/100;
}
else {
cardfix=cardfix*(100+sd->addrace[t_race]+sd->addrace_[t_race])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒWC³(¶Žè‚É‚æ‚é’ljÁ‚ ‚è)
cardfix=cardfix*(100+sd->addele[t_ele]+sd->addele_[t_ele])/100; // ‘®«‚É‚æ‚éƒ_ƒ[ƒWC³(¶Žè‚É‚æ‚é’ljÁ‚ ‚è)
cardfix=cardfix*(100+sd->addsize[t_size]+sd->addsize_[t_size])/100; // ƒTƒCƒY‚É‚æ‚éƒ_ƒ[ƒWC³(¶Žè‚É‚æ‚é’ljÁ‚ ‚è)
+ cardfix=cardfix*(100+sd->addrace2[t_race2]+sd->addrace2_[t_race2])/100;
}
}
else { //‹|–î
cardfix=cardfix*(100+sd->addrace[t_race]+sd->arrow_addrace[t_race])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒWC³(‹|–î‚É‚æ‚é’ljÁ‚ ‚è)
cardfix=cardfix*(100+sd->addele[t_ele]+sd->arrow_addele[t_ele])/100; // ‘®«‚É‚æ‚éƒ_ƒ[ƒWC³(‹|–î‚É‚æ‚é’ljÁ‚ ‚è)
cardfix=cardfix*(100+sd->addsize[t_size]+sd->arrow_addsize[t_size])/100; // ƒTƒCƒY‚É‚æ‚éƒ_ƒ[ƒWC³(‹|–î‚É‚æ‚é’ljÁ‚ ‚è)
+ cardfix=cardfix*(100+sd->addrace2[t_race2])/100;
}
if(t_mode & 0x20) { //ƒ{ƒX
if(!sd->state.arrow_atk) { //‹|–îUŒ‚ˆÈŠO‚È‚ç
@@ -3686,7 +2573,7 @@ static struct Damage battle_calc_pc_weapon_attack(
cardfix=cardfix*(100+sd->addrace[11]+sd->arrow_addrace[11])/100; //ƒ{ƒXˆÈŠOƒ‚ƒ“ƒXƒ^[‚ɒljÁƒ_ƒ[ƒW(‹|–î‚É‚æ‚é’ljÁ‚ ‚è)
}
//“Á’èClass—p•â³ˆ—(­—‚Ì“ú‹L¨ƒ{ƒ“ƒSƒ“—pH)
- t_class = battle_get_class(target);
+ t_class = status_get_class(target);
for(i=0;i<sd->add_damage_class_count;i++) {
if(sd->add_damage_classid[i] == t_class) {
cardfix=cardfix*(100+sd->add_damage_classrate[i])/100;
@@ -3703,6 +2590,7 @@ static struct Damage battle_calc_pc_weapon_attack(
cardfix=cardfix*(100+sd->addrace_[t_race])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒWC³¶Žè
cardfix=cardfix*(100+sd->addele_[t_ele])/100; // ‘® «‚É‚æ‚éƒ_ƒ[ƒWC³¶Žè
cardfix=cardfix*(100+sd->addsize_[t_size])/100; // ƒTƒCƒY‚É‚æ‚éƒ_ƒ[ƒWC³¶Žè
+ cardfix=cardfix*(100+sd->addrace2_[t_race2])/100;
if(t_mode & 0x20) //ƒ{ƒX
cardfix=cardfix*(100+sd->addrace_[10])/100; //ƒ{ƒXƒ‚ƒ“ƒXƒ^[‚ɒljÁƒ_ƒ[ƒW¶Žè
else
@@ -3716,27 +2604,24 @@ static struct Damage battle_calc_pc_weapon_attack(
}
}
if(!no_cardfix)
-
damage2=damage2*cardfix/100;
+
//ƒJ[ƒh•â³‚É‚æ‚鶎èƒ_ƒ[ƒW‘‰Á
//ƒJ[ƒh‚É‚æ‚éƒ_ƒ[ƒW‘‰Áˆ—(¶Žè)‚±‚±‚Ü‚Å
-// -- moonsoul (cardfix for magic damage portion of ASC_BREAKER)
- if(skill_num == ASC_BREAKER)
- damage3 = damage3 * cardfix / 100;
-
//ƒJ[ƒh‚É‚æ‚éƒ_ƒ[ƒWŒ¸Šˆ—‚±‚±‚©‚ç
if(tsd){ //‘ÎÛ‚ªPC‚Ìê‡
cardfix=100;
cardfix=cardfix*(100-tsd->subrace[s_race])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
cardfix=cardfix*(100-tsd->subele[s_ele])/100; // ‘®«‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
- if(battle_get_mode(src) & 0x20)
+ cardfix=cardfix*(100-tsd->subsize[s_size])/100;
+ if(status_get_mode(src) & 0x20)
cardfix=cardfix*(100-tsd->subrace[10])/100; //ƒ{ƒX‚©‚ç‚ÌUŒ‚‚̓_ƒ[ƒWŒ¸­
else
cardfix=cardfix*(100-tsd->subrace[11])/100; //ƒ{ƒXˆÈŠO‚©‚ç‚ÌUŒ‚‚̓_ƒ[ƒWŒ¸­
//“Á’èClass—p•â³ˆ—¶Žè(­—‚Ì“ú‹L¨ƒ{ƒ“ƒSƒ“—pH)
for(i=0;i<tsd->add_def_class_count;i++) {
- if(tsd->add_def_classid[i] == sd->status.class) {
+ if(tsd->add_def_classid[i] == sd->status.class_) {
cardfix=cardfix*(100-tsd->add_def_classrate[i])/100;
break;
}
@@ -3756,29 +2641,29 @@ static struct Damage battle_calc_pc_weapon_attack(
if(t_sc_data[SC_DEFENDER].timer != -1 && flag&BF_LONG) //ƒfƒBƒtƒFƒ“ƒ_[ó‘Ԃʼn“‹——£UŒ‚
cardfix=cardfix*(100-t_sc_data[SC_DEFENDER].val2)/100; //ƒfƒBƒtƒFƒ“ƒ_[‚É‚æ‚錸Š
if(t_sc_data[SC_FOGWALL].timer != -1 && flag&BF_LONG)
- cardfix=cardfix*(100-t_sc_data[SC_FOGWALL].val2)/100;
+ cardfix=cardfix*50/100;
if(cardfix != 100) {
damage=damage*cardfix/100; //ƒfƒBƒtƒFƒ“ƒ_[•â³‚É‚æ‚éƒ_ƒ[ƒWŒ¸­
damage2=damage2*cardfix/100; //ƒfƒBƒtƒFƒ“ƒ_[•â³‚É‚æ‚鶎èƒ_ƒ[ƒWŒ¸­
}
if(t_sc_data[SC_ASSUMPTIO].timer != -1){ //ƒAƒXƒ€ƒvƒeƒBƒI
if(!map[target->m].flag.pvp){
- damage=damage/3;
- damage2=damage2/3;
- }else{
- damage=damage/2;
- damage2=damage2/2;
+ damage=damage/3;
+ damage2=damage2/3;
+ }else{
+ damage=damage/2;
+ damage2=damage2/2;
+ }
}
}
- }
//‘ÎۂɃXƒe[ƒ^ƒXˆÙ킪‚ ‚éꇂ̃_ƒ[ƒWŒ¸ŽZˆ—‚±‚±‚Ü‚Å
if(damage < 0) damage = 0;
if(damage2 < 0) damage2 = 0;
// ‘® «‚Ì“K—p
- damage=battle_attr_fix(damage,s_ele, battle_get_element(target) );
- damage2=battle_attr_fix(damage2,s_ele_, battle_get_element(target) );
+ damage=battle_attr_fix(damage,s_ele, status_get_element(target) );
+ damage2=battle_attr_fix(damage2,s_ele_, status_get_element(target) );
// ¯‚Ì‚©‚¯‚çA‹C‹…‚Ì“K—p
damage += sd->star;
@@ -3797,16 +2682,16 @@ static struct Damage battle_calc_pc_weapon_attack(
// >“ñ“—¬‚̶‰Eƒ_ƒ[ƒWŒvŽZ’N‚©‚â‚Á‚Ä‚­‚ê‚¥‚¥‚¥‚¥‚¦‚¦‚¦I
// >map_session_data ‚ɶŽèƒ_ƒ[ƒW(atk,atk2)’ljÁ‚µ‚Ä
- // >pc_calcstatus()‚Å‚â‚é‚ׂ«‚©‚ÈH
+ // >status_calc_pc()‚Å‚â‚é‚ׂ«‚©‚ÈH
// map_session_data ‚ɶŽè•Ší(atk,atk2,ele,star,atkmods)’ljÁ‚µ‚Ä
- // pc_calcstatus()‚Ńf[ƒ^‚ð“ü—Í‚µ‚Ä‚¢‚Ü‚·
+ // status_calc_pc()‚Ńf[ƒ^‚ð“ü—Í‚µ‚Ä‚¢‚Ü‚·
//¶Žè‚Ì‚Ý•Ší‘•”õ
if(sd->weapontype1 == 0 && sd->weapontype2 > 0) {
damage = damage2;
damage2 = 0;
}
-
+
// ‰EŽèA¶ŽèC—û‚Ì“K—p
if(sd->status.weapon > 16) {// “ñ“—¬‚©?
int dmg = damage, dmg2 = damage2;
@@ -3838,14 +2723,14 @@ static struct Damage battle_calc_pc_weapon_attack(
// ƒCƒ“ƒxƒiƒ€C³
if(skill_num==TF_POISON){
- damage = battle_attr_fix(damage + 15*skill_lv, s_ele, battle_get_element(target) );
+ damage = battle_attr_fix(damage + 15*skill_lv, s_ele, status_get_element(target) );
}
if(skill_num==MC_CARTREVOLUTION){
- damage = battle_attr_fix(damage, 0, battle_get_element(target) );
+ damage = battle_attr_fix(damage, 0, status_get_element(target) );
}
// Š®‘S‰ñ”ð‚Ì”»’è
- if(skill_num == 0 && skill_lv >= 0 && tsd!=NULL && div_ < 255 && rand()%1000 < battle_get_flee2(target) ){
+ if(skill_num == 0 && tsd!=NULL && div_ < 255 && rand()%1000 < status_get_flee2(target) ){
damage=damage2=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
@@ -3853,7 +2738,7 @@ static struct Damage battle_calc_pc_weapon_attack(
// ‘ÎÛ‚ªŠ®‘S‰ñ”ð‚ð‚·‚éݒ肪ON‚È‚ç
if(battle_config.enemy_perfect_flee) {
- if(skill_num == 0 && skill_lv >= 0 && tmd!=NULL && div_ < 255 && rand()%1000 < battle_get_flee2(target) ) {
+ if(skill_num == 0 && tmd!=NULL && div_ < 255 && rand()%1000 < status_get_flee2(target) ) {
damage=damage2=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
@@ -3921,21 +2806,14 @@ static struct Damage battle_calc_pc_weapon_attack(
}
}
-
-// -- moonsoul (final combination of phys, mag damage for ASC_BREAKER)
- if(skill_num == ASC_BREAKER) {
- damage += damage3;
- damage2 += damage3;
- }
-
wd.damage=damage;
wd.damage2=damage2;
wd.type=type;
wd.div_=div_;
- wd.amotion=battle_get_amotion(src);
+ wd.amotion=status_get_amotion(src);
if(skill_num == KN_AUTOCOUNTER)
wd.amotion >>= 1;
- wd.dmotion=battle_get_dmotion(target);
+ wd.dmotion=status_get_dmotion(target);
wd.blewcount=blewcount;
wd.flag=flag;
wd.dmg_lv=dmg_lv;
@@ -3972,32 +2850,45 @@ struct Damage battle_calc_weapon_attack(
memset(&wd,0,sizeof(wd));
if(battle_config.equipment_breaking && src->type==BL_PC && (wd.damage > 0 || wd.damage2 > 0)) {
- struct map_session_data *sd=(struct map_session_data *)src;
- int breakrate=1;
- if(sd->status.weapon && sd->status.weapon!=11) {
- if(target->type == BL_PC && sd->sc_data[SC_MELTDOWN].timer!=-1){
- breakrate+=100*sd->sc_data[SC_MELTDOWN].val1;
- if(rand()%10000 < breakrate*battle_config.equipment_break_rate/100 || breakrate >= 10000)
- pc_breakweapon((struct map_session_data *)target);
+ struct map_session_data *sd = (struct map_session_data *)src;
+ // weapon = 0, armor = 1
+ int breakrate = 1; //0.01% default self weapon breaking chance [DracoRPG]
+ int breakrate_[2] = {0,0}; //enemy breaking chance [celest]
+ int breaktime = 5000;
+
+ breakrate_[0] += sd->break_weapon_rate;
+ 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(sd->sc_data[SC_OVERTHRUST].timer!=-1)
- breakrate+=20*sd->sc_data[SC_OVERTHRUST].val1;
- if(wd.type==0x0a)
- breakrate*=2;
- if(rand()%10000 < breakrate*battle_config.equipment_break_rate/100 || breakrate >= 10000) {
- if(pc_breakweapon(sd)==1)
+ breakrate += 10;
+ }
+
+ if(sd->status.weapon && sd->status.weapon != 11) {
+ if(rand() % 10000 < breakrate * battle_config.equipment_break_rate / 100 || breakrate >= 10000)
+ if (pc_breakweapon(sd) == 1)
wd = battle_calc_pc_weapon_attack(src,target,skill_num,skill_lv,wflag);
- }
}
- }
-
- if (battle_config.equipment_breaking && target->type == BL_PC && (wd.damage > 0 || wd.damage2 > 0)) {
- int breakrate=1;
- if(src->type==BL_PC && ((struct map_session_data *)src)->sc_data[SC_MELTDOWN].timer!=-1) breakrate+=70*((struct map_session_data *)src)->sc_data[SC_MELTDOWN].val1;
- if (wd.type==0x0a)
- breakrate*=2;
- if (rand()%10000 < breakrate*battle_config.equipment_break_rate/100 || breakrate >= 10000) {
- pc_breakarmor((struct map_session_data *)target);
+ if(rand() % 10000 < breakrate_[0] * battle_config.equipment_break_rate / 100 || breakrate_[0] >= 10000) {
+ if (target->type == BL_PC) {
+ struct map_session_data *tsd = (struct map_session_data *)target;
+ if(tsd->status.weapon != 11)
+ pc_breakweapon(tsd);
+ } else
+ status_change_start(target,SC_STRIPWEAPON,1,75,0,0,breaktime,0);
+ }
+ if(rand() % 10000 < breakrate_[1] * battle_config.equipment_break_rate/100 || breakrate_[1] >= 10000) {
+ if (target->type == BL_PC) {
+ struct map_session_data *tsd = (struct map_session_data *)target;
+ if(tsd->status.weapon != 11)
+ pc_breakarmor(tsd);
+ } else
+ status_change_start(target,SC_STRIPSHIELD,1,75,0,0,breaktime,0);
}
}
@@ -4011,13 +2902,14 @@ struct Damage battle_calc_weapon_attack(
struct Damage battle_calc_magic_attack(
struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag)
{
- int mdef1=battle_get_mdef(target);
- int mdef2=battle_get_mdef2(target);
+ int mdef1=status_get_mdef(target);
+ int mdef2=status_get_mdef2(target);
int matk1,matk2,damage=0,div_=1,blewcount=skill_get_blewcount(skill_num,skill_lv),rdamage = 0;
struct Damage md;
int aflag;
int normalmagic_flag=1;
- int ele=0,race=7,t_ele=0,t_race=7,t_mode = 0,cardfix,t_class,i;
+ int matk_flag = 1;
+ int ele=0,race=7,size=1,race2=7,t_ele=0,t_race=7,t_mode = 0,cardfix,t_class,i;
struct map_session_data *sd=NULL,*tsd=NULL;
struct mob_data *tmd = NULL;
@@ -4034,13 +2926,15 @@ struct Damage battle_calc_magic_attack(
return md;
}
- matk1=battle_get_matk1(bl);
- matk2=battle_get_matk2(bl);
+ matk1=status_get_matk1(bl);
+ matk2=status_get_matk2(bl);
ele = skill_get_pl(skill_num);
- race = battle_get_race(bl);
- t_ele = battle_get_elem_type(target);
- t_race = battle_get_race(target);
- t_mode = battle_get_mode(target);
+ race = status_get_race(bl);
+ size = status_get_size(bl);
+ race2 = status_get_race2(bl);
+ t_ele = status_get_elem_type(target);
+ t_race = status_get_race(target);
+ t_mode = status_get_mode(target);
#define MATK_FIX( a,b ) { matk1=matk1*(a)/(b); matk2=matk2*(a)/(b); }
@@ -4078,10 +2972,10 @@ struct Damage battle_calc_magic_attack(
case PR_TURNUNDEAD: // UŒ‚ƒŠƒUƒŒƒNƒVƒ‡ƒ“‚ƃ^[ƒ“ƒAƒ“ƒfƒbƒh
if(target->type != BL_PC && battle_check_undead(t_race,t_ele)){
int hp, mhp, thres;
- hp = battle_get_hp(target);
- mhp = battle_get_max_hp(target);
- thres = (skill_lv * 20) + battle_get_luk(bl)+
- battle_get_int(bl) + battle_get_lv(bl)+
+ hp = status_get_hp(target);
+ mhp = status_get_max_hp(target);
+ thres = (skill_lv * 20) + status_get_luk(bl)+
+ status_get_int(bl) + status_get_lv(bl)+
((200 - hp * 200 / mhp));
if(thres > 700) thres = 700;
// if(battle_config.battle_log)
@@ -4089,7 +2983,7 @@ struct Damage battle_calc_magic_attack(
if(rand()%1000 < thres && !(t_mode&0x20)) // ¬Œ÷
damage = hp;
else // Ž¸”s
- damage = battle_get_lv(bl) + battle_get_int(bl) + skill_lv * 10;
+ damage = status_get_lv(bl) + status_get_int(bl) + skill_lv * 10;
}
normalmagic_flag=0;
break;
@@ -4157,7 +3051,7 @@ struct Damage battle_calc_magic_attack(
break;
case WZ_STORMGUST: // ƒXƒg[ƒ€ƒKƒXƒg
MATK_FIX( skill_lv*40+100 ,100 );
- blewcount|=0x10000;
+// blewcount|=0x10000;
break;
case AL_HOLYLIGHT: // ƒz[ƒŠ[ƒ‰ƒCƒg
MATK_FIX( 125,100 );
@@ -4174,15 +3068,30 @@ struct Damage battle_calc_magic_attack(
printf("battle_calc_magic_attack(): napalmvulcan enemy count=0 !\n");
}
break;
+ case PF_SOULBURN: // Celest
+ if (target->type != BL_PC || skill_lv < 5) {
+ memset(&md,0,sizeof(md));
+ return md;
+ } else if (target->type == BL_PC) {
+ damage = ((struct map_session_data *)target)->status.sp * 2;
+ matk_flag = 0; // don't consider matk and matk2
+ }
+ break;
+ case ASC_BREAKER:
+ damage = rand()%500 + 500 + skill_lv * status_get_int(bl) * 5;
+ matk_flag = 0; // don't consider matk and matk2
+ break;
}
}
if(normalmagic_flag){ // ˆê”Ê–‚–@ƒ_ƒ[ƒWŒvŽZ
int imdef_flag=0;
- if(matk1>matk2)
- damage= matk2+rand()%(matk1-matk2+1);
- else
- damage= matk2;
+ if (matk_flag) {
+ if(matk1>matk2)
+ damage= matk2+rand()%(matk1-matk2+1);
+ else
+ damage= matk2;
+ }
if(sd) {
if(sd->ignore_mdef_ele & (1<<t_ele) || sd->ignore_mdef_race & (1<<t_race))
imdef_flag = 1;
@@ -4216,7 +3125,7 @@ struct Damage battle_calc_magic_attack(
cardfix=cardfix*(100+sd->magic_addrace[10])/100;
else
cardfix=cardfix*(100+sd->magic_addrace[11])/100;
- t_class = battle_get_class(target);
+ t_class = status_get_class(target);
for(i=0;i<sd->add_magic_damage_class_count;i++) {
if(sd->add_magic_damage_classid[i] == t_class) {
cardfix=cardfix*(100+sd->add_magic_damage_classrate[i])/100;
@@ -4224,15 +3133,19 @@ struct Damage battle_calc_magic_attack(
}
}
damage=damage*cardfix/100;
+ if (skill_num > 0 && sd->skillatk[0] == skill_num)
+ damage += damage*sd->skillatk[1]/100;
}
if( tsd ){
- int s_class = battle_get_class(bl);
+ int s_class = status_get_class(bl);
cardfix=100;
cardfix=cardfix*(100-tsd->subele[ele])/100; // ‘® «‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
cardfix=cardfix*(100-tsd->subrace[race])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
+ cardfix=cardfix*(100-tsd->subsize[size])/100;
cardfix=cardfix*(100-tsd->magic_subrace[race])/100;
- if(battle_get_mode(bl) & 0x20)
+ cardfix=cardfix*(100-tsd->subrace2[race2])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
+ if(status_get_mode(bl) & 0x20)
cardfix=cardfix*(100-tsd->magic_subrace[10])/100;
else
cardfix=cardfix*(100-tsd->magic_subrace[11])/100;
@@ -4247,13 +3160,13 @@ struct Damage battle_calc_magic_attack(
}
if(damage < 0) damage = 0;
- damage=battle_attr_fix(damage, ele, battle_get_element(target) ); // ‘® «C³
+ damage=battle_attr_fix(damage, ele, status_get_element(target) ); // ‘® «C³
if(skill_num == CR_GRANDCROSS) { // ƒOƒ‰ƒ“ƒhƒNƒƒX
struct Damage wd;
wd=battle_calc_weapon_attack(bl,target,skill_num,skill_lv,flag);
damage = (damage + wd.damage) * (100 + 40*skill_lv)/100;
- if(battle_config.gx_dupele) damage=battle_attr_fix(damage, ele, battle_get_element(target) ); //‘®«2‰ñ‚©‚©‚é
+ if(battle_config.gx_dupele) damage=battle_attr_fix(damage, ele, status_get_element(target) ); //‘®«2‰ñ‚©‚©‚é
if(bl==target) damage=damage/2; //”½“®‚Í”¼•ª
}
@@ -4287,8 +3200,8 @@ struct Damage battle_calc_magic_attack(
md.damage=damage;
md.div_=div_;
- md.amotion=battle_get_amotion(bl);
- md.dmotion=battle_get_dmotion(target);
+ md.amotion=status_get_amotion(bl);
+ md.dmotion=status_get_dmotion(target);
md.damage2=0;
md.type=0;
md.blewcount=blewcount;
@@ -4304,16 +3217,16 @@ struct Damage battle_calc_magic_attack(
struct Damage battle_calc_misc_attack(
struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag)
{
- int int_=battle_get_int(bl);
-// int luk=battle_get_luk(bl);
- int dex=battle_get_dex(bl);
- int skill,ele,race,cardfix;
+ int int_=status_get_int(bl);
+// int luk=status_get_luk(bl);
+ int dex=status_get_dex(bl);
+ int skill,ele,race,size,cardfix,race2;
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_LONG|BF_SKILL;
+ int aflag=BF_MISC|BF_SHORT|BF_SKILL;
//return‘O‚̈—‚ª‚ ‚é‚Ì‚Åî•ño—Í•”‚Ì‚Ý•ÏX
if( bl == NULL || target == NULL ){
@@ -4355,11 +3268,13 @@ struct Damage battle_calc_misc_attack(
damage=(dex/10+int_/2+skill*3+40)*2;
if(flag > 1)
damage /= flag;
+ aflag |= (flag&~BF_RANGEMASK)|BF_LONG;
break;
case TF_THROWSTONE: // ΓŠ‚°
damage=50;
damagefix=0;
+ aflag |= (flag&~BF_RANGEMASK)|BF_LONG;
break;
case BA_DISSONANCE: // •s‹¦˜a‰¹
@@ -4367,7 +3282,7 @@ struct Damage battle_calc_misc_attack(
break;
case NPC_SELFDESTRUCTION: // Ž©”š
- damage=battle_get_hp(bl)-(bl==target?1:0);
+ damage=status_get_hp(bl)-(bl==target?1:0);
damagefix=0;
break;
@@ -4378,8 +3293,8 @@ struct Damage battle_calc_misc_attack(
case NPC_DARKBREATH:
{
- struct status_change *sc_data = battle_get_sc_data(target);
- int hitrate=battle_get_hit(bl) - battle_get_flee(target) + 80;
+ 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) ) )
@@ -4391,13 +3306,25 @@ struct Damage battle_calc_misc_attack(
}
break;
case SN_FALCONASSAULT: /* ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg */
- skill = pc_checkskill(sd,HT_STEELCROW); // Celest
- damage=((150+50*skill_lv)*(dex/10+int_/2+skill*3+40)*2)/100;
+#ifdef TWILIGHT
+ if( sd==NULL || (skill = pc_checkskill(sd,HT_BLITZBEAT)) <= 0)
+ skill=0;
+ damage=(100+50*skill_lv+(dex/10+int_/2+skill*3+40)*2) * 2;
+#else
+ if( sd==NULL || (skill = pc_checkskill(sd,HT_STEELCROW)) <= 0)
+ skill=0;
+ damage=((150+50*skill_lv)*(dex/10+int_/2+skill*3+40)*2)/100; // [Celest]
+#endif
+ if(flag > 1)
+ damage /= flag;
+ aflag |= (flag&~BF_RANGEMASK)|BF_LONG;
break;
}
ele = skill_get_pl(skill_num);
- race = battle_get_race(bl);
+ race = status_get_race(bl);
+ size = status_get_size(bl);
+ race2 = status_get_race(bl);
if(damagefix){
if(damage<1 && skill_num != NPC_DARKBREATH)
@@ -4407,27 +3334,35 @@ struct Damage battle_calc_misc_attack(
cardfix=100;
cardfix=cardfix*(100-tsd->subele[ele])/100; // ‘®«‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
cardfix=cardfix*(100-tsd->subrace[race])/100; // Ží‘°‚É‚æ‚éƒ_ƒ[ƒW‘Ï«
+ cardfix=cardfix*(100-tsd->subsize[size])/100;
cardfix=cardfix*(100-tsd->misc_def_rate)/100;
+ cardfix=cardfix*(100-tsd->subrace2[race2])/100;
damage=damage*cardfix/100;
}
+ if (sd && skill_num > 0 && sd->skillatk[0] == skill_num)
+ damage += damage*sd->skillatk[1]/100;
+
if(damage < 0) damage = 0;
- damage=battle_attr_fix(damage, ele, battle_get_element(target) ); // ‘®«C³
+ damage=battle_attr_fix(damage, ele, status_get_element(target) ); // ‘®«C³
}
div_=skill_get_num( skill_num,skill_lv );
if(div_>1)
damage*=div_;
- if(damage > 0 && (damage < div_ || (battle_get_def(target) >= 1000000 && battle_get_mdef(target) >= 1000000) ) ) {
+ if(damage > 0 && (damage < div_ || (status_get_def(target) >= 1000000 && status_get_mdef(target) >= 1000000) ) ) {
damage = div_;
}
+ if(status_get_mode(target)&0x40 && damage>0)
+ damage = 1;
+
damage=battle_calc_damage(bl,target,damage,div_,skill_num,skill_lv,aflag); // ÅIC³
md.damage=damage;
md.div_=div_;
- md.amotion=battle_get_amotion(bl);
- md.dmotion=battle_get_dmotion(target);
+ md.amotion=status_get_amotion(bl);
+ md.dmotion=status_get_dmotion(target);
md.damage2=0;
md.type=0;
md.blewcount=blewcount;
@@ -4453,6 +3388,7 @@ struct Damage battle_calc_attack( int attack_type,
default:
if(battle_config.error_log)
printf("battle_calc_attack: unknwon attack type ! %d\n",attack_type);
+ memset(&d,0,sizeof(d));
break;
}
return d;
@@ -4465,7 +3401,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
unsigned int tick,int flag)
{
struct map_session_data *sd=NULL;
- struct status_change *sc_data = battle_get_sc_data(src),*t_sc_data=battle_get_sc_data(target);
+ struct status_change *sc_data = status_get_sc_data(src),*t_sc_data=status_get_sc_data(target);
short *opt1;
int race = 7, ele = 0;
int damage,rdamage = 0;
@@ -4484,7 +3420,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
if(target->type == BL_PC && pc_isdead((struct map_session_data *)target))
return 0;
- opt1=battle_get_opt1(src);
+ opt1=status_get_opt1(src);
if(opt1 && *opt1 > 0) {
battle_stopattack(src);
return 0;
@@ -4495,11 +3431,11 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
}
if(battle_check_target(src,target,BCT_ENEMY) <= 0 &&
- !battle_check_range(src,target,0))
+ !battle_check_range(src,target,0))
return 0; // UŒ‚‘ÎÛŠO
- race = battle_get_race(target);
- ele = battle_get_elem_type(target);
+ race = status_get_race(target);
+ ele = status_get_elem_type(target);
if(battle_check_target(src,target,BCT_ENEMY) > 0 &&
battle_check_range(src,target,0)){
// UŒ‚‘ÎۂƂȂ肤‚é‚Ì‚ÅUŒ‚
@@ -4549,17 +3485,17 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
}
}
if(rdamage > 0)
- clif_damage(src,src,tick, wd.amotion,0,rdamage,1,4,0);
+ clif_damage(src,src,tick,wd.amotion,wd.dmotion,rdamage,1,4,0);
}
if (wd.div_ == 255 && sd) { //ŽO’i¶
- int delay = 1000 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src);
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
int skilllv;
- if(wd.damage+wd.damage2 < battle_get_hp(target)) {
+ if(wd.damage+wd.damage2 < status_get_hp(target)) {
if((skilllv = pc_checkskill(sd, MO_CHAINCOMBO)) > 0)
delay += 300 * battle_config.combo_delay_rate /100; //’ljÁƒfƒBƒŒƒC‚ðconf‚É‚æ‚è’²®
- skill_status_change_start(src,SC_COMBO,MO_TRIPLEATTACK,skilllv,0,0,delay,0);
+ 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);
@@ -4576,23 +3512,23 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
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_damage(src,target,(wd.damage+wd.damage2),0);
+ battle_delay_damage(tick+wd.amotion,src,target,(wd.damage+wd.damage2),0);
if(target->prev != NULL &&
(target->type != BL_PC || (target->type == BL_PC && !pc_isdead((struct map_session_data *)target) ) ) ) {
if(wd.damage > 0 || wd.damage2 > 0) {
skill_additional_effect(src,target,0,0,BF_WEAPON,tick);
if(sd) {
if(sd->weapon_coma_ele[ele] > 0 && rand()%10000 < sd->weapon_coma_ele[ele])
- battle_damage(src,target,battle_get_max_hp(target),1);
+ battle_damage(src,target,status_get_max_hp(target),1);
if(sd->weapon_coma_race[race] > 0 && rand()%10000 < sd->weapon_coma_race[race])
- battle_damage(src,target,battle_get_max_hp(target),1);
- if(battle_get_mode(target) & 0x20) {
+ battle_damage(src,target,status_get_max_hp(target),1);
+ if(status_get_mode(target) & 0x20) {
if(sd->weapon_coma_race[10] > 0 && rand()%10000 < sd->weapon_coma_race[10])
- battle_damage(src,target,battle_get_max_hp(target),1);
+ battle_damage(src,target,status_get_max_hp(target),1);
}
else {
if(sd->weapon_coma_race[11] > 0 && rand()%10000 < sd->weapon_coma_race[11])
- battle_damage(src,target,battle_get_max_hp(target),1);
+ battle_damage(src,target,status_get_max_hp(target),1);
}
}
}
@@ -4643,69 +3579,96 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
}
}
if(sd) {
- if(sd->autospell_id > 0 && sd->autospell_lv > 0 && rand()%100 < sd->autospell_rate) {
- int skilllv=sd->autospell_lv,i,f=0,sp;
+ if(sd->autospell_id > 0 && rand()%100 < sd->autospell_rate) {
+ int skilllv = sd->autospell_lv, i;
i = rand()%100;
if(i >= 50) skilllv -= 2;
else if(i >= 15) skilllv--;
if(skilllv < 1) skilllv = 1;
- sp = skill_get_sp(sd->autospell_id,skilllv)*2/3;
- if(sd->status.sp >= sp) {
- if((i=skill_get_inf(sd->autospell_id) == 2) || i == 32)
- f = skill_castend_pos2(src,target->x,target->y,sd->autospell_id,skilllv,tick,flag);
- else {
- switch( skill_get_nk(sd->autospell_id) ) {
- case 0: case 2:
- f = skill_castend_damage_id(src,target,sd->autospell_id,skilllv,tick,flag);
- break;
- case 1:/* Žx‰‡Œn */
- if((sd->autospell_id==AL_HEAL || (sd->autospell_id==ALL_RESURRECTION && target->type != BL_PC)) && battle_check_undead(race,ele))
- f = skill_castend_damage_id(src,target,sd->autospell_id,skilllv,tick,flag);
- else
- f = skill_castend_nodamage_id(src,target,sd->autospell_id,skilllv,tick,flag);
- break;
- }
+
+ if((i=skill_get_inf(sd->autospell_id) == 2) || i == 32)
+ skill_castend_pos2(src,target->x,target->y,sd->autospell_id,skilllv,tick,flag);
+ else {
+ switch( skill_get_nk(sd->autospell_id) ) {
+ case 0: case 2:
+ skill_castend_damage_id(src,target,sd->autospell_id,skilllv,tick,flag);
+ break;
+ case 1:/* Žx‰‡Œn */
+ if((sd->autospell_id==AL_HEAL || (sd->autospell_id==ALL_RESURRECTION && target->type != BL_PC)) && battle_check_undead(race,ele))
+ skill_castend_damage_id(src,target,sd->autospell_id,skilllv,tick,flag);
+ else
+ skill_castend_nodamage_id(src,target,sd->autospell_id,skilllv,tick,flag);
+ break;
}
- if(!f) pc_heal(sd,0,-sp);
- }
+ }
}
- if(wd.flag&BF_WEAPON && src != target && (wd.damage > 0 || wd.damage2 > 0)) {
+ if (wd.flag&BF_WEAPON && src != target && (wd.damage > 0 || wd.damage2 > 0)) {
int hp = 0,sp = 0;
- if(sd->hp_drain_rate && sd->hp_drain_per > 0 && wd.damage > 0 && rand()%100 < sd->hp_drain_rate) {
- hp += (wd.damage * sd->hp_drain_per)/100;
- if(sd->hp_drain_rate > 0 && hp < 1) hp = 1;
- else if(sd->hp_drain_rate < 0 && hp > -1) hp = -1;
- }
- if(sd->hp_drain_rate_ && sd->hp_drain_per_ > 0 && wd.damage2 > 0 && rand()%100 < sd->hp_drain_rate_) {
- hp += (wd.damage2 * sd->hp_drain_per_)/100;
- if(sd->hp_drain_rate_ > 0 && hp < 1) hp = 1;
- else if(sd->hp_drain_rate_ < 0 && hp > -1) hp = -1;
- }
- if(sd->sp_drain_rate && sd->sp_drain_per > 0 && wd.damage > 0 && rand()%100 < sd->sp_drain_rate) {
- sp += (wd.damage * sd->sp_drain_per)/100;
- if(sd->sp_drain_rate > 0 && sp < 1) sp = 1;
- else if(sd->sp_drain_rate < 0 && sp > -1) sp = -1;
+ if (!battle_config.left_cardfix_to_right) { // “ñ“—¬¶ŽèƒJ[ƒh‚Ì‹zŽûŒnŒø‰Ê‚ð‰EŽè‚ɒljÁ‚µ‚È‚¢ê‡
+ hp += battle_calc_drain(wd.damage, sd->hp_drain_rate, sd->hp_drain_per, sd->hp_drain_value);
+ hp += battle_calc_drain(wd.damage2, sd->hp_drain_rate_, sd->hp_drain_per_, sd->hp_drain_value_);
+ sp += battle_calc_drain(wd.damage, sd->sp_drain_rate, sd->sp_drain_per, sd->sp_drain_value);
+ sp += battle_calc_drain(wd.damage2, sd->sp_drain_rate_, sd->sp_drain_per_, sd->sp_drain_value_);
+ } else { // “ñ“—¬¶ŽèƒJ[ƒh‚Ì‹zŽûŒnŒø‰Ê‚ð‰EŽè‚ɒljÁ‚·‚éê‡
+ int hp_drain_rate = sd->hp_drain_rate + sd->hp_drain_rate_;
+ int hp_drain_per = sd->hp_drain_per + sd->hp_drain_per_;
+ int hp_drain_value = sd->hp_drain_value + sd->hp_drain_value_;
+ int sp_drain_rate = sd->sp_drain_rate + sd->sp_drain_rate_;
+ int sp_drain_per = sd->sp_drain_per + sd->sp_drain_per_;
+ int sp_drain_value = sd->sp_drain_value + sd->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(sd->sp_drain_rate_ && sd->sp_drain_per_ > 0 && wd.damage2 > 0 && rand()%100 < sd->sp_drain_rate_) {
- sp += (wd.damage2 * sd->sp_drain_per_)/100;
- if(sd->sp_drain_rate_ > 0 && sp < 1) sp = 1;
- else if(sd->sp_drain_rate_ < 0 && sp > -1) sp = -1;
- }
- if(hp || sp) pc_heal(sd,hp,sp);
+
+ if (hp || sp) pc_heal(sd, hp, sp);
+ if (sd->sp_drain_type && target->type == BL_PC)
+ battle_heal(NULL,target,0,-sp,0);
+ }
+ }
+ if (target->type == BL_PC) {
+ struct map_session_data *tsd = (struct map_session_data *)target;
+ if(tsd && ((sd && !sd->state.arrow_atk) || (status_get_range(src)<=2)) &&
+ tsd->autospell2_id > 0 && rand()%100 < tsd->autospell2_rate) {
+ struct block_list *tbl;
+ int skilllv = tsd->autospell_lv, i;
+ i = rand()%100;
+ if(i >= 50) skilllv -= 2;
+ else if(i >= 15) skilllv--;
+ if(skilllv < 1) skilllv = 1;
+
+ if (tsd->autospell2_type == 0) tbl = target;
+ else tbl = src;
+ if((i=skill_get_inf(tsd->autospell2_id) == 2) || i == 32)
+ skill_castend_pos2(target,tbl->x,tbl->y,tsd->autospell2_id,skilllv,tick,flag);
+ else {
+ switch( skill_get_nk(tsd->autospell2_id) ) {
+ case 0: case 2:
+ skill_castend_damage_id(target,tbl,tsd->autospell2_id,skilllv,tick,flag);
+ break;
+ case 1:/* Žx‰‡Œn */
+ if((tsd->autospell2_id==AL_HEAL || (tsd->autospell2_id==ALL_RESURRECTION && tbl->type != BL_PC)) &&
+ battle_check_undead(status_get_race(tbl),status_get_elem_type(tbl)))
+ skill_castend_damage_id(target,tbl,tsd->autospell2_id,skilllv,tick,flag);
+ else
+ skill_castend_nodamage_id(target,tbl,tsd->autospell2_id,skilllv,tick,flag);
+ break;
+ }
+ }
}
}
if(rdamage > 0)
- battle_damage(target,src,rdamage,0);
+ battle_delay_damage(tick+wd.amotion,target,src,rdamage,0);
+
if(t_sc_data && t_sc_data[SC_AUTOCOUNTER].timer != -1 && t_sc_data[SC_AUTOCOUNTER].val4 > 0) {
if(t_sc_data[SC_AUTOCOUNTER].val3 == src->id)
battle_weapon_attack(target,src,tick,0x8000|t_sc_data[SC_AUTOCOUNTER].val1);
- skill_status_change_end(target,SC_AUTOCOUNTER,-1);
+ status_change_end(target,SC_AUTOCOUNTER,-1);
}
if(t_sc_data && t_sc_data[SC_POISONREACT].timer != -1 && t_sc_data[SC_POISONREACT].val4 > 0) { // poison react [Celest]
if(t_sc_data[SC_POISONREACT].val3 == src->id) {
struct map_session_data *tsd = (struct map_session_data *)target;
- if ((src->type == BL_MOB && battle_get_elem_type(src)==5) || (src->type == BL_PC && battle_get_attack_element(src)==5)) {
+ if ((src->type == BL_MOB && status_get_elem_type(src)==5) || (src->type == BL_PC && status_get_attack_element(src)==5)) {
t_sc_data[SC_POISONREACT].val2 = 0;
battle_weapon_attack(target,src,tick,flag|AS_POISONREACT);
} else {
@@ -4713,19 +3676,18 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
--t_sc_data[SC_POISONREACT].val2;
}
if (t_sc_data[SC_POISONREACT].val2<=0)
- skill_status_change_end(target,SC_POISONREACT,-1);
- }
- }
- if(t_sc_data && t_sc_data[SC_BLADESTOP_WAIT].timer != -1){
- if (!(src->type == BL_MOB && mob_db[((struct mob_data *)src)->class].mode&0x20)) {
- int lv = t_sc_data[SC_BLADESTOP_WAIT].val1;
- skill_status_change_end(target,SC_BLADESTOP_WAIT,-1);
- skill_status_change_start(src,SC_BLADESTOP,lv,1,(int)src,(int)target,skill_get_time2(MO_BLADESTOP,lv),0);
- skill_status_change_start(target,SC_BLADESTOP,lv,2,(int)target,(int)src,skill_get_time2(MO_BLADESTOP,lv),0);
+ status_change_end(target,SC_POISONREACT,-1);
}
}
+ if (t_sc_data && t_sc_data[SC_BLADESTOP_WAIT].timer != -1 &&
+ !(status_get_mode(src)&0x20)) { // ƒ{ƒX‚É‚Í–³Œø
+ int lv = t_sc_data[SC_BLADESTOP_WAIT].val1;
+ status_change_end(target,SC_BLADESTOP_WAIT,-1);
+ status_change_start(src,SC_BLADESTOP,lv,1,(int)src,(int)target,skill_get_time2(MO_BLADESTOP,lv),0);
+ status_change_start(target,SC_BLADESTOP,lv,2,(int)target,(int)src,skill_get_time2(MO_BLADESTOP,lv),0);
+ }
if(t_sc_data && t_sc_data[SC_SPLASHER].timer!=-1) //‰£‚Á‚½‚Ì‚Å‘Îۂ̃xƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[ó‘Ô‚ð‰ðœ
- skill_status_change_end(target,SC_SPLASHER,-1);
+ status_change_end(target,SC_SPLASHER,-1);
map_freeblock_unlock();
}
@@ -4789,8 +3751,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return -1;
// Celest
- sc_data = battle_get_sc_data(src);
- tsc_data = battle_get_sc_data(target);
+ sc_data = status_get_sc_data(src);
+ tsc_data = status_get_sc_data(target);
if ((sc_data && sc_data[SC_BASILICA].timer != -1) ||
(tsc_data && tsc_data[SC_BASILICA].timer != -1))
return -1;
@@ -4810,15 +3772,22 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
// ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ìê‡Ae‚ð‹‚ß‚é
if( src->type==BL_SKILL) {
- int inf2 = skill_get_inf2(((struct skill_unit *)src)->group->skill_id);
- if( (ss=map_id2bl( ((struct skill_unit *)src)->group->src_id))==NULL )
+ struct skill_unit *su = (struct skill_unit *)src;
+ int skillid, inf2;
+
+ nullpo_retr (-1, su);
+ nullpo_retr (-1, su->group);
+ skillid = su->group->skill_id;
+ inf2 = skill_get_inf2(skillid);
+ if( (ss=map_id2bl( su->group->src_id))==NULL )
return -1;
if(ss->prev == NULL)
return -1;
- if(inf2&0x80 &&
- (map[src->m].flag.pvp || pc_iskiller((struct map_session_data *)src, (struct map_session_data *)target)) && // [MouseJstr]
- !(target->type == BL_PC && pc_isinvisible((struct map_session_data *)target)))
- return 0;
+ if(inf2&0x80 &&
+ (map[src->m].flag.pvp ||
+ (skillid >= 115 && skillid <= 125 && map[src->m].flag.gvg)) &&
+ !(target->type == BL_PC && pc_isinvisible((struct map_session_data *)target)))
+ return 0;
if(ss == target) {
if(inf2&0x100)
return 0;
@@ -4826,10 +3795,33 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return -1;
}
}
- // Mob‚Åmaster_id‚ª‚ ‚Á‚Äspecial_mob_ai‚È‚çA¢Š«Žå‚ð‹‚ß‚é
+
if( src->type==BL_MOB ){
struct mob_data *md=(struct mob_data *)src;
- if(md && md->master_id>0){
+ nullpo_retr (-1, md);
+
+ if(target->type == BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)target;
+ nullpo_retr (-1, sd);
+
+ if(md->class_ >= 1285 && md->class_ <= 1287){
+ struct guild_castle *gc = guild_mapname2gc (map[target->m].name);
+ if(gc && agit_flag==0) // Guardians will not attack during non-woe time [Valaris]
+ return 1; // end addition [Valaris]
+ if(gc && sd->status.guild_id > 0) {
+ struct guild *g=guild_search(sd->status.guild_id); // don't attack guild members [Valaris]
+ if(g && g->guild_id == gc->guild_id)
+ return 1;
+ if(g && guild_isallied(g,gc))
+ return 1;
+ }
+ }
+ // option to have monsters ignore GMs [Valaris]
+ if (battle_config.monsters_ignore_gm > 0 && pc_isGM(sd) >= battle_config.monsters_ignore_gm)
+ return 1;
+ }
+ // Mob‚Åmaster_id‚ª‚ ‚Á‚Äspecial_mob_ai‚È‚çA¢Š«Žå‚ð‹‚ß‚é
+ if(md->master_id>0){
if(md->master_id==target->id) // Žå‚È‚çm’è
return 1;
if(md->state.special_mob_ai){
@@ -4869,11 +3861,11 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if(ss->type == BL_PET && target->type==BL_MOB)
return 0;
- s_p=battle_get_party_id(ss);
- s_g=battle_get_guild_id(ss);
+ s_p=status_get_party_id(ss);
+ s_g=status_get_guild_id(ss);
- t_p=battle_get_party_id(target);
- t_g=battle_get_guild_id(target);
+ t_p=status_get_party_id(target);
+ t_g=status_get_guild_id(target);
if(flag&0x10000) {
if(s_p && t_p && s_p == t_p) // “¯‚¶ƒp[ƒeƒB‚È‚çm’èi–¡•ûj
@@ -4896,7 +3888,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if(su && su->group->target_flag==BCT_NOENEMY)
return 1;
else if (battle_config.pk_mode &&
- (((struct map_session_data*)ss)->status.class==0 || ((struct map_session_data*)target)->status.class==0 ||
+ (((struct map_session_data*)ss)->status.class_==0 || ((struct map_session_data*)target)->status.class_==0 ||
((struct map_session_data*)ss)->status.base_level < battle_config.pk_min_level ||
((struct map_session_data*)target)->status.base_level < battle_config.pk_min_level))
return 1; // prevent novice engagement in pk_mode [Valaris]
@@ -4939,7 +3931,6 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range)
{
int dx,dy;
- struct walkpath_data wpd;
int arange;
nullpo_retr(0, src);
@@ -4962,16 +3953,7 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range)
// return 1;
// áŠQ•¨”»’è
- wpd.path_len=0;
- wpd.path_pos=0;
- wpd.path_half=0;
- if(path_search(&wpd,src->m,src->x,src->y,bl->x,bl->y,0x10001)!=-1)
- return 1;
-
- dx=(dx>0)?1:((dx<0)?-1:0);
- dy=(dy>0)?1:((dy<0)?-1:0);
- return (path_search(&wpd,src->m,src->x+dx,src->y+dy,
- bl->x-dx,bl->y-dy,0x10001)!=-1)?1:0;
+ return path_search_long(NULL,src->m,src->x,src->y,bl->x,bl->y);
}
/*==========================================
@@ -4989,7 +3971,7 @@ int battle_config_switch(const char *str) {
static const struct {
char str[128];
- int *val;
+ void *val;
} battle_data[] = {
{ "warp_point_debug", &battle_config.warp_point_debug },
{ "enemy_critical", &battle_config.enemy_critical },
@@ -5045,7 +4027,6 @@ static const struct {
{ "player_skillup_limit", &battle_config.skillup_limit },
{ "weapon_produce_rate", &battle_config.wp_rate },
{ "potion_produce_rate", &battle_config.pp_rate },
- { "deadly_potion_produce_rate", &battle_config.cdp_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 },
@@ -5082,6 +4063,11 @@ static const struct {
{ "natural_heal_skill_interval", &battle_config.natural_heal_skill_interval},
{ "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_hp", &battle_config.max_hp },
@@ -5099,14 +4085,14 @@ static const struct {
{ "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},
- { "agi_penaly_type", &battle_config.agi_penaly_type },
- { "agi_penaly_count", &battle_config.agi_penaly_count },
- { "agi_penaly_num", &battle_config.agi_penaly_num },
- { "agi_penaly_count_lv", &battle_config.agi_penaly_count_lv },
- { "vit_penaly_type", &battle_config.vit_penaly_type },
- { "vit_penaly_count", &battle_config.vit_penaly_count },
- { "vit_penaly_num", &battle_config.vit_penaly_num },
- { "vit_penaly_count_lv", &battle_config.vit_penaly_count_lv },
+ { "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 },
@@ -5127,7 +4113,7 @@ static const struct {
{ "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_penaly", &battle_config.party_skill_penaly },
+ { "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},
@@ -5140,7 +4126,6 @@ static const struct {
{ "dead_branch_active", &battle_config.dead_branch_active },
{ "vending_max_value", &battle_config.vending_max_value },
{ "show_steal_in_same_party", &battle_config.show_steal_in_same_party },
- { "enable_upper_class", &battle_config.enable_upper_class },
{ "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 },
@@ -5156,8 +4141,15 @@ static const struct {
{ "invite_request_check", &battle_config.invite_request_check },
{ "skill_removetrap_type", &battle_config.skill_removetrap_type },
{ "disp_experience", &battle_config.disp_experience },
- { "castle_defense_rate", &battle_config.castle_defense_rate },
- { "riding_weight", &battle_config.riding_weight },
+ { "castle_defense_rate", &battle_config.castle_defense_rate },
+ { "hp_rate", &battle_config.hp_rate },
+ { "sp_rate", &battle_config.sp_rate },
+ { "gm_can_drop_lv", &battle_config.gm_can_drop_lv },
+ { "disp_hpmeter", &battle_config.disp_hpmeter },
+ { "bone_drop", &battle_config.bone_drop },
+ { "monster_damage_delay", &battle_config.monster_damage_delay },
+
+// eAthena additions
{ "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
@@ -5198,16 +4190,23 @@ static const struct {
{ "max_cloth_color", &battle_config.max_cloth_color }, // added by [MouseJstr]
{ "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]
+ { "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]
{ "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]
//SQL-only options start
-#ifndef TXT_ONLY
+#ifndef TXT_ONLY
{ "mail_system", &battle_config.mail_system }, // added by [Valaris]
//SQL-only options end
#endif
@@ -5217,7 +4216,7 @@ int battle_set_value(char *w1, char *w2) {
int i;
for(i = 0; i < sizeof(battle_data) / (sizeof(battle_data[0])); i++)
if (strcmpi(w1, battle_data[i].str) == 0) {
- *battle_data[i].val = battle_config_switch(w2);
+ *((unsigned int *) battle_data[i].val) = battle_config_switch(w2);
return 1;
}
return 0;
@@ -5276,7 +4275,6 @@ void battle_set_defaults() {
battle_config.skillup_limit = 0;
battle_config.wp_rate=100;
battle_config.pp_rate=100;
- battle_config.cdp_rate=100;
battle_config.monster_active_enable=1;
battle_config.monster_damage_delay_rate=100;
battle_config.monster_loot_type=0;
@@ -5313,6 +4311,11 @@ void battle_set_defaults() {
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_hp = 32500;
@@ -5330,14 +4333,14 @@ void battle_set_defaults() {
battle_config.undead_detect_type = 0;
battle_config.pc_auto_counter_type = 1;
battle_config.monster_auto_counter_type = 1;
- battle_config.agi_penaly_type = 0;
- battle_config.agi_penaly_count = 3;
- battle_config.agi_penaly_num = 0;
- battle_config.agi_penaly_count_lv = ATK_FLEE;
- battle_config.vit_penaly_type = 0;
- battle_config.vit_penaly_count = 3;
- battle_config.vit_penaly_num = 0;
- battle_config.vit_penaly_count_lv = ATK_DEF;
+ battle_config.agi_penalty_type = 0;
+ battle_config.agi_penalty_count = 3;
+ battle_config.agi_penalty_num = 0;
+ battle_config.agi_penalty_count_lv = ATK_FLEE;
+ battle_config.vit_penalty_type = 0;
+ battle_config.vit_penalty_count = 3;
+ battle_config.vit_penalty_num = 0;
+ 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;
@@ -5349,17 +4352,16 @@ void battle_set_defaults() {
battle_config.pc_cloak_check_type = 0;
battle_config.monster_cloak_check_type = 0;
battle_config.gvg_short_damage_rate = 100;
- battle_config.gvg_long_damage_rate = 100;
- battle_config.gvg_magic_damage_rate = 100;
- battle_config.gvg_misc_damage_rate = 100;
+ battle_config.gvg_long_damage_rate = 60;
+ battle_config.gvg_magic_damage_rate = 50;
+ battle_config.gvg_misc_damage_rate = 60;
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_undead_nofreeze = 0;
battle_config.pc_land_skill_limit = 1;
battle_config.monster_land_skill_limit = 1;
- battle_config.party_skill_penaly = 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;
@@ -5372,7 +4374,6 @@ void battle_set_defaults() {
battle_config.dead_branch_active = 0;
battle_config.vending_max_value = 10000000;
battle_config.show_steal_in_same_party = 0;
- battle_config.enable_upper_class = 0;
battle_config.pet_attack_attr_none = 0;
battle_config.pc_attack_attr_none = 0;
battle_config.mob_attack_attr_none = 1;
@@ -5388,6 +4389,15 @@ void battle_set_defaults() {
battle_config.invite_request_check = 1;
battle_config.skill_removetrap_type = 0;
battle_config.disp_experience = 0;
+ battle_config.castle_defense_rate = 100;
+ battle_config.hp_rate = 100;
+ battle_config.sp_rate = 100;
+ battle_config.gm_can_drop_lv = 0;
+ battle_config.disp_hpmeter = 0;
+ battle_config.bone_drop = 0;
+ battle_config.monster_damage_delay = 1;
+
+// eAthena additions
battle_config.item_rate_common = 100;
battle_config.item_rate_equip = 100;
battle_config.item_rate_card = 100;
@@ -5421,7 +4431,7 @@ void battle_set_defaults() {
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 = 511; // added by [Yor]
+ battle_config.packet_ver_flag = 255; // added by [Yor]
battle_config.min_hair_style = 0;
battle_config.max_hair_style = 20;
battle_config.min_hair_color = 0;
@@ -5434,13 +4444,18 @@ void battle_set_defaults() {
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;
//SQL-only options start
-#ifndef TXT_ONLY
+#ifndef TXT_ONLY
battle_config.mail_system = 0;
//SQL-only options end
#endif
@@ -5477,6 +4492,10 @@ void battle_validate_conf() {
battle_config.max_aspd = 10;
if(battle_config.max_aspd > 1000)
battle_config.max_aspd = 1000;
+ if(battle_config.hp_rate < 0)
+ battle_config.hp_rate = 1;
+ if(battle_config.sp_rate < 0)
+ battle_config.sp_rate = 1;
if(battle_config.max_hp > 1000000)
battle_config.max_hp = 1000000;
if(battle_config.max_hp < 100)
@@ -5495,10 +4514,10 @@ void battle_validate_conf() {
battle_config.max_cart_weight = 100;
battle_config.max_cart_weight *= 10;
- if(battle_config.agi_penaly_count < 2)
- battle_config.agi_penaly_count = 2;
- if(battle_config.vit_penaly_count < 2)
- battle_config.vit_penaly_count = 2;
+ 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;
@@ -5530,11 +4549,11 @@ void battle_validate_conf() {
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) // added by [Yor]
- battle_config.day_duration = 0;
- if (battle_config.night_duration < 0) // added by [Yor]
- battle_config.night_duration = 0;
-
+ 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)
@@ -5551,33 +4570,43 @@ void battle_validate_conf() {
battle_config.any_warp_GM_min_level = 100;
// at least 1 client must be accepted
- if ((battle_config.packet_ver_flag & 511) == 0) // added by [Yor]
- battle_config.packet_ver_flag = 511; // accept all clients
-
+ if ((battle_config.packet_ver_flag & 255) == 0) // added by [Yor]
+ battle_config.packet_ver_flag = 255; // accept all clients
+
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 > 10000000 || battle_config.vending_max_value<=0) // Lupus & Kobra_k88
battle_config.vending_max_value = 10000000;
+ if (battle_config.min_skill_delay_limit < 10)
+ battle_config.min_skill_delay_limit = 10; // minimum delay of 10ms
}
/*==========================================
* Ý’èƒtƒ@ƒCƒ‹‚ð“Ç‚Ýž‚Þ
*------------------------------------------
*/
-int battle_config_read(const char *cfgName)
+int battle_config_read(const char *cfgName)
{
char line[1024], w1[1024], w2[1024];
FILE *fp;
static int count = 0;
- if ((count++) == 0)
+ if ((count++) == 0)
battle_set_defaults();
fp = fopen(cfgName,"r");
if (fp == NULL) {
- printf("file not found: %s\n", cfgName);
+ printf("File not found: %s\n", cfgName);
return 1;
}
while(fgets(line,1020,fp)){
diff --git a/src/map/battle.h b/src/map/battle.h
index f6f0345ca..393cc58b4 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -63,50 +63,6 @@ int battle_weapon_attack( struct block_list *bl,struct block_list *target,
// ŠeŽíƒpƒ‰ƒ[ƒ^‚𓾂é
int battle_counttargeted(struct block_list *bl,struct block_list *src,int target_lv);
-int battle_get_class(struct block_list *bl);
-int battle_get_dir(struct block_list *bl);
-int battle_get_lv(struct block_list *bl);
-int battle_get_range(struct block_list *bl);
-int battle_get_hp(struct block_list *bl);
-int battle_get_max_hp(struct block_list *bl);
-int battle_get_str(struct block_list *bl);
-int battle_get_agi(struct block_list *bl);
-int battle_get_vit(struct block_list *bl);
-int battle_get_int(struct block_list *bl);
-int battle_get_dex(struct block_list *bl);
-int battle_get_luk(struct block_list *bl);
-int battle_get_hit(struct block_list *bl);
-int battle_get_flee(struct block_list *bl);
-int battle_get_def(struct block_list *bl);
-int battle_get_mdef(struct block_list *bl);
-int battle_get_flee2(struct block_list *bl);
-int battle_get_def2(struct block_list *bl);
-int battle_get_mdef2(struct block_list *bl);
-int battle_get_baseatk(struct block_list *bl);
-int battle_get_atk(struct block_list *bl);
-int battle_get_atk2(struct block_list *bl);
-int battle_get_speed(struct block_list *bl);
-int battle_get_adelay(struct block_list *bl);
-int battle_get_amotion(struct block_list *bl);
-int battle_get_dmotion(struct block_list *bl);
-int battle_get_element(struct block_list *bl);
-int battle_get_attack_element(struct block_list *bl);
-int battle_get_attack_element2(struct block_list *bl); //¶Žè•Ší‘®«Žæ“¾
-#define battle_get_elem_type(bl) (battle_get_element(bl)%10)
-#define battle_get_elem_level(bl) (battle_get_element(bl)/10/2)
-int battle_get_party_id(struct block_list *bl);
-int battle_get_guild_id(struct block_list *bl);
-int battle_get_race(struct block_list *bl);
-int battle_get_size(struct block_list *bl);
-int battle_get_mode(struct block_list *bl);
-int battle_get_mexp(struct block_list *bl);
-
-struct status_change *battle_get_sc_data(struct block_list *bl);
-short *battle_get_sc_count(struct block_list *bl);
-short *battle_get_opt1(struct block_list *bl);
-short *battle_get_opt2(struct block_list *bl);
-short *battle_get_opt3(struct block_list *bl);
-short *battle_get_option(struct block_list *bl);
enum {
BCT_NOENEMY =0x00000,
@@ -115,6 +71,7 @@ enum {
BCT_NOPARTY =0x50000,
BCT_ALL =0x20000,
BCT_NOONE =0x60000,
+ BCT_SELF =0x60000,
};
int battle_check_undead(int race,int element);
@@ -174,7 +131,6 @@ extern struct Battle_Config {
int skillup_limit;
int wp_rate;
int pp_rate;
- int cdp_rate;
int monster_active_enable;
int monster_damage_delay_rate;
int monster_loot_type;
@@ -212,12 +168,17 @@ extern struct Battle_Config {
int natural_heal_skill_interval;
int natural_heal_weight_rate;
int item_name_override_grffile;
+ int indoors_override_grffile; // [Celest]
+ int skill_sp_override_grffile; // [Celest]
+ int cardillust_read_grffile;
+ int item_equip_override_grffile;
+ int item_slots_override_grffile;
int arrow_decrement;
int max_aspd;
int max_hp;
int max_sp;
int max_lv;
- int max_parameter;
+ unsigned int max_parameter;
int max_cart_weight;
int pc_skill_log;
int mob_skill_log;
@@ -229,12 +190,12 @@ extern struct Battle_Config {
int undead_detect_type;
int pc_auto_counter_type;
int monster_auto_counter_type;
- int agi_penaly_type;
- int agi_penaly_count;
- int agi_penaly_num;
- int vit_penaly_type;
- int vit_penaly_count;
- int vit_penaly_num;
+ int agi_penalty_type;
+ int agi_penalty_count;
+ int agi_penalty_num;
+ int vit_penalty_type;
+ int vit_penalty_count;
+ int vit_penalty_num;
int player_defense_type;
int monster_defense_type;
int pet_defense_type;
@@ -253,10 +214,9 @@ extern struct Battle_Config {
int mob_changetarget_byskill;
int pc_attack_direction_change;
int monster_attack_direction_change;
- int pc_undead_nofreeze;
int pc_land_skill_limit;
int monster_land_skill_limit;
- int party_skill_penaly;
+ int party_skill_penalty;
int monster_class_change_full_recover;
int produce_item_name_input;
int produce_potion_name_input;
@@ -271,7 +231,6 @@ extern struct Battle_Config {
// int pet_lootitem; // removed [Valaris]
// int pet_weight; // removed [Valaris]
int show_steal_in_same_party;
- int enable_upper_class;
int pet_attack_attr_none;
int mob_attack_attr_none;
int mob_ghostring_fix;
@@ -287,7 +246,7 @@ extern struct Battle_Config {
int prevent_logout; // Added by RoVeRT
int alchemist_summon_reward; // [Valaris]
- int maximum_level;
+ unsigned int maximum_level;
int drops_by_luk;
int monsters_ignore_gm;
int equipment_breaking;
@@ -297,8 +256,8 @@ extern struct Battle_Config {
int pk_mode;
int show_mob_hp; // end additions [Valaris]
- int agi_penaly_count_lv;
- int vit_penaly_count_lv;
+ int agi_penalty_count_lv;
+ int vit_penalty_count_lv;
int gx_allhit;
int gx_cardfix;
@@ -312,18 +271,25 @@ extern struct Battle_Config {
int skill_removetrap_type;
int disp_experience;
int castle_defense_rate;
- int riding_weight;
int backstab_bow_penalty;
+ int hp_rate;
+ int sp_rate;
+ int gm_can_drop_lv;
+ int disp_hpmeter;
+ int bone_drop;
+ int monster_damage_delay;
+// eAthena additions
int night_at_start; // added by [Yor]
int day_duration; // added by [Yor]
int night_duration; // added by [Yor]
int ban_spoof_namer; // added by [Yor]
+ int ban_hack_trade; // added by [Yor]
int hack_info_GM_level; // added by [Yor]
int any_warp_GM_min_level; // added by [Yor]
int packet_ver_flag; // added by [Yor]
- int muting_players; // added by [Apple]
-
+ int muting_players; // added by [PoW]
+
int min_hair_style; // added by [MouseJstr]
int max_hair_style; // added by [MouseJstr]
int min_hair_color; // added by [MouseJstr]
@@ -336,10 +302,17 @@ extern struct Battle_Config {
int zeny_from_mobs; // [Valaris]
int mobs_level_up; // [Valaris]
- int pk_min_level; // [celest]
+ unsigned int pk_min_level; // [celest]
int skill_steal_type; // [celest]
int skill_steal_rate; // [celest]
int night_darkness_level; // [celest]
+ int motd_type; // [celest]
+ int allow_atcommand_when_mute; // [celest]
+ int finding_ore_rate; // orn
+ int exp_calc_type;
+ int min_skill_delay_limit;
+ int require_glory_guild;
+ int idle_no_share;
#ifndef TXT_ONLY /* SQL-only options */
int mail_system; // [Valaris]
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index de05e20ae..9b700dc47 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -15,6 +15,7 @@
#include "itemdb.h"
#include "map.h"
#include "pc.h"
+#include "status.h"
#include "skill.h"
#include "mob.h"
#include "pet.h"
@@ -27,10 +28,11 @@
#include "npc.h"
#include "trade.h"
#include "core.h"
+#include "showmsg.h"
static char command_symbol = '#';
-static char msg_table[1000][1024]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
+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)
@@ -42,6 +44,15 @@ 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(showexp);
+CCMD_FUNC(showdelay);
#ifdef TXT_ONLY
/* TXT_ONLY */
@@ -70,6 +81,18 @@ static CharCommandInfo charcommand_info[] = {
{ 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 },
+ { CharCommandShowExp, "#showexp", 0, charcommand_showexp},
+ { CharCommandShowDelay, "#showdelay", 0, charcommand_showdelay},
+
#ifdef TXT_ONLY
/* TXT_ONLY */
@@ -248,8 +271,8 @@ int charcommand_config_read(const char *cfgName) {
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 for @commands
+ w2[0] != '%' // symbol of party chat speaking
+ )
command_symbol = w2[0];
}
fclose(fp);
@@ -285,23 +308,24 @@ int charcommand_jobchange(
}
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)) {
// fix pecopeco display
if ((job != 13 && job != 21 && job != 4014 && job != 4022)) {
if (pc_isriding(sd)) {
- if (pl_sd->status.class == 13)
- pl_sd->status.class = pl_sd->view_class = 7;
- if (pl_sd->status.class == 21)
- pl_sd->status.class = pl_sd->view_class = 14;
- if (pl_sd->status.class == 4014)
- pl_sd->status.class = pl_sd->view_class = 4008;
- if (pl_sd->status.class == 4022)
- pl_sd->status.class = pl_sd->view_class = 4015;
+ if (pl_sd->status.class_ == 13)
+ pl_sd->status.class_ = pl_sd->view_class = 7;
+ if (pl_sd->status.class_ == 21)
+ pl_sd->status.class_ = pl_sd->view_class = 14;
+ if (pl_sd->status.class_ == 4014)
+ pl_sd->status.class_ = pl_sd->view_class = 4008;
+ if (pl_sd->status.class_ == 4022)
+ pl_sd->status.class_ = pl_sd->view_class = 4015;
pl_sd->status.option &= ~0x0020;
clif_changeoption(&pl_sd->bl);
- pc_calcstatus(pl_sd, 0);
+ status_calc_pc(pl_sd, 0);
}
} else {
if (!pc_isriding(sd)) {
@@ -315,7 +339,10 @@ int charcommand_jobchange(
job = 4015;
}
}
-
+ 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 {
@@ -412,9 +439,9 @@ int charcommand_petfriendly(
if ((pl_sd->pet.intimate > 0 && t <= 0) ||
(pl_sd->pet.intimate <= 0 && t > 0)) {
if (pl_sd->bl.prev != NULL)
- pc_calcstatus(pl_sd, 0);
+ status_calc_pc(pl_sd, 0);
else
- pc_calcstatus(pl_sd, 2);
+ status_calc_pc(pl_sd, 2);
}
}
clif_displaymessage(pl_sd->fd, msg_table[182]); // Pet friendly value changed!
@@ -481,7 +508,7 @@ int charcommand_stats(
{ "Zeny - %d", pl_sd->status.zeny },
{ NULL, 0 }
};
- sprintf(job_jobname, "Job - %s %s", job_name(pl_sd->status.class), "(level %d)");
+ 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++) {
@@ -561,37 +588,37 @@ int charcommand_option(
pl_sd->opt2 = opt2;
pl_sd->status.option = opt3;
// fix pecopeco display
- if (pl_sd->status.class == 13 || pl_sd->status.class == 21 || pl_sd->status.class == 4014 || pl_sd->status.class == 4022) {
+ if (pl_sd->status.class_ == 13 || pl_sd->status.class_ == 21 || pl_sd->status.class_ == 4014 || pl_sd->status.class_ == 4022) {
if (!pc_isriding(pl_sd)) { // pl_sd have the new value...
- if (pl_sd->status.class == 13)
- pl_sd->status.class = pl_sd->view_class = 7;
- else if (pl_sd->status.class == 21)
- pl_sd->status.class = pl_sd->view_class = 14;
- else if (pl_sd->status.class == 4014)
- pl_sd->status.class = pl_sd->view_class = 4008;
- else if (pl_sd->status.class == 4022)
- pl_sd->status.class = pl_sd->view_class = 4015;
+ if (pl_sd->status.class_ == 13)
+ pl_sd->status.class_ = pl_sd->view_class = 7;
+ else if (pl_sd->status.class_ == 21)
+ pl_sd->status.class_ = pl_sd->view_class = 14;
+ else if (pl_sd->status.class_ == 4014)
+ pl_sd->status.class_ = pl_sd->view_class = 4008;
+ else if (pl_sd->status.class_ == 4022)
+ pl_sd->status.class_ = pl_sd->view_class = 4015;
}
} else {
if (pc_isriding(pl_sd)) { // pl_sd have the new value...
if (pl_sd->disguise > 0) { // temporary prevention of crash caused by peco + disguise, will look into a better solution [Valaris] (code added by [Yor])
pl_sd->status.option &= ~0x0020;
} else {
- if (pl_sd->status.class == 7)
- pl_sd->status.class = pl_sd->view_class = 13;
- else if (pl_sd->status.class == 14)
- pl_sd->status.class = pl_sd->view_class = 21;
- else if (pl_sd->status.class == 4008)
- pl_sd->status.class = pl_sd->view_class = 4014;
- else if (pl_sd->status.class == 4015)
- pl_sd->status.class = pl_sd->view_class = 4022;
+ if (pl_sd->status.class_ == 7)
+ pl_sd->status.class_ = pl_sd->view_class = 13;
+ else if (pl_sd->status.class_ == 14)
+ pl_sd->status.class_ = pl_sd->view_class = 21;
+ else if (pl_sd->status.class_ == 4008)
+ pl_sd->status.class_ = pl_sd->view_class = 4014;
+ else if (pl_sd->status.class_ == 4015)
+ pl_sd->status.class_ = pl_sd->view_class = 4022;
else
pl_sd->status.option &= ~0x0020;
}
}
}
clif_changeoption(&pl_sd->bl);
- pc_calcstatus(pl_sd, 0);
+ status_calc_pc(pl_sd, 0);
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.
@@ -673,14 +700,14 @@ int charcommand_stats_all(const int fd, struct map_session_data* sd, const char*
count = 0;
for(i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
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);
+ 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);
@@ -701,3 +728,530 @@ int charcommand_stats_all(const int fd, struct map_session_data* sd, const char*
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[100];
+ int spirit = 0;
+
+ memset(character, '\0', sizeof(character));
+
+ if(!message || !*message || sscanf(message, "%d %99[^\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[100], 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, "%99[^\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[100], 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, "%99[^\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);
+ }
+ }
+}
+/*==========================================
+ * #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[100];
+ 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;
+ nullpo_retr(-1, sd);
+
+ memset(item_name, '\0', sizeof(item_name));
+
+ if (!message || !*message || sscanf(message, "%99s %d %99[^\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);
+ }
+ }
+ 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){
+ for (i = 0; i < fd_max; i++) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data)){
+ charcommand_giveitem_sub(pl_sd,item_data,number);
+ snprintf(tmp_output, sizeof(tmp_output), "You got %s %d.", item_name,number);
+ clif_displaymessage(pl_sd->fd, tmp_output);
+ }
+ }
+ snprintf(tmp_output, sizeof(tmp_output), "%s received %s %d.","Everyone",item_name,number);
+ clif_displaymessage(fd, tmp_output);
+ } 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[100];
+ char character[100];
+ 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, "%99s %d %d %99[^\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) < 13) // 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_name, 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[100];
+ int zeny = 0, new_zeny;
+ nullpo_retr(-1, sd);
+
+ memset(character, '\0', sizeof(character));
+
+ if (!message || !*message || sscanf(message, "%d %99[^\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;
+}
+
+/*===================================
+ * Remove some messages
+ *-----------------------------------
+ */
+int charcommand_showexp(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (sd->noexp) {
+ sd->noexp = 0;
+ clif_displaymessage(fd, "Gained exp is now shown");
+ return 0;
+ }
+ else {
+ sd->noexp = 1;
+ clif_displaymessage(fd, "Gained exp is now NOT shown");
+ return 0;
+ }
+}
+
+int charcommand_showdelay(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (sd->nodelay) {
+ sd->nodelay = 0;
+ clif_displaymessage(fd, "Skill delay failure is now shown");
+ return 0;
+ }
+ else {
+ sd->nodelay = 1;
+ clif_displaymessage(fd, "Skill delay failure is NOT now shown");
+ return 0;
+ }
+}
+
diff --git a/src/map/charcommand.h b/src/map/charcommand.h
index 11babb816..7c1618cca 100644
--- a/src/map/charcommand.h
+++ b/src/map/charcommand.h
@@ -11,6 +11,15 @@ enum CharCommandType {
CharCommandOption,
CharCommandSave,
CharCommandStatsAll,
+ CharCommandSpiritball,
+ CharCommandItemList,
+ CharCommandEffect,
+ CharCommandStorageList,
+ CharCommandItem, // by MC Cameri
+ CharCommandWarp,
+ CharCommandZeny,
+ CharCommandShowDelay,
+ CharCommandShowExp,
#ifdef TXT_ONLY
/* TXT_ONLY */
diff --git a/src/map/chat.c b/src/map/chat.c
index 75788f03b..3bd29fec3 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -29,7 +29,7 @@ int chat_createchat(struct map_session_data *sd,int limit,int pub,char* pass,cha
nullpo_retr(0, sd);
- cd = aCalloc(1,sizeof(struct chat_data));
+ cd = (struct chat_data *) aCalloc(1,sizeof(struct chat_data));
cd->limit = limit;
cd->pub = pub;
@@ -49,7 +49,7 @@ int chat_createchat(struct map_session_data *sd,int limit,int pub,char* pass,cha
cd->bl.id = map_addobject(&cd->bl);
if(cd->bl.id==0){
clif_createchat(sd,1);
- free(cd);
+ aFree(cd);
return 0;
}
pc_setchatid(sd,cd->bl.id);
@@ -78,11 +78,11 @@ int chat_joinchat(struct map_session_data *sd,int chatid,char* pass)
clif_joinchatfail(sd,0);
return 0;
}
- if(cd->pub==0 && strncmp(pass,cd->pass,8)){
+ if(cd->pub==0 && strncmp(pass,(char *) cd->pass,8)){
clif_joinchatfail(sd,1);
return 0;
}
- if(chatid == sd->chatID) //Double Chat fix by Alex14, thx CHaNGeTe
+ if(chatid == (int)sd->chatID) //Double Chat fix by Alex14, thx CHaNGeTe
{
clif_joinchatfail(sd,1);
return 0;
@@ -268,14 +268,14 @@ int chat_createnpcchat(struct npc_data *nd,int limit,int pub,int trigger,char* t
nullpo_retr(1, nd);
- cd = aCalloc(1,sizeof(struct chat_data));
+ 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,"",8);
+ memcpy(cd->pass,"",1);
if(titlelen>=sizeof(cd->title)-1) titlelen=sizeof(cd->title)-1;
memcpy(cd->title,title,titlelen);
cd->title[titlelen]=0;
@@ -286,11 +286,11 @@ int chat_createnpcchat(struct npc_data *nd,int limit,int pub,int trigger,char* t
cd->bl.type = BL_CHAT;
cd->owner_ = (struct block_list *)nd;
cd->owner = &cd->owner_;
- memcpy(cd->npc_event,ev,sizeof(cd->npc_event));
+ memcpy(cd->npc_event,ev,strlen(ev));
cd->bl.id = map_addobject(&cd->bl);
if(cd->bl.id==0){
- free(cd);
+ aFree(cd);
return 0;
}
nd->chat_id=cd->bl.id;
diff --git a/src/map/chrif.c b/src/map/chrif.c
index adb26868d..e250c8a18 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -23,6 +23,7 @@
#include "npc.h"
#include "pc.h"
#include "nullpo.h"
+#include "showmsg.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -35,20 +36,22 @@ static const int packet_len_table[0x20] = {
-1,-1,10, 6,11,-1, 0, 0, // 2b10-2b17
};
-int char_fd;
+int chrif_connected;
+int char_fd = -1;
int srvinfo;
static char char_ip_str[16];
static int char_ip;
static int char_port = 6121;
static char userid[24], passwd[24];
-static int chrif_state;
+static int chrif_state = 0;
+static int char_init_done = 0;
// Ý’èƒtƒ@ƒCƒ‹“Ç‚Ýž‚ÝŠÖŒW
/*==========================================
*
*------------------------------------------
*/
-void chrif_setuserid(char *id)
+void chrif_setuserid(char *id)
{
strncpy(userid, id, 24);
}
@@ -57,7 +60,7 @@ void chrif_setuserid(char *id)
*
*------------------------------------------
*/
-void chrif_setpasswd(char *pwd)
+void chrif_setpasswd(char *pwd)
{
strncpy(passwd, pwd, 24);
}
@@ -66,7 +69,7 @@ void chrif_setpasswd(char *pwd)
*
*------------------------------------------
*/
-void chrif_setip(char *ip)
+void chrif_setip(char *ip)
{
strncpy(char_ip_str, ip, 16);
char_ip = inet_addr(char_ip_str);
@@ -76,7 +79,7 @@ void chrif_setip(char *ip)
*
*------------------------------------------
*/
-void chrif_setport(int port)
+void chrif_setport(int port)
{
char_port = port;
}
@@ -85,7 +88,7 @@ void chrif_setport(int port)
*
*------------------------------------------
*/
-int chrif_isconnect(void)
+int chrif_isconnect(void)
{
return chrif_state == 2;
}
@@ -94,11 +97,11 @@ int chrif_isconnect(void)
*
*------------------------------------------
*/
-int chrif_save(struct map_session_data *sd)
+int chrif_save(struct map_session_data *sd)
{
nullpo_retr(-1, sd);
- if (char_fd < 0)
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
return -1;
pc_makesavestatus(sd);
@@ -110,6 +113,8 @@ int chrif_save(struct map_session_data *sd)
memcpy(WFIFOP(char_fd,12), &sd->status, sizeof(sd->status));
WFIFOSET(char_fd, WFIFOW(char_fd,2));
+ storage_storage_save(sd); // to synchronise storage with character [Yor]
+
return 0;
}
@@ -117,7 +122,7 @@ int chrif_save(struct map_session_data *sd)
*
*------------------------------------------
*/
-int chrif_connect(int fd)
+int chrif_connect(int fd)
{
WFIFOW(fd,0) = 0x2af8;
memcpy(WFIFOP(fd,2), userid, 24);
@@ -134,13 +139,13 @@ int chrif_connect(int fd)
* ƒ}ƒbƒv‘—M
*------------------------------------------
*/
-int chrif_sendmap(int fd)
+int chrif_sendmap(int fd)
{
int i;
WFIFOW(fd,0) = 0x2afa;
for(i = 0; i < map_num; i++)
- if (map[i].alias[0] != '\0') // [MouseJstr] map aliasing
+ if (map[i].alias != '\0') // [MouseJstr] map aliasing
memcpy(WFIFOP(fd,4+i*16), map[i].alias, 16);
else
memcpy(WFIFOP(fd,4+i*16), map[i].name, 16);
@@ -165,7 +170,7 @@ int chrif_recvmap(int fd)
ip = RFIFOL(fd,4);
port = RFIFOW(fd,8);
for(i = 10, j = 0; i < RFIFOW(fd,2); i += 16, j++) {
- map_setipport(RFIFOP(fd,i), ip, port);
+ map_setipport((char*)RFIFOP(fd,i), ip, port);
// if (battle_config.etc_log)
// printf("recv map %d %s\n", j, RFIFOP(fd,i));
}
@@ -179,12 +184,15 @@ int chrif_recvmap(int fd)
* ƒ}ƒbƒvŽIŠÔˆÚ“®‚Ì‚½‚߂̃f[ƒ^€”õ—v‹
*------------------------------------------
*/
-int chrif_changemapserver(struct map_session_data *sd, char *name, int x, int y, int ip, short port)
+int chrif_changemapserver(struct map_session_data *sd, char *name, int x, int y, int ip, short port)
{
int i, s_ip;
nullpo_retr(-1, sd);
+ if( !sd || char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
s_ip = 0;
for(i = 0; i < fd_max; i++)
if (session[i] && session[i]->session_data == sd) {
@@ -213,7 +221,7 @@ int chrif_changemapserver(struct map_session_data *sd, char *name, int x, int y,
* ƒ}ƒbƒvŽIŠÔˆÚ“®ack
*------------------------------------------
*/
-int chrif_changemapserverack(int fd)
+int chrif_changemapserverack(int fd)
{
struct map_session_data *sd = map_id2sd(RFIFOL(fd,2));
@@ -226,7 +234,7 @@ int chrif_changemapserverack(int fd)
pc_authfail(sd->fd);
return 0;
}
- clif_changemapserver(sd, RFIFOP(fd,18), RFIFOW(fd,34), RFIFOW(fd,36), RFIFOL(fd,38), RFIFOW(fd,42));
+ clif_changemapserver(sd, (char*)RFIFOP(fd,18), RFIFOW(fd,34), RFIFOW(fd,36), RFIFOL(fd,38), RFIFOW(fd,42));
return 0;
}
@@ -235,19 +243,28 @@ int chrif_changemapserverack(int fd)
*
*------------------------------------------
*/
-int chrif_connectack(int fd)
+int chrif_connectack(int fd)
{
if (RFIFOB(fd,2)) {
printf("Connected to char-server failed %d.\n", RFIFOB(fd,2));
exit(1);
}
- printf("Connected to char-server (connection #%d).\n", fd);
+ sprintf(tmp_output,"Successfully connected to Char Server (Connection: '"CL_WHITE"%d"CL_RESET"').\n",fd);
+ ShowStatus(tmp_output);
chrif_state = 1;
+ chrif_connected=1;
chrif_sendmap(fd);
- printf("chrif: OnCharIfInit event done. (%d events)\n", npc_event_doall("OnCharIfInit"));
- printf("chrif: OnInterIfInit event done. (%d events)\n", npc_event_doall("OnInterIfInit"));
+ sprintf(tmp_output,"Event '"CL_WHITE"OnCharIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnCharIfInit"));
+ ShowStatus(tmp_output);
+ sprintf(tmp_output,"Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit"));
+ ShowStatus(tmp_output);
+ if(!char_init_done) {
+ char_init_done = 1;
+ sprintf(tmp_output,"Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce"));
+ ShowStatus(tmp_output);
+ }
// <Agit> Run Event [AgitInit]
// printf("NPC_Event:[OnAgitInit] do (%d) events (Agit Initialize).\n", npc_event_doall("OnAgitInit"));
@@ -259,7 +276,7 @@ int chrif_connectack(int fd)
*
*------------------------------------------
*/
-int chrif_sendmapack(int fd)
+int chrif_sendmapack(int fd)
{
if (RFIFOB(fd,2)) {
printf("chrif : send map list to char server failed %d\n", RFIFOB(fd,2));
@@ -277,13 +294,15 @@ int chrif_sendmapack(int fd)
*
*------------------------------------------
*/
-int chrif_authreq(struct map_session_data *sd)
+int chrif_authreq(struct map_session_data *sd)
{
int i;
nullpo_retr(-1, sd);
- if (!sd || !char_fd || !sd->bl.id || !sd->login_id1)
+ if(!sd || !sd->bl.id || !sd->login_id1)
+ return -1;
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
return -1;
for(i = 0; i < fd_max; i++)
@@ -305,13 +324,15 @@ int chrif_authreq(struct map_session_data *sd)
*
*------------------------------------------
*/
-int chrif_charselectreq(struct map_session_data *sd)
+int chrif_charselectreq(struct map_session_data *sd)
{
int i, s_ip;
nullpo_retr(-1, sd);
- if(!sd || !char_fd || !sd->bl.id || !sd->login_id1)
+ if( !sd || !sd->bl.id || !sd->login_id1 )
+ return -1;
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
return -1;
s_ip = 0;
@@ -335,9 +356,11 @@ int chrif_charselectreq(struct map_session_data *sd)
* ƒLƒƒƒ‰–¼–â‚¢‡‚킹
*------------------------------------------
*/
-int chrif_searchcharid(int char_id)
+int chrif_searchcharid(int char_id)
{
- if (!char_id)
+ if( !char_id )
+ return -1;
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
return -1;
WFIFOW(char_fd,0) = 0x2b08;
@@ -351,11 +374,14 @@ int chrif_searchcharid(int char_id)
* GM‚ɕω»—v‹
*------------------------------------------
*/
-int chrif_changegm(int id, const char *pass, int len)
+int chrif_changegm(int id, const char *pass, int len)
{
if (battle_config.etc_log)
printf("chrif_changegm: account: %d, password: '%s'.\n", id, pass);
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
WFIFOW(char_fd,0) = 0x2b0a;
WFIFOW(char_fd,2) = len + 8;
WFIFOL(char_fd,4) = id;
@@ -369,11 +395,14 @@ int chrif_changegm(int id, const char *pass, int len)
* Change Email
*------------------------------------------
*/
-int chrif_changeemail(int id, const char *actual_email, const char *new_email)
+int chrif_changeemail(int id, const char *actual_email, const char *new_email)
{
if (battle_config.etc_log)
printf("chrif_changeemail: account: %d, actual_email: '%s', new_email: '%s'.\n", id, actual_email, new_email);
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
WFIFOW(char_fd,0) = 0x2b0c;
WFIFOL(char_fd,2) = id;
memcpy(WFIFOP(char_fd,6), actual_email, 40);
@@ -394,8 +423,11 @@ int chrif_changeemail(int id, const char *actual_email, const char *new_email)
* 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)
+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)
{
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
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, 24);
@@ -419,7 +451,10 @@ int chrif_char_ask_name(int id, char * character_name, short operation_type, int
*------------------------------------------
*/
int chrif_changesex(int id, int sex) {
- WFIFOW(char_fd,0) = 0x3000;
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
+ WFIFOW(char_fd,0) = 0x2b11;
WFIFOW(char_fd,2) = 9;
WFIFOL(char_fd,4) = id;
WFIFOB(char_fd,8) = sex;
@@ -444,7 +479,7 @@ int chrif_changesex(int id, int sex) {
* 3: login-server offline
*------------------------------------------
*/
-int chrif_char_ask_name_answer(int fd)
+int chrif_char_ask_name_answer(int fd)
{
int acc;
struct map_session_data *sd;
@@ -547,7 +582,7 @@ int chrif_char_ask_name_answer(int fd)
* End of GM change (@GM) (modified by Yor)
*------------------------------------------
*/
-int chrif_changedgm(int fd)
+int chrif_changedgm(int fd)
{
int acc, level;
struct map_session_data *sd = NULL;
@@ -573,7 +608,7 @@ int chrif_changedgm(int fd)
* «•Ê•Ï‰»I—¹ (modified by Yor)
*------------------------------------------
*/
-int chrif_changedsex(int fd)
+int chrif_changedsex(int fd)
{
int acc, sex, i;
struct map_session_data *sd;
@@ -586,7 +621,7 @@ int chrif_changedsex(int fd)
sd = map_id2sd(acc);
if (acc > 0) {
if (sd != NULL && sd->status.sex != sex) {
- s_class = pc_calc_base_job(sd->status.class);
+ s_class = pc_calc_base_job(sd->status.class_);
if (sd->status.sex == 0) {
sd->status.sex = 1;
sd->sex = 1;
@@ -597,7 +632,7 @@ int chrif_changedsex(int fd)
// 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, 0, BF_NORMAL);
+ pc_unequipitem((struct map_session_data*)sd, i, 2);
}
// reset skill of some job
if (s_class.job == 19 || s_class.job == 4020 || s_class.job == 4042 ||
@@ -621,15 +656,15 @@ int chrif_changedsex(int fd)
clif_updatestatus(sd, SP_SKILLPOINT);
// change job if necessary
if (s_class.job == 20 || s_class.job == 4021 || s_class.job == 4043)
- sd->status.class -= 1;
+ sd->status.class_ -= 1;
else if (s_class.job == 19 || s_class.job == 4020 || s_class.job == 4042)
- sd->status.class += 1;
+ sd->status.class_ += 1;
}
// save character
chrif_save(sd);
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 disconexion by the server)...");
+ 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 {
@@ -645,11 +680,14 @@ int chrif_changedsex(int fd)
* ƒAƒJƒEƒ“ƒg•Ï”•Û‘¶—v‹
*------------------------------------------
*/
-int chrif_saveaccountreg2(struct map_session_data *sd)
+int chrif_saveaccountreg2(struct map_session_data *sd)
{
int p, j;
nullpo_retr(-1, sd);
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
p = 8;
for(j = 0; j < sd->status.account_reg2_num; j++) {
struct global_reg *reg = &sd->status.account_reg2[j];
@@ -671,7 +709,7 @@ int chrif_saveaccountreg2(struct map_session_data *sd)
* ƒAƒJƒEƒ“ƒg•Ï”’Ê’m
*------------------------------------------
*/
-int chrif_accountreg2(int fd)
+int chrif_accountreg2(int fd)
{
int j, p;
struct map_session_data *sd;
@@ -693,7 +731,7 @@ int chrif_accountreg2(int fd)
* —£¥î•ñ“¯Šú—v‹
*------------------------------------------
*/
-int chrif_divorce(int char_id, int partner_id)
+int chrif_divorce(int char_id, int partner_id)
{
struct map_session_data *sd = NULL;
@@ -719,7 +757,7 @@ int chrif_divorce(int char_id, int partner_id)
* Disconnection of a player (account has been deleted in login-server) by [Yor]
*------------------------------------------
*/
-int chrif_accountdeletion(int fd)
+int chrif_accountdeletion(int fd)
{
int acc;
struct map_session_data *sd;
@@ -731,7 +769,7 @@ int chrif_accountdeletion(int fd)
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 (disconnexion)...");
+ clif_displaymessage(sd->fd, "Your account has been deleted (disconnection)...");
clif_setwaitclose(sd->fd); // forced to disconnect for the change
}
} else {
@@ -746,7 +784,7 @@ int chrif_accountdeletion(int fd)
* Disconnection of a player (account has been banned of has a status, from login-server) by [Yor]
*------------------------------------------
*/
-int chrif_accountban(int fd)
+int chrif_accountban(int fd)
{
int acc;
struct map_session_data *sd;
@@ -820,7 +858,7 @@ int chrif_chardisconnect(struct map_session_data *sd)
{
nullpo_retr(-1, sd);
- if(char_fd<=0)
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
return -1;
WFIFOW(char_fd,0)=0x2b18;
@@ -836,10 +874,11 @@ int chrif_chardisconnect(struct map_session_data *sd)
* Receiving GM accounts and their levels from char-server by [Yor]
*------------------------------------------
*/
-int chrif_recvgmaccounts(int fd)
+int chrif_recvgmaccounts(int fd)
{
- printf("From login-server: receiving of %d GM accounts information.\n", pc_read_gm_account(fd));
-
+ sprintf(tmp_output,"From login-server: receiving information of '"CL_WHITE"%d"CL_RESET"' GM accounts.\n", pc_read_gm_account(fd));
+ ShowInfo(tmp_output);
+ memset(tmp_output,'\0',sizeof(tmp_output));
return 0;
}
@@ -847,8 +886,10 @@ int chrif_recvgmaccounts(int fd)
* Request to reload GM accounts and their levels: send to char-server by [Yor]
*------------------------------------------
*/
-int chrif_reloadGMdb(void)
+int chrif_reloadGMdb(void)
{
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
WFIFOW(char_fd,0) = 0x2af7;
WFIFOSET(char_fd, 2);
@@ -860,12 +901,15 @@ int chrif_reloadGMdb(void)
* Send rates and motd to char server [Wizputer]
*------------------------------------------
*/
- int chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate)
+ int chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate)
{
char buf[256];
FILE *fp;
int i;
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
WFIFOW(char_fd,0) = 0x2b16;
WFIFOW(char_fd,2) = base_rate;
WFIFOW(char_fd,4) = job_rate;
@@ -897,14 +941,62 @@ int chrif_reloadGMdb(void)
*-----------------------------------------
*/
-int chrif_char_offline(struct map_session_data *sd)
+int chrif_char_offline(struct map_session_data *sd)
{
- if (char_fd < 0)
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
return -1;
WFIFOW(char_fd,0) = 0x2b17;
WFIFOL(char_fd,2) = sd->status.char_id;
- WFIFOSET(char_fd,6);
+ 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) {
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -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) {
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
+ 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)
+{
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() )
+ return -1;
+
+ 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;
}
@@ -913,16 +1005,39 @@ int chrif_char_offline(struct map_session_data *sd)
*
*------------------------------------------
*/
-int chrif_parse(int fd)
+int chrif_disconnect_sub(struct map_session_data* sd,va_list va) {
+ clif_authfail_fd(sd->fd,1);
+ map_quit(sd);
+ return 0;
+}
+
+int chrif_disconnect(int fd) {
+ if(fd == char_fd) {
+ char_fd = 0;
+ sprintf(tmp_output,"Map Server disconnected from Char Server.\n\n");
+ ShowWarning(tmp_output);
+ clif_foreachclient(chrif_disconnect_sub);
+ chrif_connected = 0;
+ // ‘¼‚Ìmap ŽI‚̃f[ƒ^‚ðÁ‚·
+ map_eraseallipport();
+ }
+ close(fd);
+ 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) {
- printf("Map-server can't connect to char-server (connection #%d).\n", fd);
- char_fd = -1;
+ if (fd == char_fd && chrif_connected == 1) {
+ chrif_disconnect (fd);
+// check_connect_char_server(0, 0, 0, 0);
}
close(fd);
delete_session(fd);
@@ -956,11 +1071,11 @@ int chrif_parse(int fd)
case 0x2afb: chrif_sendmapack(fd); break;
case 0x2afd: pc_authok(RFIFOL(fd,4), RFIFOL(fd,8), (time_t)RFIFOL(fd,12), (struct mmo_charstatus*)RFIFOP(fd,16)); break;
case 0x2afe: pc_authfail(RFIFOL(fd,2)); break;
- case 0x2b00: map_setusers(RFIFOL(fd,2)); 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 0x2b09: map_addchariddb(RFIFOL(fd,2), RFIFOP(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;
@@ -991,12 +1106,12 @@ int send_users_tochar(int tid, unsigned int tick, int id, int data) {
int users = 0, i;
struct map_session_data *sd;
- if (char_fd <= 0 || session[char_fd] == NULL)
+ if( char_fd < 1 || session[char_fd] == NULL || !chrif_isconnect() ) // Thanks to Toster
return 0;
WFIFOW(char_fd,0) = 0x2aff;
for (i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data) && sd->state.auth &&
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) && sd->state.auth &&
!((battle_config.hide_GM_session || (sd->status.option & OPTION_HIDE)) && pc_isGM(sd))) {
WFIFOL(char_fd,6+4*users) = sd->status.char_id;
users++;
@@ -1015,14 +1130,19 @@ int send_users_tochar(int tid, unsigned int tick, int id, int data) {
*------------------------------------------
*/
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) {
- printf("Attempt to connect to char-server...\n");
+ 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);
session[char_fd]->func_parse = chrif_parse;
realloc_fifo(char_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
chrif_connect(char_fd);
+ chrif_connected = chrif_isconnect();
#ifndef TXT_ONLY
srvinfo = 0;
} else {
@@ -1032,7 +1152,16 @@ int check_connect_char_server(int tid, unsigned int tick, int id, int data) {
}
#endif /* not TXT_ONLY */
}
-
+ if (chrif_isconnect()) displayed = 0;
+ return 0;
+}
+/*==========================================
+ * I—¹
+ *------------------------------------------
+ */
+int do_final_chrif(void)
+{
+ delete_session(char_fd);
return 0;
}
diff --git a/src/map/chrif.h b/src/map/chrif.h
index de20c3086..f2b258ea9 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -9,6 +9,8 @@ void chrif_setport(int);
int chrif_isconnect(void);
+extern int chrif_connected;
+
int chrif_authreq(struct map_session_data *);
int chrif_save(struct map_session_data*);
int chrif_charselectreq(struct map_session_data *);
@@ -23,9 +25,15 @@ int chrif_saveaccountreg2(struct map_session_data *sd);
int chrif_reloadGMdb(void);
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 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 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
index 9163671a8..c8f190c5a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1,6 +1,7 @@
// $Id: clif.c 2200 2004-11-07 11:49:58Z Yor $
#define DUMP_UNKNOWN_PACKET 1
+#define DUMP_ALL_PACKETS 0
#include <stdio.h>
#include <ctype.h>
@@ -24,11 +25,13 @@
#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"
@@ -52,7 +55,16 @@
#define STATE_BLIND 0x10
-static const int packet_len_table[0x220] = {
+struct Clif_Config clif_config;
+struct packet_db packet_db[MAX_PACKET_VER + 1][MAX_PACKET_DB];
+
+#define USE_PACKET_DB(sd) \
+ clif_config.enable_packet_db && sd->packet_ver == clif_config.packet_db_ver
+
+#define IS_PACKET_DB_VER(cmd) \
+ cmd == clif_config.connect_cmd
+
+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,
@@ -67,12 +79,12 @@ static const int packet_len_table[0x220] = {
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, 23, -1, -1, -1, 0, // 0x8b unknown... size 2 or 23?
+ 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, 6, 2, 27,
+ 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,
@@ -102,13 +114,11 @@ static const int packet_len_table[0x220] = {
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, 19, 0, -1, 24, 0,
+ 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 24, 0, // 0x20c change to 0 (was 19)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
};
-// size list for each packet version after packet version 4.
-static int packet_size_table[9][0x220];
-
// local define
enum {
ALL_CLIENT,
@@ -143,6 +153,7 @@ enum {
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[80];
@@ -151,17 +162,22 @@ char talkie_mes[80];
* mapŽI‚ÌipÝ’è
*------------------------------------------
*/
-void clif_setip(char *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)
+void clif_setport(int port)
{
map_port = port;
}
@@ -170,7 +186,7 @@ void clif_setport(int port)
* mapŽI‚Ìip“Ç‚Ýo‚µ
*------------------------------------------
*/
-in_addr_t clif_getip(void)
+in_addr_t clif_getip(void)
{
return map_ip;
}
@@ -179,7 +195,7 @@ in_addr_t clif_getip(void)
* mapŽI‚Ìport“Ç‚Ýo‚µ
*------------------------------------------
*/
-int clif_getport(void)
+int clif_getport(void)
{
return map_port;
}
@@ -188,13 +204,13 @@ int clif_getport(void)
*
*------------------------------------------
*/
-int clif_countusers(void)
+int clif_countusers(void)
{
int users = 0, i;
struct map_session_data *sd;
for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data) && sd && sd->state.auth &&
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) && sd && sd->state.auth &&
!(battle_config.hide_GM_session && pc_isGM(sd)))
users++;
}
@@ -205,7 +221,7 @@ int clif_countusers(void)
* ‘S‚Ä‚Ìclient‚ɑ΂µ‚Äfunc()ŽÀs
*------------------------------------------
*/
-int clif_foreachclient(int (*func)(struct map_session_data*, va_list),...)
+int clif_foreachclient(int (*func)(struct map_session_data*, va_list),...)
{
int i;
va_list ap;
@@ -213,7 +229,7 @@ int clif_foreachclient(int (*func)(struct map_session_data*, va_list),...)
va_start(ap,func);
for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data) && sd && sd->state.auth)
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) && sd && sd->state.auth)
func(sd, ap);
}
va_end(ap);
@@ -224,14 +240,13 @@ int clif_foreachclient(int (*func)(struct map_session_data*, va_list),...)
* clif_send‚ÅAREA*Žw’莞—p
*------------------------------------------
*/
-int clif_send_sub(struct block_list *bl, va_list ap)
+int clif_send_sub(struct block_list *bl, va_list ap)
{
- unsigned char *buf;
- int len;
struct block_list *src_bl;
- int type;
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);
@@ -243,27 +258,30 @@ int clif_send_sub(struct block_list *bl, va_list ap)
switch(type) {
case AREA_WOS:
- if (bl && bl == src_bl)
+ if (bl == src_bl)
return 0;
break;
case AREA_WOC:
- if ((sd && sd->chatID) || (bl && bl == src_bl))
+ if (sd->chatID || bl == src_bl)
return 0;
break;
case AREA_WOSC:
- if ((sd) && sd->chatID && sd->chatID == ((struct map_session_data*)src_bl)->chatID)
- return 0;
+ {
+ struct map_session_data *ssd = (struct map_session_data *)src_bl;
+ if (ssd && sd->chatID && sd->chatID == ssd->chatID)
+ return 0;
+ }
break;
}
- if (sd) {
+ if (session[sd->fd] != NULL) {
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_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -279,8 +297,7 @@ int clif_send_sub(struct block_list *bl, va_list ap)
*/
int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
int i;
- struct map_session_data *sd;
- struct chat_data *cd;
+ struct map_session_data *sd = NULL;
struct party *p = NULL;
struct guild *g = NULL;
int x0 = 0, x1 = 0, y0 = 0, y1 = 0;
@@ -288,12 +305,15 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
if (type != ALL_CLIENT) {
nullpo_retr(0, bl);
}
+ if (bl && bl->type == BL_PC) {
+ nullpo_retr (0, 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 = session[i]->session_data) != NULL && sd->state.auth) {
- if (packet_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ 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
memcpy(WFIFOP(i,0), buf, len);
WFIFOSET(i,len);
}
@@ -302,8 +322,8 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
break;
case ALL_SAMEMAP: // “¯‚¶ƒ}ƒbƒv‚Ì‘SƒNƒ‰ƒCƒAƒ“ƒg‚É‘—M
for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data) != NULL && sd->state.auth && sd->bl.m == bl->m) {
- if (packet_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ 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
memcpy(WFIFOP(i,0), buf, len);
WFIFOSET(i,len);
}
@@ -321,21 +341,24 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
break;
case CHAT:
case CHAT_WOS:
- cd = (struct chat_data*)bl;
- if (bl->type == BL_PC) {
- sd = (struct map_session_data*)bl;
- cd = (struct chat_data*)map_id2bl(sd->chatID);
- } else if (bl->type != BL_CHAT)
- break;
- if (cd == NULL)
- break;
- for(i = 0; i < cd->users; i++) {
- if (type == CHAT_WOS && cd->usersd[i] == (struct map_session_data*)bl)
- continue;
- if (packet_size_table[cd->usersd[i]->packet_ver-5][RBUFW(buf,0)]) { // 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]
- memcpy(WFIFOP(cd->usersd[i]->fd,0), buf, len);
- WFIFOSET(cd->usersd[i]->fd,len);
+ {
+ 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 if (bl->type != BL_CHAT)
+ 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]
+ memcpy(WFIFOP(cd->usersd[i]->fd,0), buf, len);
+ WFIFOSET(cd->usersd[i]->fd,len);
+ }
}
}
break;
@@ -350,18 +373,18 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
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 (bl->type == BL_PC) {
- sd = (struct map_session_data *)bl;
+ if (sd) {
if (sd->partyspy > 0) {
p = party_search(sd->partyspy);
- } else {
- if (sd->status.party_id > 0)
- p = party_search(sd->status.party_id);
+ } else if (sd->status.party_id > 0) {
+ p = party_search(sd->status.party_id);
}
}
if (p) {
for(i=0;i<MAX_PARTY;i++){
if ((sd = p->member[i].sd) != NULL) {
+ if ((session[sd->fd] == NULL) || (session[sd->fd]->session_data == NULL))
+ continue;
if (sd->bl.id == bl->id && (type == PARTY_WOS ||
type == PARTY_SAMEMAP_WOS || type == PARTY_AREA_WOS))
continue;
@@ -371,7 +394,7 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
(sd->bl.x < x0 || sd->bl.y < y0 ||
sd->bl.x > x1 || sd->bl.y > y1))
continue;
- if (packet_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -381,9 +404,9 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
}
}
for (i = 0; i < fd_max; i++){
- if (session[i] && (sd = session[i]->session_data) != NULL && sd->state.auth) {
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL && sd->state.auth) {
if (sd->partyspy == p->party_id) {
- if (packet_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -393,8 +416,7 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
}
break;
case SELF:
- sd = (struct map_session_data *)bl;
- if (packet_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ if (sd && packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -410,13 +432,11 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
y1 = bl->y + AREA_SIZE;
case GUILD:
case GUILD_WOS:
- if (bl && bl->type == BL_PC) { // guildspy [Syrus22]
- sd = (struct map_session_data *)bl;
+ if (sd) { // guildspy [Syrus22]
if (sd->guildspy > 0) {
g = guild_search(sd->guildspy);
- } else {
- if (sd->status.guild_id > 0)
- g = guild_search(sd->status.guild_id);
+ } else if (sd->status.guild_id > 0) {
+ g = guild_search(sd->status.guild_id);
}
}
if (g) {
@@ -424,16 +444,18 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
if ((sd = g->member[i].sd) != NULL) {
if (type == GUILD_WOS && sd->bl.id == bl->id)
continue;
- if (packet_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ if (sd->packet_ver > MAX_PACKET_VER)
+ continue;
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
}
}
for (i = 0; i < fd_max; i++){
- if (session[i] && (sd = session[i]->session_data) != NULL && sd->state.auth) {
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL && sd->state.auth) {
if (sd->guildspy == g->guild_id) {
- if (packet_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -444,10 +466,8 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
break;
case GUILD_SAMEMAP:
case GUILD_SAMEMAP_WOS:
- if (bl->type == BL_PC) {
- sd = (struct map_session_data *)bl;
- if (sd->status.guild_id > 0)
- g = guild_search(sd->status.guild_id);
+ if (sd && sd->status.guild_id > 0) {
+ g = guild_search(sd->status.guild_id);
}
if (g) {
for(i = 0; i < g->max_member; i++) {
@@ -461,7 +481,7 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
(sd->bl.x < x0 || sd->bl.y < y0 ||
sd->bl.x > x1 || sd->bl.y > y1))
continue;
- if (packet_size_table[sd->packet_ver-5][RBUFW(buf,0)]) { // packet must exist for the client version
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -580,7 +600,7 @@ static int clif_set009e(struct flooritem_data *fitem,unsigned char *buf) {
*------------------------------------------
*/
int clif_dropflooritem(struct flooritem_data *fitem) {
- char buf[64];
+ unsigned char buf[64];
nullpo_retr(0, fitem);
@@ -685,7 +705,7 @@ static int clif_set0078(struct map_session_data *sd, unsigned char *buf) {
WBUFW(buf,0) = 0x78;
WBUFL(buf,2) = sd->bl.id;
- WBUFW(buf,6) = battle_get_speed(&sd->bl);
+ WBUFW(buf,6) = status_get_speed(&sd->bl);
WBUFW(buf,8) = sd->opt1;
WBUFW(buf,10) = sd->opt2;
WBUFW(buf,12) = sd->status.option;
@@ -697,7 +717,7 @@ static int clif_set0078(struct map_session_data *sd, unsigned char *buf) {
WBUFB(buf,49) = 5;
WBUFB(buf,50) = 5;
WBUFB(buf,51) = 0;
- WBUFW(buf,52) = ((level = battle_get_lv(&sd->bl)) > battle_config.max_lv) ? battle_config.max_lv : level;
+ WBUFW(buf,52) = ((level = status_get_lv(&sd->bl)) > battle_config.max_lv) ? battle_config.max_lv : level;
return packet_len_table[0x78];
}
@@ -775,7 +795,7 @@ static int clif_set0078(struct map_session_data *sd, unsigned char *buf) {
WBUFB(buf,49) = 5;
WBUFB(buf,50) = 5;
WBUFB(buf,51) = sd->state.dead_sit;
- WBUFW(buf,52) = ((level = battle_get_lv(&sd->bl)) > battle_config.max_lv) ? battle_config.max_lv : level;
+ WBUFW(buf,52) = ((level = status_get_lv(&sd->bl)) > battle_config.max_lv) ? battle_config.max_lv : level;
return packet_len_table[0x1d8];
#endif
@@ -794,7 +814,7 @@ static int clif_set007b(struct map_session_data *sd,unsigned char *buf) {
WBUFW(buf,0)=0x7b;
WBUFL(buf,2)=sd->bl.id;
- WBUFW(buf,6)=battle_get_speed(&sd->bl);
+ WBUFW(buf,6)=status_get_speed(&sd->bl);
WBUFW(buf,8)=sd->opt1;
WBUFW(buf,10)=sd->opt2;
WBUFW(buf,12)=sd->status.option;
@@ -806,7 +826,7 @@ static int clif_set007b(struct map_session_data *sd,unsigned char *buf) {
WBUFB(buf,55)=0;
WBUFB(buf,56)=5;
WBUFB(buf,57)=5;
- WBUFW(buf,58)=((level = battle_get_lv(&sd->bl))>battle_config.max_lv)? battle_config.max_lv:level;
+ WBUFW(buf,58)=((level = status_get_lv(&sd->bl))>battle_config.max_lv)? battle_config.max_lv:level;
return packet_len_table[0x7b];
}
@@ -896,17 +916,17 @@ static int clif_set007b(struct map_session_data *sd,unsigned char *buf) {
* ƒNƒ‰ƒXƒ`ƒFƒ“ƒW type‚ÍMob‚ÌꇂÍ1‚Å‘¼‚Í0H
*------------------------------------------
*/
-int clif_class_change(struct block_list *bl,int class,int type)
+int clif_class_change(struct block_list *bl,int class_,int type)
{
- char buf[16];
+ unsigned char buf[16];
nullpo_retr(0, bl);
- if(class >= MAX_PC_CLASS) {
+ if(class_ >= MAX_PC_CLASS) {
WBUFW(buf,0)=0x1b0;
WBUFL(buf,2)=bl->id;
WBUFB(buf,6)=type;
- WBUFL(buf,7)=class;
+ WBUFL(buf,7)=class_;
clif_send(buf,packet_len_table[0x1b0],bl,AREA);
}
@@ -916,9 +936,9 @@ int clif_class_change(struct block_list *bl,int class,int type)
*
*------------------------------------------
*/
-int clif_mob_class_change(struct mob_data *md, int class) {
- char buf[16];
- int view = mob_get_viewclass(class);
+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);
@@ -955,9 +975,9 @@ int clif_mob_equip(struct mob_data *md, int nameid) {
* MOB•\Ž¦1
*------------------------------------------
*/
-static int clif_mob0078(struct mob_data *md, unsigned char *buf)
+static int clif_mob0078(struct mob_data *md, unsigned char *buf)
{
- int level;
+ int level, i;
memset(buf,0,packet_len_table[0x78]);
@@ -965,25 +985,25 @@ static int clif_mob0078(struct mob_data *md, unsigned char *buf)
WBUFW(buf,0)=0x78;
WBUFL(buf,2)=md->bl.id;
- WBUFW(buf,6)=battle_get_speed(&md->bl);
+ 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)=mob_get_viewclass(md->class);
- if((mob_get_viewclass(md->class) <= 23) || (mob_get_viewclass(md->class) == 812) || (mob_get_viewclass(md->class) >= 4001)) {
- WBUFW(buf,12)|=mob_db[md->class].option;
- 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); //Add for player monster dye - Valaris
- WBUFB(buf,45)=mob_get_sex(md->class);
- }
-
- if (md->class >= 1285 && md->class <= 1287 && md->guild_id) { // Added guardian emblems [Valaris]
+ WBUFW(buf,14)=mob_get_viewclass(md->class_);
+ if((i=mob_get_viewclass(md->class_)) <= 23 || i == 812 || i >= 4001) {
+ WBUFW(buf,12)|=mob_db[md->class_].option;
+ 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_); //Add for player monster dye - Valaris
+ WBUFB(buf,45)=mob_get_sex(md->class_);
+ }
+
+ if (md->class_ >= 1285 && md->class_ <= 1287 && md->guild_id) { // Added guardian emblems [Valaris]
struct guild *g;
struct guild_castle *gc=guild_mapname2gc(map[md->bl.m].name);
if (gc && gc->guild_id > 0) {
@@ -999,7 +1019,7 @@ static int clif_mob0078(struct mob_data *md, unsigned char *buf)
WBUFB(buf,48)|=md->dir&0x0f;
WBUFB(buf,49)=5;
WBUFB(buf,50)=5;
- WBUFW(buf,52)=((level = battle_get_lv(&md->bl))>battle_config.max_lv)? battle_config.max_lv:level;
+ WBUFW(buf,52)=((level = status_get_lv(&md->bl))>battle_config.max_lv)? battle_config.max_lv:level;
return packet_len_table[0x78];
}
@@ -1017,27 +1037,27 @@ static int clif_mob007b(struct mob_data *md, unsigned char *buf) {
WBUFW(buf,0)=0x7b;
WBUFL(buf,2)=md->bl.id;
- WBUFW(buf,6)=battle_get_speed(&md->bl);
+ 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)=mob_get_viewclass(md->class);
- if ((mob_get_viewclass(md->class) < 24) || (mob_get_viewclass(md->class) > 4000)) {
- WBUFW(buf,12)|=mob_db[md->class].option;
- 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,14)=mob_get_viewclass(md->class_);
+ if ((mob_get_viewclass(md->class_) < 24) || (mob_get_viewclass(md->class_) > 4000)) {
+ WBUFW(buf,12)|=mob_db[md->class_].option;
+ 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); //Add for player monster dye - Valaris
- WBUFB(buf,49)=mob_get_sex(md->class);
+ 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_); //Add for player monster dye - Valaris
+ WBUFB(buf,49)=mob_get_sex(md->class_);
} else
WBUFL(buf,22)=gettick();
- if(md->class >= 1285 && md->class <= 1287 && md->guild_id) { // Added guardian emblems [Valaris]
+ if(md->class_ >= 1285 && md->class_ <= 1287 && md->guild_id) { // Added guardian emblems [Valaris]
struct guild *g;
struct guild_castle *gc=guild_mapname2gc(map[md->bl.m].name);
if(gc && gc->guild_id > 0){
@@ -1052,7 +1072,7 @@ static int clif_mob007b(struct mob_data *md, unsigned char *buf) {
WBUFPOS2(buf,50,md->bl.x,md->bl.y,md->to_x,md->to_y);
WBUFB(buf,56)=5;
WBUFB(buf,57)=5;
- WBUFW(buf,58)=((level = battle_get_lv(&md->bl))>battle_config.max_lv)? battle_config.max_lv:level;
+ WBUFW(buf,58)=((level = status_get_lv(&md->bl))>battle_config.max_lv)? battle_config.max_lv:level;
return packet_len_table[0x7b];
}
@@ -1071,8 +1091,8 @@ static int clif_npc0078(struct npc_data *nd, unsigned char *buf) {
WBUFW(buf,0)=0x78;
WBUFL(buf,2)=nd->bl.id;
WBUFW(buf,6)=nd->speed;
- WBUFW(buf,14)=nd->class;
- if ((nd->class == 722) && (nd->u.scr.guild_id > 0) && ((g=guild_search(nd->u.scr.guild_id)) != NULL)) {
+ WBUFW(buf,14)=nd->class_;
+ if ((nd->class_ == 722) && (nd->u.scr.guild_id > 0) && ((g=guild_search(nd->u.scr.guild_id)) != NULL)) {
WBUFL(buf,22)=g->emblem_id;
WBUFL(buf,26)=g->guild_id;
}
@@ -1095,8 +1115,8 @@ static int clif_npc007b(struct npc_data *nd, unsigned char *buf) {
WBUFW(buf,0)=0x7b;
WBUFL(buf,2)=nd->bl.id;
WBUFW(buf,6)=nd->speed;
- WBUFW(buf,14)=nd->class;
- if ((nd->class == 722) && (nd->u.scr.guild_id > 0) && ((g=guild_search(nd->u.scr.guild_id)) != NULL)) {
+ WBUFW(buf,14)=nd->class_;
+ if ((nd->class_ == 722) && (nd->u.scr.guild_id > 0) && ((g=guild_search(nd->u.scr.guild_id)) != NULL)) {
WBUFL(buf,22)=g->emblem_id;
WBUFL(buf,26)=g->guild_id;
}
@@ -1123,18 +1143,18 @@ static int clif_pet0078(struct pet_data *pd, unsigned char *buf) {
WBUFW(buf,0)=0x78;
WBUFL(buf,2)=pd->bl.id;
WBUFW(buf,6)=pd->speed;
- WBUFW(buf,14)=mob_get_viewclass(pd->class);
- if((mob_get_viewclass(pd->class) < 24) || (mob_get_viewclass(pd->class) > 4000)) {
- WBUFW(buf,12)=mob_db[pd->class].option;
- 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); //Add for player pet dye - Valaris
- WBUFB(buf,45)=mob_get_sex(pd->class);
+ WBUFW(buf,14)=mob_get_viewclass(pd->class_);
+ if((mob_get_viewclass(pd->class_) < 24) || (mob_get_viewclass(pd->class_) > 4000)) {
+ WBUFW(buf,12)=mob_db[pd->class_].option;
+ 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_); //Add for player pet dye - Valaris
+ WBUFB(buf,45)=mob_get_sex(pd->class_);
} else {
WBUFW(buf,16)=0x14;
if((view = itemdb_viewid(pd->equip)) > 0)
@@ -1146,7 +1166,7 @@ static int clif_pet0078(struct pet_data *pd, unsigned char *buf) {
WBUFB(buf,48)|=pd->dir&0x0f;
WBUFB(buf,49)=0;
WBUFB(buf,50)=0;
- WBUFW(buf,52)=((level = battle_get_lv(&pd->bl))>battle_config.max_lv)? battle_config.max_lv:level;
+ WBUFW(buf,52)=((level = status_get_lv(&pd->bl))>battle_config.max_lv)? battle_config.max_lv:level;
return packet_len_table[0x78];
}
@@ -1165,19 +1185,19 @@ static int clif_pet007b(struct pet_data *pd, unsigned char *buf) {
WBUFW(buf,0)=0x7b;
WBUFL(buf,2)=pd->bl.id;
WBUFW(buf,6)=pd->speed;
- WBUFW(buf,14)=mob_get_viewclass(pd->class);
- if((mob_get_viewclass(pd->class) < 24) || (mob_get_viewclass(pd->class) > 4000)) {
- WBUFW(buf,12)=mob_db[pd->class].option;
- 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,14)=mob_get_viewclass(pd->class_);
+ if((mob_get_viewclass(pd->class_) < 24) || (mob_get_viewclass(pd->class_) > 4000)) {
+ WBUFW(buf,12)=mob_db[pd->class_].option;
+ 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); //Add for player pet dye - Valaris
- WBUFB(buf,49)=mob_get_sex(pd->class);
+ 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_); //Add for player pet dye - Valaris
+ WBUFB(buf,49)=mob_get_sex(pd->class_);
} else {
WBUFW(buf,16)=0x14;
if ((view = itemdb_viewid(pd->equip)) > 0)
@@ -1189,7 +1209,7 @@ static int clif_pet007b(struct pet_data *pd, unsigned char *buf) {
WBUFPOS2(buf,50,pd->bl.x,pd->bl.y,pd->to_x,pd->to_y);
WBUFB(buf,56)=0;
WBUFB(buf,57)=0;
- WBUFW(buf,58)=((level = battle_get_lv(&pd->bl))>battle_config.max_lv)? battle_config.max_lv:level;
+ WBUFW(buf,58)=((level = status_get_lv(&pd->bl))>battle_config.max_lv)? battle_config.max_lv:level;
return packet_len_table[0x7b];
}
@@ -1281,11 +1301,11 @@ int clif_spawnpc(struct map_session_data *sd) {
clif_guild_emblem(sd,g);
} // end addition [Valaris]
- if (sd->status.class==13 || sd->status.class==21 || sd->status.class==4014 || sd->status.class==4022)
+ if (sd->status.class_==13 || sd->status.class_==21 || sd->status.class_==4014 || sd->status.class_==4022)
pc_setoption(sd,sd->status.option|0x0020); // [Valaris]
- if ((pc_isriding(sd) && pc_checkskill(sd,KN_RIDING)>0) && (sd->status.class==7 ||
- sd->status.class==14 || sd->status.class==4008 || sd->status.class==4015))
+ if ((pc_isriding(sd) && pc_checkskill(sd,KN_RIDING)>0) && (sd->status.class_==7 ||
+ sd->status.class_==14 || sd->status.class_==4008 || sd->status.class_==4015))
pc_setriding(sd); // update peco riders for people upgrading athena [Valaris]
@@ -1314,7 +1334,7 @@ int clif_spawnnpc(struct npc_data *nd)
nullpo_retr(0, nd);
- if(nd->class < 0 || nd->flag&1 || nd->class == INVISIBLE_CLASS)
+ if(nd->class_ < 0 || nd->flag&1 || nd->class_ == INVISIBLE_CLASS)
return 0;
memset(buf,0,packet_len_table[0x7c]);
@@ -1322,7 +1342,7 @@ int clif_spawnnpc(struct npc_data *nd)
WBUFW(buf,0)=0x7c;
WBUFL(buf,2)=nd->bl.id;
WBUFW(buf,6)=nd->speed;
- WBUFW(buf,20)=nd->class;
+ WBUFW(buf,20)=nd->class_;
WBUFPOS(buf,36,nd->bl.x,nd->bl.y);
clif_send(buf,packet_len_table[0x7c],&nd->bl,AREA);
@@ -1344,7 +1364,7 @@ int clif_spawnmob(struct mob_data *md)
nullpo_retr(0, md);
- if (mob_get_viewclass(md->class) > 23 ) {
+ if (mob_get_viewclass(md->class_) > 23) {
memset(buf,0,packet_len_table[0x7c]);
WBUFW(buf,0)=0x7c;
@@ -1353,7 +1373,7 @@ int clif_spawnmob(struct mob_data *md)
WBUFW(buf,8)=md->opt1;
WBUFW(buf,10)=md->opt2;
WBUFW(buf,12)=md->option;
- WBUFW(buf,20)=mob_get_viewclass(md->class);
+ WBUFW(buf,20)=mob_get_viewclass(md->class_);
WBUFPOS(buf,36,md->bl.x,md->bl.y);
clif_send(buf,packet_len_table[0x7c],&md->bl,AREA);
}
@@ -1361,8 +1381,8 @@ int clif_spawnmob(struct mob_data *md)
len = clif_mob0078(md,buf);
clif_send(buf,len,&md->bl,AREA);
- if (mob_get_equip(md->class) > 0) // mob equipment [Valaris]
- clif_mob_equip(md,mob_get_equip(md->class));
+ if (mob_get_equip(md->class_) > 0) // mob equipment [Valaris]
+ clif_mob_equip(md,mob_get_equip(md->class_));
if(md->size==2) // tiny/big mobs [Valaris]
clif_specialeffect(&md->bl,423,0);
@@ -1385,13 +1405,13 @@ int clif_spawnpet(struct pet_data *pd)
nullpo_retr(0, pd);
- if (mob_get_viewclass(pd->class) >= MAX_PC_CLASS) {
+ if (mob_get_viewclass(pd->class_) >= MAX_PC_CLASS) {
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)=mob_get_viewclass(pd->class);
+ WBUFW(buf,20)=mob_get_viewclass(pd->class_);
WBUFPOS(buf,36,pd->bl.x,pd->bl.y);
clif_send(buf,packet_len_table[0x7c],&pd->bl,AREA);
@@ -1517,6 +1537,7 @@ static int clif_waitclose(int tid, unsigned int tick, int id, int data) {
if (session[id])
session[id]->eof = 1;
+ close(id);
return 0;
}
@@ -1528,7 +1549,7 @@ void clif_setwaitclose(int fd) {
struct map_session_data *sd;
// if player is not already in the game (double connection probably)
- if ((sd = session[fd]->session_data) == NULL) {
+ 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
@@ -1584,7 +1605,7 @@ int clif_changemapserver(struct map_session_data *sd, char *mapname, int x, int
*------------------------------------------
*/
int clif_fixpos(struct block_list *bl) {
- char buf[16];
+ unsigned char buf[16];
nullpo_retr(0, bl);
@@ -1690,7 +1711,7 @@ int clif_scriptmes(struct map_session_data *sd, int npcid, char *mes) {
WFIFOW(fd,0)=0xb4;
WFIFOW(fd,2)=strlen(mes)+9;
WFIFOL(fd,4)=npcid;
- strcpy(WFIFOP(fd,8),mes);
+ strcpy((char*)WFIFOP(fd,8),mes);
WFIFOSET(fd,WFIFOW(fd,2));
return 0;
@@ -1743,7 +1764,7 @@ int clif_scriptmenu(struct map_session_data *sd, int npcid, char *mes) {
WFIFOW(fd,0)=0xb7;
WFIFOW(fd,2)=strlen(mes)+8;
WFIFOL(fd,4)=npcid;
- strcpy(WFIFOP(fd,8),mes);
+ strcpy((char*)WFIFOP(fd,8),mes);
WFIFOSET(fd,WFIFOW(fd,2));
return 0;
@@ -1816,7 +1837,7 @@ int clif_cutin(struct map_session_data *sd, char *image, int type) {
fd=sd->fd;
WFIFOW(fd,0)=0x1b3;
- memcpy(WFIFOP(fd,2),image,64);
+ strncpy((char*)WFIFOP(fd,2),image,64);
WFIFOB(fd,66)=type;
WFIFOSET(fd,packet_len_table[0x1b3]);
@@ -2067,9 +2088,9 @@ int clif_storageitemlist(struct map_session_data *sd,struct storage *stor)
#if PACKETVER < 5
WBUFW(buf,0)=0xa5;
for(i=0,n=0;i<MAX_STORAGE;i++){
- if(stor->storage[i].nameid<=0)
+ if(stor->storage_[i].nameid<=0)
continue;
- nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid));
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
if(itemdb_isequip2(id))
continue;
@@ -2077,10 +2098,10 @@ int clif_storageitemlist(struct map_session_data *sd,struct storage *stor)
if(id->view_id > 0)
WBUFW(buf,n*10+6)=id->view_id;
else
- WBUFW(buf,n*10+6)=stor->storage[i].nameid;
+ WBUFW(buf,n*10+6)=stor->storage_[i].nameid;
WBUFB(buf,n*10+8)=id->type;;
- WBUFB(buf,n*10+9)=stor->storage[i].identify;
- WBUFW(buf,n*10+10)=stor->storage[i].amount;
+ 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++;
}
@@ -2091,9 +2112,9 @@ int clif_storageitemlist(struct map_session_data *sd,struct storage *stor)
#else
WBUFW(buf,0)=0x1f0;
for(i=0,n=0;i<MAX_STORAGE;i++){
- if(stor->storage[i].nameid<=0)
+ if(stor->storage_[i].nameid<=0)
continue;
- nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid));
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
if(itemdb_isequip2(id))
continue;
@@ -2101,15 +2122,15 @@ int clif_storageitemlist(struct map_session_data *sd,struct storage *stor)
if(id->view_id > 0)
WBUFW(buf,n*18+6)=id->view_id;
else
- WBUFW(buf,n*18+6)=stor->storage[i].nameid;
+ WBUFW(buf,n*18+6)=stor->storage_[i].nameid;
WBUFB(buf,n*18+8)=id->type;;
- WBUFB(buf,n*18+9)=stor->storage[i].identify;
- WBUFW(buf,n*18+10)=stor->storage[i].amount;
+ WBUFB(buf,n*18+9)=stor->storage_[i].identify;
+ WBUFW(buf,n*18+10)=stor->storage_[i].amount;
WBUFW(buf,n*18+12)=0;
- WBUFW(buf,n*18+14)=stor->storage[i].card[0];
- WBUFW(buf,n*18+16)=stor->storage[i].card[1];
- WBUFW(buf,n*18+18)=stor->storage[i].card[2];
- WBUFW(buf,n*18+20)=stor->storage[i].card[3];
+ WBUFW(buf,n*18+14)=stor->storage_[i].card[0];
+ WBUFW(buf,n*18+16)=stor->storage_[i].card[1];
+ WBUFW(buf,n*18+18)=stor->storage_[i].card[2];
+ WBUFW(buf,n*18+20)=stor->storage_[i].card[3];
n++;
}
if(n){
@@ -2137,44 +2158,44 @@ int clif_storageequiplist(struct map_session_data *sd,struct storage *stor)
buf = WFIFOP(fd,0);
WBUFW(buf,0)=0xa6;
for(i=0,n=0;i<MAX_STORAGE;i++){
- if(stor->storage[i].nameid<=0)
+ if(stor->storage_[i].nameid<=0)
continue;
- nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid));
+ 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;
+ WBUFW(buf,n*20+6)=stor->storage_[i].nameid;
WBUFB(buf,n*20+8)=id->type;
- WBUFB(buf,n*20+9)=stor->storage[i].identify;
+ 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;
- if(stor->storage[i].card[0]==0x00ff || stor->storage[i].card[0]==0x00fe || stor->storage[i].card[0]==(short)0xff00) {
- WBUFW(buf,n*20+16)=stor->storage[i].card[0];
- WBUFW(buf,n*20+18)=stor->storage[i].card[1];
- WBUFW(buf,n*20+20)=stor->storage[i].card[2];
- WBUFW(buf,n*20+22)=stor->storage[i].card[3];
+ 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;
+ if(stor->storage_[i].card[0]==0x00ff || stor->storage_[i].card[0]==0x00fe || stor->storage_[i].card[0]==(short)0xff00) {
+ WBUFW(buf,n*20+16)=stor->storage_[i].card[0];
+ WBUFW(buf,n*20+18)=stor->storage_[i].card[1];
+ WBUFW(buf,n*20+20)=stor->storage_[i].card[2];
+ WBUFW(buf,n*20+22)=stor->storage_[i].card[3];
} else {
- if(stor->storage[i].card[0] > 0 && (j=itemdb_viewid(stor->storage[i].card[0])) > 0)
+ if(stor->storage_[i].card[0] > 0 && (j=itemdb_viewid(stor->storage_[i].card[0])) > 0)
WBUFW(buf,n*20+16)=j;
else
- WBUFW(buf,n*20+16)=stor->storage[i].card[0];
- if(stor->storage[i].card[1] > 0 && (j=itemdb_viewid(stor->storage[i].card[1])) > 0)
+ WBUFW(buf,n*20+16)=stor->storage_[i].card[0];
+ if(stor->storage_[i].card[1] > 0 && (j=itemdb_viewid(stor->storage_[i].card[1])) > 0)
WBUFW(buf,n*20+18)=j;
else
- WBUFW(buf,n*20+18)=stor->storage[i].card[1];
- if(stor->storage[i].card[2] > 0 && (j=itemdb_viewid(stor->storage[i].card[2])) > 0)
+ WBUFW(buf,n*20+18)=stor->storage_[i].card[1];
+ if(stor->storage_[i].card[2] > 0 && (j=itemdb_viewid(stor->storage_[i].card[2])) > 0)
WBUFW(buf,n*20+20)=j;
else
- WBUFW(buf,n*20+20)=stor->storage[i].card[2];
- if(stor->storage[i].card[3] > 0 && (j=itemdb_viewid(stor->storage[i].card[3])) > 0)
+ WBUFW(buf,n*20+20)=stor->storage_[i].card[2];
+ if(stor->storage_[i].card[3] > 0 && (j=itemdb_viewid(stor->storage_[i].card[3])) > 0)
WBUFW(buf,n*20+22)=j;
else
- WBUFW(buf,n*20+22)=stor->storage[i].card[3];
+ WBUFW(buf,n*20+22)=stor->storage_[i].card[3];
}
n++;
}
@@ -2204,9 +2225,9 @@ int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage *
#if PACKETVER < 5
WBUFW(buf,0)=0xa5;
for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){
- if(stor->storage[i].nameid<=0)
+ if(stor->storage_[i].nameid<=0)
continue;
- nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid));
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
if(itemdb_isequip2(id))
continue;
@@ -2214,10 +2235,10 @@ int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage *
if(id->view_id > 0)
WBUFW(buf,n*10+6)=id->view_id;
else
- WBUFW(buf,n*10+6)=stor->storage[i].nameid;
+ WBUFW(buf,n*10+6)=stor->storage_[i].nameid;
WBUFB(buf,n*10+8)=id->type;;
- WBUFB(buf,n*10+9)=stor->storage[i].identify;
- WBUFW(buf,n*10+10)=stor->storage[i].amount;
+ 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++;
}
@@ -2228,9 +2249,9 @@ int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage *
#else
WBUFW(buf,0)=0x1f0;
for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){
- if(stor->storage[i].nameid<=0)
+ if(stor->storage_[i].nameid<=0)
continue;
- nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid));
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
if(itemdb_isequip2(id))
continue;
@@ -2238,15 +2259,15 @@ int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage *
if(id->view_id > 0)
WBUFW(buf,n*18+6)=id->view_id;
else
- WBUFW(buf,n*18+6)=stor->storage[i].nameid;
+ WBUFW(buf,n*18+6)=stor->storage_[i].nameid;
WBUFB(buf,n*18+8)=id->type;;
- WBUFB(buf,n*18+9)=stor->storage[i].identify;
- WBUFW(buf,n*18+10)=stor->storage[i].amount;
+ WBUFB(buf,n*18+9)=stor->storage_[i].identify;
+ WBUFW(buf,n*18+10)=stor->storage_[i].amount;
WBUFW(buf,n*18+12)=0;
- WBUFW(buf,n*18+14)=stor->storage[i].card[0];
- WBUFW(buf,n*18+16)=stor->storage[i].card[1];
- WBUFW(buf,n*18+18)=stor->storage[i].card[2];
- WBUFW(buf,n*18+20)=stor->storage[i].card[3];
+ WBUFW(buf,n*18+14)=stor->storage_[i].card[0];
+ WBUFW(buf,n*18+16)=stor->storage_[i].card[1];
+ WBUFW(buf,n*18+18)=stor->storage_[i].card[2];
+ WBUFW(buf,n*18+20)=stor->storage_[i].card[3];
n++;
}
if(n){
@@ -2274,44 +2295,44 @@ int clif_guildstorageequiplist(struct map_session_data *sd,struct guild_storage
WBUFW(buf,0)=0xa6;
for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){
- if(stor->storage[i].nameid<=0)
+ if(stor->storage_[i].nameid<=0)
continue;
- nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid));
+ 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;
+ WBUFW(buf,n*20+6)=stor->storage_[i].nameid;
WBUFB(buf,n*20+8)=id->type;
- WBUFB(buf,n*20+9)=stor->storage[i].identify;
+ 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;
- if(stor->storage[i].card[0]==0x00ff || stor->storage[i].card[0]==0x00fe || stor->storage[i].card[0]==(short)0xff00) {
- WBUFW(buf,n*20+16)=stor->storage[i].card[0];
- WBUFW(buf,n*20+18)=stor->storage[i].card[1];
- WBUFW(buf,n*20+20)=stor->storage[i].card[2];
- WBUFW(buf,n*20+22)=stor->storage[i].card[3];
+ 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;
+ if(stor->storage_[i].card[0]==0x00ff || stor->storage_[i].card[0]==0x00fe || stor->storage_[i].card[0]==(short)0xff00) {
+ WBUFW(buf,n*20+16)=stor->storage_[i].card[0];
+ WBUFW(buf,n*20+18)=stor->storage_[i].card[1];
+ WBUFW(buf,n*20+20)=stor->storage_[i].card[2];
+ WBUFW(buf,n*20+22)=stor->storage_[i].card[3];
} else {
- if(stor->storage[i].card[0] > 0 && (j=itemdb_viewid(stor->storage[i].card[0])) > 0)
+ if(stor->storage_[i].card[0] > 0 && (j=itemdb_viewid(stor->storage_[i].card[0])) > 0)
WBUFW(buf,n*20+16)=j;
else
- WBUFW(buf,n*20+16)=stor->storage[i].card[0];
- if(stor->storage[i].card[1] > 0 && (j=itemdb_viewid(stor->storage[i].card[1])) > 0)
+ WBUFW(buf,n*20+16)=stor->storage_[i].card[0];
+ if(stor->storage_[i].card[1] > 0 && (j=itemdb_viewid(stor->storage_[i].card[1])) > 0)
WBUFW(buf,n*20+18)=j;
else
- WBUFW(buf,n*20+18)=stor->storage[i].card[1];
- if(stor->storage[i].card[2] > 0 && (j=itemdb_viewid(stor->storage[i].card[2])) > 0)
+ WBUFW(buf,n*20+18)=stor->storage_[i].card[1];
+ if(stor->storage_[i].card[2] > 0 && (j=itemdb_viewid(stor->storage_[i].card[2])) > 0)
WBUFW(buf,n*20+20)=j;
else
- WBUFW(buf,n*20+20)=stor->storage[i].card[2];
- if(stor->storage[i].card[3] > 0 && (j=itemdb_viewid(stor->storage[i].card[3])) > 0)
+ WBUFW(buf,n*20+20)=stor->storage_[i].card[2];
+ if(stor->storage_[i].card[3] > 0 && (j=itemdb_viewid(stor->storage_[i].card[3])) > 0)
WBUFW(buf,n*20+22)=j;
else
- WBUFW(buf,n*20+22)=stor->storage[i].card[3];
+ WBUFW(buf,n*20+22)=stor->storage_[i].card[3];
}
n++;
}
@@ -2384,6 +2405,8 @@ int clif_updatestatus(struct map_session_data *sd,int type)
break;
case SP_HP:
WFIFOL(fd,4)=sd->status.hp;
+ if(battle_config.disp_hpmeter)
+ clif_hpmeter(sd);
break;
case SP_SP:
WFIFOL(fd,4)=sd->status.sp;
@@ -2828,7 +2851,7 @@ int clif_unequipitemack(struct map_session_data *sd,int n,int pos,int ok)
*/
int clif_misceffect(struct block_list* bl,int type)
{
- char buf[32];
+ unsigned char buf[32];
nullpo_retr(0, bl);
@@ -2862,7 +2885,7 @@ int clif_misceffect2(struct block_list *bl, int type) {
*/
int clif_changeoption(struct block_list* bl)
{
- char buf[32];
+ unsigned char buf[32];
short option;
struct status_change *sc_data;
static const int omask[]={ 0x10,0x20 };
@@ -2871,18 +2894,18 @@ int clif_changeoption(struct block_list* bl)
nullpo_retr(0, bl);
- option = *battle_get_option(bl);
- sc_data = battle_get_sc_data(bl);
+ option = *status_get_option(bl);
+ sc_data = status_get_sc_data(bl);
WBUFW(buf,0) = 0x119;
WBUFL(buf,2) = bl->id;
- WBUFW(buf,6) = *battle_get_opt1(bl);
- WBUFW(buf,8) = *battle_get_opt2(bl);
+ WBUFW(buf,6) = *status_get_opt1(bl);
+ WBUFW(buf,8) = *status_get_opt2(bl);
WBUFW(buf,10) = option;
WBUFB(buf,12) = 0; // ??
if(bl->type==BL_PC) { // disguises [Valaris]
- struct map_session_data *sd=((struct map_session_data *)bl);
+ struct map_session_data *sd=(struct map_session_data *)bl;
if(sd && sd->disguise > 23 && sd->disguise < 4001) {
clif_send(buf,packet_len_table[0x119],bl,AREA_WOS);
clif_spawnpc(sd);
@@ -2895,9 +2918,9 @@ int clif_changeoption(struct block_list* bl)
for(i=0;i<sizeof(omask)/sizeof(omask[0]);i++){
if( option&omask[i] ){
if( sc_data[scnum[i]].timer==-1)
- skill_status_change_start(bl,scnum[i],0,0,0,0,0,0);
+ status_change_start(bl,scnum[i],0,0,0,0,0,0);
} else {
- skill_status_change_end(bl,scnum[i],-1);
+ status_change_end(bl,scnum[i],-1);
}
}
@@ -2929,7 +2952,7 @@ int clif_useitemack(struct map_session_data *sd,int index,int amount,int ok)
WFIFOB(fd,6)=ok;
WFIFOSET(fd,packet_len_table[0xa8]);
#else
- char buf[32];
+ unsigned char buf[32];
WBUFW(buf,0)=0x1c8;
WBUFW(buf,2)=index+2;
@@ -2971,19 +2994,19 @@ int clif_createchat(struct map_session_data *sd,int fail)
*/
int clif_dispchat(struct chat_data *cd,int fd)
{
- char buf[128]; // Å‘åtitle(60ƒoƒCƒg)+17
+ 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(cd->title)+17;
+ 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(WBUFP(buf,17),cd->title);
+ strcpy((char*)WBUFP(buf,17),(const char*)cd->title);
if(fd){
memcpy(WFIFOP(fd,0),buf,WBUFW(buf,2));
WFIFOSET(fd,WBUFW(buf,2));
@@ -3001,19 +3024,19 @@ int clif_dispchat(struct chat_data *cd,int fd)
*/
int clif_changechatstatus(struct chat_data *cd)
{
- char buf[128]; // Å‘åtitle(60ƒoƒCƒg)+17
+ 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(cd->title)+17;
+ 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(WBUFP(buf,17),cd->title);
+ strcpy((char*)WBUFP(buf,17),(const char*)cd->title);
clif_send(buf,WBUFW(buf,2),&cd->usersd[0]->bl,CHAT);
return 0;
@@ -3025,7 +3048,7 @@ int clif_changechatstatus(struct chat_data *cd)
*/
int clif_clearchat(struct chat_data *cd,int fd)
{
- char buf[32];
+ unsigned char buf[32];
nullpo_retr(0, cd);
@@ -3091,7 +3114,7 @@ int clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
*/
int clif_addchat(struct chat_data* cd,struct map_session_data *sd)
{
- char buf[32];
+ unsigned char buf[32];
nullpo_retr(0, sd);
nullpo_retr(0, cd);
@@ -3110,7 +3133,7 @@ int clif_addchat(struct chat_data* cd,struct map_session_data *sd)
*/
int clif_changechatowner(struct chat_data* cd,struct map_session_data *sd)
{
- char buf[64];
+ unsigned char buf[64];
nullpo_retr(0, sd);
nullpo_retr(0, cd);
@@ -3133,7 +3156,7 @@ int clif_changechatowner(struct chat_data* cd,struct map_session_data *sd)
*/
int clif_leavechat(struct chat_data* cd,struct map_session_data *sd)
{
- char buf[32];
+ unsigned char buf[32];
nullpo_retr(0, sd);
nullpo_retr(0, cd);
@@ -3160,7 +3183,7 @@ int clif_traderequest(struct map_session_data *sd,char *name)
fd=sd->fd;
WFIFOW(fd,0)=0xe5;
- strcpy(WFIFOP(fd,2),name);
+ strcpy((char*)WFIFOP(fd,2),name);
WFIFOSET(fd,packet_len_table[0xe5]);
return 0;
@@ -3353,35 +3376,35 @@ int clif_storageitemadded(struct map_session_data *sd,struct storage *stor,int i
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)
+ 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
- if(stor->storage[index].card[0]==0x00ff || stor->storage[index].card[0]==0x00fe || stor->storage[index].card[0]==(short)0xff00) {
- WFIFOW(fd,13)=stor->storage[index].card[0]; //card (4w)
- WFIFOW(fd,15)=stor->storage[index].card[1]; //card (4w)
- WFIFOW(fd,17)=stor->storage[index].card[2]; //card (4w)
- WFIFOW(fd,19)=stor->storage[index].card[3]; //card (4w)
+ 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
+ if(stor->storage_[index].card[0]==0x00ff || stor->storage_[index].card[0]==0x00fe || stor->storage_[index].card[0]==(short)0xff00) {
+ WFIFOW(fd,13)=stor->storage_[index].card[0]; //card (4w)
+ WFIFOW(fd,15)=stor->storage_[index].card[1]; //card (4w)
+ WFIFOW(fd,17)=stor->storage_[index].card[2]; //card (4w)
+ WFIFOW(fd,19)=stor->storage_[index].card[3]; //card (4w)
} else {
- if(stor->storage[index].card[0] > 0 && (j=itemdb_viewid(stor->storage[index].card[0])) > 0)
+ if(stor->storage_[index].card[0] > 0 && (j=itemdb_viewid(stor->storage_[index].card[0])) > 0)
WFIFOW(fd,13)= j;
else
- WFIFOW(fd,13)= stor->storage[index].card[0];
- if(stor->storage[index].card[1] > 0 && (j=itemdb_viewid(stor->storage[index].card[1])) > 0)
+ WFIFOW(fd,13)= stor->storage_[index].card[0];
+ if(stor->storage_[index].card[1] > 0 && (j=itemdb_viewid(stor->storage_[index].card[1])) > 0)
WFIFOW(fd,15)= j;
else
- WFIFOW(fd,15)= stor->storage[index].card[1];
- if(stor->storage[index].card[2] > 0 && (j=itemdb_viewid(stor->storage[index].card[2])) > 0)
+ WFIFOW(fd,15)= stor->storage_[index].card[1];
+ if(stor->storage_[index].card[2] > 0 && (j=itemdb_viewid(stor->storage_[index].card[2])) > 0)
WFIFOW(fd,17)= j;
else
- WFIFOW(fd,17)= stor->storage[index].card[2];
- if(stor->storage[index].card[3] > 0 && (j=itemdb_viewid(stor->storage[index].card[3])) > 0)
+ WFIFOW(fd,17)= stor->storage_[index].card[2];
+ if(stor->storage_[index].card[3] > 0 && (j=itemdb_viewid(stor->storage_[index].card[3])) > 0)
WFIFOW(fd,19)= j;
else
- WFIFOW(fd,19)= stor->storage[index].card[3];
+ WFIFOW(fd,19)= stor->storage_[index].card[3];
}
WFIFOSET(fd,packet_len_table[0xf4]);
@@ -3423,35 +3446,35 @@ int clif_guildstorageitemadded(struct map_session_data *sd,struct guild_storage
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)
+ 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
- if(stor->storage[index].card[0]==0x00ff || stor->storage[index].card[0]==0x00fe || stor->storage[index].card[0]==(short)0xff00) {
- WFIFOW(fd,13)=stor->storage[index].card[0]; //card (4w)
- WFIFOW(fd,15)=stor->storage[index].card[1]; //card (4w)
- WFIFOW(fd,17)=stor->storage[index].card[2]; //card (4w)
- WFIFOW(fd,19)=stor->storage[index].card[3]; //card (4w)
+ 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
+ if(stor->storage_[index].card[0]==0x00ff || stor->storage_[index].card[0]==0x00fe || stor->storage_[index].card[0]==(short)0xff00) {
+ WFIFOW(fd,13)=stor->storage_[index].card[0]; //card (4w)
+ WFIFOW(fd,15)=stor->storage_[index].card[1]; //card (4w)
+ WFIFOW(fd,17)=stor->storage_[index].card[2]; //card (4w)
+ WFIFOW(fd,19)=stor->storage_[index].card[3]; //card (4w)
} else {
- if(stor->storage[index].card[0] > 0 && (j=itemdb_viewid(stor->storage[index].card[0])) > 0)
+ if(stor->storage_[index].card[0] > 0 && (j=itemdb_viewid(stor->storage_[index].card[0])) > 0)
WFIFOW(fd,13)= j;
else
- WFIFOW(fd,13)= stor->storage[index].card[0];
- if(stor->storage[index].card[1] > 0 && (j=itemdb_viewid(stor->storage[index].card[1])) > 0)
+ WFIFOW(fd,13)= stor->storage_[index].card[0];
+ if(stor->storage_[index].card[1] > 0 && (j=itemdb_viewid(stor->storage_[index].card[1])) > 0)
WFIFOW(fd,15)= j;
else
- WFIFOW(fd,15)= stor->storage[index].card[1];
- if(stor->storage[index].card[2] > 0 && (j=itemdb_viewid(stor->storage[index].card[2])) > 0)
+ WFIFOW(fd,15)= stor->storage_[index].card[1];
+ if(stor->storage_[index].card[2] > 0 && (j=itemdb_viewid(stor->storage_[index].card[2])) > 0)
WFIFOW(fd,17)= j;
else
- WFIFOW(fd,17)= stor->storage[index].card[2];
- if(stor->storage[index].card[3] > 0 && (j=itemdb_viewid(stor->storage[index].card[3])) > 0)
+ WFIFOW(fd,17)= stor->storage_[index].card[2];
+ if(stor->storage_[index].card[3] > 0 && (j=itemdb_viewid(stor->storage_[index].card[3])) > 0)
WFIFOW(fd,19)= j;
else
- WFIFOW(fd,19)= stor->storage[index].card[3];
+ WFIFOW(fd,19)= stor->storage_[index].card[3];
}
WFIFOSET(fd,packet_len_table[0xf4]);
@@ -3540,23 +3563,24 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
* 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)
+ if(nd->class_ < 0 || nd->flag&1 || nd->class_ == INVISIBLE_CLASS)
return;
-
+ if(nd->state.state == MS_WALK){
+ len = clif_npc007b(nd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ } else {
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);
}
-
}
/*==========================================
@@ -3573,8 +3597,8 @@ int clif_movemob(struct mob_data *md)
len = clif_mob007b(md,buf);
clif_send(buf,len,&md->bl,AREA);
- if(mob_get_equip(md->class) > 0) // mob equipment [Valaris]
- clif_mob_equip(md,mob_get_equip(md->class));
+ if(mob_get_equip(md->class_) > 0) // mob equipment [Valaris]
+ clif_mob_equip(md,mob_get_equip(md->class_));
if(md->size==2) // tiny/big mobs [Valaris]
clif_specialeffect(&md->bl,423,0);
@@ -3681,12 +3705,13 @@ int clif_damage(struct block_list *src,struct block_list *dst,unsigned int tick,
nullpo_retr(0, src);
nullpo_retr(0, dst);
- sc_data = battle_get_sc_data(dst);
+ sc_data = status_get_sc_data(dst);
if(type != 4 && dst->type == BL_PC && ((struct map_session_data *)dst)->special_state.infinite_endure)
type = 9;
if(sc_data) {
- if(type != 4 && sc_data[SC_ENDURE].timer != -1)
+ if(type != 4 && sc_data[SC_ENDURE].timer != -1 &&
+ (dst->type == BL_PC && !map[dst->m].flag.gvg))
type = 9;
if(sc_data[SC_HALLUCINATION].timer != -1) {
if(damage > 0)
@@ -3721,6 +3746,9 @@ void clif_getareachar_mob(struct map_session_data* sd,struct mob_data* md)
nullpo_retv(sd);
nullpo_retv(md);
+ if (session[sd->fd] == NULL)
+ return;
+
if(md->state.state == MS_WALK){
len = clif_mob007b(md,WFIFOP(sd->fd,0));
WFIFOSET(sd->fd,len);
@@ -3729,14 +3757,14 @@ void clif_getareachar_mob(struct map_session_data* sd,struct mob_data* md)
WFIFOSET(sd->fd,len);
}
- if(mob_get_equip(md->class) > 0) // mob equipment [Valaris]
- clif_mob_equip(md,mob_get_equip(md->class));
+ if(mob_get_equip(md->class_) > 0) // mob equipment [Valaris]
+ clif_mob_equip(md,mob_get_equip(md->class_));
if(md->size==2) // tiny/big mobs [Valaris]
clif_specialeffect(&md->bl,423,0);
else if(md->size==1)
clif_specialeffect(&md->bl,421,0);
-
+
}
@@ -3868,7 +3896,7 @@ int clif_clearchar_skillunit(struct skill_unit *unit,int fd)
WFIFOW(fd, 0)=0x120;
WFIFOL(fd, 2)=unit->bl.id;
WFIFOSET(fd,packet_len_table[0x120]);
- if(unit->group->skill_id == WZ_ICEWALL)
+ 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;
@@ -3880,7 +3908,7 @@ int clif_clearchar_skillunit(struct skill_unit *unit,int fd)
*/
int clif_01ac(struct block_list *bl)
{
- char buf[32];
+ unsigned char buf[32];
nullpo_retr(0, bl);
@@ -3904,6 +3932,9 @@ int clif_01ac(struct block_list *bl)
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)
@@ -3963,7 +3994,7 @@ int clif_pcoutsight(struct block_list *bl,va_list ap)
}
break;
case BL_NPC:
- if( ((struct npc_data *)bl)->class != INVISIBLE_CLASS )
+ if( ((struct npc_data *)bl)->class_ != INVISIBLE_CLASS )
clif_clearchar_id(bl->id,0,sd->fd);
break;
case BL_MOB:
@@ -4033,7 +4064,9 @@ int clif_moboutsight(struct block_list *bl,va_list ap)
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)){
+ 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);
}
@@ -4053,7 +4086,9 @@ int clif_mobinsight(struct block_list *bl,va_list ap)
nullpo_retr(0, ap);
md=va_arg(ap,struct mob_data*);
- if(bl->type==BL_PC && (sd = (struct map_session_data *)bl)){
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
clif_getareachar_mob(sd,md);
}
@@ -4073,7 +4108,9 @@ int clif_petoutsight(struct block_list *bl,va_list ap)
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)){
+ 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);
}
@@ -4090,7 +4127,9 @@ int clif_npcoutsight(struct block_list *bl,va_list ap)
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)){
+ 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);
}
@@ -4110,7 +4149,9 @@ int clif_petinsight(struct block_list *bl,va_list ap)
nullpo_retr(0, ap);
pd=va_arg(ap,struct pet_data*);
- if(bl->type==BL_PC && (sd = (struct map_session_data *)bl)){
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
clif_getareachar_pet(sd,pd);
}
@@ -4127,7 +4168,9 @@ int clif_npcinsight(struct block_list *bl,va_list ap)
nullpo_retr(0, ap);
nd=va_arg(ap,struct npc_data*);
- if(bl->type==BL_PC && (sd = (struct map_session_data *)bl)){
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
clif_getareachar_npc(sd,nd);
}
@@ -4159,14 +4202,14 @@ int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range)
if(range < 0) {
range = skill_get_range(id,sd->status.skill[skillid].lv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
WFIFOW(fd,12)= range;
} else
WFIFOW(fd,12)= range;
memset(WFIFOP(fd,14),0,24);
if(!(skill_get_inf2(id)&0x01) || battle_config.quest_skill_learn == 1 || (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;
+ 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]);
@@ -4196,12 +4239,12 @@ int clif_skillinfoblock(struct map_session_data *sd)
WFIFOW(fd,len+8) = skill_get_sp(id,sd->status.skill[i].lv);
range = skill_get_range(id,sd->status.skill[i].lv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
WFIFOW(fd,len+10)= range;
memset(WFIFOP(fd,len+12),0,24);
if(!(skill_get_inf2(id)&0x01) || battle_config.quest_skill_learn == 1 || (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;
+ 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;
@@ -4231,10 +4274,10 @@ int clif_skillup(struct map_session_data *sd,int skill_num)
WFIFOW(fd,6) = skill_get_sp(skill_num,sd->status.skill[skill_num].lv);
range = skill_get_range(skill_num,sd->status.skill[skill_num].lv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
WFIFOW(fd,8) = range;
//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;
+ 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;
@@ -4290,7 +4333,12 @@ int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype)
fd=sd->fd;
- if(type==0x4 && battle_config.display_delay_skill_fail==0){
+ // reset all variables [celest]
+ sd->skillx = sd->skilly = -1;
+ sd->skillid = sd->skilllv = -1;
+ sd->skillitem = sd->skillitemlv = -1;
+
+ if(type==0x4 && (battle_config.display_delay_skill_fail==0 || sd->nodelay)){
return 0;
}
@@ -4318,7 +4366,7 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,
nullpo_retr(0, src);
nullpo_retr(0, dst);
- sc_data = battle_get_sc_data(dst);
+ sc_data = status_get_sc_data(dst);
if(type != 5 && dst->type == BL_PC && ((struct map_session_data *)dst)->special_state.infinite_endure)
type = 9;
@@ -4373,7 +4421,7 @@ int clif_skill_damage2(struct block_list *src,struct block_list *dst,
nullpo_retr(0, src);
nullpo_retr(0, dst);
- sc_data = battle_get_sc_data(dst);
+ sc_data = status_get_sc_data(dst);
if(type != 5 && dst->type == BL_PC && ((struct map_session_data *)dst)->special_state.infinite_endure)
type = 9;
@@ -4542,10 +4590,10 @@ int clif_skill_warppoint(struct map_session_data *sd,int skill_num,
fd=sd->fd;
WFIFOW(fd,0)=0x11c;
WFIFOW(fd,2)=skill_num;
- memcpy(WFIFOP(fd, 4),map1,16);
- memcpy(WFIFOP(fd,20),map2,16);
- memcpy(WFIFOP(fd,36),map3,16);
- memcpy(WFIFOP(fd,52),map4,16);
+ strncpy((char*)WFIFOP(fd, 4),map1,16);
+ strncpy((char*)WFIFOP(fd,20),map2,16);
+ strncpy((char*)WFIFOP(fd,36),map3,16);
+ strncpy((char*)WFIFOP(fd,52),map4,16);
WFIFOSET(fd,packet_len_table[0x11c]);
return 0;
}
@@ -4598,14 +4646,14 @@ int clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
return 0;
WBUFW(buf, 0)=0x18c;
- WBUFW(buf, 2)=mob_get_viewclass(md->class);
+ WBUFW(buf, 2)=mob_get_viewclass(md->class_);
WBUFW(buf, 4)=md->level;
- WBUFW(buf, 6)=mob_db[md->class].size;
+ WBUFW(buf, 6)=mob_db[md->class_].size;
WBUFL(buf, 8)=md->hp;
- WBUFW(buf,12)=battle_get_def2(&md->bl);
- WBUFW(buf,14)=mob_db[md->class].race;
- WBUFW(buf,16)=battle_get_mdef2(&md->bl) - (mob_db[md->class].vit>>1);
- WBUFW(buf,18)=battle_get_elem_type(&md->bl);
+ WBUFW(buf,12)=status_get_def2(&md->bl);
+ WBUFW(buf,14)=mob_db[md->class_].race;
+ WBUFW(buf,16)=status_get_mdef2(&md->bl) - (mob_db[md->class_].vit>>1);
+ WBUFW(buf,18)=status_get_elem_type(&md->bl);
for(i=0;i<9;i++)
WBUFB(buf,20+i)= battle_attr_fix(100,i+1,md->def_ele);
@@ -4668,8 +4716,11 @@ int clif_status_change(struct block_list *bl,int type,int flag)
* Send message (modified by [Yor])
*------------------------------------------
*/
-int clif_displaymessage(const int fd, char* mes)
+int clif_displaymessage(const int fd, char* mes)
{
+ // invalid pointer?
+ nullpo_retr(-1, mes);
+
//Console [Wizputer]
if (fd == 0)
printf("\033[0;36mConsole: \033[0m\033[1m%s\033[0m\n", mes);
@@ -4691,13 +4742,13 @@ int clif_displaymessage(const int fd, char* mes)
* “V‚̺‚ð‘—M‚·‚é
*------------------------------------------
*/
-int clif_GMmessage(struct block_list *bl, char* mes, int len, int flag)
+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*)aCalloc(len + lp, sizeof(unsigned char));
+ buf = (unsigned char*)aCallocA(len + lp, sizeof(unsigned char));
WBUFW(buf,0) = 0x9a;
WBUFW(buf,2) = len + lp;
@@ -4710,12 +4761,33 @@ int clif_GMmessage(struct block_list *bl, char* mes, int len, int flag)
(flag == 3) ? SELF :
ALL_CLIENT);
- if(buf) free(buf);
+ 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,cmd=0x8d;
+
+ if(!bl || !message)
+ return;
+
+ len=strlen(message)+1;
+
+ WBUFW(buf,0)=cmd;
+ 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);
+}
+
+/*==========================================
* HPSP‰ñ•œƒGƒtƒFƒNƒg‚ð‘—M‚·‚é
*------------------------------------------
*/
@@ -4787,12 +4859,13 @@ int clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
WFIFOL(sd->fd,10) = pvpnum;
WFIFOSET(sd->fd,packet_len_table[0x19a]);
} else {
- char buf[32];
+ unsigned char buf[32];
WBUFW(buf,0) = 0x19a;
WBUFL(buf,2) = sd->bl.id;
if(sd->status.option&0x46)
- WBUFL(buf,6) = -1;
+ // WTF? a -1 to an unsigned value...
+ WBUFL(buf,6) = 0xFFFFFFFF;
else
if(pvprank<=0)
pc_calc_pvprank(sd);
@@ -4814,7 +4887,7 @@ int clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
int clif_send0199(int map,int type)
{
struct block_list bl;
- char buf[16];
+ unsigned char buf[16];
bl.m = map;
WBUFW(buf,0)=0x199;
@@ -4845,6 +4918,8 @@ int clif_refine(int fd,struct map_session_data *sd,int fail,int index,int val)
*/
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);
+
WFIFOW(fd,0) = 0x97;
WFIFOW(fd,2) = mes_len + 24 + 4;
memcpy(WFIFOP(fd,4), nick, 24);
@@ -4858,7 +4933,7 @@ int clif_wis_message(int fd, char *nick, char *mes, int mes_len) // R 0097 <len>
*------------------------------------------
*/
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
-{
+{
WFIFOW(fd,0) = 0x98;
WFIFOW(fd,2) = flag;
WFIFOSET(fd,packet_len_table[0x98]);
@@ -5076,9 +5151,9 @@ int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv,const ch
WFIFOW(fd,10)=skill_get_sp(skillid,skilllv);
range = skill_get_range(skillid,skilllv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
WFIFOW(fd,12)=range;
- memcpy(WFIFOP(fd,14),name,24);
+ strncpy((char*)WFIFOP(fd,14),name,24);
WFIFOB(fd,38)=0;
WFIFOSET(fd,packet_len_table[0x147]);
return 0;
@@ -5321,7 +5396,7 @@ int clif_showvendingboard(struct block_list* bl,char *message,int fd)
WBUFW(buf,0)=0x131;
WBUFL(buf,2)=bl->id;
- strncpy(WBUFP(buf,6),message,80);
+ strncpy((char*)WBUFP(buf,6),message,80);
if(fd){
memcpy(WFIFOP(fd,0),buf,packet_len_table[0x131]);
WFIFOSET(fd,packet_len_table[0x131]);
@@ -5535,6 +5610,8 @@ 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;
@@ -5748,6 +5825,70 @@ int clif_party_hp(struct party *p,struct map_session_data *sd)
return 0;
}
/*==========================================
+ * GM‚ÖꊂÆHP’Ê’m
+ *------------------------------------------
+ */
+int clif_hpmeter(struct map_session_data *sd)
+{
+ struct map_session_data *md;
+ unsigned char buf[16];
+ unsigned char buf2[16];
+ int i;
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf,0)=0x107;
+ WBUFL(buf,2)=sd->bl.id;
+ WBUFW(buf,6)=sd->bl.x;
+ WBUFW(buf,8)=sd->bl.y;
+
+ for(i=0;i<fd_max;i++){
+ if(session[i] && (md = (struct map_session_data*)session[i]->session_data) && md->state.auth &&
+ md->bl.m == sd->bl.m && pc_isGM(md) && sd != md){
+ memcpy(WFIFOP(i,0),buf,packet_len_table[0x107]);
+ WFIFOSET(i,packet_len_table[0x107]);
+ }
+ }
+
+ WBUFW(buf2,0)=0x106;
+ WBUFL(buf2,2)=sd->status.account_id;
+ WBUFW(buf2,6)=(sd->status.hp > 0x7fff)? 0x7fff:sd->status.hp;
+ WBUFW(buf2,8)=(sd->status.max_hp > 0x7fff)? 0x7fff:sd->status.max_hp;
+ for(i=0;i<fd_max;i++){
+ if(session[i] && (md = (struct map_session_data*)session[i]->session_data) && md->state.auth &&
+ md->bl.m == sd->bl.m && pc_isGM(md) && sd != md){
+ memcpy(WFIFOP(i,0),buf2,packet_len_table[0x106]);
+ WFIFOSET(i,packet_len_table[0x106]);
+ }
+ }
+
+ return 0;
+}
+/*==================================================
+ * Update monster hp view if it has changed [Celest]
+ *--------------------------------------------------
+ */
+int clif_update_mobhp(struct mob_data *md)
+{
+ unsigned char buf[102];
+ char mobhp[50];
+
+ nullpo_retr(0, md);
+
+ WBUFW(buf,0) = 0x95;
+ WBUFL(buf,2) = md->bl.id;
+
+ memcpy(WBUFP(buf,6), md->name, 24);
+ sprintf(mobhp, "hp: %d/%d", md->hp, mob_db[md->class_].max_hp);
+ WBUFW(buf, 0) = 0x195;
+ memcpy(WBUFP(buf,30), mobhp, 24);
+ WBUFL(buf,54) = 0;
+ WBUFL(buf,78) = 0;
+ clif_send(buf,packet_len_table[0x195],&md->bl,AREA);
+
+ return 0;
+}
+/*==========================================
* ƒp[ƒeƒBꊈړ®i–¢Žg—pj
*------------------------------------------
*/
@@ -5930,7 +6071,7 @@ int clif_pet_emotion(struct pet_data *pd,int param)
if(sd->petDB->talk_convert_class < 0)
return 0;
else if(sd->petDB->talk_convert_class > 0) {
- param -= (pd->class - 100)*100;
+ param -= (pd->class_ - 100)*100;
param += (sd->petDB->talk_convert_class - 100)*100;
}
}
@@ -6105,7 +6246,7 @@ int clif_combo_delay(struct block_list *bl,int wait)
*------------------------------------------
*/
int clif_bladestop(struct block_list *src,struct block_list *dst,
- int bool)
+ int _bool)
{
unsigned char buf[32];
@@ -6115,7 +6256,7 @@ int clif_bladestop(struct block_list *src,struct block_list *dst,
WBUFW(buf,0)=0x1d1;
WBUFL(buf,2)=src->id;
WBUFL(buf,6)=dst->id;
- WBUFL(buf,10)=bool;
+ WBUFL(buf,10)=_bool;
clif_send(buf,packet_len_table[0x1d1],src,AREA);
@@ -6129,7 +6270,7 @@ int clif_bladestop(struct block_list *src,struct block_list *dst,
int clif_changemapcell(int m,int x,int y,int cell_type,int type)
{
struct block_list bl;
- char buf[32];
+ unsigned char buf[32];
bl.m = m;
bl.x = x;
@@ -6247,6 +6388,8 @@ int clif_guild_memberlogin_notice(struct guild *g,int idx,int flag)
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;
@@ -6317,32 +6460,32 @@ int clif_guild_basicinfo(struct map_session_data *sd)
if(g->guild_id == gc->guild_id) t++;
}
- if (t==1) memcpy(WFIFOP(fd,94),"One Castle",20);
- else if (t==2) memcpy(WFIFOP(fd,94),"Two Castles",20);
- else if (t==3) memcpy(WFIFOP(fd,94),"Three Castles",20);
- else if (t==4) memcpy(WFIFOP(fd,94),"Four Castles",20);
- else if (t==5) memcpy(WFIFOP(fd,94),"Five Castles",20);
- else if (t==6) memcpy(WFIFOP(fd,94),"Six Castles",20);
- else if (t==7) memcpy(WFIFOP(fd,94),"Seven Castles",20);
- else if (t==8) memcpy(WFIFOP(fd,94),"Eight Castles",20);
- else if (t==9) memcpy(WFIFOP(fd,94),"Nine Castles",20);
- else if (t==10) memcpy(WFIFOP(fd,94),"Ten Castles",20);
- else if (t==11) memcpy(WFIFOP(fd,94),"Eleven Castles",20);
- else if (t==12) memcpy(WFIFOP(fd,94),"Twelve Castles",20);
- else if (t==13) memcpy(WFIFOP(fd,94),"Thirteen Castles",20);
- else if (t==14) memcpy(WFIFOP(fd,94),"Fourteen Castles",20);
- else if (t==15) memcpy(WFIFOP(fd,94),"Fifteen Castles",20);
- else if (t==16) memcpy(WFIFOP(fd,94),"Sixteen Castles",20);
- else if (t==17) memcpy(WFIFOP(fd,94),"Seventeen Castles",20);
- else if (t==18) memcpy(WFIFOP(fd,94),"Eighteen Castles",20);
- else if (t==19) memcpy(WFIFOP(fd,94),"Nineteen Castles",20);
- else if (t==20) memcpy(WFIFOP(fd,94),"Twenty Castles",20);
- else if (t==21) memcpy(WFIFOP(fd,94),"Twenty One Castles",20);
- else if (t==22) memcpy(WFIFOP(fd,94),"Twenty Two Castles",20);
- else if (t==23) memcpy(WFIFOP(fd,94),"Twenty Three Castles",20);
- else if (t==24) memcpy(WFIFOP(fd,94),"Twenty Four Castles",20);
- else if (t==MAX_GUILDCASTLE) memcpy(WFIFOP(fd,94),"Total Domination",20);
- else memcpy(WFIFOP(fd,94),"None Taken",20);
+ if (t==1) strncpy((char*)WFIFOP(fd,94),"One Castle",20);
+ else if (t==2) strncpy((char*)WFIFOP(fd,94),"Two Castles",20);
+ else if (t==3) strncpy((char*)WFIFOP(fd,94),"Three Castles",20);
+ else if (t==4) strncpy((char*)WFIFOP(fd,94),"Four Castles",20);
+ else if (t==5) strncpy((char*)WFIFOP(fd,94),"Five Castles",20);
+ else if (t==6) strncpy((char*)WFIFOP(fd,94),"Six Castles",20);
+ else if (t==7) strncpy((char*)WFIFOP(fd,94),"Seven Castles",20);
+ else if (t==8) strncpy((char*)WFIFOP(fd,94),"Eight Castles",20);
+ else if (t==9) strncpy((char*)WFIFOP(fd,94),"Nine Castles",20);
+ else if (t==10) strncpy((char*)WFIFOP(fd,94),"Ten Castles",20);
+ else if (t==11) strncpy((char*)WFIFOP(fd,94),"Eleven Castles",20);
+ else if (t==12) strncpy((char*)WFIFOP(fd,94),"Twelve Castles",20);
+ else if (t==13) strncpy((char*)WFIFOP(fd,94),"Thirteen Castles",20);
+ else if (t==14) strncpy((char*)WFIFOP(fd,94),"Fourteen Castles",20);
+ else if (t==15) strncpy((char*)WFIFOP(fd,94),"Fifteen Castles",20);
+ else if (t==16) strncpy((char*)WFIFOP(fd,94),"Sixteen Castles",20);
+ else if (t==17) strncpy((char*)WFIFOP(fd,94),"Seventeen Castles",20);
+ else if (t==18) strncpy((char*)WFIFOP(fd,94),"Eighteen Castles",20);
+ else if (t==19) strncpy((char*)WFIFOP(fd,94),"Nineteen Castles",20);
+ else if (t==20) strncpy((char*)WFIFOP(fd,94),"Twenty Castles",20);
+ else if (t==21) strncpy((char*)WFIFOP(fd,94),"Twenty One Castles",20);
+ else if (t==22) strncpy((char*)WFIFOP(fd,94),"Twenty Two Castles",20);
+ else if (t==23) strncpy((char*)WFIFOP(fd,94),"Twenty Three Castles",20);
+ else if (t==24) strncpy((char*)WFIFOP(fd,94),"Twenty Four Castles",20);
+ else if (t==MAX_GUILDCASTLE) strncpy((char*)WFIFOP(fd,94),"Total Domination",20);
+ else strncpy((char*)WFIFOP(fd,94),"None Taken",20);
WFIFOSET(fd,packet_len_table[WFIFOW(fd,0)]);
clif_guild_emblem(sd,g); // Guild emblem vanish fix [Valaris]
@@ -6406,7 +6549,7 @@ int clif_guild_memberlist(struct map_session_data *sd)
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+18)=m->class_;
WFIFOW(fd,c*104+20)=m->lv;
WFIFOL(fd,c*104+22)=m->exp;
WFIFOL(fd,c*104+26)=m->online;
@@ -6564,35 +6707,51 @@ int clif_guild_skillinfo(struct map_session_data *sd)
memset(WFIFOP(fd,c*37+18),0,24);
if(g->skill[i].lv < guild_skill_get_max(id)) {
//Kafra and Guardian changed to require Approval [Sara]
- if (g->skill[i].id == GD_KAFRACONTACT && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_GUARDIANRESEARCH && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- //Glory skill requirements -- Pretty sure correct [Sara]
- else if (g->skill[i].id == GD_LEADERSHIP && guild_checkskill(g,GD_GLORYGUILD) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_GLORYWOUNDS && guild_checkskill(g,GD_GLORYGUILD) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_SOULCOLD && guild_checkskill(g,GD_GLORYWOUNDS) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_HAWKEYES && guild_checkskill(g,GD_LEADERSHIP) <= 0)
- up = 0;
- //Activated skill requirements -- Just guesses [Sara]
- else if (g->skill[i].id == GD_BATTLEORDER && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_REGENERATION && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_RESTORE && guild_checkskill(g,GD_REGENERATION) <= 0)
- up = 0;
- else if (g->skill[i].id == GD_EMERGENCYCALL && guild_checkskill(g,GD_APPROVAL) <= 0)
- up = 0;
- if (g->skill[i].id == GD_GUARDUP && guild_checkskill(g,GD_GUARDIANRESEARCH) <= 0)
- up = 0;
- //Unadded yet? Has extension description in kRO tables
- else if (g->skill[i].id == GD_DEVELOPMENT)
- up = 0;
- else
- up = 1;
+ switch (g->skill[i].id)
+ {
+ case GD_KAFRACONTACT:
+ case GD_GUARDIANRESEARCH:
+ case GD_GUARDUP:
+ case GD_DEVELOPMENT:
+ up = guild_checkskill(g,GD_APPROVAL) > 0;
+ break;
+ case GD_LEADERSHIP:
+ //Glory skill requirements -- Pretty sure correct [Sara]
+ up = (battle_config.require_glory_guild) ?
+ guild_checkskill(g,GD_GLORYGUILD) > 0 : 1;
+ // what skill does it need now that glory guild was removed? [celest]
+ break;
+ case GD_GLORYWOUNDS:
+ up = (battle_config.require_glory_guild) ?
+ guild_checkskill(g,GD_GLORYGUILD) > 0 : 1;
+ break;
+ case GD_SOULCOLD:
+ up = guild_checkskill(g,GD_GLORYWOUNDS) > 0;
+ break;
+ case GD_HAWKEYES:
+ up = guild_checkskill(g,GD_LEADERSHIP) > 0;
+ break;
+ case GD_BATTLEORDER:
+ up = guild_checkskill(g,GD_APPROVAL) > 0 &&
+ guild_checkskill(g,GD_EXTENSION) >= 2;
+ break;
+ case GD_REGENERATION:
+ up = guild_checkskill(g,GD_EXTENSION) >= 5 &&
+ guild_checkskill(g,GD_BATTLEORDER) > 0;
+ break;
+ case GD_RESTORE:
+ up = guild_checkskill(g,GD_REGENERATION) >= 2;
+ break;
+ case GD_EMERGENCYCALL:
+ up = guild_checkskill(g,GD_GUARDIANRESEARCH) > 0 &&
+ guild_checkskill(g,GD_REGENERATION) > 0;
+ break;
+ case GD_GLORYGUILD:
+ up = (battle_config.require_glory_guild) ? 1 : 0;
+ break;
+ default:
+ up = 1;
+ }
}
else {
up = 0;
@@ -6734,7 +6893,7 @@ 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*)aCalloc(len + 4, sizeof(unsigned char));
+ buf = (unsigned char*)aCallocA(len + 4, sizeof(unsigned char));
WBUFW(buf, 0) = 0x17f;
WBUFW(buf, 2) = len + 4;
@@ -6743,7 +6902,7 @@ int clif_guild_message(struct guild *g,int account_id,const char *mes,int len)
if ((sd = guild_getavailablesd(g)) != NULL)
clif_send(buf, WBUFW(buf,2), &sd->bl, GUILD);
- if(buf) free(buf);
+ if(buf) aFree(buf);
return 0;
}
@@ -6937,10 +7096,34 @@ void clif_callpartner(struct map_session_data *sd)
}
*/
/*==========================================
+ * Adopt baby [Celest]
+ *------------------------------------------
+ */
+void clif_adopt_process(struct map_session_data *sd)
+{
+ int fd;
+ nullpo_retv(sd);
+
+ fd=sd->fd;
+ WFIFOW(fd,0)=0x1f8;
+ WFIFOSET(fd,packet_len_table[0x1f8]);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ReqAdopt(int fd, struct map_session_data *sd) {
+ nullpo_retv(sd);
+
+ printf ("%d\n", RFIFOL(fd,2));
+}
+
+/*==========================================
* À‚é
*------------------------------------------
*/
-void clif_sitting(struct map_session_data *sd)
+void clif_sitting(struct map_session_data *sd)
{
unsigned char buf[64];
@@ -6956,13 +7139,13 @@ void clif_sitting(struct map_session_data *sd)
*
*------------------------------------------
*/
-int clif_disp_onlyself(struct map_session_data *sd, char *mes, int len)
+int clif_disp_onlyself(struct map_session_data *sd, char *mes, int len)
{
unsigned char *buf;
nullpo_retr(0, sd);
- buf = (unsigned char*)aCalloc(len + 8, sizeof(unsigned char));
+ buf = (unsigned char*)aCallocA(len + 8, sizeof(unsigned char));
WBUFW(buf, 0) = 0x17f;
WBUFW(buf, 2) = len + 8;
@@ -6970,7 +7153,7 @@ int clif_disp_onlyself(struct map_session_data *sd, char *mes, int len)
clif_send(buf, WBUFW(buf,2), &sd->bl, SELF);
- if(buf) free(buf);
+ if(buf) aFree(buf);
return 0;
}
@@ -6980,7 +7163,7 @@ int clif_disp_onlyself(struct map_session_data *sd, char *mes, int len)
*------------------------------------------
*/
-int clif_GM_kickack(struct map_session_data *sd, int id)
+int clif_GM_kickack(struct map_session_data *sd, int id)
{
int fd;
@@ -7009,6 +7192,25 @@ int clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd,int ty
return 0;
}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+
+int clif_timedout(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ sprintf(tmp_output,"%sCharacter with Account ID '"CL_WHITE"%d"CL_RESET"' timed out.\n", (pc_isGM(sd))?"GM ":"", sd->bl.id);
+ ShowInfo(tmp_output);
+ map_quit(sd);
+ 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‹‘”Û‹–‰Â‰ž“š
*------------------------------------------
@@ -7066,6 +7268,24 @@ void clif_soundeffect(struct map_session_data *sd,struct block_list *bl,char *na
return;
}
+
+int clif_soundeffectall(struct block_list *bl, char *name, int type)
+{
+ unsigned char buf[31];
+ memset(buf, 0, packet_len_table[0x1d3]);
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0)=0x1d3;
+ memcpy(WBUFP(buf,2), name, 24);
+ 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];
@@ -7083,8 +7303,8 @@ int clif_specialeffect(struct block_list *bl, int type, int flag) {
struct map_session_data *pl_sd;
int i;
for(i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) != NULL &&
- pl_sd->state.auth &&
+ if (session[i] && (pl_sd = (struct map_session_data*)session[i]->session_data) != NULL &&
+ pl_sd->state.auth &&
(pc_isGM((struct map_session_data *)&bl) > pc_isGM((struct map_session_data *)&pl_sd->bl)))
clif_specialeffect(&pl_sd->bl, type, 1);
}
@@ -7093,7 +7313,7 @@ int clif_specialeffect(struct block_list *bl, int type, int flag) {
struct map_session_data *sd;
int i;
for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data) != NULL && sd->state.auth && sd->bl.m == bl->m)
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL && sd->state.auth && sd->bl.m == bl->m)
clif_specialeffect(&sd->bl, type, 1);
}
}
@@ -7106,6 +7326,14 @@ int clif_specialeffect(struct block_list *bl, int type, int flag) {
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->mapname,sd->bl.x,sd->bl.y);
+ return 0;
+}
+
// ------------
// clif_parse_*
// ------------
@@ -7114,10 +7342,10 @@ int clif_specialeffect(struct block_list *bl, int type, int flag) {
*
*------------------------------------------
*/
-void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
+void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
{
struct map_session_data *old_sd;
- int account_id; // account_id in the packet 0x72 or 0x7E
+ int cmd, account_id; // account_id in the packet 0x72 or 0x7E
if (sd) {
if (battle_config.error_log)
@@ -7125,8 +7353,14 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
return;
}
+ cmd = RFIFOW(fd,0);
+
+ // packet DB
+ if (IS_PACKET_DB_VER(cmd)) {
+ //printf("Received bytes %d with packet 0x72.\n", RFIFOREST(fd));
+ account_id = RFIFOL(fd,packet_db[clif_config.packet_db_ver][clif_config.connect_cmd].pos[0]);
// 0x72
- if (RFIFOW(fd,0) == 0x72) {
+ } else if (cmd == 0x72) {
//printf("Received bytes %d with packet 0x72.\n", RFIFOREST(fd));
if (RFIFOREST(fd) >= 39 && (RFIFOB(fd,38) == 0 || RFIFOB(fd,38) == 1)) // 00 = Female, 01 = Male
account_id = RFIFOL(fd,12);
@@ -7135,14 +7369,14 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
else // old packet version
account_id = RFIFOL(fd,2);
// 0x7E
- } else if (RFIFOW(fd,0) == 0x7E) {
+ } else if (cmd == 0x7E) {
//printf("Received bytes %d with packet 0x7E.\n", RFIFOREST(fd));
if (RFIFOREST(fd) >= 37 && (RFIFOB(fd,36) == 0 || RFIFOB(fd,36) == 1)) // 00 = Female, 01 = Male
account_id = RFIFOL(fd,9);
else
account_id = RFIFOL(fd,12);
// 0xF5
- } else {
+ } else if (cmd == 0xF5) {
//printf("Received bytes %d with packet 0xF5.\n", RFIFOREST(fd));
if (RFIFOREST(fd) >= 34 && (RFIFOB(fd,33) == 0 || RFIFOB(fd,33) == 1)) // 00 = Female, 01 = Male
account_id = RFIFOL(fd,7);
@@ -7150,20 +7384,37 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
account_id = RFIFOL(fd,12);
else if (RFIFOREST(fd) >= 32 && (RFIFOB(fd,31) == 0 || RFIFOB(fd,31) == 1)) // 00 = Female, 01 = Male
account_id = RFIFOL(fd,10);
- else // 29 28 28
- account_id = RFIFOL(fd,5);
+ else { // 29 28 28 // search correct value
+ // if account id and char id of version 14
+ if (RFIFOL(fd,3) > 700000 && RFIFOL(fd,10) >= 150000 && RFIFOL(fd,10) < 5000000) // account id / char id (more than 5.000.000 characters?) [Yor]
+ account_id = RFIFOL(fd,3);
+ else
+ account_id = RFIFOL(fd,5);
+ }
+ // 0x9B
+ } else {
+ account_id = RFIFOL(fd,3);
}
// if same account already connected, we disconnect the 2 sessions
if ((old_sd = map_id2sd(account_id)) != NULL) {
- clif_authfail_fd(fd, 2); // same id
+ clif_authfail_fd(fd, 8); // still recognizes last connection
clif_authfail_fd(old_sd->fd, 2); // same id
+ if (sd != 0)
+ clif_setwaitclose(sd->fd); // Set session to EOF
} else {
- sd = session[fd]->session_data = (struct map_session_data*)aCalloc(1, sizeof(struct map_session_data));
+ sd = (struct map_session_data*)aCalloc(1, sizeof(struct map_session_data));
+ session[fd]->session_data = sd;
sd->fd = fd;
+ if (IS_PACKET_DB_VER(cmd)) {
+ sd->packet_ver = clif_config.packet_db_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ pc_setnewpc(sd, account_id, RFIFOL(fd,packet_db[clif_config.packet_db_ver][clif_config.connect_cmd].pos[1]),
+ RFIFOL(fd,packet_db[clif_config.packet_db_ver][clif_config.connect_cmd].pos[2]),
+ RFIFOL(fd,packet_db[clif_config.packet_db_ver][clif_config.connect_cmd].pos[3]),
+ RFIFOL(fd,packet_db[clif_config.packet_db_ver][clif_config.connect_cmd].pos[4]), fd);
// 0x72
- if (RFIFOW(fd,0) == 0x72) {
+ } else if (cmd == 0x72) {
if (RFIFOREST(fd) >= 39 && (RFIFOB(fd,38) == 0 || RFIFOB(fd,38) == 1)) { // 00 = Female, 01 = Male
sd->packet_ver = 7; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
pc_setnewpc(sd, account_id, RFIFOL(fd,22), RFIFOL(fd,30), RFIFOL(fd,34), RFIFOB(fd,38), fd);
@@ -7175,7 +7426,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
pc_setnewpc(sd, account_id, RFIFOL(fd,6), RFIFOL(fd,10), RFIFOL(fd,14), RFIFOB(fd,18), fd);
}
// 0x7E
- } else if (RFIFOW(fd,0) == 0x7E) {
+ } else if (cmd == 0x7E) {
if (RFIFOREST(fd) >= 37 && (RFIFOB(fd,36) == 0 || RFIFOB(fd,36) == 1)) { // 00 = Female, 01 = Male
sd->packet_ver = 9; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
pc_setnewpc(sd, account_id, RFIFOL(fd,21), RFIFOL(fd,28), RFIFOL(fd,32), RFIFOB(fd,36), fd);
@@ -7184,7 +7435,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
pc_setnewpc(sd, account_id, RFIFOL(fd,18), RFIFOL(fd,24), RFIFOL(fd,28), RFIFOB(fd,32), fd);
}
// 0xF5
- } else {
+ } else if (cmd == 0xF5) {
if (RFIFOREST(fd) >= 34 && (RFIFOB(fd,33) == 0 || RFIFOB(fd,33) == 1)) { // 00 = Female, 01 = Male
sd->packet_ver = 10; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
pc_setnewpc(sd, account_id, RFIFOL(fd,15), RFIFOL(fd,25), RFIFOL(fd,29), RFIFOB(fd,33), fd);
@@ -7195,9 +7446,19 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
sd->packet_ver = 11; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
pc_setnewpc(sd, account_id, RFIFOL(fd,17), RFIFOL(fd,23), RFIFOL(fd,27), RFIFOB(fd,31), fd);
} else { // 29
- sd->packet_ver = 13; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- pc_setnewpc(sd, account_id, RFIFOL(fd,14), RFIFOL(fd,20), RFIFOL(fd,24), RFIFOB(fd,28), fd);
+ // if account id and char id of version 14
+ if (RFIFOL(fd,3) > 700000 && RFIFOL(fd,10) >= 150000 && RFIFOL(fd,10) < 5000000) { // account id / char id (more than 5.000.000 characters?)
+ sd->packet_ver = 15; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ pc_setnewpc(sd, account_id, RFIFOL(fd,10), RFIFOL(fd,20), RFIFOL(fd,24), RFIFOB(fd,28), fd);
+ } else {
+ sd->packet_ver = 13; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ pc_setnewpc(sd, account_id, RFIFOL(fd,14), RFIFOL(fd,20), RFIFOL(fd,24), RFIFOB(fd,28), fd);
+ }
}
+ // 0x9B
+ } else {
+ sd->packet_ver = 16; // 16: 10jan05
+ pc_setnewpc(sd, account_id, RFIFOL(fd,12), RFIFOL(fd,23), RFIFOL(fd,27), RFIFOB(fd,31), fd);
}
WFIFOL(fd,0) = sd->bl.id;
@@ -7299,10 +7560,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if(sd->state.connect_new) {
sd->state.connect_new = 0;
- if(sd->status.class != sd->view_class)
+ 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));
+ clif_pet_emotion(sd->pd,(sd->pd->class_ - 100)*100 + 50 + pet_hungry_val(sd));
/* Stop players from spawning inside castles [Valaris] */
@@ -7326,16 +7587,17 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if(battle_config.save_clothcolor==1 && sd->status.clothes_color > 0)
clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color);
- if(sd->status.hp<sd->status.max_hp>>2 && pc_checkskill(sd,SM_AUTOBERSERK)>0 &&
+ //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”­“®
- skill_status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
-
+ status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
+
// if(time(&timer) < ((weddingtime=pc_readglobalreg(sd,"PC_WEDDING_TIME")) + 3600))
-// skill_status_change_start(&sd->bl,SC_WEDDING,0,weddingtime,0,0,36000,0);
+// status_change_start(&sd->bl,SC_WEDDING,0,weddingtime,0,0,36000,0);
if(battle_config.muting_players && sd->status.manner < 0)
- skill_status_change_start(&sd->bl,SC_NOCHAT,0,0,0,0,0,0);
+ status_change_start(&sd->bl,SC_NOCHAT,0,0,0,0,0,0);
if (night_flag) {
if (battle_config.night_darkness_level > 0 && !map[sd->bl.m].flag.indoors)
@@ -7354,16 +7616,16 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
// option
clif_changeoption(&sd->bl);
if(sd->sc_data[SC_TRICKDEAD].timer != -1)
- skill_status_change_end(&sd->bl,SC_TRICKDEAD,-1);
+ status_change_end(&sd->bl,SC_TRICKDEAD,-1);
if(sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(7,sd->def_ele))
- skill_status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
+ status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
if(sd->special_state.infinite_endure && sd->sc_data[SC_ENDURE].timer == -1)
- skill_status_change_start(&sd->bl,SC_ENDURE,10,1,0,0,0,0);
+ status_change_start(&sd->bl,SC_ENDURE,10,1,0,0,0,0);
for(i=0;i<MAX_INVENTORY;i++){
if(sd->status.inventory[i].equip && sd->status.inventory[i].equip & 0x0002 && sd->status.inventory[i].attribute==1)
- skill_status_change_start(&sd->bl,SC_BROKNWEAPON,0,0,0,0,0,0);
+ status_change_start(&sd->bl,SC_BROKNWEAPON,0,0,0,0,0,0);
if(sd->status.inventory[i].equip && sd->status.inventory[i].equip & 0x0010 && sd->status.inventory[i].attribute==1)
- skill_status_change_start(&sd->bl,SC_BROKNARMOR,0,0,0,0,0,0);
+ status_change_start(&sd->bl,SC_BROKNARMOR,0,0,0,0,0,0);
}
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,0,sd);
@@ -7376,29 +7638,42 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
void clif_parse_TickSend(int fd, struct map_session_data *sd) {
nullpo_retv(sd);
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 8:
- sd->client_tick = RFIFOL(fd,6);
- break;
- case 9:
- sd->client_tick = RFIFOL(fd,9);
- break;
- case 10:
- sd->client_tick = RFIFOL(fd,7);
- break;
- case 11:
- sd->client_tick = RFIFOL(fd,10);
- break;
- case 12:
- sd->client_tick = RFIFOL(fd,6);
- break;
- case 13:
- sd->client_tick = RFIFOL(fd,5);
- break;
- default: // old version by default (and version 6 + 7)
- sd->client_tick = RFIFOL(fd,2);
- break;
+ if (USE_PACKET_DB(sd)) {
+ sd->client_tick=RFIFOL(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 8:
+ sd->client_tick = RFIFOL(fd,6);
+ break;
+ case 9:
+ sd->client_tick = RFIFOL(fd,9);
+ break;
+ case 10:
+ sd->client_tick = RFIFOL(fd,7);
+ break;
+ case 11:
+ sd->client_tick = RFIFOL(fd,10);
+ break;
+ case 12:
+ sd->client_tick = RFIFOL(fd,6);
+ break;
+ case 13:
+ case 14:
+ sd->client_tick = RFIFOL(fd,5);
+ break;
+ case 15:
+ sd->client_tick = RFIFOL(fd,3);
+ break;
+ case 16:
+ sd->client_tick = RFIFOL(fd,5);
+ break;
+
+ default: // old version by default (and version 6 + 7)
+ sd->client_tick = RFIFOL(fd,2);
+ break;
+ }
}
+
sd->server_tick = gettick();
clif_servertick(sd);
}
@@ -7436,7 +7711,9 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) {
sd->sc_data[SC_TRICKDEAD].timer !=-1 || //Ž€‚ñ‚¾‚Ó‚è
sd->sc_data[SC_BLADESTOP].timer !=-1 || //”’nŽæ‚è
sd->sc_data[SC_SPIDERWEB].timer !=-1 || //ƒXƒpƒCƒ_[ƒEƒFƒbƒu
- (sd->sc_data[SC_DANCING].timer !=-1 && sd->sc_data[SC_DANCING].val4)) //‡‘tƒXƒLƒ‹‰‰‘t’†‚Í“®‚¯‚È‚¢
+ (sd->sc_data[SC_DANCING].timer !=-1 && sd->sc_data[SC_DANCING].val4) || //‡‘tƒXƒLƒ‹‰‰‘t’†‚Í“®‚¯‚È‚¢
+ (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_CONFUSION].timer !=-1)
return;
if ((sd->status.option & 2) && pc_checkskill(sd, RG_TUNNELDRIVE) <= 0)
return;
@@ -7446,43 +7723,60 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) {
pc_stopattack(sd);
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 6:
- x = RFIFOB(fd,5) * 4 + (RFIFOB(fd,6) >> 6);
- y = ((RFIFOB(fd,6) & 0x3f) << 4) + (RFIFOB(fd,7) >> 4);
- break;
- case 7:
- x = RFIFOB(fd,6) * 4 + (RFIFOB(fd,7) >> 6);
- y = ((RFIFOB(fd,7) & 0x3f) << 4) + (RFIFOB(fd,8) >> 4);
- break;
- case 8:
- x = RFIFOB(fd,3) * 4 + (RFIFOB(fd,4) >> 6);
- y = ((RFIFOB(fd,4) & 0x3f) << 4) + (RFIFOB(fd,5) >> 4);
- break;
- case 9:
- x = RFIFOB(fd,12) * 4 + (RFIFOB(fd,13) >> 6);
- y = ((RFIFOB(fd,13) & 0x3f) << 4) + (RFIFOB(fd,14) >> 4);
- break;
- case 10:
- x = RFIFOB(fd,6) * 4 + (RFIFOB(fd,7) >> 6);
- y = ((RFIFOB(fd,7) & 0x3f) << 4) + (RFIFOB(fd,8) >> 4);
- break;
- case 11:
- x = RFIFOB(fd,11) * 4 + (RFIFOB(fd,12) >> 6);
- y = ((RFIFOB(fd,12) & 0x3f) << 4) + (RFIFOB(fd,13) >> 4);
- break;
- case 12:
- x = RFIFOB(fd,3) * 4 + (RFIFOB(fd,4) >> 6);
- y = ((RFIFOB(fd,4) & 0x3f) << 4) + (RFIFOB(fd,5) >> 4);
- break;
- case 13:
- x = RFIFOB(fd,3) * 4 + (RFIFOB(fd,4) >> 6);
- y = ((RFIFOB(fd,4) & 0x3f) << 4) + (RFIFOB(fd,5) >> 4);
- break;
- default: // old version by default
- x = RFIFOB(fd,2) * 4 + (RFIFOB(fd,3) >> 6);
- y = ((RFIFOB(fd,3) & 0x3f) << 4) + (RFIFOB(fd,4) >> 4);
- break;
+ if (USE_PACKET_DB(sd)) {
+ int cmd = RFIFOW(fd,0);
+ x = RFIFOB(fd,packet_db[clif_config.packet_db_ver][cmd].pos[0]) * 4 +
+ (RFIFOB(fd,packet_db[clif_config.packet_db_ver][cmd].pos[0] + 1) >> 6);
+ y = ((RFIFOB(fd,packet_db[clif_config.packet_db_ver][cmd].pos[0]+1) & 0x3f) << 4) +
+ (RFIFOB(fd,packet_db[clif_config.packet_db_ver][cmd].pos[0] + 2) >> 4);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 6:
+ x = RFIFOB(fd,5) * 4 + (RFIFOB(fd,6) >> 6);
+ y = ((RFIFOB(fd,6) & 0x3f) << 4) + (RFIFOB(fd,7) >> 4);
+ break;
+ case 7:
+ x = RFIFOB(fd,6) * 4 + (RFIFOB(fd,7) >> 6);
+ y = ((RFIFOB(fd,7) & 0x3f) << 4) + (RFIFOB(fd,8) >> 4);
+ break;
+ case 8:
+ x = RFIFOB(fd,3) * 4 + (RFIFOB(fd,4) >> 6);
+ y = ((RFIFOB(fd,4) & 0x3f) << 4) + (RFIFOB(fd,5) >> 4);
+ break;
+ case 9:
+ x = RFIFOB(fd,12) * 4 + (RFIFOB(fd,13) >> 6);
+ y = ((RFIFOB(fd,13) & 0x3f) << 4) + (RFIFOB(fd,14) >> 4);
+ break;
+ case 10:
+ x = RFIFOB(fd,6) * 4 + (RFIFOB(fd,7) >> 6);
+ y = ((RFIFOB(fd,7) & 0x3f) << 4) + (RFIFOB(fd,8) >> 4);
+ break;
+ case 11:
+ x = RFIFOB(fd,11) * 4 + (RFIFOB(fd,12) >> 6);
+ y = ((RFIFOB(fd,12) & 0x3f) << 4) + (RFIFOB(fd,13) >> 4);
+ break;
+ case 12:
+ x = RFIFOB(fd,3) * 4 + (RFIFOB(fd,4) >> 6);
+ y = ((RFIFOB(fd,4) & 0x3f) << 4) + (RFIFOB(fd,5) >> 4);
+ break;
+ case 13:
+ case 14:
+ x = RFIFOB(fd,3) * 4 + (RFIFOB(fd,4) >> 6);
+ y = ((RFIFOB(fd,4) & 0x3f) << 4) + (RFIFOB(fd,5) >> 4);
+ break;
+ case 15:
+ x = RFIFOB(fd,4) * 4 + (RFIFOB(fd,5) >> 6);
+ y = ((RFIFOB(fd,5) & 0x3f) << 4) + (RFIFOB(fd,6) >> 4);
+ break;
+ case 16:
+ x = RFIFOB(fd,10) * 4 + (RFIFOB(fd,11) >> 6);
+ y = ((RFIFOB(fd,11) & 0x3f) << 4) + (RFIFOB(fd,12) >> 4);
+ break;
+ default: // old version by default
+ x = RFIFOB(fd,2) * 4 + (RFIFOB(fd,3) >> 6);
+ y = ((RFIFOB(fd,3) & 0x3f) << 4) + (RFIFOB(fd,4) >> 4);
+ break;
+ }
}
pc_walktoxy(sd, x, y);
@@ -7527,28 +7821,39 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
struct block_list *bl;
int account_id;
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 8:
- account_id = RFIFOL(fd,11);
- break;
- case 9:
- account_id = RFIFOL(fd,8);
- break;
- case 10:
- account_id = RFIFOL(fd,10);
- break;
- case 11:
- account_id = RFIFOL(fd,6);
- break;
- case 12:
- account_id = RFIFOL(fd,11);
- break;
- case 13:
- account_id = RFIFOL(fd,6);
- break;
- default: // old version by default (+ packet version 6 and 7)
- account_id = RFIFOL(fd,2);
- break;
+ if (USE_PACKET_DB(sd)) {
+ account_id = RFIFOL(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 8:
+ account_id = RFIFOL(fd,11);
+ break;
+ case 9:
+ account_id = RFIFOL(fd,8);
+ break;
+ case 10:
+ account_id = RFIFOL(fd,10);
+ break;
+ case 11:
+ account_id = RFIFOL(fd,6);
+ break;
+ case 12:
+ account_id = RFIFOL(fd,11);
+ break;
+ case 13:
+ case 14:
+ account_id = RFIFOL(fd,6);
+ break;
+ case 15:
+ account_id = RFIFOL(fd,9);
+ break;
+ case 16:
+ account_id = RFIFOL(fd,4);
+ break;
+ default: // old version by default (+ packet version 6 and 7)
+ account_id = RFIFOL(fd,2);
+ break;
+ }
}
bl = map_id2bl(account_id);
if (bl == NULL)
@@ -7606,7 +7911,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
nullpo_retv(md);
memcpy(WFIFOP(fd,6), md->name, 24);
- if (md->class >= 1285 && md->class <= 1288 && md->guild_id) {
+ if (md->class_ >= 1285 && md->class_ <= 1288 && md->guild_id) {
struct guild *g;
struct guild_castle *gc = guild_mapname2gc(map[md->bl.m].name);
if (gc && gc->guild_id > 0 && (g = guild_search(gc->guild_id)) != NULL) {
@@ -7620,7 +7925,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
}
} else if (battle_config.show_mob_hp == 1) {
char mobhp[50];
- sprintf(mobhp, "hp: %d/%d", md->hp, mob_db[md->class].max_hp);
+ sprintf(mobhp, "hp: %d/%d", md->hp, mob_db[md->class_].max_hp);
WFIFOW(fd, 0) = 0x195;
memcpy(WFIFOP(fd,30), mobhp, 24);
WFIFOB(fd,54) = 0;
@@ -7644,42 +7949,47 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
*/
void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c <len>.w <str>.?B
char *message;
- char *buf;
+ unsigned char *buf;
nullpo_retv(sd);
- if (is_charcommand(fd, sd, RFIFOP(fd,4),0)!= CharCommand_None) return;
- if ((is_atcommand(fd, sd, RFIFOP(fd,4), 0) != AtCommand_None) ||
- (sd->sc_data &&
+ if ((is_atcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != AtCommand_None) ||
+ (is_charcommand(fd, sd, (char*)RFIFOP(fd,4),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;
- message = (char*)aCalloc(RFIFOW(fd,2) + 128, sizeof(char));
- buf = (char*)aCalloc(RFIFOW(fd,2) + 4, sizeof(char));
+ message = (char*)aCallocA(RFIFOW(fd,2) + 128, sizeof(char));
+ buf = (unsigned char*)aCallocA(RFIFOW(fd,2) + 4, sizeof(char));
//printf("clif_parse_GlobalMessage: message: '%s'.\n", RFIFOP(fd,4));
- if (strncmp(RFIFOP(fd,4), sd->status.name, strlen(sd->status.name)) != 0) {
+ if (strncmp((char*)RFIFOP(fd,4), sd->status.name, strlen(sd->status.name)) != 0) {
printf("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);
// information is sended to all online GM
- sprintf(message, "Hack on global message (normal message): character '%s' (account: %d) uses an other name.", sd->status.name, sd->status.account_id);
- intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message, strlen(message) + 1);
- if (strlen(RFIFOP(fd,4)) == 0)
+ 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
sprintf(message, " This player sends (name:message): '%s'.", RFIFOP(fd,4));
- intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message, strlen(message) + 1);
+ 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, strlen(message) + 1);
+ 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
+
+ if(message) aFree(message);
+ if(buf) aFree(buf);
+
+ return;
}
// but for the hacker, we display on his screen (he see/look no difference).
} else {
@@ -7696,8 +8006,37 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c <
WFIFOW(fd,0) = 0x8e;
WFIFOSET(fd, WFIFOW(fd,2));
- if(message) free(message);
- if(buf) free(buf);
+#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 (pc_calc_base_job2 (sd->status.class_) == 23 ) {
+ int next = pc_nextbaseexp(sd)>0 ? pc_nextbaseexp(sd) : sd->status.base_exp;
+ if (next > 0 && (sd->status.base_exp*100/next)%10 == 0) {
+ estr_lower((char*)RFIFOP(fd,4));
+ if (sd->state.snovice_flag == 0 && strstr((char*)RFIFOP(fd,4), msg_txt(504)))
+ sd->state.snovice_flag = 1;
+ else if (sd->state.snovice_flag == 1) {
+ sprintf(message, msg_txt(505), sd->status.name);
+ estr_lower(message);
+ if (strstr((char*)RFIFOP(fd,4), message))
+ sd->state.snovice_flag = 2;
+ }
+ else if (sd->state.snovice_flag == 2 && strstr((char*)RFIFOP(fd,4), msg_txt(506)))
+ sd->state.snovice_flag = 3;
+ else if (sd->state.snovice_flag == 3) {
+ int i;
+ status_change_start(&sd->bl,SkillStatusChangeTable[MO_EXPLOSIONSPIRITS],1,0,0,0,skill_get_time(MO_EXPLOSIONSPIRITS,1),0 );
+ for(i=0;i<5;i++)
+ pc_addspiritball(sd,skill_get_time(MO_CALLSPIRITS,1),5);
+ sd->state.snovice_flag = 0;
+ }
+ }
+ }
+
+ if(message) aFree(message);
+ if(buf) aFree(buf);
return;
}
@@ -7714,7 +8053,7 @@ int clif_message(struct block_list *bl, char* msg)
WBUFL(buf, 4) = bl->id;
memcpy(WBUFP(buf, 8), msg, msg_len);
- clif_send(buf, WBUFW(buf,2), bl, AREA);
+ clif_send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC); // by Gengar
return 0;
}
@@ -7725,17 +8064,20 @@ int clif_message(struct block_list *bl, char* msg)
*/
void clif_parse_MapMove(int fd, struct map_session_data *sd) {
// /m /mapmove (as @rura GM command)
- char output[100];
+ char output[30]; // 17+4+4=26, 30 max.
char map_name[17];
nullpo_retv(sd);
- memset(output, '\0', sizeof(output));
- memset(map_name, '\0', sizeof(map_name));
+// not needed at all as far as sprintf is used // [Ilpalazzo-sama]
+// memset(output, '\0', sizeof(output));
+// not needed -- map_name[16]='\0'; will do
+// memset(map_name, '\0', sizeof(map_name));
if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
(pc_isGM(sd) >= get_atcommand_level(AtCommand_MapMove))) {
memcpy(map_name, RFIFOP(fd,2), 16);
+ map_name[16]='\0';
sprintf(output, "%s %d %d", map_name, RFIFOW(fd,18), RFIFOW(fd,20));
atcommand_rura(fd, sd, "@rura", output);
}
@@ -7747,58 +8089,89 @@ void clif_parse_MapMove(int fd, struct map_session_data *sd) {
*
*------------------------------------------
*/
-void clif_parse_ChangeDir(int fd, struct map_session_data *sd) {
+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);
+ if (sd && sd->disguise > 23 && sd->disguise < 4001) // mob disguises [Valaris]
+ clif_send(buf, packet_len_table[0x9c], &sd->bl, AREA);
+ else
+ clif_send(buf, packet_len_table[0x9c], bl, AREA_WOS);
+
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ChangeDir(int fd, struct map_session_data *sd) {
short headdir, dir;
nullpo_retv(sd);
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 7:
- headdir = RFIFOW(fd,5);
- dir = RFIFOB(fd,12);
- break;
- case 8:
- headdir = RFIFOW(fd,5);
- dir = RFIFOB(fd,12);
- break;
- case 9:
- headdir = RFIFOW(fd,7);
- dir = RFIFOB(fd,11);
- break;
- case 10:
- headdir = RFIFOW(fd,4);
- dir = RFIFOB(fd,9);
- break;
- case 11:
- headdir = RFIFOW(fd,8);
- dir = RFIFOB(fd,17);
- break;
- case 12:
- headdir = RFIFOW(fd,5);
- dir = RFIFOB(fd,12);
- break;
- case 13:
- headdir = RFIFOW(fd,6);
- dir = RFIFOB(fd,14);
- break;
- default: // old version by default (and packet version 6)
- headdir = RFIFOW(fd,2);
- dir = RFIFOB(fd,4);
- break;
+ if (USE_PACKET_DB(sd)) {
+ headdir = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0]);
+ dir = RFIFOB(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[1]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 7:
+ headdir = RFIFOW(fd,5);
+ dir = RFIFOB(fd,12);
+ break;
+ case 8:
+ headdir = RFIFOW(fd,5);
+ dir = RFIFOB(fd,12);
+ break;
+ case 9:
+ headdir = RFIFOW(fd,7);
+ dir = RFIFOB(fd,11);
+ break;
+ case 10:
+ headdir = RFIFOW(fd,4);
+ dir = RFIFOB(fd,9);
+ break;
+ case 11:
+ headdir = RFIFOW(fd,8);
+ dir = RFIFOB(fd,17);
+ break;
+ case 12:
+ headdir = RFIFOW(fd,5);
+ dir = RFIFOB(fd,12);
+ break;
+ case 13:
+ case 14:
+ headdir = RFIFOW(fd,6);
+ dir = RFIFOB(fd,14);
+ break;
+ case 15:
+ headdir = RFIFOW(fd,3);
+ dir = RFIFOB(fd,7);
+ break;
+ case 16:
+ headdir = RFIFOW(fd,12);
+ dir = RFIFOB(fd,22);
+ break;
+
+ default: // old version by default (and packet version 6)
+ headdir = RFIFOW(fd,2);
+ dir = RFIFOB(fd,4);
+ break;
+ }
}
pc_setdir(sd, dir, headdir);
- WBUFW(buf,0) = 0x9c;
- WBUFL(buf,2) = sd->bl.id;
- WBUFW(buf,6) = headdir;
- WBUFB(buf,8) = dir;
- if (sd->disguise > 23 && sd->disguise < 4001) // mob disguises [Valaris]
- clif_send(buf, packet_len_table[0x9c], &sd->bl, AREA);
- else
- clif_send(buf, packet_len_table[0x9c], &sd->bl, AREA_WOS);
-
+ clif_changed_dir(&sd->bl);
+ return;
}
/*==========================================
@@ -7811,10 +8184,20 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd) {
nullpo_retv(sd);
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) + 2; // not more than 1 every 2 seconds (normal client is every 3-4 seconds)
+ clif_skill_fail(sd, 1, 0, 1);
+ return;
+ }
+ sd->emotionlasttime = time(NULL) + 2; // not more than 1 every 2 seconds (normal client is every 3-4 seconds)
+
WBUFW(buf,0) = 0xc0;
WBUFL(buf,2) = sd->bl.id;
- if(RFIFOB(fd,2)==34) // prevent use of the mute emote [Valaris]
- return;
WBUFB(buf,6) = RFIFOB(fd,2);
clif_send(buf, packet_len_table[0xc0], &sd->bl, AREA);
} else
@@ -7848,7 +8231,8 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
}
if (sd->npc_id != 0 || sd->opt1 > 0 || sd->status.option & 2 ||
(sd->sc_data &&
- (sd->sc_data[SC_AUTOCOUNTER].timer != -1 || //ƒI[ƒgƒJƒEƒ“ƒ^[
+ (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;
@@ -7858,35 +8242,50 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
pc_stop_walking(sd, 0);
pc_stopattack(sd);
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 8:
- target_id = RFIFOL(fd,3);
- action_type = RFIFOB(fd,8);
- break;
- case 9:
- target_id = RFIFOL(fd,7);
- action_type = RFIFOB(fd,17);
- break;
- case 10:
- target_id = RFIFOL(fd,9);
- action_type = RFIFOB(fd,22);
- break;
- case 11:
- target_id = RFIFOL(fd,3);
- action_type = RFIFOB(fd,8);
- break;
- case 12:
- target_id = RFIFOL(fd,3);
- action_type = RFIFOB(fd,8);
- break;
- case 13:
- target_id = RFIFOL(fd,4);
- action_type = RFIFOB(fd,14);
- break;
- default: // old version by default (and packet version 6 and 7)
- target_id = RFIFOL(fd,2);
- action_type = RFIFOB(fd,6);
- break;
+ if (USE_PACKET_DB(sd)) {
+ target_id = RFIFOL(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0]);
+ action_type = RFIFOB(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[1]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 8:
+ target_id = RFIFOL(fd,3);
+ action_type = RFIFOB(fd,8);
+ break;
+ case 9:
+ target_id = RFIFOL(fd,7);
+ action_type = RFIFOB(fd,17);
+ break;
+ case 10:
+ target_id = RFIFOL(fd,9);
+ action_type = RFIFOB(fd,22);
+ break;
+ case 11:
+ target_id = RFIFOL(fd,3);
+ action_type = RFIFOB(fd,8);
+ break;
+ case 12:
+ target_id = RFIFOL(fd,3);
+ action_type = RFIFOB(fd,8);
+ break;
+ case 13:
+ case 14:
+ target_id = RFIFOL(fd,4);
+ action_type = RFIFOB(fd,14);
+ break;
+ case 15:
+ target_id = RFIFOL(fd,6);
+ action_type = RFIFOB(fd,17);
+ break;
+ case 16:
+ target_id = RFIFOL(fd,9);
+ action_type = RFIFOB(fd,19);
+ break;
+
+ default: // old version by default (and packet version 6 and 7)
+ target_id = RFIFOL(fd,2);
+ action_type = RFIFOB(fd,6);
+ break;
+ }
}
switch(action_type) {
@@ -7911,15 +8310,15 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
case 0x02: // sitdown
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 3) {
pc_stop_walking(sd, 1);
- skill_gangsterparadise(sd, 1); // ƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒXÝ’è
pc_setsit(sd);
+ skill_gangsterparadise(sd, 1); // ƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒXÝ’è fixed Valaris
clif_sitting(sd);
} else
clif_skill_fail(sd, 1, 0, 2);
break;
case 0x03: // standup
- skill_gangsterparadise(sd, 0); // ƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒX‰ðœ
pc_setstand(sd);
+ skill_gangsterparadise(sd, 0); // ƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒX‰ðœ fixed Valaris
WBUFW(buf, 0) = 0x8a;
WBUFL(buf, 2) = sd->bl.id;
WBUFB(buf,26) = 3;
@@ -7942,6 +8341,9 @@ void clif_parse_Restart(int fd, struct map_session_data *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:
if(!pc_isdead(sd) && (sd->opt1 || (sd->opt2 && !(night_flag == 1 && sd->opt2 == STATE_BLIND))))
@@ -7971,32 +8373,32 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni
//printf("clif_parse_Wis: message: '%s'.\n", RFIFOP(fd,28));
- gm_command = (char*)aCalloc(strlen(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)
+ 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 && 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) free(gm_command);
+ if(gm_command) aFree(gm_command);
return;
}
- if(gm_command) free(gm_command);
+ if(gm_command) aFree(gm_command);
// searching destination character
- dstsd = map_nick2sd(RFIFOP(fd,4));
+ 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, RFIFOP(fd,4)) != 0) // not exactly same name
+ strcmp(dstsd->status.name, (const char*)RFIFOP(fd,4)) != 0) // not exactly same name
// send message to inter-server
- intif_wis_message(sd, RFIFOP(fd,4), RFIFOP(fd,28), RFIFOW(fd,2)-28);
+ 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
@@ -8015,7 +8417,7 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni
}
// if source player not found in ignore list
if (i == MAX_IGNORE_LIST) {
- clif_wis_message(dstsd->fd, sd->status.name, RFIFOP(fd,28), RFIFOW(fd,2) - 28);
+ clif_wis_message(dstsd->fd, sd->status.name, (char*)RFIFOP(fd,28), RFIFOW(fd,2) - 28);
clif_wis_end(fd, 0); // type: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
}
}
@@ -8035,7 +8437,7 @@ void clif_parse_GMmessage(int fd, struct map_session_data *sd) {
if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
(pc_isGM(sd) >= get_atcommand_level(AtCommand_Broadcast)))
- intif_GMmessage(RFIFOP(fd,4), RFIFOW(fd,2)-4, 0);
+ intif_GMmessage((char*)RFIFOP(fd,4), RFIFOW(fd,2)-4, 0);
}
/*==========================================
@@ -8048,31 +8450,42 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd) {
nullpo_retv(sd);
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 7:
- map_object_id = RFIFOL(fd,6);
- break;
- case 8:
- map_object_id = RFIFOL(fd,6);
- break;
- case 9:
- map_object_id = RFIFOL(fd,9);
- break;
- case 10:
- map_object_id = RFIFOL(fd,7);
- break;
- case 11:
- map_object_id = RFIFOL(fd,10);
- break;
- case 12:
- map_object_id = RFIFOL(fd,6);
- break;
- case 13:
- map_object_id = RFIFOL(fd,5);
- break;
- default: // old version by default (and packet version 6)
- map_object_id = RFIFOL(fd,2);
- break;
+ if (USE_PACKET_DB(sd)) {
+ map_object_id = RFIFOL(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 7:
+ map_object_id = RFIFOL(fd,6);
+ break;
+ case 8:
+ map_object_id = RFIFOL(fd,6);
+ break;
+ case 9:
+ map_object_id = RFIFOL(fd,9);
+ break;
+ case 10:
+ map_object_id = RFIFOL(fd,7);
+ break;
+ case 11:
+ map_object_id = RFIFOL(fd,10);
+ break;
+ case 12:
+ map_object_id = RFIFOL(fd,6);
+ break;
+ case 13:
+ case 14:
+ map_object_id = RFIFOL(fd,5);
+ break;
+ case 15:
+ map_object_id = RFIFOL(fd,3);
+ break;
+ case 16:
+ map_object_id = RFIFOL(fd,5);
+ break;
+ default: // old version by default (and packet version 6)
+ map_object_id = RFIFOL(fd,2);
+ break;
+ }
}
fitem = (struct flooritem_data*)map_id2bl(map_object_id);
@@ -8113,35 +8526,49 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd) {
sd->sc_data[SC_BERSERK].timer != -1)) ) //ƒo[ƒT[ƒN
return;
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 8:
- item_index = RFIFOW(fd,5) - 2;
- item_amount = RFIFOW(fd,12);
- break;
- case 9:
- item_index = RFIFOW(fd,8) - 2;
- item_amount = RFIFOW(fd,15);
- break;
- case 10:
- item_index = RFIFOW(fd,6) - 2;
- item_amount = RFIFOW(fd,15);
- break;
- case 11:
- item_index = RFIFOW(fd,12) - 2;
- item_amount = RFIFOW(fd,17);
- break;
- case 12:
- item_index = RFIFOW(fd,5) - 2;
- item_amount = RFIFOW(fd,12);
- break;
- case 13:
- item_index = RFIFOW(fd,6) - 2;
- item_amount = RFIFOW(fd,10);
- break;
- default: // old version by default (+ packet version 6 and 7)
- item_index = RFIFOW(fd,2) - 2;
- item_amount = RFIFOW(fd,4);
- break;
+ if (USE_PACKET_DB(sd)) {
+ item_index = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0])-2;
+ item_amount = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[1]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 8:
+ item_index = RFIFOW(fd,5) - 2;
+ item_amount = RFIFOW(fd,12);
+ break;
+ case 9:
+ item_index = RFIFOW(fd,8) - 2;
+ item_amount = RFIFOW(fd,15);
+ break;
+ case 10:
+ item_index = RFIFOW(fd,6) - 2;
+ item_amount = RFIFOW(fd,15);
+ break;
+ case 11:
+ item_index = RFIFOW(fd,12) - 2;
+ item_amount = RFIFOW(fd,17);
+ break;
+ case 12:
+ item_index = RFIFOW(fd,5) - 2;
+ item_amount = RFIFOW(fd,12);
+ break;
+ case 13:
+ case 14:
+ item_index = RFIFOW(fd,6) - 2;
+ item_amount = RFIFOW(fd,10);
+ break;
+ case 15:
+ item_index = RFIFOW(fd,4) - 2;
+ item_amount = RFIFOW(fd,10);
+ break;
+ case 16:
+ item_index = RFIFOW(fd,15) - 2;
+ item_amount = RFIFOW(fd,18);
+ break;
+ default: // old version by default (+ packet version 6 and 7)
+ item_index = RFIFOW(fd,2) - 2;
+ item_amount = RFIFOW(fd,4);
+ break;
+ }
}
pc_dropitem(sd, item_index, item_amount);
@@ -8158,7 +8585,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) {
clif_clearchar_area(&sd->bl, 1);
return;
}
- if (sd->npc_id!=0 || sd->vender_id != 0 || sd->opt1 > 0 ||
+ if (sd->npc_id!=0 || sd->vender_id != 0 || (sd->opt1 > 0 && sd->opt1 != 6) ||
(sd->sc_data && (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
@@ -8168,34 +8595,45 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) {
if (sd->invincible_timer != -1)
pc_delinvincibletimer(sd);
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 6:
- pc_useitem(sd,RFIFOW(fd,5)-2);
- break;
- case 7:
- pc_useitem(sd,RFIFOW(fd,6)-2);
- break;
- case 8:
- pc_useitem(sd,RFIFOW(fd,6)-2);
- break;
- case 9:
- pc_useitem(sd,RFIFOW(fd,9)-2);
- break;
- case 10:
- pc_useitem(sd,RFIFOW(fd,7)-2);
- break;
- case 11:
- pc_useitem(sd,RFIFOW(fd,10)-2);
- break;
- case 12:
- pc_useitem(sd,RFIFOW(fd,6)-2);
- break;
- case 13:
- pc_useitem(sd,RFIFOW(fd,5)-2);
- break;
- default: // old version by default
- pc_useitem(sd,RFIFOW(fd,2)-2);
- break;
+ if (USE_PACKET_DB(sd)) {
+ pc_useitem(sd,RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0])-2);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 6:
+ pc_useitem(sd,RFIFOW(fd,5)-2);
+ break;
+ case 7:
+ pc_useitem(sd,RFIFOW(fd,6)-2);
+ break;
+ case 8:
+ pc_useitem(sd,RFIFOW(fd,6)-2);
+ break;
+ case 9:
+ pc_useitem(sd,RFIFOW(fd,9)-2);
+ break;
+ case 10:
+ pc_useitem(sd,RFIFOW(fd,7)-2);
+ break;
+ case 11:
+ pc_useitem(sd,RFIFOW(fd,10)-2);
+ break;
+ case 12:
+ pc_useitem(sd,RFIFOW(fd,6)-2);
+ break;
+ case 13:
+ case 14:
+ pc_useitem(sd,RFIFOW(fd,5)-2);
+ break;
+ case 15:
+ pc_useitem(sd,RFIFOW(fd,3)-2);
+ break;
+ case 16:
+ pc_useitem(sd,RFIFOW(fd,5)-2);
+ break;
+ default: // old version by default
+ pc_useitem(sd,RFIFOW(fd,2)-2);
+ break;
+ }
}
}
@@ -8246,17 +8684,18 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
clif_clearchar_area(&sd->bl,1);
return;
}
+ if(sd->npc_id!=0 || sd->vender_id != 0 || sd->opt1 > 0)
+ return;
index = RFIFOW(fd,2)-2;
- if(sd->status.inventory[index].attribute == 1 && sd->sc_data && sd->sc_data[SC_BROKNWEAPON].timer!=-1)
- skill_status_change_end(&sd->bl,SC_BROKNWEAPON,-1);
+
+ /*if(sd->status.inventory[index].attribute == 1 && sd->sc_data && sd->sc_data[SC_BROKNWEAPON].timer!=-1)
+ status_change_end(&sd->bl,SC_BROKNWEAPON,-1);
if(sd->status.inventory[index].attribute == 1 && sd->sc_data && sd->sc_data[SC_BROKNARMOR].timer!=-1)
- skill_status_change_end(&sd->bl,SC_BROKNARMOR,-1);
- if(sd->sc_data && ( sd->sc_data[SC_BLADESTOP].timer!=-1 || sd->sc_data[SC_BERSERK].timer!=-1 ))
- return;
+ status_change_end(&sd->bl,SC_BROKNARMOR,-1);
+ if(sd->sc_count && ( sd->sc_data[SC_BLADESTOP].timer!=-1 || sd->sc_data[SC_BERSERK].timer!=-1 ))
+ return;*/
- if(sd->npc_id!=0 || sd->vender_id != 0 || sd->opt1 > 0)
- return;
- pc_unequipitem(sd,index,0,BF_NORMAL);
+ pc_unequipitem(sd,index,1);
}
/*==========================================
@@ -8330,7 +8769,7 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
void clif_parse_CreateChatRoom(int fd,struct map_session_data *sd)
{
if(battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 4){
- chat_createchat(sd,RFIFOW(fd,4),RFIFOB(fd,6),RFIFOP(fd,7),RFIFOP(fd,15),RFIFOW(fd,2)-15);
+ 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);
}
@@ -8341,7 +8780,7 @@ void clif_parse_CreateChatRoom(int fd,struct map_session_data *sd)
*/
void clif_parse_ChatAddMember(int fd,struct map_session_data *sd)
{
- chat_joinchat(sd,RFIFOL(fd,2),RFIFOP(fd,6));
+ chat_joinchat(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6));
}
/*==========================================
@@ -8350,7 +8789,7 @@ void clif_parse_ChatAddMember(int fd,struct map_session_data *sd)
*/
void clif_parse_ChatRoomStatusChange(int fd,struct map_session_data *sd)
{
- chat_changechatstatus(sd,RFIFOW(fd,4),RFIFOB(fd,6),RFIFOP(fd,7),RFIFOP(fd,15),RFIFOW(fd,2)-15);
+ chat_changechatstatus(sd,RFIFOW(fd,4),RFIFOB(fd,6),(char*)RFIFOP(fd,7),(char*)RFIFOP(fd,15),RFIFOW(fd,2)-15);
}
/*==========================================
@@ -8359,7 +8798,7 @@ void clif_parse_ChatRoomStatusChange(int fd,struct map_session_data *sd)
*/
void clif_parse_ChangeChatOwner(int fd,struct map_session_data *sd)
{
- chat_changechatowner(sd,RFIFOP(fd,6));
+ chat_changechatowner(sd,(char*)RFIFOP(fd,6));
}
/*==========================================
@@ -8368,7 +8807,7 @@ void clif_parse_ChangeChatOwner(int fd,struct map_session_data *sd)
*/
void clif_parse_KickFromChat(int fd,struct map_session_data *sd)
{
- chat_kickchat(sd,RFIFOP(fd,2));
+ chat_kickchat(sd,(char*)RFIFOP(fd,2));
}
/*==========================================
@@ -8429,7 +8868,7 @@ void clif_parse_TradeOk(int fd,struct map_session_data *sd)
* ŽæˆøƒLƒƒƒ“ƒZƒ‹
*------------------------------------------
*/
-void clif_parse_TradeCansel(int fd,struct map_session_data *sd)
+void clif_parse_TradeCancel(int fd,struct map_session_data *sd)
{
trade_tradecancel(sd);
}
@@ -8483,17 +8922,17 @@ void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd)
void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
{
if(pc_isriding(sd)) { // jobchange when removing peco [Valaris]
- if(sd->status.class==13)
- sd->status.class=sd->view_class=7;
+ if(sd->status.class_==13)
+ sd->status.class_=sd->view_class=7;
- if(sd->status.class==21)
- sd->status.class=sd->view_class=14;
+ if(sd->status.class_==21)
+ sd->status.class_=sd->view_class=14;
- if(sd->status.class==4014)
- sd->status.class=sd->view_class=4008;
+ if(sd->status.class_==4014)
+ sd->status.class_=sd->view_class=4008;
- if(sd->status.class==4022)
- sd->status.class=sd->view_class=4015;
+ if(sd->status.class_==4022)
+ sd->status.class_=sd->view_class=4015;
}
pc_setoption(sd,0);
@@ -8539,52 +8978,69 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
if (sd->chatID || sd->npc_id != 0 || sd->vender_id != 0)
return;
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 6:
- skilllv = RFIFOW(fd,4);
- skillnum = RFIFOW(fd,9);
- target_id = RFIFOL(fd,11);
- break;
- case 7:
- skilllv = RFIFOW(fd,7);
- skillnum = RFIFOW(fd,9);
- target_id = RFIFOL(fd,15);
- break;
- case 8:
- skilllv = RFIFOW(fd,7);
- skillnum = RFIFOW(fd,12);
- target_id = RFIFOL(fd,16);
- break;
- case 9:
- skilllv = RFIFOW(fd,11);
- skillnum = RFIFOW(fd,18);
- target_id = RFIFOL(fd,22);
- break;
- case 10:
- skilllv = RFIFOW(fd,9);
- skillnum = RFIFOW(fd,15);
- target_id = RFIFOL(fd,18);
- break;
- case 11:
- skilllv = RFIFOW(fd,4);
- skillnum = RFIFOW(fd,7);
- target_id = RFIFOL(fd,10);
- break;
- case 12:
- skilllv = RFIFOW(fd,7);
- skillnum = RFIFOW(fd,12);
- target_id = RFIFOL(fd,16);
- break;
- case 13:
- skilllv = RFIFOW(fd,4);
- skillnum = RFIFOW(fd,10);
- target_id = RFIFOL(fd,22);
- break;
- default: // old version by default
- skilllv = RFIFOW(fd,2);
- skillnum = RFIFOW(fd,4);
- target_id = RFIFOL(fd,6);
- break;
+ if (USE_PACKET_DB(sd)) {
+ skilllv = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0]);
+ skillnum = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[1]);
+ target_id = RFIFOL(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[2]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 6:
+ skilllv = RFIFOW(fd,4);
+ skillnum = RFIFOW(fd,9);
+ target_id = RFIFOL(fd,11);
+ break;
+ case 7:
+ skilllv = RFIFOW(fd,7);
+ skillnum = RFIFOW(fd,9);
+ target_id = RFIFOL(fd,15);
+ break;
+ case 8:
+ skilllv = RFIFOW(fd,7);
+ skillnum = RFIFOW(fd,12);
+ target_id = RFIFOL(fd,16);
+ break;
+ case 9:
+ skilllv = RFIFOW(fd,11);
+ skillnum = RFIFOW(fd,18);
+ target_id = RFIFOL(fd,22);
+ break;
+ case 10:
+ skilllv = RFIFOW(fd,9);
+ skillnum = RFIFOW(fd,15);
+ target_id = RFIFOL(fd,18);
+ break;
+ case 11:
+ skilllv = RFIFOW(fd,4);
+ skillnum = RFIFOW(fd,7);
+ target_id = RFIFOL(fd,10);
+ break;
+ case 12:
+ skilllv = RFIFOW(fd,7);
+ skillnum = RFIFOW(fd,12);
+ target_id = RFIFOL(fd,16);
+ break;
+ case 13:
+ case 14:
+ skilllv = RFIFOW(fd,4);
+ skillnum = RFIFOW(fd,10);
+ target_id = RFIFOL(fd,22);
+ break;
+ case 15:
+ skilllv = RFIFOW(fd,8);
+ skillnum = RFIFOW(fd,12);
+ target_id = RFIFOL(fd,18);
+ break;
+ case 16:
+ skilllv = RFIFOW(fd,8);
+ skillnum = RFIFOW(fd,16);
+ target_id = RFIFOL(fd,22);
+ break;
+ default: // old version by default
+ skilllv = RFIFOW(fd,2);
+ skillnum = RFIFOW(fd,4);
+ target_id = RFIFOL(fd,6);
+ break;
+ }
}
if (skillnotok(skillnum, sd))
@@ -8593,12 +9049,20 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
if (sd->skilltimer != -1) {
if (skillnum != SA_CASTCANCEL)
return;
- } else if (DIFF_TICK(tick, sd->canact_tick) < 0) {
+ } 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) ||
+ 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 == 22)
return;
@@ -8621,6 +9085,20 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
return;
}
}
+ } else if (skillnum == CH_TIGERFIST) {
+ if (sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != MO_COMBOFINISH) {
+ if (!sd->state.skill_flag ) {
+ sd->state.skill_flag = 1;
+ if (!sd->attacktarget) {
+ clif_skillinfo(sd, CH_TIGERFIST, 1, -2);
+ return;
+ } else
+ target_id = sd->attacktarget;
+ } else if (sd->bl.id == target_id) {
+ clif_skillinfo(sd, CH_TIGERFIST, 1, -2);
+ return;
+ }
+ }
}
if ((lv = pc_checkskill(sd, skillnum)) > 0) {
if (skilllv > lv)
@@ -8647,79 +9125,103 @@ void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) {
if(sd->chatID) return;
skillmoreinfo = -1;
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 6:
- skilllv = RFIFOW(fd,4);
- skillnum = RFIFOW(fd,9);
- x = RFIFOW(fd,11);
- y = RFIFOW(fd,13);
- if (RFIFOW(fd,0) == 0x190)
- skillmoreinfo = 15;
- break;
- case 7:
- skilllv = RFIFOW(fd,7);
- skillnum = RFIFOW(fd,9);
- x = RFIFOW(fd,15);
- y = RFIFOW(fd,17);
- if (RFIFOW(fd,0) == 0x190)
- skillmoreinfo = 19;
- break;
- case 8:
- skilllv = RFIFOW(fd,3);
- skillnum = RFIFOW(fd,6);
- x = RFIFOW(fd,17);
- y = RFIFOW(fd,21);
- if (RFIFOW(fd,0) == 0x0a2)
- skillmoreinfo = 23;
- break;
- case 9:
- skilllv = RFIFOW(fd,5);
- skillnum = RFIFOW(fd,15);
- x = RFIFOW(fd,29);
- y = RFIFOW(fd,38);
- if (RFIFOW(fd,0) == 0x0a2)
- skillmoreinfo = 40;
- break;
- case 10:
- skilllv = RFIFOW(fd,10);
- skillnum = RFIFOW(fd,14);
- x = RFIFOW(fd,18);
- y = RFIFOW(fd,23);
- if (RFIFOW(fd,0) == 0x08c)
- skillmoreinfo = 25;
- break;
- case 11:
- skilllv = RFIFOW(fd,6); // 16? to check.
- skillnum = RFIFOW(fd,20);
- x = RFIFOW(fd,23);
- y = RFIFOW(fd,27);
- if (RFIFOW(fd,0) == 0x08c)
- skillmoreinfo = 29;
- break;
- case 12:
- skilllv = RFIFOW(fd,3); // 2? to check.
- skillnum = RFIFOW(fd,6);
- x = RFIFOW(fd,17);
- y = RFIFOW(fd,21);
- if (RFIFOW(fd,0) == 0x08c)
- skillmoreinfo = 23;
- break;
- case 13:
- skilllv = RFIFOW(fd,6);
- skillnum = RFIFOW(fd,9);
- x = RFIFOW(fd,23);
- y = RFIFOW(fd,26);
- if (RFIFOW(fd,0) == 0x08c)
- skillmoreinfo = 28;
- break;
- default: // old version by default
- skilllv = RFIFOW(fd,2);
- skillnum = RFIFOW(fd,4);
- x = RFIFOW(fd,6);
- y = RFIFOW(fd,8);
- if (RFIFOW(fd,0) == 0x190)
- skillmoreinfo = 10;
- break;
+ if (USE_PACKET_DB(sd)) {
+ skilllv = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0]);
+ skillnum = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[1]);
+ x = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[2]);
+ y = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[3]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 6:
+ skilllv = RFIFOW(fd,4);
+ skillnum = RFIFOW(fd,9);
+ x = RFIFOW(fd,11);
+ y = RFIFOW(fd,13);
+ if (RFIFOW(fd,0) == 0x190)
+ skillmoreinfo = 15;
+ break;
+ case 7:
+ skilllv = RFIFOW(fd,7);
+ skillnum = RFIFOW(fd,9);
+ x = RFIFOW(fd,15);
+ y = RFIFOW(fd,17);
+ if (RFIFOW(fd,0) == 0x190)
+ skillmoreinfo = 19;
+ break;
+ case 8:
+ skilllv = RFIFOW(fd,3);
+ skillnum = RFIFOW(fd,6);
+ x = RFIFOW(fd,17);
+ y = RFIFOW(fd,21);
+ if (RFIFOW(fd,0) == 0x0a2)
+ skillmoreinfo = 23;
+ break;
+ case 9:
+ skilllv = RFIFOW(fd,5);
+ skillnum = RFIFOW(fd,15);
+ x = RFIFOW(fd,29);
+ y = RFIFOW(fd,38);
+ if (RFIFOW(fd,0) == 0x0a2)
+ skillmoreinfo = 40;
+ break;
+ case 10:
+ skilllv = RFIFOW(fd,10);
+ skillnum = RFIFOW(fd,14);
+ x = RFIFOW(fd,18);
+ y = RFIFOW(fd,23);
+ if (RFIFOW(fd,0) == 0x08c)
+ skillmoreinfo = 25;
+ break;
+ case 11:
+ skilllv = RFIFOW(fd,6); // 16? to check.
+ skillnum = RFIFOW(fd,20);
+ x = RFIFOW(fd,23);
+ y = RFIFOW(fd,27);
+ if (RFIFOW(fd,0) == 0x08c)
+ skillmoreinfo = 29;
+ break;
+ case 12:
+ skilllv = RFIFOW(fd,3); // 2? to check.
+ skillnum = RFIFOW(fd,6);
+ x = RFIFOW(fd,17);
+ y = RFIFOW(fd,21);
+ if (RFIFOW(fd,0) == 0x08c)
+ skillmoreinfo = 23;
+ break;
+ case 13:
+ case 14:
+ skilllv = RFIFOW(fd,6);
+ skillnum = RFIFOW(fd,9);
+ x = RFIFOW(fd,23);
+ y = RFIFOW(fd,26);
+ if (RFIFOW(fd,0) == 0x08c)
+ skillmoreinfo = 28;
+ break;
+ case 15:
+ skilllv = RFIFOW(fd,4);
+ skillnum = RFIFOW(fd,9);
+ x = RFIFOW(fd,22);
+ y = RFIFOW(fd,28);
+ if (RFIFOW(fd,0) == 0x113)
+ skillmoreinfo = 30;
+ break;
+ case 16:
+ skilllv = RFIFOW(fd,9);
+ skillnum = RFIFOW(fd,18);
+ x = RFIFOW(fd,22);
+ y = RFIFOW(fd,32);
+ if (RFIFOW(fd,0) == 0x07e)
+ skillmoreinfo = 34;
+ break;
+ default: // old version by default
+ skilllv = RFIFOW(fd,2);
+ skillnum = RFIFOW(fd,4);
+ x = RFIFOW(fd,6);
+ y = RFIFOW(fd,8);
+ if (RFIFOW(fd,0) == 0x190)
+ skillmoreinfo = 10;
+ break;
+ }
}
if (skillnotok(skillnum, sd))
@@ -8735,12 +9237,20 @@ void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) {
if (sd->skilltimer != -1)
return;
- else if (DIFF_TICK(tick, sd->canact_tick) < 0) {
+ 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) ||
+ 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 == 22)
return;
@@ -8770,7 +9280,7 @@ void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
if(sd->chatID) return;
- if (sd->npc_id!=0 || sd->vender_id != 0 || (sd->sc_data &&
+ 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 ||
@@ -8781,7 +9291,7 @@ void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
if(sd->invincible_timer != -1)
pc_delinvincibletimer(sd);
- skill_castend_map(sd,RFIFOW(fd,2),RFIFOP(fd,4));
+ skill_castend_map(sd,RFIFOW(fd,2),(char*)RFIFOP(fd,4));
}
/*==========================================
* ƒƒ‚—v‹
@@ -8854,7 +9364,7 @@ void clif_parse_NpcStringInput(int fd,struct map_session_data *sd)
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,RFIFOP(fd,8));
+ strcpy(sd->npc_str,(char*)RFIFOP(fd,8));
npc_scriptcont(sd,RFIFOL(fd,4));
}
@@ -8918,28 +9428,39 @@ void clif_parse_InsertCard(int fd,struct map_session_data *sd)
void clif_parse_SolveCharName(int fd, struct map_session_data *sd) {
int char_id;
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 8:
- char_id = RFIFOL(fd,8);
- break;
- case 9:
- char_id = RFIFOL(fd,7);
- break;
- case 10:
- char_id = RFIFOL(fd,10);
- break;
- case 11:
- char_id = RFIFOL(fd,6);
- break;
- case 12:
- char_id = RFIFOL(fd,8);
- break;
- case 13:
- char_id = RFIFOL(fd,12);
- break;
- default: // old version by default (+ packet version 6 and 7)
- char_id = RFIFOL(fd,2);
- break;
+ if (USE_PACKET_DB(sd)) {
+ char_id = RFIFOL(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 8:
+ char_id = RFIFOL(fd,8);
+ break;
+ case 9:
+ char_id = RFIFOL(fd,7);
+ break;
+ case 10:
+ char_id = RFIFOL(fd,10);
+ break;
+ case 11:
+ char_id = RFIFOL(fd,6);
+ break;
+ case 12:
+ char_id = RFIFOL(fd,8);
+ break;
+ case 13:
+ case 14:
+ char_id = RFIFOL(fd,12);
+ break;
+ case 15:
+ char_id = RFIFOL(fd,10);
+ break;
+ case 16:
+ char_id = RFIFOL(fd,7);
+ break;
+ default: // old version by default (+ packet version 6 and 7)
+ char_id = RFIFOL(fd,2);
+ break;
+ }
}
clif_solved_charname(sd, char_id);
}
@@ -8951,15 +9472,14 @@ void clif_parse_SolveCharName(int fd, struct map_session_data *sd) {
void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
nullpo_retv(sd);
- if (battle_config.atc_gmonly == 0 || pc_isGM(sd)) {
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ pc_isGM(sd) >= get_atcommand_level(AtCommand_ResetState)) {
switch(RFIFOW(fd,2)){
case 0:
- if (pc_isGM(sd) >= get_atcommand_level(AtCommand_ResetState))
- pc_resetstate(sd);
+ pc_resetstate(sd);
break;
case 1:
- if (pc_isGM(sd) >= get_atcommand_level(AtCommand_ResetState))
- pc_resetskill(sd);
+ pc_resetskill(sd);
break;
}
}
@@ -8970,7 +9490,7 @@ void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_LGMmessage(int fd, struct map_session_data *sd) {
- unsigned char buf[64];
+ unsigned char buf[512];
nullpo_retv(sd);
@@ -8995,42 +9515,55 @@ void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) {
if (sd->npc_id != 0 || sd->vender_id != 0)
return;
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 8:
- item_index = RFIFOW(fd,5) - 2;
- item_amount = RFIFOL(fd,12);
- break;
- case 9:
- item_index = RFIFOW(fd,5) - 2;
- item_amount = RFIFOL(fd,19);
- break;
- case 10:
- item_index = RFIFOW(fd,3) - 2;
- item_amount = RFIFOL(fd,15);
- break;
- case 11:
- item_index = RFIFOW(fd,6) - 2;
- item_amount = RFIFOL(fd,21);
- break;
- case 12:
- item_index = RFIFOW(fd,5) - 2;
- item_amount = RFIFOL(fd,12);
- break;
- case 13:
- item_index = RFIFOW(fd,6) - 2;
- item_amount = RFIFOL(fd,9);
- break;
- default: // old version by default (+ packet version 6 and 7)
- item_index = RFIFOW(fd,2) - 2;
- item_amount = RFIFOL(fd,4);
- break;
+ if (USE_PACKET_DB(sd)) {
+ item_index = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0])-2;
+ item_amount = RFIFOL(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[1]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 8:
+ item_index = RFIFOW(fd,5) - 2;
+ item_amount = RFIFOL(fd,12);
+ break;
+ case 9:
+ item_index = RFIFOW(fd,5) - 2;
+ item_amount = RFIFOL(fd,19);
+ break;
+ case 10:
+ item_index = RFIFOW(fd,3) - 2;
+ item_amount = RFIFOL(fd,15);
+ break;
+ case 11:
+ item_index = RFIFOW(fd,6) - 2;
+ item_amount = RFIFOL(fd,21);
+ break;
+ case 12:
+ item_index = RFIFOW(fd,5) - 2;
+ item_amount = RFIFOL(fd,12);
+ break;
+ case 13:
+ case 14:
+ item_index = RFIFOW(fd,6) - 2;
+ item_amount = RFIFOL(fd,9);
+ break;
+ case 15:
+ item_index = RFIFOW(fd,4) - 2;
+ item_amount = RFIFOL(fd,10);
+ break;
+ case 16:
+ item_index = RFIFOW(fd,10) - 2;
+ item_amount = RFIFOL(fd,16);
+ break;
+ default: // old version by default (+ packet version 6 and 7)
+ item_index = RFIFOW(fd,2) - 2;
+ item_amount = RFIFOL(fd,4);
+ break;
+ }
}
if (item_index < 0 || item_index >= MAX_INVENTORY)
return;
if(itemdb_isdropable(sd->status.inventory[item_index].nameid) == 0)
-
return;
if (sd->state.storage_flag)
@@ -9048,35 +9581,49 @@ void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) {
nullpo_retv(sd);
- switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- case 8:
- item_index = RFIFOW(fd,10) - 1;
- item_amount = RFIFOL(fd,22);
- break;
- case 9:
- item_index = RFIFOW(fd,11) - 1;
- item_amount = RFIFOL(fd,22);
- break;
- case 10:
- item_index = RFIFOW(fd,3) - 1;
- item_amount = RFIFOL(fd,13);
- break;
- case 11:
- item_index = RFIFOW(fd,4) - 1;
- item_amount = RFIFOL(fd,8);
- break;
- case 12:
- item_index = RFIFOW(fd,10) - 1;
- item_amount = RFIFOL(fd,22);
- break;
- case 13:
- item_index = RFIFOW(fd,12) - 1;
- item_amount = RFIFOL(fd,18);
- break;
- default: // old version by default (+ packet version 6 and 7)
- item_index = RFIFOW(fd,2) - 1;
- item_amount = RFIFOL(fd,4);
- break;
+ if (USE_PACKET_DB(sd)) {
+ item_index = RFIFOW(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[0])-1;
+ item_amount = RFIFOL(fd,packet_db[clif_config.packet_db_ver][RFIFOW(fd,0)].pos[1]);
+ } else {
+ switch (sd->packet_ver) { // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ case 8:
+ item_index = RFIFOW(fd,10) - 1;
+ item_amount = RFIFOL(fd,22);
+ break;
+ case 9:
+ item_index = RFIFOW(fd,11) - 1;
+ item_amount = RFIFOL(fd,22);
+ break;
+ case 10:
+ item_index = RFIFOW(fd,3) - 1;
+ item_amount = RFIFOL(fd,13);
+ break;
+ case 11:
+ item_index = RFIFOW(fd,4) - 1;
+ item_amount = RFIFOL(fd,8);
+ break;
+ case 12:
+ item_index = RFIFOW(fd,10) - 1;
+ item_amount = RFIFOL(fd,22);
+ break;
+ case 13:
+ case 14:
+ item_index = RFIFOW(fd,12) - 1;
+ item_amount = RFIFOL(fd,18);
+ break;
+ case 15:
+ item_index = RFIFOW(fd,4) - 1;
+ item_amount = RFIFOL(fd,17);
+ break;
+ case 16:
+ item_index = RFIFOW(fd,11) - 1;
+ item_amount = RFIFOL(fd,17);
+ break;
+ default: // old version by default (+ packet version 6 and 7)
+ item_index = RFIFOW(fd,2) - 1;
+ item_amount = RFIFOL(fd,4);
+ break;
+ }
}
if (sd->npc_id != 0 || sd->vender_id != 0)
@@ -9137,7 +9684,7 @@ void clif_parse_CloseKafra(int fd, struct map_session_data *sd) {
*/
void clif_parse_CreateParty(int fd, struct map_session_data *sd) {
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 7) {
- party_create(sd,RFIFOP(fd,2));
+ party_create(sd,(char*)RFIFOP(fd,2),0,0);
} else
clif_skill_fail(sd,1,0,4);
}
@@ -9148,9 +9695,9 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd) {
*/
void clif_parse_CreateParty2(int fd, struct map_session_data *sd) {
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 7){
- party_create(sd, RFIFOP(fd,2));
+ party_create(sd,(char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27));
} else
- clif_skill_fail(sd, 1, 0, 4);
+ clif_skill_fail(sd,1,0,4);
}
/*==========================================
@@ -9187,7 +9734,7 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
- party_removemember(sd,RFIFOL(fd,2),RFIFOP(fd,6));
+ party_removemember(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6));
}
/*==========================================
@@ -9204,16 +9751,15 @@ void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) {
*/
void clif_parse_PartyMessage(int fd, struct map_session_data *sd) {
nullpo_retv(sd);
- if (is_charcommand(fd, sd, RFIFOP(fd,4), 0) != CharCommand_None)
- return;
- if (is_atcommand(fd, sd, RFIFOP(fd,4), 0) != AtCommand_None)
- return;
- if(sd->sc_data &&
+
+ 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‹ÖŽ~
+ sd->sc_data[SC_NOCHAT].timer!=-1))) //ƒ`ƒƒƒbƒg‹ÖŽ~
return;
- party_send_message(sd, RFIFOP(fd,4), RFIFOW(fd,2)-4);
+ party_send_message(sd, (char*)RFIFOP(fd,4), RFIFOW(fd,2)-4);
}
/*==========================================
@@ -9249,32 +9795,7 @@ void clif_parse_PurchaseReq(int fd, struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_OpenVending(int fd,struct map_session_data *sd) {
- vending_openvending(sd, RFIFOW(fd,2), RFIFOP(fd,4), RFIFOB(fd,84), RFIFOP(fd,85));
-}
-
-/*==========================================
- * /monster /item rewriten by [Yor]
- *------------------------------------------
- */
-void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) {
- char monster_item_name[25];
-
- nullpo_retv(sd);
-
- memset(monster_item_name, '\0', sizeof(monster_item_name));
-
- if (battle_config.atc_gmonly == 0 || pc_isGM(sd)) {
- memcpy(monster_item_name, RFIFOP(fd,2), 24);
-
- if (mobdb_searchname(monster_item_name) != 0) {
- if (pc_isGM(sd) >= get_atcommand_level(AtCommand_Monster))
- atcommand_spawn(fd, sd, "@spawn", monster_item_name); // as @spawn
- } else if (itemdb_searchname(monster_item_name) != NULL) {
- if (pc_isGM(sd) >= get_atcommand_level(AtCommand_Item))
- atcommand_item(fd, sd, "@item", monster_item_name); // as @item
- }
-
- }
+ vending_openvending(sd, RFIFOW(fd,2), (char*)RFIFOP(fd,4), RFIFOB(fd,84), RFIFOP(fd,85));
}
/*==========================================
@@ -9282,7 +9803,7 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_CreateGuild(int fd,struct map_session_data *sd) {
- guild_create(sd, RFIFOP(fd,6));
+ guild_create(sd, (char*)RFIFOP(fd,6));
}
/*==========================================
@@ -9297,7 +9818,7 @@ void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd) {
* ƒMƒ‹ƒhî•ñ—v‹
*------------------------------------------
*/
-void clif_parse_GuildReqeustInfo(int fd, struct map_session_data *sd) {
+void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) {
switch(RFIFOL(fd,2)){
case 0: // ƒMƒ‹ƒhŠî–{î•ñA“¯–¿“G‘Îî•ñ
clif_guild_basicinfo(sd);
@@ -9332,7 +9853,7 @@ void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) {
int i;
for(i = 4; i < RFIFOW(fd,2); i += 40 ){
- guild_change_position(sd, RFIFOL(fd,i), RFIFOL(fd,i+4), RFIFOL(fd,i+12), RFIFOP(fd,i+16));
+ guild_change_position(sd, RFIFOL(fd,i), RFIFOL(fd,i+4), RFIFOL(fd,i+12), (char*)RFIFOP(fd,i+16));
}
}
@@ -9366,7 +9887,7 @@ void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd) {
- guild_change_emblem(sd,RFIFOW(fd,2)-4,RFIFOP(fd,4));
+ guild_change_emblem(sd,RFIFOW(fd,2)-4,(char*)RFIFOP(fd,4));
}
/*==========================================
@@ -9374,7 +9895,7 @@ void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_GuildChangeNotice(int fd,struct map_session_data *sd) {
- guild_change_notice(sd,RFIFOL(fd,2),RFIFOP(fd,6),RFIFOP(fd,66));
+ guild_change_notice(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6),(char*)RFIFOP(fd,66));
}
/*==========================================
@@ -9398,7 +9919,7 @@ void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
- guild_leave(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOP(fd,14));
+ guild_leave(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),(char*)RFIFOP(fd,14));
}
/*==========================================
@@ -9406,7 +9927,7 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_GuildExplusion(int fd,struct map_session_data *sd) {
- guild_explusion(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOP(fd,14));
+ guild_explusion(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),(char*)RFIFOP(fd,14));
}
/*==========================================
@@ -9415,16 +9936,15 @@ void clif_parse_GuildExplusion(int fd,struct map_session_data *sd) {
*/
void clif_parse_GuildMessage(int fd,struct map_session_data *sd) {
nullpo_retv(sd);
- if (is_charcommand(fd, sd, RFIFOP(fd, 4), 0) != CharCommand_None)
- return;
- if (is_atcommand(fd, sd, RFIFOP(fd, 4), 0) != AtCommand_None)
- return;
- if(sd->sc_data &&
+
+ 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‹ÖŽ~
+ sd->sc_data[SC_NOCHAT].timer!=-1))) //ƒ`ƒƒƒbƒg‹ÖŽ~
return;
- guild_send_message(sd, RFIFOP(fd,4), RFIFOW(fd,2)-4);
+ guild_send_message(sd, (char*)RFIFOP(fd,4), RFIFOW(fd,2)-4);
}
/*==========================================
@@ -9464,7 +9984,7 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
*------------------------------------------
*/
void clif_parse_GuildBreak(int fd, struct map_session_data *sd) {
- guild_break(sd,RFIFOP(fd,2));
+ guild_break(sd,(char*)RFIFOP(fd,2));
}
// pet
@@ -9488,7 +10008,7 @@ void clif_parse_SendEmotion(int fd, struct map_session_data *sd) {
}
void clif_parse_ChangePetName(int fd, struct map_session_data *sd) {
- pet_change_name(sd,RFIFOP(fd,2));
+ pet_change_name(sd,(char*)RFIFOP(fd,2));
}
// Kick (right click menu for GM "(name) force to quit")
@@ -9559,6 +10079,31 @@ void clif_parse_Recall(int fd, struct map_session_data *sd) { // Added by RoVeRT
return;
}
+/*==========================================
+ * /monster /item rewriten by [Yor]
+ *------------------------------------------
+ */
+void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) {
+ char monster_item_name[25];
+
+ nullpo_retv(sd);
+
+ memset(monster_item_name, '\0', sizeof(monster_item_name));
+
+ if (battle_config.atc_gmonly == 0 || pc_isGM(sd)) {
+ memcpy(monster_item_name, RFIFOP(fd,2), 24);
+
+ if (mobdb_searchname(monster_item_name) != 0) {
+ if (pc_isGM(sd) >= get_atcommand_level(AtCommand_Monster))
+ atcommand_spawn(fd, sd, "@spawn", monster_item_name); // as @spawn
+ } else if (itemdb_searchname(monster_item_name) != NULL) {
+ if (pc_isGM(sd) >= get_atcommand_level(AtCommand_Item))
+ atcommand_item(fd, sd, "@item", monster_item_name); // as @item
+ }
+
+ }
+}
+
void clif_parse_GMHide(int fd, struct map_session_data *sd) { // Modified by [Yor]
nullpo_retv(sd);
@@ -9607,10 +10152,10 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd)
WFIFOSET(dstfd,packet_len_table[0x14b]);
dstsd->status.manner -= limit;
if(dstsd->status.manner < 0)
- skill_status_change_start(bl,SC_NOCHAT,0,0,0,0,0,0);
+ status_change_start(bl,SC_NOCHAT,0,0,0,0,0,0);
else{
dstsd->status.manner = 0;
- skill_status_change_end(bl,SC_NOCHAT,-1);
+ status_change_end(bl,SC_NOCHAT,-1);
}
printf("name:%s type:%d limit:%d manner:%d\n",dstsd->status.name,type,limit,dstsd->status.manner);
}
@@ -9628,7 +10173,7 @@ void clif_parse_GMReqNoChatCount(int fd, struct map_session_data *sd)
WFIFOW(fd,0) = 0x1e0;
WFIFOL(fd,2) = tid;
- sprintf(WFIFOP(fd,6),"%d",tid);
+ sprintf((char*)WFIFOP(fd,6),"%d",tid);
// memcpy(WFIFOP(fd,6), "TESTNAME", 24);
WFIFOSET(fd, packet_len_table[0x1e0]);
@@ -9642,14 +10187,14 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
memset(output, '\0', sizeof(output));
- nick = RFIFOP(fd,2); // speed up
+ nick = (char*)RFIFOP(fd,2); // speed up
RFIFOB(fd,25) = '\0'; // to be sure that the player name have at maximum 23 characters
//printf("Ignore: char '%s' state: %d\n", nick, RFIFOB(fd,26));
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) {
+ if (strlen(nick) < 4) {
WFIFOB(fd,3) = 1; // fail
WFIFOSET(fd, packet_len_table[0x0d1]);
if (RFIFOB(fd,26) == 0) // type
@@ -9669,7 +10214,7 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
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, strlen(output) + 1);
+ 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')
@@ -9682,7 +10227,7 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
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, strlen(output) + 1);
+ 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);
}
@@ -9692,7 +10237,7 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
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, strlen(output) + 1);
+ 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)
@@ -9701,7 +10246,7 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
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) {
+ if (pos == -1) {
WFIFOB(fd,3) = 0; // success
WFIFOSET(fd, packet_len_table[0x0d1]);
pos = i; // don't break, to remove ALL same nick
@@ -9753,6 +10298,38 @@ void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) { // Rewritten
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++;
+ }
+ WFIFOW(fd,0) = 0xd4;
+ WFIFOW(fd,2) = 4 + (24 * 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, 24);
+ j++;
+ }
+ }
+ WFIFOSET(fd, WFIFOW(fd,2));
+ if(count >= MAX_IGNORE_LIST) //–žƒ^ƒ“‚È‚çÅŒã‚Ì1ŒÂ‚ðÁ‚·
+ sd->ignore[MAX_IGNORE_LIST - 1].name[0] = 0;
+
+ return;
+}
+
void clif_parse_skillMessage(int fd, struct map_session_data *sd) { // Added by RoVeRT
int skillid,skilllv, x, y;
char *mes;
@@ -9763,7 +10340,7 @@ void clif_parse_skillMessage(int fd, struct map_session_data *sd) { // Added by
y = RFIFOB(fd,6);
x = RFIFOB(fd,8);
- mes = RFIFOP(fd,10);
+ mes = (char*)RFIFOP(fd,10);
// skill 220 = graffiti
// printf("skill: %d %d location: %3d %3d message: %s\n", skillid, skilllv, x, y, (char*)mes);
@@ -9795,11 +10372,11 @@ void clif_parse_sn_doridori(int fd, struct map_session_data *sd) {
* ƒXƒpƒmƒr‚Ì”š—ô”g“®
*------------------------------------------
*/
-void clif_parse_sn_explosionspirits(int fd, struct map_session_data *sd)
+void clif_parse_sn_explosionspirits(int fd, struct map_session_data *sd)
{
if(sd){
int nextbaseexp=pc_nextbaseexp(sd);
- struct pc_base_job s_class = pc_calc_base_job(sd->status.class);
+ struct pc_base_job s_class = pc_calc_base_job(sd->status.class_);
if (battle_config.etc_log){
if(nextbaseexp != 0)
printf("SuperNovice explosionspirits!! %d %d %d %d\n",sd->bl.id,s_class.job,sd->status.base_exp,(int)((double)1000*sd->status.base_exp/nextbaseexp));
@@ -9808,7 +10385,7 @@ void clif_parse_sn_explosionspirits(int fd, struct map_session_data *sd)
}
if(s_class.job == 23 && 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);
- skill_status_change_start(&sd->bl,SkillStatusChangeTable[MO_EXPLOSIONSPIRITS],5,0,0,0,skill_get_time(MO_EXPLOSIONSPIRITS,5),0 );
+ status_change_start(&sd->bl,SkillStatusChangeTable[MO_EXPLOSIONSPIRITS],5,0,0,0,skill_get_time(MO_EXPLOSIONSPIRITS,5),0 );
}
}
return;
@@ -9839,7 +10416,7 @@ void clif_parse_friends_list_add(int fd, struct map_session_data *sd) {
struct map_session_data *f_sd;
int i;
- f_sd = map_nick2sd(RFIFOP(fd,2));
+ f_sd = map_nick2sd((char*)RFIFOP(fd,2));
// Friend doesn't exist (no player with this name)
if (f_sd == NULL) {
@@ -9917,9 +10494,28 @@ void clif_parse_GMkillall(int fd,struct map_session_data *sd)
return;
}
+/*==========================================
+ * ƒpƒPƒbƒgƒfƒoƒbƒO
+ *------------------------------------------
+ */
+void clif_parse_debug(int fd,struct map_session_data *sd)
+{
+ int i, cmd;
+
+ cmd = RFIFOW(fd,0);
+
+ printf("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<packet_db[sd->packet_ver][cmd].len;i++){
+ if((i&15)==0)
+ printf("\n%04X ",i);
+ printf("%02X ",RFIFOB(fd,i));
+ }
+ printf("\n");
+}
+
// functions list
-static void (*clif_parse_func_table[7][0x220])() = {
- {
+static void (*clif_parse_func_table[MAX_PACKET_DB])(int, struct map_session_data *) = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -9951,11 +10547,11 @@ static void (*clif_parse_func_table[7][0x220])() = {
NULL, clif_parse_HowManyConnections, NULL, NULL, NULL, clif_parse_NpcBuySellSelected, NULL, NULL,
clif_parse_NpcBuyListSend, clif_parse_NpcSellListSend, NULL, NULL, clif_parse_GMKick, NULL, clif_parse_GMkillall, clif_parse_PMIgnore,
// d0
- clif_parse_PMIgnoreAll, NULL, NULL, NULL, NULL, clif_parse_CreateChatRoom, NULL, NULL,
+ clif_parse_PMIgnoreAll, NULL, NULL, clif_parse_PMIgnoreList, NULL, clif_parse_CreateChatRoom, NULL, NULL,
NULL, clif_parse_ChatAddMember, NULL, NULL, NULL, NULL, clif_parse_ChatRoomStatusChange, NULL,
// e0
clif_parse_ChangeChatOwner, NULL, clif_parse_KickFromChat, clif_parse_ChatLeave, clif_parse_TradeRequest, NULL, clif_parse_TradeAck, NULL,
- clif_parse_TradeAddItem, NULL, NULL, clif_parse_TradeOk, NULL, clif_parse_TradeCansel, NULL, clif_parse_TradeCommit,
+ clif_parse_TradeAddItem, NULL, NULL, clif_parse_TradeOk, NULL, clif_parse_TradeCancel, NULL, clif_parse_TradeCommit,
// f0
NULL, NULL, NULL, clif_parse_MoveToKafra, NULL, clif_parse_MoveFromKafra, NULL, clif_parse_CloseKafra,
NULL, clif_parse_CreateParty, NULL, NULL, clif_parse_PartyInvite, NULL, NULL, clif_parse_ReplyPartyInvite,
@@ -9975,7 +10571,7 @@ static void (*clif_parse_func_table[7][0x220])() = {
// 140
clif_parse_MapMove, NULL, NULL, clif_parse_NpcAmountInput, NULL, NULL, clif_parse_NpcCloseClicked, NULL,
- NULL, clif_parse_GMReqNoChat, NULL, NULL, NULL, clif_parse_GuildCheckMaster, NULL, clif_parse_GuildReqeustInfo,
+ NULL, clif_parse_GMReqNoChat, NULL, NULL, NULL, clif_parse_GuildCheckMaster, NULL, clif_parse_GuildRequestInfo,
// 150
NULL, clif_parse_GuildRequestEmblem, NULL, clif_parse_GuildChangeEmblem, NULL, clif_parse_GuildChangeMemberPosition, NULL, NULL,
NULL, clif_parse_GuildLeave, NULL, clif_parse_GuildExplusion, NULL, clif_parse_GuildBreak, NULL, NULL,
@@ -10010,7 +10606,8 @@ static void (*clif_parse_func_table[7][0x220])() = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, clif_parse_sn_doridori,
clif_parse_CreateParty2, NULL, NULL, NULL, NULL, clif_parse_sn_explosionspirits, NULL, NULL,
// 1f0
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, clif_parse_ReqAdopt,
+ NULL, NULL, NULL, NULL, NULL, NULL,
// 200
NULL, NULL, clif_parse_friends_list_add, clif_parse_friends_list_remove, NULL, NULL, NULL, NULL,
@@ -10020,13 +10617,6 @@ static void (*clif_parse_func_table[7][0x220])() = {
#if 0
case 0xd3: clif_parse_IgnoreList
#endif
- },
- {NULL},
- {NULL},
- {NULL},
- {NULL},
- {NULL},
- {NULL}
};
/*==========================================
@@ -10035,28 +10625,33 @@ static void (*clif_parse_func_table[7][0x220])() = {
*------------------------------------------
*/
static int clif_parse(int fd) {
- int packet_len = 0, cmd, packet_ver;
+ int packet_len = 0, cmd, packet_ver, dump = 0;
struct map_session_data *sd;
- sd = session[fd]->session_data;
+ sd = (struct map_session_data*)session[fd]->session_data;
// Ú‘±‚ªØ‚ê‚Ä‚é‚Ì‚ÅŒãŽn––
if (!chrif_isconnect() || session[fd]->eof) { // charŽI‚ÉŒq‚ª‚Á‚Ä‚È‚¢ŠÔ‚ÍÚ‘±‹ÖŽ~ (!chrif_isconnect())
if (sd && sd->state.auth) {
- if (chrif_isconnect())
- clif_quitsave(fd, sd);
+ 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)
- printf("Player [%s] has logged off your server.\n", sd->status.name); // Player logout display [Valaris]
+ sprintf(tmp_output,"%sCharacter '"CL_WHITE"%s"CL_RESET"' logged off.\n", (pc_isGM(sd))?"GM ":"",sd->status.name); // Player logout display [Valaris]
else
- printf("Player with account [%d] has logged off your server.\n", sd->bl.id); // Player logout display [Yor]
+ sprintf(tmp_output,"%sCharacter with Account ID '"CL_WHITE"%d"CL_RESET"' logged off.\n", (pc_isGM(sd))?"GM ":"", sd->bl.id); // Player logout display [Yor]
} else if (sd) { // not authentified! (refused by char-server or disconnect before to be authentified)
- printf("Player with account [%d] has logged off your server (not auth account).\n", sd->bl.id); // Player logout display [Yor]
- map_deliddb(&sd->bl); // account_id has been included in the DB before auth answer
+ sprintf(tmp_output,"Player not authenticated with Account ID '"CL_WHITE"%d"CL_RESET"' logged off.\n", sd->bl.id); // Player logout display [Yor]
+// if (chrif_isconnect())
+// clif_quitsave(fd, sd);
+ map_deliddb(&sd->bl); // account_id has been included in the DB before auth answer [Yor]
+// sd = 0;
+ } else {
+ unsigned char *ip = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ sprintf(tmp_output,"Player not identified with IP '"CL_WHITE"%d.%d.%d.%d"CL_RESET"' logged off.\n", ip[0],ip[1],ip[2],ip[3]);
}
+ ShowInfo(tmp_output);
close(fd);
- if (sd) // ’ljÁ
-
- map_deliddb(&sd->bl); // ’ljÁ
+// if (sd) // ’ljÁ
+// map_deliddb(&sd->bl); // ’ljÁ
delete_session(fd);
return 0;
}
@@ -10064,7 +10659,7 @@ static int clif_parse(int fd) {
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));
+// printf("clif_parse: connection #%d, packet: 0x%x (with being read: %d bytes).\n", fd, RFIFOW(fd,0), RFIFOREST(fd));
cmd = RFIFOW(fd,0);
@@ -10084,7 +10679,8 @@ static int clif_parse(int fd) {
RFIFOSKIP(fd,2);
break;
case 0x7532: // Ú‘±‚ÌØ’f
- session[fd]->eof = 1;
+ close(fd);
+ session[fd]->eof=1;
break;
}
return 0;
@@ -10092,119 +10688,135 @@ static int clif_parse(int fd) {
// get packet version before to parse
packet_ver = 0;
- if (sd)
+ if (sd) {
packet_ver = sd->packet_ver;
+ if (packet_ver < 0 || packet_ver > MAX_PACKET_VER) { // unusual, but just in case
+ close(fd);
+ session[fd]->eof = 1;
+ printf("clif_parse: session #%d, bad packet version -> disconnected.\n", fd);
+ return 0;
+ }
// check authentification packet to know packet version
- else {
+ } else {
+ // packet DB
+ if (IS_PACKET_DB_VER (cmd)) {
+ if (RFIFOREST(fd) >= packet_db[clif_config.packet_db_ver][cmd].len &&
+ (RFIFOB(fd,packet_db[clif_config.packet_db_ver][cmd].pos[4]) == 0 ||
+ RFIFOB(fd,packet_db[clif_config.packet_db_ver][cmd].pos[4]) == 1)) {// 00 = Female, 01 = Male
+ packet_ver = clif_config.packet_db_ver;
+ }
// 0x72
- if (cmd == 0x72) {
+ } else if (cmd == 0x72) {
if (RFIFOREST(fd) >= 39 && (RFIFOB(fd,38) == 0 || RFIFOB(fd,38) == 1)) // 00 = Female, 01 = Male
- packet_ver = 7; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ packet_ver = 7; // 7: 13july04
else if (RFIFOREST(fd) >= 22 && (RFIFOB(fd,21) == 0 || RFIFOB(fd,21) == 1)) // 00 = Female, 01 = Male
- packet_ver = 6; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ packet_ver = 6; // 6: 7july04
else if (RFIFOREST(fd) >= 19 && (RFIFOB(fd,18) == 0 || RFIFOB(fd,18) == 1)) // 00 = Female, 01 = Male
- packet_ver = 5; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ packet_ver = 5; // 5: old
// else probably incomplete packet
else if (RFIFOREST(fd) < 19)
return 0;
// 0x7E
} else if (cmd == 0x7E) {
if (RFIFOREST(fd) >= 37 && (RFIFOB(fd,36) == 0 || RFIFOB(fd,36) == 1)) // 00 = Female, 01 = Male
- packet_ver = 9; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ packet_ver = 9; // 9: 9aug04/16aug04/17aug04
else if (RFIFOREST(fd) >= 33 && (RFIFOB(fd,32) == 0 || RFIFOB(fd,32) == 1)) // 00 = Female, 01 = Male
- packet_ver = 8; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ packet_ver = 8; // 8: 26july04
// else probably incomplete packet
else if (RFIFOREST(fd) < 33)
return 0;
// 0xF5
- } else {
+ } else if (cmd == 0xF5) {
if (RFIFOREST(fd) >= 34 && (RFIFOB(fd,33) == 0 || RFIFOB(fd,33) == 1)) // 00 = Female, 01 = Male
- packet_ver = 10; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ packet_ver = 10; // 10: 6sept04
else if (RFIFOREST(fd) >= 33 && (RFIFOB(fd,32) == 0 || RFIFOB(fd,32) == 1)) // 00 = Female, 01 = Male
- packet_ver = 12; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ packet_ver = 12; // 12: 18oct04
else if (RFIFOREST(fd) >= 32 && (RFIFOB(fd,31) == 0 || RFIFOB(fd,31) == 1)) // 00 = Female, 01 = Male
- packet_ver = 11; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
- else if (RFIFOREST(fd) >= 29 && (RFIFOB(fd,28) == 0 || RFIFOB(fd,28) == 1)) // 00 = Female, 01 = Male
- packet_ver = 13; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ packet_ver = 11; // 11: 21sept04
+ else if (RFIFOREST(fd) >= 29 && (RFIFOB(fd,28) == 0 || RFIFOB(fd,28) == 1)) { // 00 = Female, 01 = Male
+ if (RFIFOL(fd,3) > 700000 && RFIFOL(fd,10) >= 150000 && RFIFOL(fd,10) < 5000000) // account id / char id (more than 5.000.000 characters?) [Yor]
+ packet_ver = 15; // 14: 6dec04
+ else
+ packet_ver = 13; // 13: 25oct04 (by [Yor])
+ }
// else probably incomplete packet
else if (RFIFOREST(fd) < 29)
return 0;
+ // 0x9B
+ } else if (cmd == 0x9B) {
+ if (RFIFOREST(fd) >= 32 && (RFIFOB(fd,31) == 0 || RFIFOB(fd,31) == 1)) // 00 = Female, 01 = Male
+ packet_ver = 16; // 16: 10jan05
+ else if (RFIFOREST(fd) < 32)
+ return 0;
+ } else {
+ // unknown client? leave packet ver as 0 so it'll disconnect anyway
}
+
// check if version is accepted
- if ((packet_ver == 5 && (battle_config.packet_ver_flag & 1) == 0) ||
- (packet_ver == 6 && (battle_config.packet_ver_flag & 2) == 0) ||
- (packet_ver == 7 && (battle_config.packet_ver_flag & 4) == 0) ||
- (packet_ver == 8 && (battle_config.packet_ver_flag & 8) == 0) ||
- (packet_ver == 9 && (battle_config.packet_ver_flag & 16) == 0) ||
- (packet_ver == 10 && (battle_config.packet_ver_flag & 32) == 0) ||
- (packet_ver == 11 && (battle_config.packet_ver_flag & 64) == 0) ||
- (packet_ver == 12 && (battle_config.packet_ver_flag & 128) == 0) ||
- (packet_ver == 13 && (battle_config.packet_ver_flag & 256) == 0)) {
+ if (packet_ver < 5 || // reject really old client versions
+ (packet_ver <= 9 && (battle_config.packet_ver_flag & 1) == 0) || // older than 6sept04
+ (packet_ver == 10 && (battle_config.packet_ver_flag & 2) == 0) ||
+ (packet_ver == 11 && (battle_config.packet_ver_flag & 4) == 0) ||
+ (packet_ver == 12 && (battle_config.packet_ver_flag & 8) == 0) ||
+ (packet_ver == 13 && (battle_config.packet_ver_flag & 16) == 0) ||
+ (packet_ver == 14 && (battle_config.packet_ver_flag & 32) == 0) ||
+ (packet_ver == 15 && (battle_config.packet_ver_flag & 64) == 0) ||
+ (packet_ver == 16 && (battle_config.packet_ver_flag & 128) == 0) ||
+ packet_ver > MAX_PACKET_VER || // no packet version support yet
+ // identified version, but unknown client?
+ (!sd && packet_db[packet_ver][cmd].func != clif_parse_WantToConnection)) {
WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 5; // 05 = Game's EXE is not the latest version
WFIFOSET(fd,23);
- session[fd]->eof = 1;
+ clif_setwaitclose(fd);
return 0;
}
}
// ƒQ[ƒ€—pˆÈŠOƒpƒPƒbƒg‚©A”FØ‚ðI‚¦‚é‘O‚É0072ˆÈŠO‚ª—ˆ‚½‚çAØ’f‚·‚é
- if (packet_ver < 5 || packet_ver > 13 || // if packet is not inside these values: session is incorrect?? or auth packet is unknown
- cmd >= 0x220 || packet_size_table[packet_ver-5][cmd] == 0) {
+ 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
if (!fd)
return 0;
+ close(fd);
session[fd]->eof = 1;
printf("clif_parse: session #%d, packet 0x%x (%d bytes received) -> disconnected.\n", fd, cmd, RFIFOREST(fd));
return 0;
}
// ƒpƒPƒbƒg’·‚ðŒvŽZ
- packet_len = packet_size_table[packet_ver-5][cmd];
+ 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) {
- session[fd]->eof = 1;
+ close(fd);
+ session[fd]->eof =1;
return 0;
}
}
if (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_ver < 8 && clif_parse_func_table[0][cmd]) { // packet version 5-6-7 use same functions, but size are different
+ } else if (packet_db[packet_ver][cmd].func) { // packet version 5-6-7 use same functions, but size are different
// ƒpƒPƒbƒgˆ—
- clif_parse_func_table[0][cmd](fd, sd);
- } else if (packet_ver >= 8 && clif_parse_func_table[packet_ver - 7][cmd]) {
- // ƒpƒPƒbƒgˆ—
- clif_parse_func_table[packet_ver - 7][cmd](fd, sd);
+ packet_db[packet_ver][cmd].func(fd, sd);
} else {
// •s–¾‚ȃpƒPƒbƒg
if (battle_config.error_log) {
- if (fd)
- printf("\nclif_parse: session #%d, packet 0x%x, lenght %d\n", fd, cmd, packet_len);
-#ifdef DUMP_UNKNOWN_PACKET
+#if DUMP_UNKNOWN_PACKET
{
int i;
FILE *fp;
char packet_txt[256] = "save/packet.txt";
time_t now;
- 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));
- }
- 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);
+ dump = 1;
if ((fp = fopen(packet_txt, "a")) == NULL) {
printf("clif.c: cant write [%s] !!! data is lost !!!\n", packet_txt);
@@ -10233,218 +10845,618 @@ static int clif_parse(int fd) {
#endif
}
}
+
+ if (dump) {
+ int i;
+ if (fd)
+ printf("\nclif_parse: session #%d, packet 0x%x, lenght %d\n", fd, cmd, packet_len);
+ 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));
+ }
+ 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,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_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_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_sn_doridori,"sndoridori"},
+ {clif_parse_sn_explosionspirits,"snexplosionspirits"},
+ {clif_parse_PMIgnore,"wisexin"},
+ {clif_parse_PMIgnoreList,"wisexlist"},
+ {clif_parse_PMIgnoreAll,"wisall"},
+ {clif_parse_friends_list_add,"friendslistadd"},
+ {clif_parse_friends_list_remove,"friendslistremove"},
+ {clif_parse_GMkillall,"killall"},
+ {clif_parse_Recall,"summon"},
+ {clif_parse_GM_Monster_Item,"itemmonster"},
+ {clif_parse_Shift,"shift"},
+ {clif_parse_debug,"debug"},
+
+ {NULL,NULL}
+ };
+
+ if( (fp=fopen("db/packet_db.txt","r"))==NULL ){
+ printf("can't read db/packet_db.txt\n");
+ return 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) {
+ packet_ver = atoi(w2);
+ // copy from previous version into new version and continue
+ // - indicating all following packets should be read into the newer version
+ // -- on 2nd thought, rereading everything isn't the best thing to do...
+ // memcpy(&packet_db[packet_ver], &packet_db[packet_ver - 1], sizeof(packet_db[0]));
+ continue;
+ } else if(strcmpi(w1,"packet_db_ver")==0) {
+ // optional: if you do not wish to read multiple versions from the packet_db,
+ // remove all "packet_ver: ##" lines, and define the packet DB version with this
+ 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;
+ } else if(strcmpi(w1,"enable_packet_db")==0) {
+ // whether we want to allow identifying clients via the packet DB
+ clif_config.enable_packet_db = battle_config_switch(w2);
+ // if we don't want to read the packet DB, and use hardcoded values only
+ if (!clif_config.enable_packet_db)
+ return 0;
+ continue;
+ } else if(strcmpi(w1,"prefer_packet_db")==0) {
+ // whether the packet DB takes higher precedence over the hardcoded one (type 1)
+ // and whether to overwrite predefined packet length and functions when reading
+ // from the DB (type 2)
+ clif_config.prefer_packet_db = battle_config_switch(w2); // not used for now
+ 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){
+ sprintf(tmp_output, "packet_db: packet len error\n");
+ ShowError(tmp_output);
+ continue;
+ }
+ k = atoi(str[1]);
+ // if (packet_db[packet_ver][cmd].len != k && clif_config.prefer_packet_db) // not used for now
+ packet_db[packet_ver][cmd].len = k;
+
+ if(str[2]==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 && !clif_config.prefer_packet_db)
+ // break; // not used for now
+ 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 = cmd;
+ }
+ if(str[3]==NULL){
+ sprintf(tmp_output, "packet_db: packet error\n");
+ ShowError(tmp_output);
+ 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);
+ }
+
+ fclose(fp);
+ sprintf(tmp_output,"Done reading packet version '"CL_WHITE"%d"CL_RESET"' in '"CL_WHITE"%s"CL_RESET"'.\n", clif_config.packet_db_ver, "db/packet_db.txt");
+ ShowStatus(tmp_output);
+ return 0;
+
+}
+
+/*==========================================
*
*------------------------------------------
*/
int do_init_clif(void) {
-#ifndef __WIN32
int i;
-#endif
+ clif_config.enable_packet_db = 1; // whether to use the packet DB for client connection
+ clif_config.packet_db_ver = -1; // the main packet version of the DB
+ clif_config.prefer_packet_db = 1; // whether the packet version takes precedence
+ clif_config.connect_cmd = 0xF5; // the default packet used for connecting to the server
+
+ memset(packet_db,0,sizeof(packet_db));
+
+ // size of packet version 5 (old)
+ for(i=0;i<sizeof(packet_len_table)/sizeof(packet_len_table[0]);i++){
+ packet_db[0][i].len = packet_len_table[i];
+ }
+ // packet functions of version 5 (old)
+ for(i=0;i<sizeof(clif_parse_func_table)/sizeof(clif_parse_func_table[0]);i++){
+ packet_db[0][i].func = clif_parse_func_table[i];
+ }
+
+ // using hardcoded packet values isn't necessary with packet_db now,
+ // but... just in case, i'll leave it to initialise for now ^^;
+ // init packet version 5 and lower
+ memcpy(&packet_db[1], &packet_db[0], sizeof(packet_db[0]));
+ memcpy(&packet_db[2], &packet_db[1], sizeof(packet_db[0]));
+ memcpy(&packet_db[3], &packet_db[2], sizeof(packet_db[0]));
+ memcpy(&packet_db[4], &packet_db[3], sizeof(packet_db[0]));
+ memcpy(&packet_db[5], &packet_db[4], sizeof(packet_db[0]));
+
+#ifndef PREFER_PACKET_DB
// functions of packet version 5-6-7 are same, but size are different
+ // size of packet version 6 (7july04)
+ memcpy(&packet_db[6], &packet_db[5], sizeof(packet_db[0]));
+ packet_db[6][0x072].len = 22;
+ packet_db[6][0x085].len = 8;
+ packet_db[6][0x0a7].len = 13;
+ packet_db[6][0x113].len = 15;
+ packet_db[6][0x116].len = 15;
+ packet_db[6][0x190].len = 95;
+ // size of packet version 7 (13july04)
+ memcpy(&packet_db[7], &packet_db[6], sizeof(packet_db[0]));
+ packet_db[7][0x072].len = 39;
+ packet_db[7][0x085].len = 9;
+ packet_db[7][0x09b].len = 13;
+ packet_db[7][0x09f].len = 10;
+ packet_db[7][0x0a7].len = 17;
+ packet_db[7][0x113].len = 19;
+ packet_db[7][0x116].len = 19;
+ packet_db[7][0x190].len = 99;
// init packet function calls for packet ver 8
- memcpy(clif_parse_func_table[1], clif_parse_func_table[0], sizeof(clif_parse_func_table[0]));
- clif_parse_func_table[1][0x072] = clif_parse_DropItem;
- clif_parse_func_table[1][0x07e] = clif_parse_WantToConnection;
- clif_parse_func_table[1][0x085] = clif_parse_UseSkillToId;
- clif_parse_func_table[1][0x089] = clif_parse_GetCharNameRequest;
- clif_parse_func_table[1][0x08c] = clif_parse_UseSkillToPos;
- clif_parse_func_table[1][0x094] = clif_parse_TakeItem;
- clif_parse_func_table[1][0x09b] = clif_parse_WalkToXY;
- clif_parse_func_table[1][0x09f] = clif_parse_ChangeDir;
- clif_parse_func_table[1][0x0a2] = clif_parse_UseSkillToPos;
- clif_parse_func_table[1][0x0a7] = clif_parse_SolveCharName;
- clif_parse_func_table[1][0x0f3] = clif_parse_GlobalMessage;
- clif_parse_func_table[1][0x0f5] = clif_parse_UseItem;
- clif_parse_func_table[1][0x0f7] = clif_parse_TickSend;
- clif_parse_func_table[1][0x113] = clif_parse_MoveToKafra;
- clif_parse_func_table[1][0x116] = clif_parse_CloseKafra;
- clif_parse_func_table[1][0x190] = clif_parse_MoveFromKafra;
- clif_parse_func_table[1][0x193] = clif_parse_ActionRequest;
+ memcpy(packet_db[8], packet_db[7], sizeof(packet_db[0]));
+ packet_db[8][0x072].func = clif_parse_DropItem;
+ packet_db[8][0x07e].func = clif_parse_WantToConnection;
+ packet_db[8][0x085].func = clif_parse_UseSkillToId;
+ packet_db[8][0x089].func = clif_parse_GetCharNameRequest;
+ packet_db[8][0x08c].func = clif_parse_UseSkillToPos;
+ packet_db[8][0x094].func = clif_parse_TakeItem;
+ packet_db[8][0x09b].func = clif_parse_WalkToXY;
+ packet_db[8][0x09f].func = clif_parse_ChangeDir;
+ packet_db[8][0x0a2].func = clif_parse_UseSkillToPos;
+ packet_db[8][0x0a7].func = clif_parse_SolveCharName;
+ packet_db[8][0x0f3].func = clif_parse_GlobalMessage;
+ packet_db[8][0x0f5].func = clif_parse_UseItem;
+ packet_db[8][0x0f7].func = clif_parse_TickSend;
+ packet_db[8][0x113].func = clif_parse_MoveToKafra;
+ packet_db[8][0x116].func = clif_parse_CloseKafra;
+ packet_db[8][0x190].func = clif_parse_MoveFromKafra;
+ packet_db[8][0x193].func = clif_parse_ActionRequest;
+ // size of packet version 8 (26july04)
+ packet_db[8][0x072].len = 14;
+ packet_db[8][0x07e].len = 33;
+ packet_db[8][0x085].len = 20;
+ packet_db[8][0x089].len = 15;
+ packet_db[8][0x08c].len = 23;
+ packet_db[8][0x094].len = 10;
+ packet_db[8][0x09b].len = 6;
+ packet_db[8][0x09f].len = 13;
+ packet_db[8][0x0a2].len = 103;
+ packet_db[8][0x0a7].len = 12;
+ packet_db[8][0x0f3].len = -1;
+ packet_db[8][0x0f5].len = 17;
+ packet_db[8][0x0f7].len = 10;
+ packet_db[8][0x113].len = 16;
+ packet_db[8][0x116].len = 2;
+ packet_db[8][0x190].len = 26;
+ packet_db[8][0x193].len = 9;
// init packet function calls for packet ver 9 (same function of packet version 8, but size are different)
- memcpy(clif_parse_func_table[2], clif_parse_func_table[1], sizeof(clif_parse_func_table[0]));
+ memcpy(packet_db[9], packet_db[8], sizeof(packet_db[0]));
+ // size of packet version 9 (9aug04/16aug04/17aug04)
+ packet_db[9][0x072].len = 17;
+ packet_db[9][0x07e].len = 37;
+ packet_db[9][0x085].len = 26;
+ packet_db[9][0x089].len = 12;
+ packet_db[9][0x08c].len = 40;
+ packet_db[9][0x094].len = 13;
+ packet_db[9][0x09b].len = 15;
+ packet_db[9][0x09f].len = 12;
+ packet_db[9][0x0a2].len = 120;
+ packet_db[9][0x0a7].len = 11;
+// packet_db[9][0x0f3].len = -1;
+ packet_db[9][0x0f5].len = 24;
+ packet_db[9][0x0f7].len = 13;
+ packet_db[9][0x113].len = 23;
+// packet_db[9][0x116].len = 2;
+ packet_db[9][0x190].len = 26;
+ packet_db[9][0x193].len = 18;
+ // new packet
+ packet_db[9][0x20f].len = 10;
+ packet_db[9][0x210].len = 22;
+ packet_db[9][0x212].len = 26;
+ packet_db[9][0x213].len = 26;
+ packet_db[9][0x214].len = 42;
// init packet function calls for packet ver 10
- memcpy(clif_parse_func_table[3], clif_parse_func_table[2], sizeof(clif_parse_func_table[0]));
- clif_parse_func_table[3][0x072] = clif_parse_UseItem;
- clif_parse_func_table[3][0x07e] = clif_parse_MoveToKafra;
- clif_parse_func_table[3][0x085] = clif_parse_ActionRequest;
- clif_parse_func_table[3][0x089] = clif_parse_WalkToXY;
- clif_parse_func_table[3][0x08c] = clif_parse_UseSkillToPos;
- clif_parse_func_table[3][0x094] = clif_parse_DropItem;
- clif_parse_func_table[3][0x09b] = clif_parse_GetCharNameRequest;
- clif_parse_func_table[3][0x09f] = clif_parse_GlobalMessage;
- clif_parse_func_table[3][0x0a2] = clif_parse_SolveCharName;
- clif_parse_func_table[3][0x0a7] = clif_parse_UseSkillToPos;
- clif_parse_func_table[3][0x0f3] = clif_parse_ChangeDir;
- clif_parse_func_table[3][0x0f5] = clif_parse_WantToConnection;
- clif_parse_func_table[3][0x0f7] = clif_parse_CloseKafra;
- clif_parse_func_table[3][0x113] = clif_parse_TakeItem;
- clif_parse_func_table[3][0x116] = clif_parse_TickSend;
- clif_parse_func_table[3][0x190] = clif_parse_UseSkillToId;
- clif_parse_func_table[3][0x193] = clif_parse_MoveFromKafra;
+ memcpy(packet_db[10], packet_db[9], sizeof(packet_db[0]));
+ packet_db[10][0x072].func = clif_parse_UseItem;
+ packet_db[10][0x07e].func = clif_parse_MoveToKafra;
+ packet_db[10][0x085].func = clif_parse_ActionRequest;
+ packet_db[10][0x089].func = clif_parse_WalkToXY;
+ packet_db[10][0x08c].func = clif_parse_UseSkillToPos;
+ packet_db[10][0x094].func = clif_parse_DropItem;
+ packet_db[10][0x09b].func = clif_parse_GetCharNameRequest;
+ packet_db[10][0x09f].func = clif_parse_GlobalMessage;
+ packet_db[10][0x0a2].func = clif_parse_SolveCharName;
+ packet_db[10][0x0a7].func = clif_parse_UseSkillToPos;
+ packet_db[10][0x0f3].func = clif_parse_ChangeDir;
+ packet_db[10][0x0f5].func = clif_parse_WantToConnection;
+ packet_db[10][0x0f7].func = clif_parse_CloseKafra;
+ packet_db[10][0x113].func = clif_parse_TakeItem;
+ packet_db[10][0x116].func = clif_parse_TickSend;
+ packet_db[10][0x190].func = clif_parse_UseSkillToId;
+ packet_db[10][0x193].func = clif_parse_MoveFromKafra;
+ // size of packet version 10 (6sept04)
+ packet_db[10][0x072].len = 20;
+ packet_db[10][0x07e].len = 19;
+ packet_db[10][0x085].len = 23;
+ packet_db[10][0x089].len = 9;
+ packet_db[10][0x08c].len = 105;
+ packet_db[10][0x094].len = 17;
+ packet_db[10][0x09b].len = 14;
+ packet_db[10][0x09f].len = -1;
+ packet_db[10][0x0a2].len = 14;
+ packet_db[10][0x0a7].len = 25;
+ packet_db[10][0x0f3].len = 10;
+ packet_db[10][0x0f5].len = 34;
+ packet_db[10][0x0f7].len = 2;
+ packet_db[10][0x113].len = 11;
+ packet_db[10][0x116].len = 11;
+ packet_db[10][0x190].len = 22;
+ packet_db[10][0x193].len = 17;
// init packet function calls for packet ver 11 (same function of packet version 10, but size are different)
- memcpy(clif_parse_func_table[4], clif_parse_func_table[3], sizeof(clif_parse_func_table[0]));
+ memcpy(packet_db[11], packet_db[10], sizeof(packet_db[0]));
+ // size of packet version 11 (21sept04)
+ packet_db[11][0x072].len = 18;
+ packet_db[11][0x07e].len = 25;
+ packet_db[11][0x085].len = 9;
+ packet_db[11][0x089].len = 14;
+ packet_db[11][0x08c].len = 109;
+ packet_db[11][0x094].len = 19;
+ packet_db[11][0x09b].len = 10;
+// packet_db[11][0x09f].len = -1;
+ packet_db[11][0x0a2].len = 10;
+ packet_db[11][0x0a7].len = 29;
+ packet_db[11][0x0f3].len = 18;
+ packet_db[11][0x0f5].len = 32;
+// packet_db[11][0x0f7].len = 2;
+ packet_db[11][0x113].len = 14;
+ packet_db[11][0x116].len = 14;
+ packet_db[11][0x190].len = 14;
+ packet_db[11][0x193].len = 12;
// init packet function calls for packet ver 12 (same function of packet version 11, but size are different)
- memcpy(clif_parse_func_table[5], clif_parse_func_table[4], sizeof(clif_parse_func_table[0]));
+ memcpy(packet_db[12], packet_db[11], sizeof(packet_db[0]));
+ // size of packet version 12 (18oct04)
+ packet_db[12][0x072].len = 17;
+ packet_db[12][0x07e].len = 16;
+// packet_db[12][0x085].len = 9;
+ packet_db[12][0x089].len = 6;
+ packet_db[12][0x08c].len = 103;
+ packet_db[12][0x094].len = 14;
+ packet_db[12][0x09b].len = 15;
+// packet_db[12][0x09f].len = -1;
+ packet_db[12][0x0a2].len = 12;
+ packet_db[12][0x0a7].len = 23;
+ packet_db[12][0x0f3].len = 13;
+ packet_db[12][0x0f5].len = 33;
+// packet_db[12][0x0f7].len = 2;
+ packet_db[12][0x113].len = 10;
+ packet_db[12][0x116].len = 10;
+ packet_db[12][0x190].len = 20;
+ packet_db[12][0x193].len = 26;
// init packet function calls for packet ver 13 (same function of packet version 12, but size are different)
- memcpy(clif_parse_func_table[6], clif_parse_func_table[5], sizeof(clif_parse_func_table[0]));
-
- // size of packet version 5
- memcpy(&packet_size_table[0], &packet_len_table, sizeof(packet_len_table));
- // size of packet version 6
- memcpy(&packet_size_table[1], &packet_size_table[0], sizeof(packet_len_table));
- packet_size_table[1][0x072] = 22;
- packet_size_table[1][0x085] = 8;
- packet_size_table[1][0x0a7] = 13;
- packet_size_table[1][0x113] = 15;
- packet_size_table[1][0x116] = 15;
- packet_size_table[1][0x190] = 95;
- // size of packet version 7
- memcpy(&packet_size_table[2], &packet_size_table[1], sizeof(packet_len_table));
- packet_size_table[2][0x072] = 39;
- packet_size_table[2][0x085] = 9;
- packet_size_table[2][0x09b] = 13;
- packet_size_table[2][0x09f] = 10;
- packet_size_table[2][0x0a7] = 17;
- packet_size_table[2][0x113] = 19;
- packet_size_table[2][0x116] = 19;
- packet_size_table[2][0x190] = 99;
- // size of packet version 8
- memcpy(&packet_size_table[3], &packet_size_table[2], sizeof(packet_len_table));
- packet_size_table[3][0x072] = 14;
- packet_size_table[3][0x07e] = 33;
- packet_size_table[3][0x085] = 20;
- packet_size_table[3][0x089] = 15;
- packet_size_table[3][0x08c] = 23;
- packet_size_table[3][0x094] = 10;
- packet_size_table[3][0x09b] = 6;
- packet_size_table[3][0x09f] = 13;
- packet_size_table[3][0x0a2] = 103;
- packet_size_table[3][0x0a7] = 12;
- packet_size_table[3][0x0f3] = -1;
- packet_size_table[3][0x0f5] = 17;
- packet_size_table[3][0x0f7] = 10;
- packet_size_table[3][0x113] = 16;
- packet_size_table[3][0x116] = 2;
- packet_size_table[3][0x190] = 26;
- packet_size_table[3][0x193] = 9;
- // size of packet version 9
- memcpy(&packet_size_table[4], &packet_size_table[3], sizeof(packet_len_table));
- packet_size_table[4][0x072] = 17;
- packet_size_table[4][0x07e] = 37;
- packet_size_table[4][0x085] = 26;
- packet_size_table[4][0x089] = 12;
- packet_size_table[4][0x08c] = 40;
- packet_size_table[4][0x094] = 13;
- packet_size_table[4][0x09b] = 15;
- packet_size_table[4][0x09f] = 12;
- packet_size_table[4][0x0a2] = 120;
- packet_size_table[4][0x0a7] = 11;
-// packet_size_table[4][0x0f3] = -1;
- packet_size_table[4][0x0f5] = 24;
- packet_size_table[4][0x0f7] = 13;
- packet_size_table[4][0x113] = 23;
-// packet_size_table[4][0x116] = 2;
- packet_size_table[4][0x190] = 26;
- packet_size_table[4][0x193] = 18;
- // new packet
- packet_size_table[4][0x20f] = 10;
- packet_size_table[4][0x210] = 22;
- packet_size_table[4][0x212] = 26;
- packet_size_table[4][0x213] = 26;
- packet_size_table[4][0x214] = 42;
- // size of packet version 10
- memcpy(&packet_size_table[5], &packet_size_table[4], sizeof(packet_len_table));
- packet_size_table[5][0x072] = 20;
- packet_size_table[5][0x07e] = 19;
- packet_size_table[5][0x085] = 23;
- packet_size_table[5][0x089] = 9;
- packet_size_table[5][0x08c] = 105;
- packet_size_table[5][0x094] = 17;
- packet_size_table[5][0x09b] = 14;
- packet_size_table[5][0x09f] = -1;
- packet_size_table[5][0x0a2] = 14;
- packet_size_table[5][0x0a7] = 25;
- packet_size_table[5][0x0f3] = 10;
- packet_size_table[5][0x0f5] = 34;
- packet_size_table[5][0x0f7] = 2;
- packet_size_table[5][0x113] = 11;
- packet_size_table[5][0x116] = 11;
- packet_size_table[5][0x190] = 22;
- packet_size_table[5][0x193] = 17;
- // size of packet version 11
- memcpy(&packet_size_table[6], &packet_size_table[5], sizeof(packet_len_table));
- packet_size_table[6][0x072] = 18;
- packet_size_table[6][0x07e] = 25;
- packet_size_table[6][0x085] = 9;
- packet_size_table[6][0x089] = 14;
- packet_size_table[6][0x08c] = 109;
- packet_size_table[6][0x094] = 19;
- packet_size_table[6][0x09b] = 10;
-// packet_size_table[6][0x09f] = -1;
- packet_size_table[6][0x0a2] = 10;
- packet_size_table[6][0x0a7] = 29;
- packet_size_table[6][0x0f3] = 18;
- packet_size_table[6][0x0f5] = 32;
-// packet_size_table[6][0x0f7] = 2;
- packet_size_table[6][0x113] = 14;
- packet_size_table[6][0x116] = 14;
- packet_size_table[6][0x190] = 14;
- packet_size_table[6][0x193] = 12;
- // size of packet version 12
- memcpy(&packet_size_table[7], &packet_size_table[6], sizeof(packet_len_table));
- packet_size_table[7][0x072] = 17;
- packet_size_table[7][0x07e] = 16;
-// packet_size_table[7][0x085] = 9;
- packet_size_table[7][0x089] = 6;
- packet_size_table[7][0x08c] = 103;
- packet_size_table[7][0x094] = 14;
- packet_size_table[7][0x09b] = 15;
-// packet_size_table[7][0x09f] = -1;
- packet_size_table[7][0x0a2] = 12;
- packet_size_table[7][0x0a7] = 23;
- packet_size_table[7][0x0f3] = 13;
- packet_size_table[7][0x0f5] = 33;
-// packet_size_table[7][0x0f7] = 2;
- packet_size_table[7][0x113] = 10;
- packet_size_table[7][0x116] = 10;
- packet_size_table[7][0x190] = 20;
- packet_size_table[7][0x193] = 26;
- // size of packet version 13
- memcpy(&packet_size_table[8], &packet_size_table[7], sizeof(packet_len_table));
- packet_size_table[8][0x072] = 13;
- packet_size_table[8][0x07e] = 13;
- packet_size_table[8][0x085] = 15;
-// packet_size_table[8][0x089] = 6;
- packet_size_table[8][0x08c] = 108;
- packet_size_table[8][0x094] = 12;
- packet_size_table[8][0x09b] = 10;
-// packet_size_table[8][0x09f] = -1;
- packet_size_table[8][0x0a2] = 16;
- packet_size_table[8][0x0a7] = 28;
- packet_size_table[8][0x0f3] = 15;
- packet_size_table[8][0x0f5] = 29;
-// packet_size_table[8][0x0f7] = 2;
- packet_size_table[8][0x113] = 9;
- packet_size_table[8][0x116] = 9;
- packet_size_table[8][0x190] = 26;
- packet_size_table[8][0x193] = 22;
+ memcpy(packet_db[13], packet_db[12], sizeof(packet_db[0]));
+ // size of packet version 13 (25oct04)
+ packet_db[13][0x072].len = 13;
+ packet_db[13][0x07e].len = 13;
+ packet_db[13][0x085].len = 15;
+// packet_db[13][0x089].len = 6;
+ packet_db[13][0x08c].len = 108;
+ packet_db[13][0x094].len = 12;
+ packet_db[13][0x09b].len = 10;
+// packet_db[13][0x09f].len = -1;
+ packet_db[13][0x0a2].len = 16;
+ packet_db[13][0x0a7].len = 28;
+ packet_db[13][0x0f3].len = 15;
+ packet_db[13][0x0f5].len = 29;
+// packet_db[13][0x0f7].len = 2;
+ packet_db[13][0x113].len = 9;
+ packet_db[13][0x116].len = 9;
+ packet_db[13][0x190].len = 26;
+ packet_db[13][0x193].len = 22;
+ // init packet function calls for packet ver 14 (same function of packet version 13, but size are different)
+ memcpy(packet_db[14], packet_db[13], sizeof(packet_db[0]));
+ // size of packet version 14 - Added by nsstrunks (1nov04)
+ packet_db[14][0x072].len = 13;
+ packet_db[14][0x07e].len = 13;
+ packet_db[14][0x085].len = 15;
+ packet_db[14][0x089].len = 6;
+ packet_db[14][0x08c].len = 108;
+ packet_db[14][0x094].len = 12;
+ packet_db[14][0x09b].len = 10;
+ packet_db[14][0x09f].len = -1;
+ packet_db[14][0x0a2].len = 16;
+ packet_db[14][0x0a7].len = 28;
+ packet_db[14][0x0f3].len = 15;
+ packet_db[14][0x0f5].len = 29;
+ packet_db[14][0x113].len = 9;
+ packet_db[14][0x116].len = 9;
+ packet_db[14][0x190].len = 26;
+ packet_db[14][0x193].len = 22;
+ packet_db[14][0x215].len = 6;
+ packet_db[14][0x216].len = 6;
+ packet_db[14][0x217].len = 2;
+ packet_db[14][0x218].len = 2;
+ packet_db[14][0x219].len = 282;
+ packet_db[14][0x21a].len = 282;
+ packet_db[14][0x21b].len = 10;
+ packet_db[14][0x21c].len = 10;
+// packet_db[14][0x143].len = 23; // is this required? uncomment if it is
+ // Init packet function calls for packet ver 15
+ memcpy(packet_db[15], packet_db[14], sizeof(packet_db[0]));
+ packet_db[15][0x072].func = clif_parse_UseSkillToId;
+ packet_db[15][0x07e].func = clif_parse_UseSkillToPos;
+ packet_db[15][0x089].func = clif_parse_TickSend;
+ packet_db[15][0x085].func = clif_parse_GlobalMessage;
+ packet_db[15][0x08c].func = clif_parse_GetCharNameRequest;
+ packet_db[15][0x094].func = clif_parse_MoveToKafra;
+ packet_db[15][0x09b].func = clif_parse_CloseKafra;
+ packet_db[15][0x09f].func = clif_parse_ActionRequest;
+ packet_db[15][0x0a2].func = clif_parse_TakeItem;
+ packet_db[15][0x0a7].func = clif_parse_WalkToXY;
+ packet_db[15][0x0f3].func = clif_parse_ChangeDir;
+ packet_db[15][0x0f5].func = clif_parse_WantToConnection;
+ packet_db[15][0x0f7].func = clif_parse_SolveCharName;
+ packet_db[15][0x113].func = clif_parse_UseSkillToPos;
+ packet_db[15][0x116].func = clif_parse_DropItem;
+ packet_db[15][0x190].func = clif_parse_UseItem;
+ packet_db[15][0x193].func = clif_parse_MoveFromKafra;
+ // Size of packet version 15 - Added by nsstrunks (6dec04)
+ packet_db[15][0x072].len = 22;
+ packet_db[15][0x07e].len = 30;
+ packet_db[15][0x094].len = 14;
+ packet_db[15][0x09f].len = 18;
+ packet_db[15][0x085].len = -1;
+ packet_db[15][0x08c].len = 13;
+ packet_db[15][0x089].len = 7;
+ packet_db[15][0x09b].len = 2;
+ packet_db[15][0x0a2].len = 7;
+ packet_db[15][0x0a7].len = 7;
+ packet_db[15][0x0f3].len = 8;
+ packet_db[15][0x0f5].len = 29;
+ packet_db[15][0x0f7].len = 14;
+ packet_db[15][0x113].len = 110;
+ packet_db[15][0x116].len = 12;
+ packet_db[15][0x190].len = 15;
+ packet_db[15][0x193].len = 21;
+ packet_db[15][0x21d].len = 6;
+ packet_db[15][0x222].len = 6;
+ packet_db[15][0x221].len = -1;
+ packet_db[15][0x223].len = 8;
+ // Init packet function calls for packet ver 16
+ memcpy(packet_db[16], packet_db[15], sizeof(packet_db[0]));
+ packet_db[16][0x072].func = clif_parse_UseSkillToId;
+ packet_db[16][0x07e].func = clif_parse_UseSkillToPos;
+ packet_db[16][0x089].func = clif_parse_TickSend;
+ packet_db[16][0x0f3].func = clif_parse_GlobalMessage;
+ packet_db[16][0x08c].func = clif_parse_GetCharNameRequest;
+ packet_db[16][0x094].func = clif_parse_MoveToKafra;
+ packet_db[16][0x193].func = clif_parse_CloseKafra;
+ packet_db[16][0x190].func = clif_parse_ActionRequest;
+ packet_db[16][0x0f5].func = clif_parse_TakeItem;
+ packet_db[16][0x0a7].func = clif_parse_WalkToXY;
+ packet_db[16][0x085].func = clif_parse_ChangeDir;
+ packet_db[16][0x09b].func = clif_parse_WantToConnection;
+ packet_db[16][0x0a2].func = clif_parse_SolveCharName;
+ packet_db[16][0x113].func = clif_parse_UseSkillToPos;
+ packet_db[16][0x116].func = clif_parse_DropItem;
+ packet_db[16][0x09f].func = clif_parse_UseItem;
+ packet_db[16][0x0f7].func = clif_parse_MoveFromKafra;
+ // Size of packet version 16 [10jan05]
+ packet_db[16][0x072].len = 26;
+ packet_db[16][0x07e].len = 114;
+ packet_db[16][0x089].len = 9;
+ packet_db[16][0x0f3].len = -1;
+ packet_db[16][0x08c].len = 8;
+ packet_db[16][0x094].len = 20;
+ packet_db[16][0x193].len = 2;
+ packet_db[16][0x190].len = 20;
+ packet_db[16][0x0f5].len = 9;
+ packet_db[16][0x0a7].len = 13;
+ packet_db[16][0x085].len = 23;
+ packet_db[16][0x09b].len = 32;
+ packet_db[16][0x0a2].len = 11;
+ packet_db[16][0x113].len = 34;
+ packet_db[16][0x116].len = 20;
+ packet_db[16][0x09f].len = 17;
+ packet_db[16][0x0f7].len = 21;
+ packet_db[16][0x143].len = 10;
+ // Init packet function calls for the packet_db.txt (17)
+ memcpy(packet_db[MAX_PACKET_VER], packet_db[MAX_PACKET_VER - 1], sizeof(packet_db[0]));
+#endif
+
+ if (clif_config.enable_packet_db)
+ packetdb_readdb();
set_defaultparse(clif_parse);
#ifdef __WIN32
- if (!make_listen_port(map_port)) {
+ //if (!make_listen_port(map_port)) {
+ if (!make_listen_bind(bind_ip,map_port)) {
printf("cant bind game port\n");
exit(1);
}
#else
for(i = 0; i < 10; i++) {
- if (make_listen_port(map_port))
+ //if (make_listen_port(map_port))
+ if (make_listen_bind(bind_ip,map_port))
break;
sleep(20);
}
diff --git a/src/map/clif.h b/src/map/clif.h
index cf03820b1..b23eed5a6 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -13,7 +13,25 @@ typedef unsigned int in_addr_t;
#include "map.h"
+#define MAX_PACKET_DB 0x224
+#define MAX_PACKET_VER 17
+
+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];
+
+extern struct Clif_Config {
+ int enable_packet_db;
+ int packet_db_ver;
+ int prefer_packet_db;
+ int connect_cmd;
+} clif_config;
+
void clif_setip(char*);
+void clif_setbindip(char*);
void clif_setport(int);
in_addr_t clif_getip(void);
@@ -74,7 +92,7 @@ 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
@@ -84,14 +102,17 @@ 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
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_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);
@@ -124,8 +145,8 @@ 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_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);
@@ -164,7 +185,7 @@ int clif_autospell(struct map_session_data *sd,int skilllv);
int clif_devotion(struct map_session_data *sd,int 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_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_change(struct block_list *bl,int type,int flag);
@@ -173,6 +194,7 @@ 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_update_mobhp(struct mob_data *md);
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);
@@ -195,6 +217,7 @@ int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv,const ch
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);
@@ -218,6 +241,7 @@ 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 party *p,struct map_session_data *sd);
int clif_party_hp(struct party *p,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);
@@ -277,6 +301,7 @@ int clif_message(struct block_list *bl, char* msg); // messages (from mobs/npcs)
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_timedout(struct map_session_data *sd);
int clif_foreachclient(int (*)(struct map_session_data*,va_list),...);
diff --git a/src/map/guild.c b/src/map/guild.c
index a48bb3020..935377e19 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -13,11 +13,13 @@
#include "battle.h"
#include "npc.h"
#include "pc.h"
+#include "status.h"
#include "map.h"
#include "mob.h"
#include "intif.h"
#include "clif.h"
#include "skill.h"
+#include "showmsg.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -43,6 +45,14 @@ struct guild_expcache {
int guild_id, account_id, char_id, exp;
};
+// 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);
+
// ƒMƒ‹ƒhƒXƒLƒ‹db‚̃AƒNƒZƒTi¡‚Í’¼‘Å‚¿‚Å‘ã—pj
int guild_skill_get_inf(int id) { // Modified for new skills [Sara]
if (id==GD_BATTLEORDER) return 4;
@@ -54,9 +64,21 @@ int guild_skill_get_inf(int id) { // Modified for new skills [Sara]
int guild_skill_get_sp(int id,int lv){ return 0; }
int guild_skill_get_range(int id){ return 0; }
int guild_skill_get_max(int id) { // Modified for new skills [Sara]
- if(id==GD_EXTENSION) return 10;
- else if(id==GD_REGENERATION) return 3;
- else return 1;
+ switch (id) {
+ case GD_GUARDUP:
+ return 3;
+ case GD_EXTENSION:
+ return 10;
+ case GD_LEADERSHIP:
+ case GD_GLORYWOUNDS:
+ case GD_SOULCOLD:
+ case GD_HAWKEYES:
+ return 5;
+ case GD_REGENERATION:
+ return 3;
+ default:
+ return 1;
+ }
}
// ƒMƒ‹ƒhƒXƒLƒ‹‚ª‚ ‚é‚©Šm”F
@@ -68,11 +90,6 @@ int guild_checkskill(struct guild *g,int id)
return g->skill[idx].lv;
}
-
-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);
-
-
static int guild_read_castledb(void)
{
FILE *fp;
@@ -115,7 +132,8 @@ static int guild_read_castledb(void)
ln++;
}
fclose(fp);
- printf("read db/castle_db.txt done (count=%d)\n",ln);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"db/castle_db.txt");
+ ShowStatus(tmp_output);
return 0;
}
@@ -132,6 +150,7 @@ void do_init_guild(void)
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_interval(gettick()+GUILD_PAYEXP_INVERVAL,guild_payexp_timer,0,0,GUILD_PAYEXP_INVERVAL);
}
@@ -139,7 +158,7 @@ void do_init_guild(void)
// ŒŸõ
struct guild *guild_search(int guild_id)
{
- return numdb_search(guild_db,guild_id);
+ return (struct guild *) numdb_search(guild_db,guild_id);
}
int guild_searchname_sub(void *key,void *data,va_list ap)
{
@@ -160,7 +179,7 @@ struct guild* guild_searchname(char *str)
}
struct guild_castle *guild_castle_search(int gcid)
{
- return numdb_search(castle_db,gcid);
+ return (struct guild_castle *) numdb_search(castle_db,gcid);
}
// mapname‚ɑΉž‚µ‚½ƒAƒWƒg‚Ìgc‚ð•Ô‚·
@@ -228,7 +247,7 @@ void guild_makemember(struct guild_member *m,struct map_session_data *sd)
m->hair =sd->status.hair;
m->hair_color =sd->status.hair_color;
m->gender =sd->sex;
- m->class =sd->status.class;
+ m->class_ =sd->status.class_;
m->lv =sd->status.base_level;
m->exp =0;
m->exp_payper =0;
@@ -270,7 +289,7 @@ int guild_payexp_timer_sub(void *key,void *data,va_list ap)
c->exp=0;
dellist[(*delp)++]=dataid;
- free(c);
+ aFree(c);
return 0;
}
int guild_payexp_timer(int tid,unsigned int tick,int id,int data)
@@ -317,7 +336,7 @@ int guild_created(int account_id,int guild_id)
struct guild *g;
sd->status.guild_id=guild_id;
sd->guild_sended=0;
- if((g=numdb_search(guild_db,guild_id))!=NULL){
+ if((g=(struct guild *) numdb_search(guild_db,guild_id))!=NULL){
printf("guild: id already exists!\n");
exit(1);
}
@@ -352,7 +371,7 @@ int guild_npc_request_info(int guild_id,const char *event)
return guild_request_info(guild_id);
ev=(struct eventlist *)aCalloc(1,sizeof(struct eventlist));
- memcpy(ev->name,event,sizeof(ev->name));
+ memcpy(ev->name,event,strlen(event));
ev->next=(struct eventlist *)numdb_search(guild_infoevent_db,guild_id);
numdb_insert(guild_infoevent_db,guild_id,ev);
return guild_request_info(guild_id);
@@ -367,7 +386,7 @@ int guild_check_member(const struct guild *g)
nullpo_retr(0, g);
for(i=0;i<fd_max;i++){
- if(session[i] && (sd=session[i]->session_data) && sd->state.auth){
+ if(session[i] && (sd=(struct map_session_data *) session[i]->session_data) && sd->state.auth && !sd->state.waitingdisconnect){
if(sd->status.guild_id==g->guild_id){
int j,f=1;
for(j=0;j<MAX_GUILD;j++){ // ƒf[ƒ^‚ª‚ ‚é‚©
@@ -393,7 +412,7 @@ int guild_recv_noinfo(int guild_id)
int i;
struct map_session_data *sd;
for(i=0;i<fd_max;i++){
- if(session[i] && (sd=session[i]->session_data) && sd->state.auth){
+ if(session[i] && (sd=(struct map_session_data *) session[i]->session_data) && sd->state.auth && !sd->state.waitingdisconnect){
if(sd->status.guild_id==guild_id)
sd->status.guild_id=0;
}
@@ -409,7 +428,7 @@ int guild_recv_info(struct guild *sg)
nullpo_retr(0, sg);
- if((g=numdb_search(guild_db,sg->guild_id))==NULL){
+ if((g=(struct guild *) numdb_search(guild_db,sg->guild_id))==NULL){
g=(struct guild *)aCalloc(1,sizeof(struct guild));
numdb_insert(guild_db,sg->guild_id,g);
before=*sg;
@@ -423,9 +442,11 @@ int guild_recv_info(struct guild *sg)
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);
- g->member[i].sd=(sd!=NULL &&
- sd->status.char_id==g->member[i].char_id &&
- sd->status.guild_id==g->guild_id)? sd:NULL;
+ 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;
m++;
}else
g->member[i].sd=NULL;
@@ -460,10 +481,13 @@ int guild_recv_info(struct guild *sg)
}
// ƒCƒxƒ“ƒg‚Ì”­¶
- if( (ev=numdb_search(guild_infoevent_db,sg->guild_id))!=NULL ){
+ if( (ev=(struct eventlist *)numdb_search(guild_infoevent_db,sg->guild_id))!=NULL ){
numdb_erase(guild_infoevent_db,sg->guild_id);
- for(;ev;ev2=ev->next,free(ev),ev=ev2){
+ while(ev){
npc_event_do(ev->name);
+ ev2=ev->next;
+ aFree(ev);
+ ev=ev2;
}
}
@@ -566,17 +590,18 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag)
if( (g=guild_search(guild_id))==NULL )
return 0;
- if((sd==NULL || sd->guild_invite==0) && flag==0){
+ if(sd==NULL || sd->guild_invite==0){
// ƒLƒƒƒ‰‘¤‚É“o˜^‚Å‚«‚È‚©‚Á‚½‚½‚ß’E‘Þ—v‹‚ðo‚·
- if(battle_config.error_log)
- printf("guild: member added error %d is not online\n",account_id);
- intif_guild_leave(guild_id,account_id,char_id,0,"**“o˜^Ž¸”s**");
+ if (flag == 0) {
+ if(battle_config.error_log)
+ printf("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;
}
- sd->guild_invite=0;
- sd->guild_invite_account=0;
-
- sd2=map_id2sd(sd->guild_invite_account);
+ sd2 = map_id2sd(sd->guild_invite_account);
+ sd->guild_invite = 0;
+ sd->guild_invite_account = 0;
if(flag==1){ // Ž¸”s
if( sd2!=NULL )
@@ -659,11 +684,10 @@ int guild_member_leaved(int guild_id,int account_id,int char_id,int flag,
{
struct map_session_data *sd=map_id2sd(account_id);
struct guild *g=guild_search(guild_id);
- int i;
if(g!=NULL){
int i;
- for(i=0;i<g->max_member;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;
@@ -679,19 +703,21 @@ int guild_member_leaved(int guild_id,int account_id,int char_id,int flag,
g->member[i].account_id=0;
g->member[i].sd=NULL;
}
+ // ƒƒ“ƒ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 && sd->status.guild_id==guild_id){
- sd->status.guild_id=0;
- sd->guild_emblem_id=0;
- sd->guild_sended=0;
- }
-
- // ƒƒ“ƒ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){
+ sd->status.guild_id=0;
+ sd->guild_emblem_id=0;
+ sd->guild_sended=0;
+ }
}
-
+
return 0;
}
// ƒMƒ‹ƒhƒƒ“ƒo‚̃Iƒ“ƒ‰ƒCƒ“ó‘Ô/LvXV‘—M
@@ -708,7 +734,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online)
return 0;
intif_guild_memberinfoshort(g->guild_id,
- sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class);
+ 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);
@@ -736,7 +762,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online)
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 guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_)
{
int i,alv,c,idx=0,om=0,oldonline=-1;
struct guild *g=guild_search(guild_id);
@@ -748,7 +774,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
oldonline=m->online;
m->online=online;
m->lv=lv;
- m->class=class;
+ m->class_=class_;
idx=i;
}
if(m->account_id>0){
@@ -771,9 +797,11 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
for(i=0;i<g->max_member;i++){ // sdÄÝ’è
struct map_session_data *sd= map_id2sd(g->member[i].account_id);
- g->member[i].sd=(sd!=NULL &&
- sd->status.char_id==g->member[i].char_id &&
- sd->status.guild_id==guild_id)?sd:NULL;
+ 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
@@ -788,6 +816,8 @@ int guild_send_message(struct map_session_data *sd,char *mes,int len)
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);
+
return 0;
}
// ƒMƒ‹ƒh‰ï˜bŽóM
@@ -870,14 +900,16 @@ int guild_notice_changed(int guild_id,const char *mes1,const char *mes2)
// ƒ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);
- struct guild *g = NULL;
- if ((g = guild_search(sd->status.guild_id)) && guild_checkskill(g, GD_GLORYGUILD)>0)
- return intif_guild_emblem(sd->status.guild_id,len,data);
+ 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;
+ }
- 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)
@@ -920,8 +952,8 @@ int guild_payexp(struct map_session_data *sd,int exp)
if( (exp2=exp*per/100)<=0 )
return 0;
- if( (c=numdb_search(guild_expcache_db,sd->status.char_id))==NULL ){
- c=(struct guild_expcache *)aCalloc(1,sizeof(struct guild_expcache));
+ if( (c=(struct guild_expcache *) numdb_search(guild_expcache_db,sd->status.char_id))==NULL ){
+ 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;
@@ -933,6 +965,30 @@ int guild_payexp(struct map_session_data *sd,int exp)
return exp2;
}
+// Celest
+int guild_getexp(struct map_session_data *sd,int exp)
+{
+ struct guild *g;
+ struct guild_expcache *c;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.guild_id==0 || (g=guild_search(sd->status.guild_id))==NULL )
+ return 0;
+
+ if( (c=(struct guild_expcache *) numdb_search(guild_expcache_db,sd->status.char_id))==NULL ){
+ 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;
+ c->exp=exp;
+ numdb_insert(guild_expcache_db,c->char_id,c);
+ }else{
+ c->exp+=exp;
+ }
+ return exp;
+}
+
// ƒXƒLƒ‹ƒ|ƒCƒ“ƒgŠ„‚èU‚è
int guild_skillup(struct map_session_data *sd,int skill_num,int flag)
{
@@ -954,7 +1010,7 @@ int guild_skillup(struct map_session_data *sd,int skill_num,int flag)
g->skill[idx].lv < guild_skill_get_max(skill_num) ){
intif_guild_skillup(g->guild_id,skill_num,sd->status.account_id,flag);
}
- pc_calcstatus (sd, 0); // Celest
+ status_calc_pc (sd, 0); // Celest
return 0;
}
@@ -989,6 +1045,23 @@ int guild_get_alliance_count(struct guild *g,int flag)
}
return c;
}
+// “¯–¿ŠÖŒ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)
{
@@ -1146,11 +1219,18 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
int flag,const char *name1,const char *name2)
{
struct guild *g[2];
- int guild_id[2]={guild_id1,guild_id2};
- const char *guild_name[2]={name1,name2};
- struct map_session_data *sd[2]={map_id2sd(account_id1),map_id2sd(account_id2)};
+ 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);
@@ -1252,7 +1332,7 @@ int guild_broken(int guild_id,int flag)
numdb_foreach(guild_db,guild_broken_sub,guild_id);
numdb_erase(guild_db,guild_id);
guild_storage_delete(guild_id);
- free(g);
+ aFree(g);
return 0;
}
@@ -1301,7 +1381,7 @@ int guild_addcastleinfoevent(int castle_id,int index,const char *name)
ev=(struct eventlist *)aCalloc(1,sizeof(struct eventlist));
memcpy(ev->name,name,sizeof(ev->name));
- ev->next=numdb_search(guild_castleinfoevent_db,code);
+ ev->next=(struct eventlist *) numdb_search(guild_castleinfoevent_db,code);
numdb_insert(guild_castleinfoevent_db,code,ev);
return 0;
}
@@ -1346,10 +1426,13 @@ int guild_castledataloadack(int castle_id,int index,int value)
printf("guild_castledataloadack ERROR!! (Not found index=%d)\n", index);
return 0;
}
- if( (ev=numdb_search(guild_castleinfoevent_db,code))!=NULL ){
+ if( (ev=(struct eventlist *) numdb_search(guild_castleinfoevent_db,code))!=NULL ){
numdb_erase(guild_castleinfoevent_db,code);
- for(;ev;ev2=ev->next,free(ev),ev=ev2){
+ while(ev){
npc_event_do(ev->name);
+ ev2=ev->next;
+ aFree(ev);
+ ev=ev2;
}
}
return 1;
@@ -1439,6 +1522,8 @@ int guild_agit_start(void)
{ // Run All NPC_Event[OnAgitStart]
int c = npc_event_doall("OnAgitStart");
printf("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;
}
@@ -1446,20 +1531,82 @@ int guild_agit_end(void)
{ // Run All NPC_Event[OnAgitEnd]
int c = npc_event_doall("OnAgitEnd");
printf("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]
- size_t len = strlen((const char*)data);
- char *evname=(char*)aCalloc(len + 4,sizeof(char));
+ 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
+ char *evname=(char*)aMalloc( (len + 4) * sizeof(char));
int c=0;
- if(!agit_flag) return 0; // Agit already End
- memcpy(evname,(const char *)data,len - 5);
- strcpy(evname + len - 5,"Eliminate");
- c = npc_event_do(evname);
- printf("NPC_Event:[%s] Run (%d) Events.\n",evname,c);
+ if(agit_flag) // Agit not already End
+ {
+ memcpy(evname,name,len - 5);
+ strcpy(evname + len - 5,"Eliminate");
+ c = npc_event_do(evname);
+ printf("NPC_Event:[%s] Run (%d) Events.\n",evname,c);
+ }
+ if(name) aFree(name);
+ return 0;
+}
+
+static int Ghp[MAX_GUILDCASTLE][8]; // 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;
+
+ 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
+ // This should already be done in gldfunc_ev_agit.txt,
+ // but since people have complained... Well x3
+ guild_castledatasave(gc->castle_id, 1, gc->guild_id);
+ Gid[i] = gc->guild_id;
+ }
+ if (gc->visibleG0 == 1 && Ghp[i][0] != gc->Ghp0) {
+ guild_castledatasave(gc->castle_id, 18, gc->Ghp0);
+ Ghp[i][0] = gc->Ghp0;
+ }
+ if (gc->visibleG1 == 1 && Ghp[i][1] != gc->Ghp1) {
+ guild_castledatasave(gc->castle_id, 19, gc->Ghp1);
+ Ghp[i][1] = gc->Ghp1;
+ }
+ if (gc->visibleG2 == 1 && Ghp[i][2] != gc->Ghp2) {
+ guild_castledatasave(gc->castle_id, 20, gc->Ghp2);
+ Ghp[i][2] = gc->Ghp2;
+ }
+ if (gc->visibleG3 == 1 && Ghp[i][3] != gc->Ghp3) {
+ guild_castledatasave(gc->castle_id, 21, gc->Ghp3);
+ Ghp[i][3] = gc->Ghp3;
+ }
+ if (gc->visibleG4 == 1 && Ghp[i][4] != gc->Ghp4) {
+ guild_castledatasave(gc->castle_id, 22, gc->Ghp4);
+ Ghp[i][4] = gc->Ghp4;
+ }
+ if (gc->visibleG5 == 1 && Ghp[i][5] != gc->Ghp5) {
+ guild_castledatasave(gc->castle_id, 23, gc->Ghp5);
+ Ghp[i][5] = gc->Ghp5;
+ }
+ if (gc->visibleG6 == 1 && Ghp[i][6] != gc->Ghp6) {
+ guild_castledatasave(gc->castle_id, 24, gc->Ghp6);
+ Ghp[i][6] = gc->Ghp6;
+ }
+ if (gc->visibleG7 == 1 && Ghp[i][7] != gc->Ghp7) {
+ guild_castledatasave(gc->castle_id, 25, gc->Ghp7);
+ Ghp[i][7] = gc->Ghp7;
+ }
+ }
+
return 0;
}
@@ -1469,7 +1616,7 @@ int guild_agit_break(struct mob_data *md)
nullpo_retr(0, md);
- evname=(char *)aCalloc(strlen(md->npc_event) + 1, sizeof(char));
+ evname=(char *)aCallocA(strlen(md->npc_event) + 1, sizeof(char));
strcpy(evname,md->npc_event);
// Now By User to Run [OnAgitBreak] NPC Event...
@@ -1491,7 +1638,7 @@ int guild_checkcastles(struct guild *g) {
for(i=0;i<MAX_GUILDCASTLE;i++){
gc=guild_castle_search(i);
cas_id=gc->guild_id;
- if(g->guild_id==cas_id)
+ if(g->guild_id==cas_id)
nb_cas=nb_cas+1;
} //end for
return nb_cas;
@@ -1522,36 +1669,36 @@ int guild_isallied(struct guild *g, struct guild_castle *gc)
return 0;
}
-
+
static int guild_db_final(void *key,void *data,va_list ap)
{
- struct guild *g=data;
+ struct guild *g=(struct guild *) data;
- free(g);
+ aFree(g);
return 0;
}
static int castle_db_final(void *key,void *data,va_list ap)
{
- struct guild_castle *gc=data;
+ struct guild_castle *gc=(struct guild_castle *) data;
- free(gc);
+ aFree(gc);
return 0;
}
static int guild_expcache_db_final(void *key,void *data,va_list ap)
{
- struct guild_expcache *c=data;
+ struct guild_expcache *c=(struct guild_expcache *) data;
- free(c);
+ aFree(c);
return 0;
}
static int guild_infoevent_db_final(void *key,void *data,va_list ap)
{
- struct eventlist *ev=data;
+ struct eventlist *ev=(struct eventlist *) data;
- free(ev);
+ aFree(ev);
return 0;
}
diff --git a/src/map/guild.h b/src/map/guild.h
index 528605f7f..1dee350a1 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -29,6 +29,7 @@ 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);
@@ -53,9 +54,10 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
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_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,
diff --git a/src/map/intif.c b/src/map/intif.c
index fc79e5148..3aa472ad8 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -31,6 +31,7 @@
#include "guild.h"
#include "pet.h"
#include "nullpo.h"
+#include "malloc.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -54,10 +55,16 @@ extern int char_fd; // inter server‚Ìfd‚Íchar_fd‚ðŽg‚¤
//-----------------------------------------------------------------
// inter server‚Ö‚Ì‘—M
+int CheckForCharServer() {
+ return ((char_fd == -1) || 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;
WFIFOW(inter_fd,0) = 0x3080;
WFIFOL(inter_fd,2) = account_id;
WFIFOL(inter_fd,6) = char_id;
@@ -77,6 +84,8 @@ int intif_create_pet(int account_id,int char_id,short pet_class,short pet_lv,sho
int intif_request_petdata(int account_id,int char_id,int pet_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3081;
WFIFOL(inter_fd,2) = account_id;
WFIFOL(inter_fd,6) = char_id;
@@ -88,6 +97,8 @@ int intif_request_petdata(int account_id,int char_id,int pet_id)
int intif_save_petdata(int account_id,struct s_pet *p)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3082;
WFIFOW(inter_fd,2) = sizeof(struct s_pet) + 8;
WFIFOL(inter_fd,4) = account_id;
@@ -99,6 +110,8 @@ int intif_save_petdata(int account_id,struct s_pet *p)
int intif_delete_petdata(int pet_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3083;
WFIFOL(inter_fd,2) = pet_id;
WFIFOSET(inter_fd,6);
@@ -110,18 +123,25 @@ int intif_delete_petdata(int pet_id)
int intif_GMmessage(char* mes,int len,int flag)
{
int lp = (flag&0x10) ? 8 : 4;
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3000;
WFIFOW(inter_fd,2) = lp + len;
WFIFOL(inter_fd,4) = 0x65756c62;
memcpy(WFIFOP(inter_fd,lp), mes, len);
WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
+ // Send to the local players
+ clif_GMmessage(NULL, mes, len, 0);
+
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;
WFIFOW(inter_fd,0) = 0x3001;
WFIFOW(inter_fd,2) = mes_len + 52;
@@ -138,6 +158,8 @@ int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int me
// The reply of Wisp/page
int intif_wis_replay(int id, int flag) {
+ if (CheckForCharServer())
+ return 0;
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
@@ -150,7 +172,11 @@ int intif_wis_replay(int id, int flag) {
}
// 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) {
+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
WFIFOW(inter_fd,0) = 0x3003;
WFIFOW(inter_fd,2) = mes_len + 30;
memcpy(WFIFOP(inter_fd,4), Wisp_name, 24);
@@ -167,9 +193,14 @@ int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes, int me
// ƒAƒJƒEƒ“ƒg•Ï”‘—M
int intif_saveaccountreg(struct map_session_data *sd) {
int j,p;
+ if (CheckForCharServer())
+ return 0;
nullpo_retr(0, sd);
+ if (sd->status.account_reg_num == -1)
+ return 0;
+
WFIFOW(inter_fd,0) = 0x3004;
WFIFOL(inter_fd,4) = sd->bl.id;
for(j=0,p=8;j<sd->status.account_reg_num;j++,p+=36){
@@ -184,16 +215,23 @@ int intif_saveaccountreg(struct map_session_data *sd) {
int intif_request_accountreg(struct map_session_data *sd)
{
nullpo_retr(0, sd);
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3005;
WFIFOL(inter_fd,2) = sd->bl.id;
WFIFOSET(inter_fd,6);
+
+ sd->status.account_reg_num = -1;
+
return 0;
}
// ‘qŒÉƒf[ƒ^—v‹
int intif_request_storage(int account_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3010;
WFIFOL(inter_fd,2) = account_id;
WFIFOSET(inter_fd,6);
@@ -202,6 +240,8 @@ int intif_request_storage(int account_id)
// ‘qŒÉƒf[ƒ^‘—M
int intif_send_storage(struct storage *stor)
{
+ if (CheckForCharServer())
+ return 0;
nullpo_retr(0, stor);
WFIFOW(inter_fd,0) = 0x3011;
WFIFOW(inter_fd,2) = sizeof(struct storage)+8;
@@ -213,6 +253,8 @@ int intif_send_storage(struct storage *stor)
int intif_request_guild_storage(int account_id,int guild_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3018;
WFIFOL(inter_fd,2) = account_id;
WFIFOL(inter_fd,6) = guild_id;
@@ -221,6 +263,8 @@ int intif_request_guild_storage(int account_id,int guild_id)
}
int intif_send_guild_storage(int account_id,struct guild_storage *gstor)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3019;
WFIFOW(inter_fd,2) = sizeof(struct guild_storage)+12;
WFIFOL(inter_fd,4) = account_id;
@@ -231,8 +275,10 @@ int intif_send_guild_storage(int account_id,struct guild_storage *gstor)
}
// ƒp[ƒeƒB쬗v‹
-int intif_create_party(struct map_session_data *sd,char *name)
+int intif_create_party(struct map_session_data *sd,char *name,int item,int item2)
{
+ if (CheckForCharServer())
+ return 0;
nullpo_retr(0, sd);
WFIFOW(inter_fd,0) = 0x3020;
@@ -241,7 +287,9 @@ int intif_create_party(struct map_session_data *sd,char *name)
memcpy(WFIFOP(inter_fd,30),sd->status.name,24);
memcpy(WFIFOP(inter_fd,54),map[sd->bl.m].name,16);
WFIFOW(inter_fd,70)= sd->status.base_level;
- WFIFOSET(inter_fd,72);
+ WFIFOB(inter_fd,72)= item;
+ WFIFOB(inter_fd,73)= item2;
+ WFIFOSET(inter_fd,74);
// if(battle_config.etc_log)
// printf("intif: create party\n");
return 0;
@@ -249,6 +297,8 @@ int intif_create_party(struct map_session_data *sd,char *name)
// ƒp[ƒeƒBî•ñ—v‹
int intif_request_partyinfo(int party_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3021;
WFIFOL(inter_fd,2) = party_id;
WFIFOSET(inter_fd,6);
@@ -260,6 +310,8 @@ int intif_request_partyinfo(int party_id)
int intif_party_addmember(int party_id,int account_id)
{
struct map_session_data *sd;
+ if (CheckForCharServer())
+ return 0;
sd=map_id2sd(account_id);
// if(battle_config.etc_log)
// printf("intif: party add member %d %d\n",party_id,account_id);
@@ -277,6 +329,8 @@ int intif_party_addmember(int party_id,int account_id)
// ƒp[ƒeƒBÝ’è•ÏX
int intif_party_changeoption(int party_id,int account_id,int exp,int item)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3023;
WFIFOL(inter_fd,2)=party_id;
WFIFOL(inter_fd,6)=account_id;
@@ -288,6 +342,8 @@ int intif_party_changeoption(int party_id,int account_id,int exp,int item)
// ƒp[ƒeƒB’E‘Þ—v‹
int intif_party_leave(int party_id,int account_id)
{
+ if (CheckForCharServer())
+ return 0;
// if(battle_config.etc_log)
// printf("intif: party leave %d %d\n",party_id,account_id);
WFIFOW(inter_fd,0)=0x3024;
@@ -299,6 +355,8 @@ int intif_party_leave(int party_id,int account_id)
// ƒp[ƒeƒBˆÚ“®—v‹
int intif_party_changemap(struct map_session_data *sd,int online)
{
+ if (CheckForCharServer())
+ return 0;
if(sd!=NULL){
WFIFOW(inter_fd,0)=0x3025;
WFIFOL(inter_fd,2)=sd->status.party_id;
@@ -315,6 +373,8 @@ int intif_party_changemap(struct map_session_data *sd,int online)
// ƒp[ƒeƒB[‰ðŽU—v‹
int intif_break_party(int party_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3026;
WFIFOL(inter_fd,2)=party_id;
WFIFOSET(inter_fd,6);
@@ -323,6 +383,8 @@ int intif_break_party(int party_id)
// ƒ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);
WFIFOW(inter_fd,0)=0x3027;
@@ -336,6 +398,8 @@ int intif_party_message(int party_id,int account_id,char *mes,int len)
// ƒp[ƒeƒB‹£‡ƒ`ƒFƒbƒN—v‹
int intif_party_checkconflict(int party_id,int account_id,char *nick)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3028;
WFIFOL(inter_fd,2)=party_id;
WFIFOL(inter_fd,6)=account_id;
@@ -347,6 +411,8 @@ int intif_party_checkconflict(int party_id,int account_id,char *nick)
// ƒMƒ‹ƒh쬗v‹
int intif_guild_create(const char *name,const struct guild_member *master)
{
+ if (CheckForCharServer())
+ return 0;
nullpo_retr(0, master);
WFIFOW(inter_fd,0)=0x3030;
@@ -360,6 +426,8 @@ int intif_guild_create(const char *name,const struct guild_member *master)
// ƒMƒ‹ƒhî•ñ—v‹
int intif_guild_request_info(int guild_id)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3031;
WFIFOL(inter_fd,2) = guild_id;
WFIFOSET(inter_fd,6);
@@ -368,6 +436,8 @@ int intif_guild_request_info(int guild_id)
// ƒMƒ‹ƒhƒƒ“ƒo’ljÁ—v‹
int intif_guild_addmember(int guild_id,struct guild_member *m)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0) = 0x3032;
WFIFOW(inter_fd,2) = sizeof(struct guild_member)+8;
WFIFOL(inter_fd,4) = guild_id;
@@ -378,6 +448,8 @@ int intif_guild_addmember(int guild_id,struct guild_member *m)
// ƒ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;
WFIFOW(inter_fd, 0) = 0x3034;
WFIFOL(inter_fd, 2) = guild_id;
WFIFOL(inter_fd, 6) = account_id;
@@ -389,21 +461,25 @@ int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const cha
}
// ƒ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)
+ int account_id,int char_id,int online,int lv,int class_)
{
+ if (CheckForCharServer())
+ return 0;
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;
+ 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;
WFIFOW(inter_fd, 0) = 0x3036;
WFIFOL(inter_fd, 2) = guild_id;
WFIFOSET(inter_fd,6);
@@ -412,17 +488,22 @@ int intif_guild_break(int guild_id)
// ƒMƒ‹ƒh‰ï˜b‘—M
int intif_guild_message(int guild_id,int account_id,char *mes,int len)
{
+ if (CheckForCharServer())
+ return 0;
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;
WFIFOW(inter_fd, 0)=0x3038;
WFIFOL(inter_fd, 2)=guild_id;
WFIFOL(inter_fd, 6)=account_id;
@@ -433,6 +514,8 @@ int intif_guild_checkconflict(int guild_id,int account_id,int char_id)
// ƒMƒ‹ƒhŠî–{î•ñ•ÏX—v‹
int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3039;
WFIFOW(inter_fd,2)=len+10;
WFIFOL(inter_fd,4)=guild_id;
@@ -445,6 +528,8 @@ 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)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd, 0)=0x303a;
WFIFOW(inter_fd, 2)=len+18;
WFIFOL(inter_fd, 4)=guild_id;
@@ -458,6 +543,8 @@ int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id,
// ƒMƒ‹ƒh–ðE•ÏX—v‹
int intif_guild_position(int guild_id,int idx,struct guild_position *p)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x303b;
WFIFOW(inter_fd,2)=sizeof(struct guild_position)+12;
WFIFOL(inter_fd,4)=guild_id;
@@ -469,6 +556,8 @@ int intif_guild_position(int guild_id,int idx,struct guild_position *p)
// ƒ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;
WFIFOW(inter_fd, 0)=0x303c;
WFIFOL(inter_fd, 2)=guild_id;
WFIFOL(inter_fd, 6)=skill_num;
@@ -480,6 +569,8 @@ int intif_guild_skillup(int guild_id,int skill_num,int account_id,int flag)
// ƒ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;
WFIFOW(inter_fd, 0)=0x303d;
WFIFOL(inter_fd, 2)=guild_id1;
WFIFOL(inter_fd, 6)=guild_id2;
@@ -492,6 +583,8 @@ int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account
// ƒMƒ‹ƒh’m•ÏX—v‹
int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x303e;
WFIFOL(inter_fd,2)=guild_id;
memcpy(WFIFOP(inter_fd,6),mes1,60);
@@ -502,6 +595,8 @@ int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
// ƒ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;
WFIFOW(inter_fd,0)=0x303f;
@@ -515,6 +610,8 @@ int intif_guild_emblem(int guild_id,int len,const char *data)
//Œ»Ý‚̃Mƒ‹ƒhéè—̃Mƒ‹ƒh‚𒲂ׂé
int intif_guild_castle_dataload(int castle_id,int index)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3040;
WFIFOW(inter_fd,2)=castle_id;
WFIFOB(inter_fd,4)=index;
@@ -525,6 +622,8 @@ int intif_guild_castle_dataload(int castle_id,int index)
//ƒMƒ‹ƒhéè—̃Mƒ‹ƒh•ÏX—v‹
int intif_guild_castle_datasave(int castle_id,int index, int value)
{
+ if (CheckForCharServer())
+ return 0;
WFIFOW(inter_fd,0)=0x3041;
WFIFOW(inter_fd,2)=castle_id;
WFIFOB(inter_fd,4)=index;
@@ -539,14 +638,15 @@ int intif_guild_castle_datasave(int castle_id,int index, int value)
// Wisp/Page reception
int intif_parse_WisMessage(int fd) { // rewritten by [Yor]
struct map_session_data* sd;
+ char *wisp_source;
int id=RFIFOL(fd,4);
int 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) );
-
- sd=map_nick2sd(RFIFOP(fd,32)); // ‘—Mæ‚ð’T‚·
- if(sd!=NULL && strcmp(sd->status.name, RFIFOP(fd,32)) == 0){
+
+ sd=(struct map_session_data *) map_nick2sd((char *) RFIFOP(fd,32)); // ‘—Mæ‚ð’T‚·
+ if(sd!=NULL && strcmp((char *) sd->status.name, (char *) RFIFOP(fd,32)) == 0){
/*
for(i=0;i<MAX_WIS_REFUSAL;i++){ //‹‘”ÛƒŠƒXƒg‚É–¼‘O‚ª‚ ‚é‚©‚Ç‚¤‚©”»’肵‚Ä‚ ‚ê‚΋‘”Û
if(strcmp(sd->wis_refusal[i],RFIFOP(fd,8))==0){
@@ -563,9 +663,20 @@ int intif_parse_WisMessage(int fd) { // rewritten by [Yor]
else{
*/
- if(i == MAX_IGNORE_LIST) {
- clif_wis_message(sd->fd,RFIFOP(fd,8),RFIFOP(fd,56),RFIFOW(fd,2)-56);
- intif_wis_replay(RFIFOL(fd,4),0); // ‘—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‚¢‚Ü‚¹‚ñ
@@ -578,7 +689,7 @@ int intif_parse_WisEnd(int fd) {
if (battle_config.etc_log)
printf("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 = map_nick2sd(RFIFOP(fd,2));
+ sd = (struct map_session_data *)map_nick2sd((char *) RFIFOP(fd,2));
if (sd != NULL)
clif_wis_end(sd->fd, RFIFOB(fd,26));
@@ -591,7 +702,7 @@ int mapif_parse_WisToGM(int fd) { // 0x3003/0x3803 <packet_len>.w <wispname>.24B
struct map_session_data *pl_sd;
char Wisp_name[24];
char mbuf[255];
- char *message = ((RFIFOW(fd,2) - 30) >= sizeof(mbuf)) ? (char *) malloc((RFIFOW(fd,2) - 30)) : mbuf;
+ char *message = (char *) (((RFIFOW(fd,2) - 30) >= sizeof(mbuf)) ? (char *) aMallocA((RFIFOW(fd,2) - 30)) : mbuf);
min_gm_level = (int)RFIFOW(fd,28);
memcpy(Wisp_name, RFIFOP(fd,4), 24);
@@ -600,12 +711,12 @@ int mapif_parse_WisToGM(int fd) { // 0x3003/0x3803 <packet_len>.w <wispname>.24B
message[sizeof(message) - 1] = '\0';
// information is sended to all online GM
for (i = 0; i < fd_max; i++)
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth)
+ 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)
- free(message);
+ aFree(message);
return 0;
}
@@ -633,6 +744,13 @@ int intif_parse_LoadStorage(int fd) {
struct map_session_data *sd;
stor = account2storage( RFIFOL(fd,4));
+
+ if (stor->storage_status == 1) { // Already open.. lets ignore this update
+ if (battle_config.error_log)
+ printf("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)
printf("intif_parse_LoadStorage: data size error %d %d\n", RFIFOW(fd,2)-8, sizeof(struct storage));
@@ -647,6 +765,7 @@ int intif_parse_LoadStorage(int fd) {
if(battle_config.save_log)
printf("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 = 0;
clif_storageitemlist(sd,stor);
@@ -712,7 +831,7 @@ int intif_parse_PartyCreated(int fd)
{
if(battle_config.etc_log)
printf("intif: party created\n");
- party_created(RFIFOL(fd,2),RFIFOB(fd,6),RFIFOL(fd,7),RFIFOP(fd,11));
+ party_created(RFIFOL(fd,2), RFIFOB(fd,6),RFIFOL(fd,7),(char *) RFIFOP(fd,11));
return 0;
}
// ƒp[ƒeƒBî•ñ
@@ -752,7 +871,7 @@ int intif_parse_PartyMemberLeaved(int fd)
{
if(battle_config.etc_log)
printf("intif: party member leaved %d %d %s\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOP(fd,10));
- party_member_leaved(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOP(fd,10));
+ party_member_leaved(RFIFOL(fd,2),RFIFOL(fd,6),(char *) RFIFOP(fd,10));
return 0;
}
// ƒp[ƒeƒB‰ðŽU’Ê’m
@@ -766,7 +885,7 @@ int intif_parse_PartyMove(int fd)
{
// if(battle_config.etc_log)
// printf("intif: party move %d %d %s %d %d\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOP(fd,10),RFIFOB(fd,26),RFIFOW(fd,27));
- party_recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOP(fd,10),RFIFOB(fd,26),RFIFOW(fd,27));
+ party_recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),(char *) RFIFOP(fd,10),RFIFOB(fd,26),RFIFOW(fd,27));
return 0;
}
// ƒp[ƒeƒBƒƒbƒZ[ƒW
@@ -774,7 +893,7 @@ int intif_parse_PartyMessage(int fd)
{
// if(battle_config.etc_log)
// printf("intif_parse_PartyMessage: %s\n",RFIFOP(fd,12));
- party_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),RFIFOP(fd,12),RFIFOW(fd,2)-12);
+ party_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
return 0;
}
@@ -815,7 +934,7 @@ int intif_parse_GuildMemberAdded(int fd)
int intif_parse_GuildMemberLeaved(int fd)
{
guild_member_leaved(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),
- RFIFOP(fd,55),RFIFOP(fd,15));
+ (char *) RFIFOP(fd,55), (char *) RFIFOP(fd,15));
return 0;
}
@@ -892,25 +1011,25 @@ int intif_parse_GuildSkillUp(int fd)
int intif_parse_GuildAlliance(int fd)
{
guild_allianceack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOL(fd,14),
- RFIFOB(fd,18),RFIFOP(fd,19),RFIFOP(fd,43));
+ RFIFOB(fd,18),(char *) RFIFOP(fd,19),(char *) RFIFOP(fd,43));
return 0;
}
// ƒMƒ‹ƒh’m•ÏX’Ê’m
int intif_parse_GuildNotice(int fd)
{
- guild_notice_changed(RFIFOL(fd,2),RFIFOP(fd,6),RFIFOP(fd,66));
+ 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)
{
- guild_emblem_changed(RFIFOW(fd,2)-12,RFIFOL(fd,4),RFIFOL(fd,8),RFIFOP(fd,12));
+ 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)
{
- guild_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),RFIFOP(fd,12),RFIFOW(fd,2)-12);
+ guild_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
return 0;
}
// ƒMƒ‹ƒhéƒf[ƒ^—v‹•ÔM
@@ -999,7 +1118,7 @@ int intif_parse(int fd)
}
// ˆ—•ªŠò
switch(cmd){
- case 0x3800: clif_GMmessage(NULL,RFIFOP(fd,4),packet_len-4,0); break;
+ case 0x3800: clif_GMmessage(NULL,(char *) RFIFOP(fd,4),packet_len-4,0); break;
case 0x3801: intif_parse_WisMessage(fd); break;
case 0x3802: intif_parse_WisEnd(fd); break;
case 0x3803: mapif_parse_WisToGM(fd); break;
diff --git a/src/map/intif.h b/src/map/intif.h
index 5077dbe18..17d6045ac 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -7,7 +7,7 @@ int intif_parse(int fd);
int intif_GMmessage(char* mes,int len,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 mes_len);
+int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes);
int intif_saveaccountreg(struct map_session_data *sd);
int intif_request_accountreg(struct map_session_data *sd);
@@ -18,7 +18,7 @@ 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 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, int account_id);
int intif_party_changeoption(int party_id, int account_id, int exp, int item);
@@ -33,7 +33,7 @@ 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_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);
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index a225cff83..91ec58c81 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -12,6 +12,7 @@
#include "itemdb.h"
#include "script.h"
#include "pc.h"
+#include "showmsg.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -25,9 +26,9 @@
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];
-static int blue_box_count=0,violet_box_count=0,card_album_count=0,gift_box_count=0,scroll_count=0;
-static int blue_box_default=0,violet_box_default=0,card_album_default=0,gift_box_default=0,scroll_default=0;
+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;
// Function declarations
@@ -39,7 +40,11 @@ static int itemdb_read_sqldb(void);
static int itemdb_read_randomitem();
static int itemdb_read_itemavail(void);
static int itemdb_read_itemnametable(void);
+static int itemdb_read_itemslottable(void);
+static int itemdb_read_itemslotcounttable(void);
+static int itemdb_read_cardillustnametable(void);
static int itemdb_read_noequip(void);
+static int itemdb_read_norefine(void);
void itemdb_reload(void);
/*==========================================
@@ -97,16 +102,18 @@ int itemdb_searchrandomid(int flags)
struct {
int nameid,count;
struct random_item_data *list;
- } data[] ={
- { 0,0,NULL },
- { blue_box_default ,blue_box_count ,blue_box },
- { violet_box_default,violet_box_count ,violet_box },
- { card_album_default,card_album_count ,card_album },
- { gift_box_default ,gift_box_count ,gift_box },
- { scroll_default ,scroll_count ,scroll },
- };
-
- if(flags>=1 && flags<=5){
+ } 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;
@@ -130,7 +137,7 @@ int itemdb_searchrandomid(int flags)
*/
struct item_data* itemdb_exists(int nameid)
{
- return numdb_search(item_db,nameid);
+ return (struct item_data *) numdb_search(item_db,nameid);
}
/*==========================================
* DB‚ÌŒŸõ
@@ -140,7 +147,7 @@ struct item_data* itemdb_search(int nameid)
{
struct item_data *id;
- id=numdb_search(item_db,nameid);
+ id=(struct item_data *) numdb_search(item_db,nameid);
if(id) return id;
id=(struct item_data *)aCalloc(1,sizeof(struct item_data));
@@ -152,7 +159,7 @@ struct item_data* itemdb_search(int nameid)
id->weight=10;
id->sex=2;
id->elv=0;
- id->class=0xffffffff;
+ id->class_=0xffffffff;
id->flag.available=0;
id->flag.value_notdc=0; //ˆê‰žEEE
id->flag.value_notoc=0;
@@ -237,66 +244,40 @@ int itemdb_isdropable(int nameid)
return 1;
}
-//
-// ‰Šú‰»
-//
-/*==========================================
- *
- *------------------------------------------
- */
-static int itemdb_read_itemslottable(void)
-{
- char *buf,*p;
- int s;
-
- buf=grfio_read("data\\itemslottable.txt");
- if(buf==NULL)
- return -1;
- s=grfio_size("data\\itemslottable.txt");
- buf[s]=0;
- for(p=buf;p-buf<s;){
- int nameid,equip;
- sscanf(p,"%d#%d#",&nameid,&equip);
- itemdb_search(nameid)->equip=equip;
- p=strchr(p,10);
- if(!p) break;
- p++;
- p=strchr(p,10);
- if(!p) break;
- p++;
- }
- free(buf);
-
- return 0;
-}
-
-#ifndef TXT_ONLY
/*====================================
* Removed item_value_db, don't re-add
*------------------------------------
*/
static void itemdb_read(void)
{
- itemdb_read_itemslottable();
-
- if (db_use_sqldbs)
- {
- itemdb_read_sqldb();
- }
- else
- {
+ #ifndef TXT_ONLY
+ if (db_use_sqldbs)
+ {
+ itemdb_read_sqldb();
+ }
+ else
+ {
+ itemdb_readdb();
+ }
+ /* not TXT_ONLY */
+ #else
itemdb_readdb();
- }
+ #endif /* TXT_ONLY */
itemdb_read_randomitem();
itemdb_read_itemavail();
itemdb_read_noequip();
-
- if (!battle_config.item_name_override_grffile)
+ itemdb_read_norefine();
+ 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();
}
-#endif /* not TXT_ONLY */
/*==========================================
* ƒAƒCƒeƒ€ƒf[ƒ^ƒx[ƒX‚Ì“Ç‚Ýž‚Ý
*------------------------------------------
@@ -346,20 +327,36 @@ static int itemdb_readdb(void)
memcpy(id->name,str[1],24);
memcpy(id->jname,str[2],24);
id->type=atoi(str[3]);
- // buy‚sell*2 ‚Í item_value_db.txt ‚ÅŽw’肵‚Ä‚­‚¾‚³‚¢B
- if (atoi(str[5])) { // sell’l‚ð—Dæ‚Æ‚·‚é
- id->value_buy=atoi(str[5])*2;
- id->value_sell=atoi(str[5]);
- } else {
- id->value_buy=atoi(str[4]);
- id->value_sell=atoi(str[4])/2;
+
+ {
+ 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) {
+ sprintf (tmp_output, "Item %s [%d] buying:%d < selling:%d\n",
+ id->name, id->nameid, id->value_buy*75/100, id->value_sell*124/100);
+ ShowWarning (tmp_output);
+ }
}
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]);
- id->class=atoi(str[11]);
+ id->class_=atoi(str[11]);
id->sex=atoi(str[12]);
if(id->equip != atoi(str[13])){
id->equip=atoi(str[13]);
@@ -377,13 +374,17 @@ static int itemdb_readdb(void)
if((p=strchr(np,'{'))==NULL)
continue;
- id->use_script = parse_script(p,lines);
+ id->use_script = parse_script((unsigned char *) p,lines);
if((p=strchr(p+1,'{'))==NULL)
continue;
- id->equip_script = parse_script(p,lines);
+ id->equip_script = parse_script((unsigned char *) p,lines);
}
fclose(fp);
- printf("read %s done (count=%d)\n",filename[i],ln);
+ if (ln > 0) {
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,filename[i]);
+ ShowStatus(tmp_output);
+ }
+ ln=0; // reset to 0
}
return 0;
}
@@ -410,15 +411,16 @@ static int itemdb_read_randomitem()
{"db/item_bluebox.txt", blue_box, &blue_box_count, &blue_box_default },
{"db/item_violetbox.txt", violet_box, &violet_box_count, &violet_box_default },
{"db/item_cardalbum.txt", card_album, &card_album_count, &card_album_default },
- {"db/item_giftbox.txt", gift_box, &gift_box_count, &gift_box_default },
- {"db/item_scroll.txt", scroll, &scroll_count, &scroll_default },
+ {"db/item_giftbox.txt", gift_box, &gift_box_count, &gift_box_default },
+ {"db/item_scroll.txt", scroll, &scroll_count, &scroll_default },
+ {"db/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=data[i].filename;
+ char *fn=(char *) data[i].filename;
*pdefault = 0;
if( (fp=fopen(fn,"r"))==NULL ){
@@ -458,7 +460,10 @@ static int itemdb_read_randomitem()
ln++;
}
fclose(fp);
- printf("read %s done (count=%d)\n",fn,*pc);
+ if (*pc > 0) {
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",*pc,fn);
+ ShowStatus(tmp_output);
+ }
}
return 0;
@@ -507,7 +512,8 @@ static int itemdb_read_itemavail(void)
ln++;
}
fclose(fp);
- printf("read db/item_avail.txt done (count=%d)\n",ln);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"db/item_avail.txt");
+ ShowStatus(tmp_output);
return 0;
}
@@ -520,7 +526,7 @@ static int itemdb_read_itemnametable(void)
char *buf,*p;
int s;
- buf=grfio_reads("data\\idnum2itemdisplaynametable.txt",&s);
+ buf=(char *) grfio_reads("data\\idnum2itemdisplaynametable.txt",&s);
if(buf==NULL)
return -1;
@@ -547,12 +553,13 @@ static int itemdb_read_itemnametable(void)
if(!p) break;
p++;
}
- free(buf);
- printf("read data\\idnum2itemdisplaynametable.txt done.\n");
+ aFree(buf);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\idnum2itemdisplaynametable.txt");
+ ShowStatus(tmp_output);
return 0;
}
-#ifdef TXT_ONLY
+
/*==========================================
* ƒJ[ƒhƒCƒ‰ƒXƒg‚̃Šƒ\[ƒX–¼‘Oƒe[ƒuƒ‹‚ð“Ç‚Ýž‚Þ
*------------------------------------------
@@ -562,7 +569,7 @@ static int itemdb_read_cardillustnametable(void)
char *buf,*p;
int s;
- buf=grfio_reads("data\\num2cardillustnametable.txt",&s);
+ buf=(char *) grfio_reads("data\\num2cardillustnametable.txt",&s);
if(buf==NULL)
return -1;
@@ -582,12 +589,83 @@ static int itemdb_read_cardillustnametable(void)
if(!p) break;
p++;
}
- free(buf);
- printf("read data\\num2cardillustnametable.txt done.\n");
+ aFree(buf);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\num2cardillustnametable.txt");
+ ShowStatus(tmp_output);
+
+ return 0;
+}
+
+//
+// ‰Šú‰»
+//
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int itemdb_read_itemslottable(void)
+{
+ char *buf,*p;
+ int s;
+
+ buf=(char *) grfio_read("data\\itemslottable.txt");
+ if(buf==NULL)
+ return -1;
+ s=grfio_size("data\\itemslottable.txt");
+ 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);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\itemslottable.txt");
+ ShowStatus(tmp_output);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int itemdb_read_itemslotcounttable(void)
+{
+ char *buf,*p;
+ int s;
+
+ buf=(char *) grfio_read("data\\itemslotcounttable.txt");
+ if(buf==NULL)
+ return -1;
+ s=grfio_size("data\\itemslotcounttable.txt");
+ buf[s]=0;
+ for(p=buf;p-buf<s;){
+ int nameid,slot;
+ sscanf(p,"%d#%d#",&nameid,&slot);
+ itemdb_search(nameid)->slot=slot;
+ p=strchr(p,10);
+ if(!p) break;
+ p++;
+ p=strchr(p,10);
+ if(!p) break;
+ p++;
+ }
+ aFree(buf);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\itemslotcounttable.txt");
+ ShowStatus(tmp_output);
return 0;
}
-#endif /* TXT_ONLY */
+
/*==========================================
* ‘•”õ§ŒÀƒtƒ@ƒCƒ‹“Ç‚Ýo‚µ
*------------------------------------------
@@ -627,9 +705,47 @@ static int itemdb_read_noequip(void)
}
fclose(fp);
- printf("read db/item_noequip.txt done (count=%d)\n",ln);
+ if (ln > 0) {
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"db/item_noequip.txt");
+ ShowStatus(tmp_output);
+ }
return 0;
}
+
+/*================================================
+ * Whether the item can be refined or not [Celest]
+ *------------------------------------------------
+ */
+static int itemdb_read_norefine(void)
+{
+ int i, nameid;
+ struct item_data *id;
+ // To-do: let it read from a text file later
+ int cant_refine[] = {
+ 1243, 1530, 2110, 2112, 2201, 2202, 2203, 2204, 2205, 2210,
+ 2212, 2218, 2219, 2237, 2238, 2239, 2240, 2241, 2242, 2243,
+ 2250, 2253, 2260, 2262, 2263, 2264, 2265, 2266, 2267, 2268,
+ 2269, 2270, 2271, 2276, 2278, 2279, 2281, 2282, 2286, 2288,
+ 2289, 2290, 2291, 2292, 2293, 2295, 2296, 2297, 2298, 2352,
+ 2410, 2413, 2414, 2509, 2510, 2601, 2602, 2603, 2604, 2605,
+ 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614, 2615, 2616,
+ 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2626,
+ 2627, 2628, 2629, 2630, 2631, 2634, 2635, 2636, 2637, 2638,
+ 2639, 2640, 5004, 5005, 5006, 5008, 5014, 5015, 5037, 5039,
+ 5040, 5043, 5046, 5049, 5050, 5051, 5053, 5054, 5055, 5058,
+ 5068, 5074, 5085, 5086, 5087, 5088, 5089, 5090, 5096, 5098, 0
+ };
+
+ for (i=0; i < (int)(sizeof(cant_refine) / sizeof(cant_refine[0])); i++) {
+ nameid = cant_refine[i];
+ if(nameid<=0 || nameid>=20000 || !(id=itemdb_exists(nameid)))
+ continue;
+ id->flag.no_refine = 1;
+ }
+
+ return 1;
+}
+
#ifndef TXT_ONLY
/*======================================
@@ -673,7 +789,7 @@ static int itemdb_read_sqldb(void)
// Insert a new row into the item database
- /*id = calloc(sizeof(struct item_data), 1);
+ /*id = aCalloc(sizeof(struct item_data), 1);
if (id == NULL)
{
@@ -723,7 +839,7 @@ static int itemdb_read_sqldb(void)
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;
- id->class = (sql_row[11] != NULL) ? atoi(sql_row[11]) : 0;
+ id->class_ = (sql_row[11] != NULL) ? atoi(sql_row[11]) : 0;
id->sex = (sql_row[12] != NULL) ? atoi(sql_row[12]) : 0;
id->equip = (sql_row[13] != NULL) ? atoi(sql_row[13]) : 0;
id->wlv = (sql_row[14] != NULL) ? atoi(sql_row[14]) : 0;
@@ -737,10 +853,10 @@ static int itemdb_read_sqldb(void)
if (sql_row[17] != NULL)
{
if (sql_row[17][0] == '{')
- id->use_script = parse_script(sql_row[17], 0);
+ id->use_script = parse_script((unsigned char *) sql_row[17], 0);
else {
sprintf(script, "{%s}", sql_row[17]);
- id->use_script = parse_script(script, 0);
+ id->use_script = parse_script((unsigned char *) script, 0);
}
}
else
@@ -751,10 +867,10 @@ static int itemdb_read_sqldb(void)
if (sql_row[18] != NULL)
{
if (sql_row[18][0] == '{')
- id->equip_script = parse_script(sql_row[18], 0);
+ id->equip_script = parse_script((unsigned char *) sql_row[18], 0);
else {
sprintf(script, "{%s}", sql_row[18]);
- id->equip_script = parse_script(script, 0);
+ id->equip_script = parse_script((unsigned char *) script, 0);
}
}
else
@@ -774,8 +890,8 @@ static int itemdb_read_sqldb(void)
{
printf("Database server error (retrieving rows from %s): %s\n", item_db_db, mysql_error(&mmysql_handle));
}
-
- printf("read %s done (count = %lu)\n", item_db_db, (unsigned long) mysql_num_rows(sql_res));
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",(unsigned long) mysql_num_rows(sql_res),item_db_db);
+ ShowStatus(tmp_output);
}
else
{
@@ -802,26 +918,20 @@ static int itemdb_final(void *key,void *data,va_list ap)
{
struct item_data *id;
- nullpo_retr(0, id=data);
+ nullpo_retr(0, id= (struct item_data *) data);
if(id->use_script)
- free(id->use_script);
+ aFree(id->use_script);
if(id->equip_script)
- free(id->equip_script);
- free(id);
+ aFree(id->equip_script);
+ aFree(id);
return 0;
}
void itemdb_reload(void)
{
- /*
-
- <empty item databases>
- itemdb_read();
-
- */
-
+ numdb_final(item_db,itemdb_final);
do_init_itemdb();
}
@@ -851,23 +961,6 @@ void itemdebugtxt()
fclose(dfp);
}
*/
-#ifdef TXT_ONLY
-/*====================================
- * Removed item_value_db, don't re-add
- *------------------------------------
- */
-static void itemdb_read(void)
-{
- itemdb_read_itemslottable();
- itemdb_readdb();
- itemdb_read_randomitem();
- itemdb_read_itemavail();
- itemdb_read_noequip();
- itemdb_read_cardillustnametable();
- if (!battle_config.item_name_override_grffile)
- itemdb_read_itemnametable();
-}
-#endif /* TXT_ONLY */
/*==========================================
*
*------------------------------------------
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 0edfad243..2ba6ae7f6 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -12,7 +12,7 @@ struct item_data {
int value_buy;
int value_sell;
int type;
- int class;
+ int class_;
int sex;
int equip;
int weight;
@@ -33,6 +33,7 @@ struct item_data {
unsigned no_equip : 3;
unsigned no_drop : 1;
unsigned no_use : 1;
+ unsigned no_refine : 1; // [celest]
} flag;
int view_id;
};
diff --git a/src/map/log.c b/src/map/log.c
index 86c5a41a2..7cf4dfcf4 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -3,69 +3,117 @@
#include <stdio.h>
#include <string.h>
+#include "../common/strlib.h"
+#include "../common/nullpo.h"
+#include "itemdb.h"
#include "map.h"
-#include "nullpo.h"
#include "log.h"
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)
+//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 logger according the settings
+int should_log_item(int filter, int nameid) {
+ struct item_data *item_data;
+ if (nameid<512 || (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 ) || //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 ) ||
+ (filter&512 && item_data->refine >= log_config.refine_items_log )
+ ) return item_data->nameid;
+
+ return 0;
+}
+
int log_branch(struct map_session_data *sd)
{
+#ifndef TXT_ONLY
+ char t_name[100];
+#endif
FILE *logfp;
if(log_config.enable_logs <= 0)
return 0;
nullpo_retr(0, sd);
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql, "INSERT 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, sd->status.name, sd->mapname);
+ 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), sd->mapname);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
- if((logfp=fopen(log_config.log_drop,"a+")) != NULL) {
- char timestring[255];
- time_t curtime;
+#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, sd->mapname, RETCODE);
fclose(logfp);
}
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
}
- #endif
+#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);
- #ifndef TXT_ONLY
+ for (i = 0; i<10; i++) { //Should we log these items? [Lupus]
+ flag += should_log_item(log_config.drop,log_drop[i]);
+ }
+ 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 INTO `%s` (`drop_date`, `kill_char_id`, `monster_id`, `item1`, `item2`, `item3`, `item4`, `item5`, `item6`, `item7`, `item8`, `map`) VALUES (NOW(), '%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], sd->mapname);
+ 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], sd->mapname);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_drop,"a+")) != NULL) {
- char timestring[255];
+
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%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], RETCODE);
+ 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
+#ifndef TXT_ONLY
}
- #endif
- return 0;
+#endif
+ return 1; //Logged
}
int log_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp)
@@ -75,81 +123,87 @@ int log_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp)
if(log_config.enable_logs <= 0)
return 0;
nullpo_retr(0, sd);
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql, "INSERT 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], sd->mapname);
+ 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], sd->mapname);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_mvpdrop,"a+")) != NULL) {
- char timestring[255];
- 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%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
+#ifndef TXT_ONLY
}
- #endif
+#endif
return 0;
}
int log_present(struct map_session_data *sd, int source_type, int nameid)
{
FILE *logfp;
+#ifndef TXT_ONLY
+ char t_name[100];
+#endif
+
if(log_config.enable_logs <= 0)
return 0;
nullpo_retr(0, sd);
- #ifndef TXT_ONLY
+ if(!should_log_item(log_config.present,nameid)) return 0; //filter [Lupus]
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql, "INSERT 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, sd->status.name, nameid, sd->mapname);
+ 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, sd->mapname);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_present,"a+")) != NULL) {
- char timestring[255];
- 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%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, source_type, nameid, RETCODE);
fclose(logfp);
}
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
}
- #endif
+#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[100];
+#endif
+
if(log_config.enable_logs <= 0)
return 0;
nullpo_retr(0, sd);
- #ifndef TXT_ONLY
+ if(!should_log_item(log_config.produce,nameid)) return 0; //filter [Lupus]
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql, "INSERT 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, sd->status.name, nameid, slot1, slot2, slot3, sd->mapname, success);
+ 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, sd->mapname, success);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_produce,"a+")) != NULL) {
- char timestring[255];
- 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\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
+#ifndef TXT_ONLY
}
- #endif
+#endif
return 0;
}
@@ -159,6 +213,9 @@ int log_refine(struct map_session_data *sd, int n, int success)
int log_card[4];
int item_level;
int i;
+#ifndef TXT_ONLY
+ char t_name[100];
+#endif
if(log_config.enable_logs <= 0)
return 0;
@@ -169,37 +226,100 @@ int log_refine(struct map_session_data *sd, int n, int success)
item_level = 0;
else
item_level = sd->status.inventory[n].refine + 1;
-
+ if(!should_log_item(log_config.refine,sd->status.inventory[n].nameid)) return 0; //filter [Lupus]
for(i=0;i<4;i++)
log_card[i] = sd->status.inventory[n].card[i];
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql, "INSERT INTO `%s` (`refine_date`, `account_id`, `char_id`, `char_name`, `nameid`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `success`, `item_level`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%d', '%d')", log_config.log_refine_db, sd->status.account_id, sd->status.char_id, sd->status.name, sd->status.inventory[n].nameid, sd->status.inventory[n].refine, log_card[0], log_card[1], log_card[2], log_card[3], sd->mapname, success, item_level);
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`refine_date`, `account_id`, `char_id`, `char_name`, `nameid`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `success`, `item_level`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%d', '%d')",
+ log_config.log_refine_db, sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name), sd->status.inventory[n].nameid, sd->status.inventory[n].refine, log_card[0], log_card[1], log_card[2], log_card[3], sd->mapname, success, item_level);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_refine,"a+")) != NULL) {
- char timestring[255];
- time_t curtime;
time(&curtime);
strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
fprintf(logfp,"%s - %s[%d:%d]\t%d,%d\t%d%d%d%d\t%d,%d%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, sd->status.inventory[n].nameid, sd->status.inventory[n].refine, log_card[0], log_card[1], log_card[2], log_card[3], success, item_level, RETCODE);
fclose(logfp);
}
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
}
- #endif
+#endif
return 0;
}
+int log_tostorage(struct map_session_data *sd,int n, int guild)
+{
+ FILE *logfp;
+
+ 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%d,%d,%d,%d%s", 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,
+ sd->status.inventory[n].card[0],
+ sd->status.inventory[n].card[1],
+ sd->status.inventory[n].card[2],
+ sd->status.inventory[n].card[3], RETCODE);
+ fclose(logfp);
+ }
+ return 0;
+}
+
+int log_fromstorage(struct map_session_data *sd,int n, int guild)
+{
+ FILE *logfp;
+
+ 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 - from %s: %s[%d:%d]\t%d\t%d\t%d\t%d,%d,%d,%d%s", 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,
+ sd->status.inventory[n].card[0],
+ sd->status.inventory[n].card[1],
+ sd->status.inventory[n].card[2],
+ sd->status.inventory[n].card[3], 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[4];
int i;
+#ifndef TXT_ONLY
+ char t_name[100],t_name2[100];
+#endif
if(log_config.enable_logs <= 0)
return 0;
@@ -211,7 +331,7 @@ int log_trade(struct map_session_data *sd, struct map_session_data *target_sd, i
if(sd->status.inventory[n].amount < 0)
return 1;
-
+ if(!should_log_item(log_config.trade,sd->status.inventory[n].nameid)) 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;
@@ -219,25 +339,24 @@ int log_trade(struct map_session_data *sd, struct map_session_data *target_sd, i
for(i=0;i<4;i++)
log_card[i] = sd->status.inventory[n].card[i];
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql, "INSERT 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`, `card0`, `card1`, `card2`, `card3`, `map`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s')", log_config.log_trade_db, sd->status.account_id, sd->status.char_id, sd->status.name, target_sd->status.account_id, target_sd->status.char_id, target_sd->status.name, log_nameid, log_amount, log_refine, log_card[0], log_card[1], log_card[2], log_card[3], sd->mapname);
+ sprintf(tmp_sql, "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`, `card0`, `card1`, `card2`, `card3`, `map`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s')",
+ log_config.log_trade_db, 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, log_card[0], log_card[1], log_card[2], log_card[3], sd->mapname);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_trade,"a+")) != NULL) {
- char timestring[255];
- time_t curtime;
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%d,%d,%d,%d%s", 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, log_card[0], log_card[1], log_card[2], log_card[3], RETCODE);
fclose(logfp);
}
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
}
- #endif
+#endif
return 0;
}
@@ -246,6 +365,9 @@ int log_vend(struct map_session_data *sd,struct map_session_data *vsd,int n,int
FILE *logfp;
int log_nameid, log_amount, log_refine, log_card[4];
int i;
+#ifndef TXT_ONLY
+ char t_name[100],t_name2[100];
+#endif
if(log_config.enable_logs <= 0)
return 0;
@@ -255,88 +377,124 @@ int log_vend(struct map_session_data *sd,struct map_session_data *vsd,int n,int
return 1;
if(sd->status.inventory[n].amount< 0)
return 1;
-
+ if(!should_log_item(log_config.vend,sd->status.inventory[n].nameid)) 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<4;i++)
log_card[i] = sd->status.inventory[n].card[i];
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql, "INSERT 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`, `card0`, `card1`, `card2`, `card3`, `map`, `zeny`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%d')", log_config.log_vend_db, sd->status.account_id, sd->status.char_id, sd->status.name, vsd->status.account_id, vsd->status.char_id, vsd->status.name, log_nameid, log_amount, log_refine, log_card[0], log_card[1], log_card[2], log_card[3], sd->mapname, zeny);
+ sprintf(tmp_sql, "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`, `card0`, `card1`, `card2`, `card3`, `map`, `zeny`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%d')",
+ log_config.log_vend_db, 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, log_card[0], log_card[1], log_card[2], log_card[3], sd->mapname, zeny);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_vend,"a+")) != NULL) {
- char timestring[255];
- time_t curtime;
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%d,%d,%d,%d\t%d%s", 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, log_card[0], log_card[1], log_card[2], log_card[3], zeny, RETCODE);
fclose(logfp);
}
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
}
- #endif
+#endif
return 0;
}
int log_zeny(struct map_session_data *sd, struct map_session_data *target_sd,int amount)
{
FILE *logfp;
+#ifndef TXT_ONLY
+ char t_name[100],t_name2[100];
+#endif
+
if(log_config.enable_logs <= 0)
return 0;
nullpo_retr(0, sd);
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql,"INSERT INTO `%s` (`trade_date`, `src_account_id`, `src_char_id`, `src_char_name`, `des_account_id`, `des_char_id`, `des_char_name`, `map`, `zeny`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%s', '%d')", log_config.log_trade_db, sd->status.account_id, sd->status.char_id, sd->status.name, target_sd->status.account_id, target_sd->status.char_id, target_sd->status.name, sd->mapname, sd->deal_zeny);
+ sprintf(tmp_sql,"INSERT DELAYED INTO `%s` (`trade_date`, `src_account_id`, `src_char_id`, `src_char_name`, `des_account_id`, `des_char_id`, `des_char_name`, `map`, `zeny`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%s', '%d')",
+ log_config.log_trade_db, 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), sd->mapname, sd->deal_zeny);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_trade,"a+")) != NULL) {
- char timestring[255];
- time_t curtime;
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
+#ifndef TXT_ONLY
}
- #endif
+#endif
return 0;
}
int log_atcommand(struct map_session_data *sd, const char *message)
{
FILE *logfp;
+#ifndef TXT_ONLY
+ char t_name[100];
+#endif
+
if(log_config.enable_logs <= 0)
return 0;
nullpo_retr(0, sd);
- #ifndef TXT_ONLY
+#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
- sprintf(tmp_sql, "INSERT 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, sd->status.name, sd->mapname, message);
+ 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), sd->mapname, message);
if(mysql_query(&mmysql_handle, tmp_sql))
printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
} else {
- #endif
+#endif
if((logfp=fopen(log_config.log_gm,"a+")) != NULL) {
- char timestring[255];
- time_t curtime;
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
+#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[100];
#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), sd->mapname, message);
+ if(mysql_query(&mmysql_handle, tmp_sql))
+ printf("DB server Error - %s\n",mysql_error(&mmysql_handle));
+ } 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;
}
@@ -345,11 +503,19 @@ int log_config_read(char *cfgName)
char line[1024], w1[1024], w2[1024];
FILE *fp;
+ memset(&log_config, 0, sizeof(log_config));
+
if((fp = fopen(cfgName, "r")) == NULL)
{
printf("Log configuration file not found at: %s\n", cfgName);
return 1;
}
+
+ //LOG FILTER Default values
+ log_config.refine_items_log = 7; //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;
while(fgets(line, sizeof(line) -1, fp))
{
@@ -362,6 +528,16 @@ int log_config_read(char *cfgName)
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_drop") == 0) {
@@ -376,6 +552,8 @@ int log_config_read(char *cfgName)
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) {
@@ -383,10 +561,13 @@ int log_config_read(char *cfgName)
log_config.zeny = 0;
else
log_config.zeny = (atoi(w2));
- } else if(strcmpi(w1,"log_gm") == 0) {
+ } else if(strcmpi(w1,"log_gm") == 0) {
log_config.gm = (atoi(w2));
+ } else if(strcmpi(w1,"log_npc") == 0) {
+ log_config.npc = (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)
@@ -420,6 +601,13 @@ int log_config_read(char *cfgName)
printf("and Zeny Trades");
printf(" 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)
@@ -428,49 +616,68 @@ int log_config_read(char *cfgName)
strcpy(log_config.log_gm_db, w2);
if(log_config.gm > 0)
printf("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)
+ printf("Logging NPC 'logmes' to table `%s`\n", w2);
}
+#endif
- else if(strcmpi(w1, "log_branch") == 0) {
+ else if(strcmpi(w1, "log_branch_file") == 0) {
strcpy(log_config.log_branch, w2);
- if(log_config.branch == 1)
+ if(log_config.branch > 0 && log_config.sql_logs < 1)
printf("Logging Dead Branch Usage to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_drop") == 0) {
+ } else if(strcmpi(w1, "log_drop_file") == 0) {
strcpy(log_config.log_drop, w2);
- if(log_config.drop == 1)
+ if(log_config.drop > 0 && log_config.sql_logs < 1)
printf("Logging Item Drops to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_mvpdrop") == 0) {
+ } else if(strcmpi(w1, "log_mvpdrop_file") == 0) {
strcpy(log_config.log_mvpdrop, w2);
- if(log_config.mvpdrop == 1)
+ if(log_config.mvpdrop > 0 && log_config.sql_logs < 1)
printf("Logging MVP Drops to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_present") == 0) {
+ } else if(strcmpi(w1, "log_present_file") == 0) {
strcpy(log_config.log_present, w2);
- if(log_config.present == 1)
+ if(log_config.present > 0 && log_config.sql_logs < 1)
printf("Logging Present Usage & Results to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_produce") == 0) {
+ } else if(strcmpi(w1, "log_produce_file") == 0) {
strcpy(log_config.log_produce, w2);
- if(log_config.produce == 1)
+ if(log_config.produce > 0 && log_config.sql_logs < 1)
printf("Logging Producing to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_refine") == 0) {
+ } else if(strcmpi(w1, "log_refine_file") == 0) {
strcpy(log_config.log_refine, w2);
- if(log_config.refine == 1)
+ if(log_config.refine > 0 && log_config.sql_logs < 1)
printf("Logging Refining to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_trade") == 0) {
+ } else if(strcmpi(w1, "log_trade_file") == 0) {
strcpy(log_config.log_trade, w2);
- if(log_config.trade == 1)
+ if(log_config.trade > 0 && log_config.sql_logs < 1)
{
printf("Logging Item Trades");
- if(log_config.zeny == 1)
+ if(log_config.zeny > 0)
printf("and Zeny Trades");
printf(" to file `%s`.txt\n", w2);
}
- } else if(strcmpi(w1, "log_vend") == 0) {
+ } else if(strcmpi(w1, "log_storage_file") == 0) {
+ strcpy(log_config.log_storage, w2);
+ if(log_config.storage > 0 && log_config.sql_logs < 1)
+ {
+ printf("Logging Item Storages");
+ printf(" to file `%s`.txt\n", w2);
+ }
+ } else if(strcmpi(w1, "log_vend_file") == 0) {
strcpy(log_config.log_vend, w2);
- if(log_config.vend == 1)
+ if(log_config.vend > 0 && log_config.sql_logs < 1)
printf("Logging Vending to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_gm") == 0) {
+ } else if(strcmpi(w1, "log_gm_file") == 0) {
strcpy(log_config.log_gm, w2);
- if(log_config.gm > 0)
+ if(log_config.gm > 0 && log_config.sql_logs < 1)
printf("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)
+ printf("Logging NPC 'logmes' 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);
}
}
}
diff --git a/src/map/log.h b/src/map/log.h
index d4ad0bd66..cdb543f0d 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -16,18 +16,25 @@ 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_zeny(struct map_session_data *sd, struct map_session_data *target_sd,int amount);
int log_atcommand(struct map_session_data *sd, const char *message);
+int log_npc(struct map_session_data *sd, const char *message);
int log_config_read(char *cfgName);
extern struct Log_Config {
int enable_logs;
int sql_logs;
- int branch, drop, mvpdrop, present, produce, refine, trade, vend, zeny, gm;
- char log_branch[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];
- char log_branch_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];
+ int rare_items_log,refine_items_log,price_items_log,amount_items_log;
+ int branch, drop, mvpdrop, present, produce, refine, trade, vend, zeny, gm, npc, storage;
+ char log_branch[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];
+ char log_branch_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];
+ int uptime;
+ char log_uptime[32];
} log_config;
#endif
diff --git a/src/map/mail.c b/src/map/mail.c
index 019f6303d..42a83de52 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -1,18 +1,22 @@
+#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 "socket.h"
-#include "timer.h"
-#include "nullpo.h"
+#include "../common/strlib.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
#include "map.h"
#include "clif.h"
#include "chrif.h"
#include "intif.h"
+#include "atcommand.h"
#include "pc.h"
#include "mail.h"
@@ -20,6 +24,7 @@ char mail_db[32] = "mail";
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)
#ifdef MEMWATCH
#include "memwatch.h"
@@ -27,13 +32,13 @@ int mail_timer;
int mail_check(struct map_session_data *sd,int type)
{
- int i=0,new=0,priority=0;
+ int i = 0, new_ = 0, priority = 0;
char message[50];
- if(sd==NULL)
- return 0;
-
- sprintf(tmp_msql,"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);
+ nullpo_retr (0, sd);
+
+ sprintf(tmp_msql,"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_msql)) {
printf("Database server error (executing query for %s): %s\n", mail_db, mysql_error(&mail_handle));
@@ -42,63 +47,66 @@ int mail_check(struct map_session_data *sd,int type)
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.");
- mysql_free_result(mail_res);
- return 0;
- }
+ if (mysql_num_rows(mail_res) == 0) {
+ //clif_displaymessage(sd->fd,"You have no messages.");
+ clif_displaymessage(sd->fd, msg_txt(516));
- while ((mail_row = mysql_fetch_row(mail_res))) {
- i++;
+ mysql_free_result(mail_res);
+ return 0;
+ }
- if(!atoi(mail_row[5])) {
+ while ((mail_row = mysql_fetch_row(mail_res))) {
+ i++;
+ if(!atoi(mail_row[5])) {
sprintf(tmp_msql,"UPDATE `%s` SET `check_flag`='1' WHERE `message_id`= \"%d\"", mail_db, atoi(mail_row[0]));
- if(mysql_query(&mail_handle, tmp_msql) ) {
- printf("DB server Error (update Read `%s`)- %s\n", mail_db, mysql_error(&mail_handle) );
- }
+ if(mysql_query(&mail_handle, tmp_msql) ) {
+ printf("DB server Error (update Read `%s`)- %s\n", mail_db, mysql_error(&mail_handle) );
}
+ }
- 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]);
- clif_displaymessage(sd->fd, message);
- }
-
- else {
- sprintf(message, "%d - From : %s (New)", i, mail_row[2]);
- clif_displaymessage(sd->fd, message);
- }
+ 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));
+ }
+ }
- else if(type==2){
- sprintf(message, "%d - From : %s", i, mail_row[2]);
- clif_displaymessage(sd->fd, message);
- }
-
- }
-
mysql_free_result(mail_res);
-
} else {
- printf("MySQL error (storing query result for %s): %s\n", mail_db, mysql_error(&mail_handle));
+ printf("MySQL error (storing query result for %s): %s\n", mail_db, mysql_error(&mail_handle));
return 0;
- }
+ }
- if(i>0 && new>0 && type==1) {
- sprintf(message, "You have %d new messages.", new);
- clif_displaymessage(sd->fd, message);
+ 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);
- clif_displaymessage(sd->fd, 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.");
+ if(!new_) {
+ //clif_displaymessage(sd->fd, "You have no new messages.");
+ clif_displaymessage(sd->fd, msg_txt(516));
}
return 0;
@@ -109,9 +117,8 @@ int mail_read(struct map_session_data *sd, int message_id)
char message[80];
- if(sd==NULL)
- return 0;
-
+ nullpo_retr (0, sd);
+
sprintf(tmp_msql,"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_msql)) {
@@ -121,48 +128,47 @@ int mail_read(struct map_session_data *sd, int message_id)
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.");
- return 0;
- }
-
- if ((mail_row = mysql_fetch_row(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_msql,"UPDATE `%s` SET `check_flag`='1' WHERE `message_id`= \"%d\"", mail_db, atoi(mail_row[0]));
- if(mysql_query(&mail_handle, tmp_msql) ) {
- printf("DB server Error (update Read `%s`)- %s\n", mail_db, mysql_error(&mail_handle) );
- }
+ if(mysql_query(&mail_handle, tmp_msql) ) {
+ printf("DB server Error (update Read `%s`)- %s\n", mail_db, mysql_error(&mail_handle) );
+ }
}
- sprintf(message, "Reading message from %s", mail_row[2]);
- clif_displaymessage(sd->fd, message);
+ //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, message);
+ clif_displaymessage(sd->fd, jstrescape(message));
sprintf(tmp_msql,"UPDATE `%s` SET `read_flag`='1' WHERE `message_id`= \"%d\"", mail_db, atoi(mail_row[0]));
- if(mysql_query(&mail_handle, tmp_msql) ) {
+ if(mysql_query(&mail_handle, tmp_msql) ) {
printf("DB server Error (update Read `%s`)- %s\n", mail_db, mysql_error(&mail_handle) );
- }
+ }
}
-
+
mysql_free_result(mail_res);
-
+
} else {
- printf("MySQL error (storing query result for %s): %s\n", mail_db, mysql_error(&mail_handle));
- return 0;
- }
+ printf("MySQL error (storing query result for %s): %s\n", mail_db, mysql_error(&mail_handle));
+ }
return 0;
}
int mail_delete(struct map_session_data *sd, int message_id)
{
- if(sd==NULL)
- return 0;
-
+ nullpo_retr (0, sd);
+
sprintf(tmp_msql,"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_msql)) {
@@ -172,21 +178,25 @@ int mail_delete(struct map_session_data *sd, int message_id)
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.");
- return 0;
- }
+ 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 ((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,"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,"You have recieved new mail, use @listmail before deleting.");
+ clif_displaymessage(sd->fd,msg_txt(520));
return 0;
}
sprintf(tmp_msql,"DELETE FROM `%s` WHERE `message_id` = \"%d\"", mail_db, atoi(mail_row[0]));
@@ -195,75 +205,77 @@ int mail_delete(struct map_session_data *sd, int message_id)
printf("DB server Error (update Read `%s`)- %s\n", mail_db, mysql_error(&mail_handle) );
return 0;
}
- else clif_displaymessage(sd->fd,"Message deleted.");
+ //else clif_displaymessage(sd->fd,"Message deleted.");
+ else clif_displaymessage(sd->fd,msg_txt(521));
}
-
+
mysql_free_result(mail_res);
-
+
} else {
- printf("MySQL error (delete query result for %s): %s\n", mail_db, mysql_error(&mail_handle));
- return 0;
- }
+ printf("MySQL error (delete query result for %s): %s\n", mail_db, mysql_error(&mail_handle));
+ }
return 0;
}
int mail_send(struct map_session_data *sd, char *name, char *message, int flag)
{
- if(sd==NULL)
- return 0;
-
+ 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,"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, "Access Denied.");
+ clif_displaymessage(sd->fd, msg_txt(523));
return 0;
}
else
sprintf(tmp_msql,"SELECT DISTINCT `account_id` FROM `%s` WHERE `account_id` <> '%d' ORDER BY `account_id`", char_db, sd->status.account_id);
}
else
- sprintf(tmp_msql,"SELECT `account_id`,`name` FROM `%s` WHERE `name` = \"%s\"", char_db, name);
+ sprintf(tmp_msql,"SELECT `account_id`,`name` FROM `%s` WHERE `name` = \"%s\"", char_db, jstrescape(name));
if (mysql_query(&mail_handle, tmp_msql)) {
printf("Database server error (executing query for %s): %s\n", char_db, mysql_error(&mail_handle));
return 0;
- }
-
+ }
+
mail_res = mysql_store_result(&mail_handle);
if(mail_res) {
- if (mysql_num_rows(mail_res) == 0) {
+ if (mysql_num_rows(mail_res) == 0) {
mysql_free_result(mail_res);
- clif_displaymessage(sd->fd,"Character does not exist.");
- return 0;
- }
+ //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))) {
+ while ((mail_row = mysql_fetch_row(mail_res))) {
if(strcmp(name,"*")==0) {
- sprintf(tmp_msql, "INSERT 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, message, flag);
+ sprintf(tmp_msql, "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_msql, "INSERT 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, message, flag);
+ sprintf(tmp_msql, "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_msql) ) {
mysql_free_result(mail_res);
printf("DB server Error (insert `mail_db`)- %s\n", mysql_error(&mail_handle) );
return 0;
}
-
}
}
- clif_displaymessage(sd->fd,"Mail has been sent.");
+ //clif_displaymessage(sd->fd,"Mail has been sent.");
+ clif_displaymessage(sd->fd,msg_txt(525));
return 0;
}
@@ -271,43 +283,43 @@ int mail_send(struct map_session_data *sd, char *name, char *message, int flag)
int mail_check_timer(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd = NULL;
- int i;
+ int i;
if(mail_timer != tid)
return 0;
sprintf(tmp_msql,"SELECT DISTINCT `to_account_id` FROM `%s` WHERE `read_flag` = '0' AND `check_flag` = '0'", mail_db);
-
+
if (mysql_query(&mail_handle, tmp_msql)) {
printf("Database server error (executing query for %s): %s\n", char_db, mysql_error(&mail_handle));
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) {
+ 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;
- }
+ return 0;
+ }
- while ((mail_row = mysql_fetch_row(mail_res))) {
+ while ((mail_row = mysql_fetch_row(mail_res))) {
for (i = 0; i < fd_max; i++) {
- if (session[i] && (sd = session[i]->session_data) && sd->state.auth){
+ 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, "You have new mail.");
+ clif_displaymessage(sd->fd, msg_txt(526));
}
}
}
}
sprintf(tmp_msql,"UPDATE `%s` SET `check_flag`='1' WHERE `check_flag`= '0' ", mail_db);
- if(mysql_query(&mail_handle, tmp_msql) ) {
+ if(mysql_query(&mail_handle, tmp_msql) ) {
printf("DB server Error (update Read `%s`)- %s\n", mail_db, mysql_error(&mail_handle) );
}
@@ -316,9 +328,10 @@ int mail_check_timer(int tid,unsigned int tick,int id,int data)
}
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/map.c b/src/map/map.c
index 3214373f9..386b38954 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -8,12 +8,14 @@
#else
#include <netdb.h>
#endif
+#include <math.h>
#include "core.h"
#include "timer.h"
#include "db.h"
#include "grfio.h"
#include "malloc.h"
+#include "version.h"
#include "map.h"
#include "chrif.h"
@@ -21,6 +23,7 @@
#include "intif.h"
#include "npc.h"
#include "pc.h"
+#include "status.h"
#include "mob.h"
#include "chat.h"
#include "itemdb.h"
@@ -43,7 +46,8 @@
#include "memwatch.h"
#endif
-unsigned long ticks = 0; // by MC Cameri
+// maybe put basic macros to somewhere else
+#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b)))
#ifndef TXT_ONLY
@@ -99,19 +103,31 @@ int read_gm_interval = 600000;
char char_db[32] = "char";
static int online_timer(int,unsigned int,int,int);
-
int CHECK_INTERVAL = 3600000; // [Valaris]
-int check_online_timer=0; // [Valaris]
#endif /* not TXT_ONLY */
-// ‹É—Í static‚Ń[ƒJƒ‹‚ÉŽû‚ß‚é
+
+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;
+
+#define USE_AFM
+#define USE_AF2
+
+// ‹É—Í static‚Ń?ƒJƒ‹‚É?‚ß‚é
static struct dbt * id_db=NULL;
static struct dbt * map_db=NULL;
static struct dbt * nick_db=NULL;
static struct dbt * charid_db=NULL;
static int users=0;
-static struct block_list *object[MAX_FLOORITEM];
+static struct block_list *objects[MAX_FLOORITEM];
static int first_free_object_id=0,last_object_id=0;
#define block_free_max 1048576
@@ -145,23 +161,33 @@ struct charid2nick {
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 motd_txt[256] = "conf/motd.txt";
char help_txt[256] = "conf/help.txt";
char wisp_server_name[24] = "Server"; // can be modified in char-server configuration file
int console = 0;
+
/*==========================================
- * ‘SmapŽI‘Œv‚Å‚ÌÚ‘±”Ý’è
+ * ‘SmapŽI?Œv‚Å‚ÌÚ??Ý’è
* (charŽI‚©‚ç‘—‚ç‚ê‚Ä‚­‚é)
*------------------------------------------
*/
-void map_setusers(int n) {
- users = n;
+void map_setusers(int fd)
+{
+ users = RFIFOL(fd,2);
+ // send some anser
+ WFIFOW(fd,0) = 0x2718;
+ WFIFOSET(fd,2);
}
/*==========================================
- * ‘SmapŽI‘Œv‚Å‚ÌÚ‘±”Žæ“¾ (/w‚ւ̉ž“š—p)
+ * ‘SmapŽI?Œv‚Å‚ÌÚ??Žæ“¾ (/w‚Ö‚Ì?“š—p)
*------------------------------------------
*/
int map_getusers(void) {
@@ -169,18 +195,18 @@ int map_getusers(void) {
}
//
-// block휂̈À‘S«Šm•Ûˆ—
+// block휂̈À‘S«Šm•Û?—
//
/*==========================================
- * block‚ðfree‚·‚é‚Æ‚«free‚Ì•Ï‚í‚è‚ɌĂÔ
+ * block‚ðfree‚·‚é‚Æ‚«free‚Ì?‚í‚è‚ɌĂÔ
* ƒƒbƒN‚³‚ê‚Ä‚¢‚é‚Æ‚«‚̓oƒbƒtƒ@‚É‚½‚ß‚é
*------------------------------------------
*/
int map_freeblock( void *bl )
{
if(block_free_lock==0){
- free(bl);
+ aFree(bl);
bl = NULL;
}
else{
@@ -216,23 +242,40 @@ int map_freeblock_unlock(void) {
// printf("map_freeblock_unlock: free %d object\n",block_free_count);
// }
for(i=0;i<block_free_count;i++){
- free(block_free[i]);
+ aFree(block_free[i]);
block_free[i] = NULL;
}
block_free_count=0;
}else if(block_free_lock<0){
if(battle_config.error_log)
printf("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) {
+ printf("map_freeblock_timer: block_free_lock(%d) is invalid.\n",block_free_lock);
+ block_free_lock = 1;
+ map_freeblock_unlock();
+ }
+ // else {
+ // printf("map_freeblock_timer: check ok\n");
+ // }
+ return 0;
+}
//
-// block‰»ˆ—
+// block‰»?—
//
/*==========================================
- * map[]‚Ìblock_list‚©‚çŒq‚ª‚Á‚Ä‚¢‚éꇂÉ
+ * map[]‚Ìblock_list‚©‚ç?‚ª‚Á‚Ä‚¢‚éꇂÉ
* bl->prev‚Ébl_head‚̃AƒhƒŒƒX‚ð“ü‚ê‚Ä‚¨‚­
*------------------------------------------
*/
@@ -240,9 +283,9 @@ static struct block_list bl_head;
/*==========================================
* map[]‚Ìblock_list‚ɒljÁ
- * mob‚Í”‚ª‘½‚¢‚̂ŕʃŠƒXƒg
+ * mob‚Í?‚ª‘½‚¢‚̂ŕʃŠƒXƒg
*
- * Šù‚ÉlinkÏ‚Ý‚©‚ÌŠm”F‚ª–³‚¢BŠëŒ¯‚©‚à
+ * ?‚Élink?‚Ý‚©‚ÌŠm”F‚ª–³‚¢BŠë?‚©‚à
*------------------------------------------
*/
int map_addblock(struct block_list *bl)
@@ -286,7 +329,7 @@ int map_addblock(struct block_list *bl)
/*==========================================
* map[]‚Ìblock_list‚©‚çŠO‚·
- * prev‚ªNULL‚Ìê‡list‚ÉŒq‚ª‚Á‚Ä‚È‚¢
+ * prev‚ªNULL‚Ìê‡list‚É?‚ª‚Á‚Ä‚È‚¢
*------------------------------------------
*/
int map_delblock(struct block_list *bl)
@@ -294,7 +337,7 @@ int map_delblock(struct block_list *bl)
int b;
nullpo_retr(0, bl);
- // Šù‚Éblocklist‚©‚甲‚¯‚Ä‚¢‚é
+ // ?‚Éblocklist‚©‚ç?‚¯‚Ä‚¢‚é
if(bl->prev==NULL){
if(bl->next!=NULL){
// prev‚ªNULL‚Ånext‚ªNULL‚Å‚È‚¢‚Ì‚Í—L‚Á‚Ä‚Í‚È‚ç‚È‚¢
@@ -308,7 +351,8 @@ int map_delblock(struct block_list *bl)
if(bl->type==BL_PC)
map[bl->m].users--;
- if(bl->next) bl->next->prev = bl->prev;
+ if(bl->next)
+ bl->next->prev = bl->prev;
if(bl->prev==&bl_head){
// ƒŠƒXƒg‚Ì“ª‚È‚Ì‚ÅAmap[]‚Ìblock_list‚ðXV‚·‚é
if(bl->type==BL_MOB){
@@ -330,7 +374,7 @@ int map_delblock(struct block_list *bl)
}
/*==========================================
- * ŽüˆÍ‚ÌPCl”‚𔂦‚é (Œ»Ý–¢Žg—p)
+ * Žü?‚ÌPCl?‚ð?‚¦‚é (Œ»Ý–¢Žg—p)
*------------------------------------------
*/
int map_countnearpc(int m, int x, int y) {
@@ -356,7 +400,7 @@ int map_countnearpc(int m, int x, int y) {
}
/*==========================================
- * ƒZƒ‹ã‚ÌPC‚ÆMOB‚Ì”‚𔂦‚é (ƒOƒ‰ƒ“ƒhƒNƒƒX—p)
+ * ƒZƒ‹ã‚ÌPC‚ÆMOB‚Ì?‚ð?‚¦‚é (ƒOƒ‰ƒ“ƒhƒNƒƒX—p)
*------------------------------------------
*/
int map_count_oncell(int m, int x, int y) {
@@ -383,18 +427,47 @@ int map_count_oncell(int m, int x, int y) {
if(!count) count = 1;
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‚ɑ΂µ‚Ä
+ * map m (x0,y0)-(x1,y1)?‚Ì‘Sobj‚É?‚µ‚Ä
* func‚ðŒÄ‚Ô
* type!=0 ‚È‚ç‚»‚ÌŽí—Þ‚Ì‚Ý
*------------------------------------------
*/
void 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;
struct block_list *bl=NULL;
- va_list ap=NULL;
int blockcount=bl_list_count,i,c;
if(m < 0)
@@ -437,7 +510,7 @@ void map_foreachinarea(int (*func)(struct block_list*,va_list),int m,int x0,int
map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // —LŒø‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ if(bl_list[i]->prev) // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
func(bl_list[i],ap);
map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
@@ -448,8 +521,8 @@ void map_foreachinarea(int (*func)(struct block_list*,va_list),int m,int x0,int
/*==========================================
* ‹éŒ`(x0,y0)-(x1,y1)‚ª(dx,dy)ˆÚ“®‚µ‚½Žž‚Ì
- * —̈æŠO‚É‚È‚é—̈æ(‹éŒ`‚©LŽšŒ`)“à‚Ìobj‚É
- * ‘΂µ‚Äfunc‚ðŒÄ‚Ô
+ * —̈æŠO‚É‚È‚é—̈æ(‹éŒ`‚©LŽšŒ`)?‚Ìobj‚É
+ * ?‚µ‚Äfunc‚ðŒÄ‚Ô
*
* dx,dy‚Í-1,0,1‚Ì‚Ý‚Æ‚·‚éi‚Ç‚ñ‚È’l‚Å‚à‚¢‚¢‚Á‚Û‚¢Hj
*------------------------------------------
@@ -457,7 +530,7 @@ void map_foreachinarea(int (*func)(struct block_list*,va_list),int m,int x0,int
void 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;
struct block_list *bl=NULL;
- va_list ap=NULL;
+ va_list ap;
int blockcount=bl_list_count,i,c;
va_start(ap,type);
@@ -546,8 +619,12 @@ void map_foreachinmovearea(int (*func)(struct block_list*,va_list),int m,int x0,
map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // —LŒø‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ 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;
func(bl_list[i],ap);
+ }
map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
@@ -562,7 +639,7 @@ void map_foreachinmovearea(int (*func)(struct block_list*,va_list),int m,int x0,
void map_foreachincell(int (*func)(struct block_list*,va_list),int m,int x,int y,int type,...) {
int bx,by;
struct block_list *bl=NULL;
- va_list ap=NULL;
+ va_list ap;
int blockcount=bl_list_count,i,c;
va_start(ap,type);
@@ -602,18 +679,445 @@ void map_foreachincell(int (*func)(struct block_list*,va_list),int m,int x,int y
map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // —LŒø‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ if(bl_list[i]->prev) // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ func(bl_list[i],ap);
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+
+ va_end(ap);
+ bl_list_count = blockcount;
+}
+
+/*============================================================
+* For checking a path between two points (x0, y0) and (x1, y1)
+*------------------------------------------------------------
+ */
+void map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int range,int type,...)
+{
+/* va_list ap;
+ double deltax = 0.0;
+ double deltay = 0.0;
+ int t, bx, by;
+ int *xs, *ys;
+ int blockcount = bl_list_count, i, c;
+ struct block_list *bl = NULL;
+
+ if(m < 0)
+ return;
+ va_start(ap,type);
+ 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;
+
+ // I'm not finished thinking on it
+ // but first it might better use a parameter equation
+ // x=(x1-x0)*t+x0; y=(y1-y0)*t+y0; t=[0,1]
+ // would not need special case aproximating for infinity/zero slope
+ // so maybe this way:
+
+ // find maximum runindex
+ int tmax = abs(y1-y0);
+ if(tmax < abs(x1-x0))
+ tmax = abs(x1-x0);
+
+ xs = (int *)aCallocA(tmax + 1, sizeof(int));
+ ys = (int *)aCallocA(tmax + 1, sizeof(int));
+
+ // pre-calculate delta values for x and y destination
+ // should speed up cause you don't need to divide in the loop
+ if(tmax>0)
+ {
+ deltax = ((double)(x1-x0)) / ((double)tmax);
+ deltay = ((double)(y1-y0)) / ((double)tmax);
+ }
+ // go along the index
+ for(t=0; t<=tmax; t++)
+ {
+ int x = (int)floor(deltax * (double)t +0.5)+x0;
+ int y = (int)floor(deltay * (double)t +0.5)+y0;
+ // the xy pairs of points in line between x0y0 and x1y1
+ // including start and end point
+ xs[t] = x;
+ ys[t] = y;
+ }
+
+ if (type == 0 || type != BL_MOB)
+
+
+this here is wrong,
+there is no check if x0<x1 and y0<y1
+but this is not valid in 3 of 4 cases,
+so in this case here you check only blocks when shooting to a positive direction
+shooting in other directions just do nothing like the skill has failed
+if you want to keep this that way then check and swap x0,y0 with x1,y1
+
+ 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) {
+ if (type && bl->type!=type)
+ continue;
+ for(t=0; t<=tmax; t++)
+ if(bl->x==xs[t] && bl->y==ys[t] && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+ }
+ if(type==0 || 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) {
+ for(t=0; t<=tmax; t++)
+ if(bl->x==xs[t] && bl->y==ys[t] && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+ }
+
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ printf("map_foreachinarea: *WARNING* 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
func(bl_list[i],ap);
map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+ bl_list_count = blockcount;
+ aFree (xs);
+ aFree (ys);
+ va_end(ap);
+
+*/
+
+/*
+//////////////////////////////////////////////////////////////
+//
+// sharp shooting 1
+//
+//////////////////////////////////////////////////////////////
+// problem:
+// finding targets standing on and within some range of a line
+// (t1,t2 t3 and t4 get hit)
+//
+// target 1
+// x t4
+// t2
+// t3 x
+// x
+// S
+//////////////////////////////////////////////////////////////
+// solution 1 (straight forward, but a bit calculation expensive)
+// calculating perpendiculars from quesionable mobs to the straight line
+// if the mob is hit then depends on the distance to the line
+//
+// solution 2 (complex, need to handle many cases, but maybe faster)
+// make a formula to deside if a given (x,y) is within a shooting area
+// the shape can be ie. rectangular or triangular
+// if the mob is hit then depends on if the mob is inside or outside the area
+// I'm not going to implement this, but if somebody is interested
+// in vector algebra, it might be some fun
+
+//////////////////////////////////////////////////////////////
+// possible shooting ranges (I prefer the second one)
+//////////////////////////////////////////////////////////////
+//
+// ---------------- ------
+// ---------------- ------------
+// Sxxxxxxxxxxxxxxxxtarget Sxxxxxxxxxxxxxxxxtarget
+// ---------------- ------------
+// ---------------- -----
+//
+// the original code implemented the left structure
+// might be not that realistic, so I changed to the other one
+// I take "range" as max distance from the line
+//////////////////////////////////////////////////////////////
+
+ va_list ap;
+ int i, blockcount = bl_list_count;
+ struct block_list *bl;
+ int c1,c2;
+
+///////////
+ double deltax,deltay;
+ double k,kfact,knorm;
+ double v1,v2,distance;
+ double xm,ym,rd;
+ int bx,by,bx0,bx1,by0,by1;
+//////////////
+ // no map
+ if(m < 0) return;
+
+ // xy out of range
+ 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;
+
+ ///////////////////////////////
+ // stuff for a linear equation in xy coord to calculate
+ // the perpendicular from a block xy to the straight line
+ deltax = (x1-x0);
+ deltay = (y1-y0);
+ kfact = (deltax*deltax+deltay*deltay); // the sqare length of the line
+ knorm = -deltax*x0-deltay*y0; // the offset vector param
+
+//printf("(%i,%i)(%i,%i) range: %i\n",x0,y0,x1,y1,range);
+
+ if(kfact==0) return; // shooting at the standing position should not happen
+ kfact = 1/kfact; // divide here and multiply in the loop
+
+ range *= range; // compare with range^2 so we can skip a sqrt and signs
+
+ ///////////////////////////////
+ // prepare shooting area check
+ xm = (x1+x0)/2.0;
+ ym = (y1+y0)/2.0;// middle point on the shooting line
+ // the sqared radius of a circle around the shooting range
+ // plus the sqared radius of a block
+ rd = (x0-xm)*(x0-xm) + (y0-ym)*(y0-ym) + (range*range)
+ +BLOCK_SIZE*BLOCK_SIZE/2;
+ // so whenever a block midpoint is within this circle
+ // some of the block area is possibly within the shooting range
+
+ ///////////////////////////////
+ // what blocks we need to test
+ // blocks covered by the xy position of begin and end of the line
+ bx0 = x0/BLOCK_SIZE;
+ bx1 = x1/BLOCK_SIZE;
+ by0 = y0/BLOCK_SIZE;
+ by1 = y1/BLOCK_SIZE;
+ // swap'em for a smallest-to-biggest run
+ if(bx0>bx1) swap(bx0,bx1);
+ if(by0>by1) swap(by0,by1);
+
+ // enlarge the block area by a range value and 1
+ // so we can be sure to process all blocks that might touch the shooting area
+ // in this case here with BLOCK_SIZE=8 and range=2 it will be only enlarged by 1
+ // but I implement it anyway just in case that ranges will be larger
+ // or BLOCK_SIZE smaller in future
+ i = (range/BLOCK_SIZE+1);//temp value
+ if(bx0>i) bx0 -=i; else bx0=0;
+ if(by0>i) by0 -=i; else by0=0;
+ if(bx1+i<map[m].bxs) bx1 +=i; else bx1=map[m].bxs-1;
+ if(by1+i<map[m].bys) by1 +=i; else by1=map[m].bys-1;
+
+
+//printf("run for (%i,%i)(%i,%i)\n",bx0,by0,bx1,by1);
+ for(bx=bx0; bx<=bx1; bx++)
+ for(by=by0; by<=by1; by++)
+ { // block xy
+ c1 = map[m].block_count[bx+by*map[m].bxs]; // number of elements in the block
+ c2 = map[m].block_mob_count[bx+by*map[m].bxs]; // number of mobs in the mob block
+ if( (c1==0) && (c2==0) ) continue; // skip if nothing in the blocks
+
+//printf("block(%i,%i) %i %i\n",bx,by,c1,c2);fflush(stdout);
+ // test if the mid-point of the block is too far away
+ // so we could skip the whole block in this case
+ v1 = (bx*BLOCK_SIZE+BLOCK_SIZE/2-xm)*(bx*BLOCK_SIZE+BLOCK_SIZE/2-xm)
+ +(by*BLOCK_SIZE+BLOCK_SIZE/2-ym)*(by*BLOCK_SIZE+BLOCK_SIZE/2-ym);
+//printf("block(%i,%i) v1=%f rd=%f\n",bx,by,v1,rd);fflush(stdout);
+ // check for the worst case scenario
+ if(v1 > rd) continue;
+
+ // it seems that the block is at least partially covered by the shooting range
+ // so we go into it
+ if(type==0 || type!=BL_MOB) {
+ bl = map[m].block[bx+by*map[m].bxs]; // a block with the elements
+ for(i=0;i<c1 && bl;i++,bl=bl->next){ // go through all elements
+ if( bl && ( !type || bl->type==type ) && bl_list_count<BL_LIST_MAX )
+ {
+ // calculate the perpendicular from block xy to the straight line
+ k = kfact*(deltax*bl->x + deltay*bl->y + knorm);
+ // check if the perpendicular is within start and end of our line
+ if(k>=0 && k<=1)
+ { // calculate the distance
+ v1 = deltax*k+x0 - bl->x;
+ v2 = deltay*k+y0 - bl->y;
+ distance = v1*v1+v2*v2;
+ // triangular shooting range
+ if( distance <= range*k )
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }//end for elements
+ }
+
+ if(type==0 || type==BL_MOB) {
+ bl = map[m].block_mob[bx+by*map[m].bxs]; // and the mob block
+ for(i=0;i<c2 && bl;i++,bl=bl->next){
+ if(bl && bl_list_count<BL_LIST_MAX) {
+ // calculate the perpendicular from block xy to the straight line
+ k = kfact*(deltax*bl->x + deltay*bl->y + knorm);
+//printf("mob: (%i,%i) k=%f ",bl->x,bl->y, k);
+ // check if the perpendicular is within start and end of our line
+ if(k>=0 && k<=1)
+ {
+ v1 = deltax*k+x0 - bl->x;
+ v2 = deltay*k+y0 - bl->y;
+ distance = v1*v1+v2*v2;
+//printf("dist: %f",distance);
+ // triangular shooting range
+ if( distance <= range*k )
+ {
+//printf(" hit");
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+//printf("\n");
+ }
+ }//end for mobs
+ }
+ }//end for(bx,by)
+
+
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ printf("map_foreachinarea: *WARNING* block count too many!\n");
+ }
+
+ va_start(ap,type);
+ map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
+
+ for(i=blockcount;i<bl_list_count;i++)
+ if(bl_list[i]->prev) // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ func(bl_list[i],ap);
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+ va_end(ap);
+
+ bl_list_count = blockcount;
+
+*/
+
+
+//////////////////////////////////////////////////////////////
+//
+// sharp shooting 2
+//
+//////////////////////////////////////////////////////////////
+// problem:
+// finding targets standing exactly on a line
+// (only t1 and t2 get hit)
+//
+// target 1
+// x t4
+// t2
+// t3 x
+// x
+// S
+//////////////////////////////////////////////////////////////
+ va_list ap;
+ int i, blockcount = bl_list_count;
+ struct block_list *bl;
+ int c1,c2;
+
+ //////////////////////////////////////////////////////////////
+ // linear parametric equation
+ // x=(x1-x0)*t+x0; y=(y1-y0)*t+y0; t=[0,1]
+ //////////////////////////////////////////////////////////////
+ // linear equation for finding a single line between (x0,y0)->(x1,y1)
+ // independent of the given xy-values
+ double dx = 0.0;
+ double dy = 0.0;
+ int bx=-1; // initialize block coords to some impossible value
+ int by=-1;
+
+ int t;
+ ///////////////////////////////
+ // find maximum runindex
+ int tmax = abs(y1-y0);
+ if(tmax < abs(x1-x0))
+ tmax = abs(x1-x0);
+ // pre-calculate delta values for x and y destination
+ // should speed up cause you don't need to divide in the loop
+ if(tmax>0)
+ {
+ dx = ((double)(x1-x0)) / ((double)tmax);
+ dy = ((double)(y1-y0)) / ((double)tmax);
+ }
+ // go along the index
+ for(t=0; t<=tmax; t++)
+ { // xy-values of the line including start and end point
+ int x = (int)floor(dx * (double)t +0.5)+x0;
+ int y = (int)floor(dy * (double)t +0.5)+y0;
+
+ // check the block index of the calculated xy
+ if( (bx!=x/BLOCK_SIZE) || (by!=y/BLOCK_SIZE) )
+ { // we have reached a new block
+ // so we store the current block coordinates
+ bx = x/BLOCK_SIZE;
+ by = y/BLOCK_SIZE;
+
+ // and process the data
+ c1 = map[m].block_count[bx+by*map[m].bxs]; // number of elements in the block
+ c2 = map[m].block_mob_count[bx+by*map[m].bxs]; // number of mobs in the mob block
+ if( (c1==0) && (c2==0) ) continue; // skip if nothing in the block
+
+ if(type==0 || type!=BL_MOB) {
+ bl = map[m].block[bx+by*map[m].bxs]; // a block with the elements
+ for(i=0;i<c1 && bl;i++,bl=bl->next){ // go through all elements
+ if( bl && ( !type || bl->type==type ) && bl_list_count<BL_LIST_MAX )
+ {
+ // check if block xy is on the line
+ if( (bl->x-x0)*(y1-y0) == (bl->y-y0)*(x1-x0) )
+ // and if it is within start and end point
+ if( (((x0<=x1)&&(x0<=bl->x)&&(bl->x<=x1)) || ((x0>=x1)&&(x0>=bl->x)&&(bl->x>=x1))) &&
+ (((y0<=y1)&&(y0<=bl->y)&&(bl->y<=y1)) || ((y0>=y1)&&(y0>=bl->y)&&(bl->y>=y1))) )
+ bl_list[bl_list_count++]=bl;
+ }
+ }//end for elements
+ }
+
+ if(type==0 || type==BL_MOB) {
+ bl = map[m].block_mob[bx+by*map[m].bxs]; // and the mob block
+ for(i=0;i<c2 && bl;i++,bl=bl->next){
+ if(bl && bl_list_count<BL_LIST_MAX) {
+ // check if mob xy is on the line
+ if( (bl->x-x0)*(y1-y0) == (bl->y-y0)*(x1-x0) )
+ // and if it is within start and end point
+ if( (((x0<=x1)&&(x0<=bl->x)&&(bl->x<=x1)) || ((x0>=x1)&&(x0>=bl->x)&&(bl->x>=x1))) &&
+ (((y0<=y1)&&(y0<=bl->y)&&(bl->y<=y1)) || ((y0>=y1)&&(y0>=bl->y)&&(bl->y>=y1))) )
+ bl_list[bl_list_count++]=bl;
+ }
+ }//end for mobs
+ }
+ }
+ }//end for index
+
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ printf("map_foreachinarea: *WARNING* block count too many!\n");
+ }
+
+ va_start(ap,type);
+ map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
+
+ for(i=blockcount;i<bl_list_count;i++)
+ if(bl_list[i]->prev) // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ func(bl_list[i],ap);
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
va_end(ap);
+
bl_list_count = blockcount;
}
/*==========================================
- * °ƒAƒCƒeƒ€‚âƒGƒtƒFƒNƒg—p‚̈ꎞobjŠ„‚è“–‚Ä
- * object[]‚Ö‚Ì•Û‘¶‚Æid_db“o˜^‚Ü‚Å
+ * °ƒAƒCƒeƒ€‚âƒGƒtƒFƒNƒg—p‚̈ꎞobjŠ„‚è?‚Ä
+ * object[]‚Ö‚Ì•Û‘¶‚Æid_db“o?‚Ü‚Å
*
* bl->id‚à‚±‚Ì’†‚Åݒ肵‚Ä–â‘è–³‚¢?
*------------------------------------------
@@ -627,7 +1131,7 @@ int map_addobject(struct block_list *bl) {
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;i++)
- if(object[i]==NULL)
+ if(objects[i]==NULL)
break;
if(i>=MAX_FLOORITEM){
if(battle_config.error_log)
@@ -637,29 +1141,29 @@ int map_addobject(struct block_list *bl) {
first_free_object_id=i;
if(last_object_id<i)
last_object_id=i;
- object[i]=bl;
+ objects[i]=bl;
numdb_insert(id_db,i,bl);
return i;
}
/*==========================================
* ˆêŽžobject‚̉ð•ú
- * map_delobject‚Ìfree‚µ‚È‚¢ƒo[ƒWƒ‡ƒ“
+ * map_delobject‚Ìfree‚µ‚È‚¢ƒo?ƒWƒ‡ƒ“
*------------------------------------------
*/
int map_delobjectnofree(int id) {
- if(object[id]==NULL)
+ if(objects[id]==NULL)
return 0;
- map_delblock(object[id]);
+ map_delblock(objects[id]);
numdb_erase(id_db,id);
-// map_freeblock(object[id]);
- object[id]=NULL;
+// map_freeblock(objects[id]);
+ objects[id]=NULL;
if(first_free_object_id>id)
first_free_object_id=id;
- while(last_object_id>2 && object[last_object_id]==NULL)
+ while(last_object_id>2 && objects[last_object_id]==NULL)
last_object_id--;
return 0;
@@ -670,11 +1174,11 @@ int map_delobjectnofree(int id) {
* block_list‚©‚ç‚ÌíœAid_db‚©‚ç‚Ìíœ
* object data‚ÌfreeAobject[]‚Ö‚ÌNULL‘ã“ü
*
- * add‚Æ‚Ì‘ÎÌ«‚ª–³‚¢‚Ì‚ª‹C‚É‚È‚é
+ * add‚Æ‚Ì??«‚ª–³‚¢‚Ì‚ª?‚É‚È‚é
*------------------------------------------
*/
int map_delobject(int id) {
- struct block_list *obj = object[id];
+ struct block_list *obj = objects[id];
if(obj==NULL)
return 0;
@@ -693,20 +1197,20 @@ int map_delobject(int id) {
void map_foreachobject(int (*func)(struct block_list*,va_list),int type,...) {
int i;
int blockcount=bl_list_count;
- va_list ap=NULL;
+ va_list ap;
va_start(ap,type);
for(i=2;i<=last_object_id;i++){
- if(object[i]){
- if(type && object[i]->type!=type)
+ if(objects[i]){
+ if(type && objects[i]->type!=type)
continue;
if(bl_list_count>=BL_LIST_MAX) {
if(battle_config.error_log)
printf("map_foreachobject: too many block !\n");
}
else
- bl_list[bl_list_count++]=object[i];
+ bl_list[bl_list_count++]=objects[i];
}
}
@@ -729,13 +1233,13 @@ void map_foreachobject(int (*func)(struct block_list*,va_list),int type,...) {
* data!=0‚ÌŽž‚ÍE‚¤“™‚ÅÁ‚¦‚½Žž‚Æ‚µ‚Ä“®ì
*
* ŒãŽÒ‚ÍAmap_clearflooritem(id)‚Ö
- * map.h“à‚Å#define‚µ‚Ä‚ ‚é
+ * 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 *)object[id];
+ fitem = (struct flooritem_data *)objects[id];
if(fitem==NULL || fitem->bl.type!=BL_ITEM || (!data && fitem->cleartimer != tid)){
if(battle_config.error_log)
printf("map_clearflooritem_timer : error\n");
@@ -752,14 +1256,14 @@ int map_clearflooritem_timer(int tid,unsigned int tick,int id,int data) {
}
/*==========================================
- * (m,x,y)‚ÌŽüˆÍrangeƒ}ƒX“à‚Ì‹ó‚«(=N“ü‰Â”\)cell‚Ì
- * “à‚©‚ç“K“–‚ȃ}ƒX–Ú‚ÌÀ•W‚ðx+(y<<16)‚Å•Ô‚·
+ * (m,x,y)‚ÌŽü?rangeƒ}ƒX?‚Ì‹ó‚«(=N“ü‰Â”\)cell‚Ì
+ * ?‚©‚ç“K?‚ȃ}ƒX–Ú‚ÌÀ•W‚ðx+(y<<16)‚Å•Ô‚·
*
- * Œ»órange=1‚ŃAƒCƒeƒ€ƒhƒƒbƒv—p“r‚Ì‚Ý
+ * Œ»?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,c;
+ int free_cell,i,j;
for(free_cell=0,i=-range;i<=range;i++){
if(i+y<0 || i+y>=map[m].ys)
@@ -767,7 +1271,7 @@ int map_searchrandfreecell(int m,int x,int y,int range) {
for(j=-range;j<=range;j++){
if(j+x<0 || j+x>=map[m].xs)
continue;
- if((c=read_gat(m,j+x,i+y))==1 || c==5)
+ if(map_getcell(m,j+x,i+y,CELL_CHKNOPASS))
continue;
free_cell++;
}
@@ -781,7 +1285,7 @@ int map_searchrandfreecell(int m,int x,int y,int range) {
for(j=-range;j<=range;j++){
if(j+x<0 || j+x>=map[m].xs)
continue;
- if((c=read_gat(m,j+x,i+y))==1 || c==5)
+ if(map_getcell(m,j+x,i+y,CELL_CHKNOPASS))
continue;
if(free_cell==0){
x+=j;
@@ -797,7 +1301,7 @@ int map_searchrandfreecell(int m,int x,int y,int range) {
}
/*==========================================
- * (m,x,y)‚ð’†S‚É3x3ˆÈ“à‚É°ƒAƒCƒeƒ€Ý’u
+ * (m,x,y)‚ð’†S‚É3x3ˆÈ?‚É°ƒAƒCƒeƒ€Ý’u
*
* item_data‚ÍamountˆÈŠO‚ðcopy‚·‚é
*------------------------------------------
@@ -829,7 +1333,7 @@ int map_addflooritem(struct item *item_data,int amount,int m,int x,int y,struct
fitem->bl.id = map_addobject(&fitem->bl);
if(fitem->bl.id==0){
- free(fitem);
+ aFree(fitem);
return 0;
}
@@ -876,9 +1380,9 @@ void map_addchariddb(int charid, char *name) {
struct charid2nick *p=NULL;
int req=0;
- p=numdb_search(charid_db,charid);
- if(p==NULL){ // ƒf[ƒ^ƒx[ƒX‚É‚È‚¢
- p = (struct charid2nick *)aCalloc(1,sizeof(struct charid2nick));
+ p = (struct charid2nick*)numdb_search(charid_db,charid);
+ if(p==NULL){ // ƒf?ƒ^ƒx?ƒX‚É‚È‚¢
+ p = (struct charid2nick *)aCallocA(1,sizeof(struct charid2nick));
p->req_id=0;
}else
numdb_erase(charid_db,charid);
@@ -903,8 +1407,8 @@ int map_reqchariddb(struct map_session_data * sd,int charid) {
nullpo_retr(0, sd);
- p=numdb_search(charid_db,charid);
- if(p!=NULL) // ƒf[ƒ^ƒx[ƒX‚É‚·‚Å‚É‚ ‚é
+ p = (struct charid2nick*)numdb_search(charid_db,charid);
+ if(p!=NULL) // ƒf?ƒ^ƒx?ƒX‚É‚·‚Å‚É‚ ‚é
return 0;
p = (struct charid2nick *)aCalloc(1,sizeof(struct charid2nick));
p->req_id=sd->bl.id;
@@ -943,105 +1447,133 @@ void map_addnickdb(struct map_session_data *sd) {
}
/*==========================================
- * PC‚Ìquitˆ— map.c“à•ª
+ * PC‚Ìquit?— map.c?•ª
*
- * quitˆ—‚ÌŽå‘Ì‚ªˆá‚¤‚悤‚È‹C‚à‚µ‚Ä‚«‚½
+ * quit?—‚ÌŽå?‚ªˆá‚¤‚悤‚È?‚à‚µ‚Ä‚«‚½
*------------------------------------------
*/
int map_quit(struct map_session_data *sd) {
- int i;
-
nullpo_retr(0, sd);
- if(sd->chatID) // ƒ`ƒƒƒbƒg‚©‚ço‚é
- chat_leavechat(sd);
+ 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
+ sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.logout_event_name);
+ ShowStatus(tmp_output);
+ }
+ } else {
+ sprintf (tmp_output, "%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);
+ ShowStatus(tmp_output);
+ }
+ }
- if(sd->trade_partner) // Žæˆø‚ð’†’f‚·‚é
- trade_tradecancel(sd);
+ if(sd->chatID) // ƒ`ƒƒƒbƒg‚©‚ço‚é
+ chat_leavechat(sd);
- if(sd->party_invite>0) // ƒp[ƒeƒBŠ©—U‚ð‹‘”Û‚·‚é
- party_reply_invite(sd,sd->party_invite_account,0);
+ if(sd->trade_partner) // Žæˆø‚ð’†?‚·‚é
+ trade_tradecancel(sd);
- 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);
+ if(sd->party_invite>0) // ƒp?ƒeƒB?—U‚ð‹‘”Û‚·‚é
+ party_reply_invite(sd,sd->party_invite_account,0);
- party_send_logout(sd); // ƒp[ƒeƒB‚̃ƒOƒAƒEƒgƒƒbƒZ[ƒW‘—M
+ 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);
- guild_send_memberinfoshort(sd,0); // ƒMƒ‹ƒh‚̃ƒOƒAƒEƒgƒƒbƒZ[ƒW‘—M
+ party_send_logout(sd); // ƒp?ƒeƒB‚̃ƒOƒAƒEƒgƒƒbƒZ?ƒW‘—M
- pc_cleareventtimer(sd); // ƒCƒxƒ“ƒgƒ^ƒCƒ}‚ð”jŠü‚·‚é
+ guild_send_memberinfoshort(sd,0); // ƒMƒ‹ƒh‚̃ƒOƒAƒEƒgƒƒbƒZ?ƒW‘—M
- if(sd->state.storage_flag)
- storage_guild_storage_quit(sd,0);
- else
- storage_storage_quit(sd); // ‘qŒÉ‚ðŠJ‚¢‚Ä‚é‚È‚ç•Û‘¶‚·‚é
-
- skill_castcancel(&sd->bl,0); // ‰r¥‚ð’†’f‚·‚é
- skill_stop_dancing(&sd->bl,1);// ƒ_ƒ“ƒX/‰‰‘t’†’f
-
- if(sd->sc_data && sd->sc_data[SC_BERSERK].timer!=-1) //ƒo[ƒT[ƒN’†‚ÌI—¹‚ÍHP‚ð100‚É
- sd->status.hp = 100;
-
- skill_status_change_clear(&sd->bl,1); // ƒXƒe[ƒ^ƒXˆÙí‚ð‰ðœ‚·‚é
- skill_clear_unitgroup(&sd->bl); // ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹[ƒv‚Ìíœ
- skill_cleartimerskill(&sd->bl);
- pc_stop_walking(sd,0);
- pc_stopattack(sd);
- pc_delinvincibletimer(sd);
- pc_delspiritball(sd,sd->spiritball,1);
- skill_gangsterparadise(sd,0);
-
- pc_calcstatus(sd,4);
-
- clif_clearchar_area(&sd->bl,2);
-
- 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;
- }
+ pc_cleareventtimer(sd); // ƒCƒxƒ“ƒgƒ^ƒCƒ}‚ð”jŠü‚·‚é
+
+ if(sd->state.storage_flag)
+ storage_guild_storage_quit(sd,0);
else
- intif_save_petdata(sd->status.account_id,&sd->pet);
- }
-
- if(pc_isdead(sd))
- pc_setrestartvalue(sd,2);
- pc_makesavestatus(sd);
- //ƒNƒ[ƒ“ƒXƒLƒ‹‚ÅŠo‚¦‚½ƒXƒLƒ‹‚ÍÁ‚·
- 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;
+ storage_storage_quit(sd); // ‘qŒÉ‚ðŠJ‚¢‚Ä‚é‚È‚ç•Û‘¶‚·‚é
+
+ // check if we've been authenticated [celest]
+ if (sd->state.auth)
+ skill_castcancel(&sd->bl,0); // ‰r¥‚ð’†?‚·‚é
+
+ skill_stop_dancing(&sd->bl,1);// ƒ_ƒ“ƒX/‰‰‘t’†?
+
+ if(sd->sc_data && sd->sc_data[SC_BERSERK].timer!=-1) //ƒo?ƒT?ƒN’†‚ÌI—¹‚ÍHP‚ð100‚É
+ sd->status.hp = 100;
+
+ status_change_clear(&sd->bl,1); // ƒXƒe?ƒ^ƒXˆÙí‚ð‰ðœ‚·‚é
+ skill_clear_unitgroup(&sd->bl); // ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹?ƒv‚Ìíœ
+ skill_cleartimerskill(&sd->bl);
+
+ // check if we've been authenticated [celest]
+ if (sd->state.auth) {
+ pc_stop_walking(sd,0);
+ pc_stopattack(sd);
+ pc_delinvincibletimer(sd);
+ }
+ pc_delspiritball(sd,sd->spiritball,1);
+ skill_gangsterparadise(sd,0);
+ skill_unit_move(&sd->bl,gettick(),0);
+
+ if (sd->state.auth)
+ status_calc_pc(sd,4);
+ // skill_clear_unitgroup(&sd->bl); // [Sara-chan]
+
+ clif_clearchar_area(&sd->bl,2);
+
+ 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);
}
- }
- chrif_save(sd);
- storage_storage_save(sd);
- if( sd->npc_stackbuf && sd->npc_stackbuf != NULL)
- free( sd->npc_stackbuf );
+ if(pc_isdead(sd))
+ pc_setrestartvalue(sd,2);
- map_delblock(&sd->bl);
+ pc_clean_skilltree(sd);
+ pc_makesavestatus(sd);
+ chrif_save(sd);
+ storage_storage_dirty(sd);
+ storage_storage_save(sd);
+ map_delblock(&sd->bl);
+ }
+
+ if( sd->npc_stackbuf && sd->npc_stackbuf != NULL) {
+ aFree( sd->npc_stackbuf );
+ sd->npc_stackbuf = NULL;
+ }
-#ifndef TXT_ONLY
chrif_char_offline(sd);
-#endif
- numdb_erase(id_db,sd->bl.id);
+ {
+ void *p = numdb_search(charid_db,sd->status.char_id);
+ if(p) {
+ numdb_erase(charid_db,sd->status.char_id);
+ aFree(p);
+ }
+ }
strdb_erase(nick_db,sd->status.name);
numdb_erase(charid_db,sd->status.char_id);
+ numdb_erase(id_db,sd->bl.id);
+ aFree(sd->reg);
+ aFree(sd->regstr);
return 0;
}
/*==========================================
- * id”Ô†‚ÌPC‚ð’T‚·B‹‚È‚¯‚ê‚ÎNULL
+ * id”Ô?‚ÌPC‚ð’T‚·B‹‚È‚¯‚ê‚ÎNULL
*------------------------------------------
*/
struct map_session_data * map_id2sd(int id) {
@@ -1060,21 +1592,23 @@ struct map_session_data * map_id2sd(int id) {
return NULL;
*/
int i;
- struct map_session_data *sd=NULL;
+ struct map_session_data *sd;
+
+ if (id <= 0) return 0;
for(i = 0; i < fd_max; i++)
- if (session[i] && (sd = session[i]->session_data) && sd->bl.id == id)
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) && sd->bl.id == id)
return sd;
return NULL;
}
/*==========================================
- * char_id”Ô†‚Ì–¼‘O‚ð’T‚·
+ * char_id”Ô?‚Ì–¼‘O‚ð’T‚·
*------------------------------------------
*/
char * map_charid2nick(int id) {
- struct charid2nick *p=numdb_search(charid_db,id);
+ struct charid2nick *p = (struct charid2nick*)numdb_search(charid_db,id);
if(p==NULL)
return NULL;
@@ -1083,6 +1617,18 @@ char * map_charid2nick(int id) {
return p->nick;
}
+struct map_session_data * map_charid2sd(int id) {
+ int i;
+ struct map_session_data *sd;
+
+ if (id <= 0) return 0;
+
+ for(i = 0; i < fd_max; i++)
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) && sd->status.char_id == id)
+ return sd;
+
+ return NULL;
+}
/*==========================================
* Search session data from a nick name
@@ -1101,7 +1647,7 @@ struct map_session_data * map_nick2sd(char *nick) {
nicklen = strlen(nick);
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth)
+ if (session[i] && (pl_sd = (struct map_session_data*)session[i]->session_data) && pl_sd->state.auth)
// 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)
@@ -1121,27 +1667,27 @@ struct map_session_data * map_nick2sd(char *nick) {
}
/*==========================================
- * id”Ô†‚Ì•¨‚ð’T‚·
+ * id”Ô?‚Ì•¨‚ð’T‚·
* ˆêŽžobject‚Ìꇂ͔z—ñ‚ðˆø‚­‚Ì‚Ý
*------------------------------------------
*/
struct block_list * map_id2bl(int id)
{
struct block_list *bl=NULL;
- if(id<sizeof(object)/sizeof(object[0]))
- bl = object[id];
+ if(id >= 0 && id < sizeof(objects)/sizeof(objects[0]))
+ bl = objects[id];
else
- bl = numdb_search(id_db,id);
+ bl = (struct block_list*)numdb_search(id_db,id);
return bl;
}
/*==========================================
- * id_db“à‚Ì‘S‚Ä‚Éfunc‚ðŽÀs
+ * id_db?‚Ì‘S‚Ä‚Éfunc‚ð?s
*------------------------------------------
*/
int map_foreachiddb(int (*func)(void*,void*,va_list),...) {
- va_list ap=NULL;
+ va_list ap;
va_start(ap,func);
numdb_foreach(id_db,func,ap);
@@ -1179,48 +1725,60 @@ int map_addnpc(int m,struct npc_data *nd) {
}
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);
- numdb_erase(id_db,map[m].npc[i]->bl.id);
- if(map[m].npc[i]->bl.subtype==SCRIPT) {
-// free(map[m].npc[i]->u.scr.script);
-// free(map[m].npc[i]->u.scr.label_list);
- }
- free(map[m].npc[i]);
- map[m].npc[i] = NULL;
- n++;
- }
- }
- }
- printf("%d NPCs removed.\n",n);
+ 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);
+ numdb_erase(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++;
+ }
+ }
+ }
+
+ sprintf(tmp_output,"Successfully removed and freed from memory '"CL_WHITE"%d"CL_RESET"' NPCs.\n",n);
+ ShowStatus(tmp_output);
}
/*==========================================
- * map–¼‚©‚çmap”Ô†‚Ö•ÏŠ·
+ * map–¼‚©‚çmap”Ô?‚Ö?Š·
*------------------------------------------
*/
int map_mapname2mapid(char *name) {
struct map_data *md=NULL;
- md=strdb_search(map_db,name);
+ md = (struct map_data*)strdb_search(map_db,name);
+
+#ifdef USE_AFM
+ // If we can't find the .gat map try .afm instead [celest]
+ if(md==NULL && strstr(name,".gat")) {
+ char *afm_name = strdup(name);
+ strcpy(&afm_name[strlen(name) - 3], "afm");
+ md = (struct map_data*)strdb_search(map_db,afm_name);
+ }
+#endif
+
if(md==NULL || md->gat==NULL)
return -1;
return md->m;
}
/*==========================================
- * ‘¼ŽImap–¼‚©‚çip,port•ÏŠ·
+ * ‘¼ŽImap–¼‚©‚çip,port?Š·
*------------------------------------------
*/
int map_mapname2ipport(char *name,int *ip,int *port) {
struct map_data_other_server *mdos=NULL;
- mdos=strdb_search(map_db,name);
+ mdos = (struct map_data_other_server*)strdb_search(map_db,name);
if(mdos==NULL || mdos->gat)
return -1;
*ip=mdos->ip;
@@ -1311,20 +1869,74 @@ int map_calc_dir( struct block_list *src,int x,int y) {
* (m,x,y)‚Ìó‘Ԃ𒲂ׂé
*------------------------------------------
*/
-int map_getcell(int m,int x,int y) {
- if(x<0 || x>=map[m].xs-1 || y<0 || y>=map[m].ys-1)
- return 1;
- return map[m].gat[x+y*map[m].xs];
+
+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;
+ 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];
+ if (cellchk<0x10)
+ type &= CELL_MASK;
+
+ switch(cellchk)
+ {
+ case CELL_CHKPASS:
+ return (type!=1 && type!=5);
+ case CELL_CHKNOPASS:
+ return (type==1 || type==5);
+ case CELL_CHKWALL:
+ return (type==1);
+ case CELL_CHKWATER:
+ return (type==3);
+ case CELL_CHKGROUND:
+ return (type==5);
+ case CELL_GETTYPE:
+ return type;
+ case CELL_CHKNPC:
+ return (type&CELL_NPC);
+ case CELL_CHKBASILICA:
+ return (type&CELL_BASILICA);
+ default:
+ return 0;
+ }
}
/*==========================================
- * (m,x,y)‚Ìó‘Ô‚ðt‚É‚·‚é
+ * (m,x,y)‚Ìó‘Ô‚ðÝ’è‚·‚é
*------------------------------------------
*/
-int map_setcell(int m,int x,int y,int t) {
+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 t;
- return map[m].gat[x+y*map[m].xs]=t;
+ return;
+ j=x+y*map[m].xs;
+
+ switch (cell) {
+ case CELL_SETNPC:
+ map[m].gat[j] |= CELL_NPC;
+ break;
+ case CELL_SETBASILICA:
+ map[m].gat[j] |= CELL_BASILICA;
+ break;
+ case CELL_CLRBASILICA:
+ map[m].gat[j] &= ~CELL_BASILICA;
+ break;
+ default:
+ map[m].gat[j] = (map[m].gat[j]&~CELL_MASK) + cell;
+ break;
+ }
}
/*==========================================
@@ -1335,22 +1947,46 @@ int map_setipport(char *name,unsigned long ip,int port) {
struct map_data *md=NULL;
struct map_data_other_server *mdos=NULL;
- md=strdb_search(map_db,name);
+ md = (struct map_data*)strdb_search(map_db,name);
if(md==NULL){ // not exist -> add new data
mdos=(struct map_data_other_server *)aCalloc(1,sizeof(struct map_data_other_server));
memcpy(mdos->name,name,24);
mdos->gat = NULL;
mdos->ip = ip;
mdos->port = port;
+ mdos->map = NULL;
strdb_insert(map_db,mdos->name,mdos);
+ } else if(md->gat){
+ if(ip!=clif_getip() || port!=clif_getport()){
+ // “Ç‚Ýž‚ñ‚Å‚¢‚½‚¯‚ÇA’S“–ŠO‚É‚È‚Á‚½ƒ}ƒbƒv
+ mdos=(struct map_data_other_server *)aCalloc(1,sizeof(struct map_data_other_server));
+ memcpy(mdos->name,name,24);
+ mdos->gat = NULL;
+ mdos->ip = ip;
+ mdos->port = port;
+ mdos->map = md;
+ strdb_insert(map_db,mdos->name,mdos);
+ // printf("from char server : %s -> %08lx:%d\n",name,ip,port);
+ } else {
+ // “Ç‚Ýž‚ñ‚Å‚¢‚ÄA’S“–‚É‚È‚Á‚½ƒ}ƒbƒvi‰½‚à‚µ‚È‚¢j
+ ;
+ }
} else {
- if(md->gat){ // local -> check data
- if(ip!=clif_getip() || port!=clif_getport()){
- printf("from char server : %s -> %08lx:%d\n",name,ip,port);
- return 1;
+ mdos=(struct map_data_other_server *)md;
+ if(ip == clif_getip() && port == clif_getport()) {
+ // Ž©•ª‚Ì’S“–‚É‚È‚Á‚½ƒ}ƒbƒv
+ if(mdos->map == NULL) {
+ // “Ç‚Ýž‚ñ‚Å‚¢‚È‚¢‚Ì‚ÅI—¹‚·‚é
+ printf("map_setipport : %s is not loaded.\n",name);
+ exit(1);
+ } else {
+ // “Ç‚Ýž‚ñ‚Å‚¢‚é‚Ì‚Å’u‚«Š·‚¦‚é
+ md = mdos->map;
+ aFree(mdos);
+ strdb_insert(map_db,md->name,md);
}
- } else { // update
- mdos=(struct map_data_other_server *)md;
+ } else {
+ // ‘¼‚ÌŽI‚Ì’S“–ƒ}ƒbƒv‚È‚Ì‚Å’u‚«Š·‚¦‚邾‚¯
mdos->ip = ip;
mdos->port = port;
}
@@ -1358,12 +1994,62 @@ int map_setipport(char *name,unsigned long ip,int port) {
return 0;
}
+/*==========================================
+ * ‘¼ŽIŠÇ—‚̃}ƒbƒv‚ð‘S‚Äíœ
+ *------------------------------------------
+ */
+int map_eraseallipport_sub(void *key,void *data,va_list va) {
+ struct map_data_other_server *mdos = (struct map_data_other_server*)data;
+ if(mdos->gat == NULL && mdos->map == NULL) {
+ strdb_erase(map_db,key);
+ aFree(mdos);
+ }
+ return 0;
+}
+
+int map_eraseallipport(void) {
+ strdb_foreach(map_db,map_eraseallipport_sub);
+ return 1;
+}
+
+/*==========================================
+ * ‘¼ŽIŠÇ—‚̃}ƒbƒv‚ðdb‚©‚çíœ
+ *------------------------------------------
+ */
+int map_eraseipport(char *name,unsigned long ip,int port)
+{
+ struct map_data *md;
+ struct map_data_other_server *mdos;
+// unsigned char *p=(unsigned char *)&ip;
+
+ md=(struct map_data *) strdb_search(map_db,name);
+ if(md){
+ if(md->gat) // local -> check data
+ return 0;
+ else {
+ mdos=(struct map_data_other_server *)md;
+ if(mdos->ip==ip && mdos->port == port) {
+ if(mdos->map) {
+ // ‚±‚̃}ƒbƒvŽI‚Å‚à“Ç‚Ýž‚ñ‚Å‚¢‚é‚̂ňړ®‚Å‚«‚é
+ return 1; // ŒÄ‚Ño‚µŒ³‚Å chrif_sendmap() ‚ð‚·‚é
+ } else {
+ strdb_erase(map_db,name);
+ aFree(mdos);
+ }
+// if(battle_config.etc_log)
+// printf("erase map %s %d.%d.%d.%d:%d\n",name,p[0],p[1],p[2],p[3],port);
+ }
+ }
+ }
+ return 0;
+}
+
// ‰Šú‰»Žü‚è
/*==========================================
* …ê‚‚³Ý’è
*------------------------------------------
*/
-static struct {
+static struct waterlist_ {
char mapname[24];
int waterheight;
} *waterlist=NULL;
@@ -1391,7 +2077,7 @@ static void map_readwater(char *watertxt) {
return;
}
if(waterlist==NULL)
- waterlist=aCalloc(MAX_MAP_PER_SERVER,sizeof(*waterlist));
+ 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] == '/')
@@ -1408,8 +2094,244 @@ static void map_readwater(char *watertxt) {
}
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)
+{
+ atexit(map_cache_close);
+ 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.nmaps == MAX_MAP_CACHE &&
+ map_cache.head.filesize == ftell(map_cache.fp)
+ ) {
+ // ƒLƒƒƒbƒVƒ…“Ç‚Ýž‚ݬŒ÷
+ 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);
+ }
+ // “Ç‚Ýž‚Ý‚ÉŽ¸”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; m->gat = NULL; aFree(m->gat);
+ 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ƒ‹Œã”¼‚ªŒ‡‚¯‚Ä‚é‚Ì‚Å“Ç‚Ý’¼‚µ
+ printf("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ƒŠ‚ª–³‚¯‚ê‚Α‚«ž‚ß‚éꊂð’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;
+ }
+ }
+ // ‘‚«ž‚ß‚È‚©‚Á‚½
+ return 1;
+}
+#ifdef USE_AFM
static int map_readafm(int m,char *fn) {
/*
@@ -1474,7 +2396,7 @@ static int map_readafm(int m,char *fn) {
size_t size;
char afm_line[65535];
- int afm_size[1];
+ int afm_size[2];
FILE *afm_file;
char *str;
@@ -1492,7 +2414,8 @@ static int map_readafm(int m,char *fn) {
map[m].m = m;
xs = map[m].xs = afm_size[0];
ys = map[m].ys = afm_size[1];
- map[m].gat = calloc(s = map[m].xs * map[m].ys, 1);
+ // check this, unsigned where it might not need to be
+ map[m].gat = (unsigned char*)aCallocA(s = map[m].xs * map[m].ys, 1);
if(map[m].gat==NULL){
printf("out of memory : map_readmap gat\n");
@@ -1515,14 +2438,14 @@ static int map_readafm(int m,char *fn) {
map[m].bxs=(xs+BLOCK_SIZE-1)/BLOCK_SIZE;
map[m].bys=(ys+BLOCK_SIZE-1)/BLOCK_SIZE;
size = map[m].bxs * map[m].bys * sizeof(struct block_list*);
- map[m].block = calloc(size, 1);
+ map[m].block = (struct block_list**)aCalloc(size, 1);
if(map[m].block == NULL){
printf("out of memory : map_readmap block\n");
exit(1);
}
- map[m].block_mob = calloc(size, 1);
+ map[m].block_mob = (struct block_list**)aCalloc(size, 1);
if (map[m].block_mob == NULL) {
printf("out of memory : map_readmap block_mob\n");
exit(1);
@@ -1530,14 +2453,14 @@ static int map_readafm(int m,char *fn) {
size = map[m].bxs*map[m].bys*sizeof(int);
- map[m].block_count = calloc(size, 1);
+ map[m].block_count = (int*)aCallocA(size, 1);
if(map[m].block_count==NULL){
printf("out of memory : map_readmap block\n");
exit(1);
}
memset(map[m].block_count,0,size);
- map[m].block_mob_count=calloc(size, 1);
+ map[m].block_mob_count = (int*)aCallocA(size, 1);
if(map[m].block_mob_count==NULL){
printf("out of memory : map_readmap block_mob\n");
exit(1);
@@ -1552,58 +2475,100 @@ static int map_readafm(int m,char *fn) {
return 0;
}
+#endif
/*==========================================
* ƒ}ƒbƒv1–‡“Ç‚Ýž‚Ý
- *------------------------------------------
- */
-static int map_readmap(int m,char *fn, char *alias) {
- unsigned char *gat="";
- int s;
- int x,y,xs,ys;
- struct gat_1cell {float high[4]; int type;} *p=NULL;
- int wh;
+ * ===================================================*/
+static int map_readmap(int m,char *fn, char *alias, int *map_cache, int maxmap) {
+ char *gat="";
size_t size;
- // read & convert fn
- gat=grfio_read(fn);
- if(gat==NULL)
- return -1;
+ int i = 0;
+ int e = 0;
+ char progress[21] = " ";
+
+ //printf("\rLoading Maps [%d/%d]: %-50s ",m,map_num,fn);
+ if (maxmap) { //avoid map-server crashing if there are 0 maps
+ char c = '-';
+ static int lasti = -1;
+ static int last_time = -1;
+ i=m*20/maxmap;
+ if ((i != lasti) || (last_time != time(0))) {
+ lasti = i;
+ printf("\r");
+ ShowStatus("Progress: ");
+ printf("[");
+ for (e=0;e<i;e++) progress[e] = '#';
+ printf(progress);
+ printf("] Working: [");
+ last_time = time(0);
+ switch(last_time % 4) {
+ case 0: c='\\'; break;
+ case 1: c='|'; break;
+ case 2: c='/'; break;
+ case 3: c='-'; break;
+ }
+ printf("%c]",c);
+ fflush(stdout);
+ }
+ }
-// printf("\rLoading Maps [%d/%d]: %-50s ",m,map_num,fn);
-// fflush(stdout);
+ if(map_cache_read(&map[m])) {
+ // ƒLƒƒƒbƒVƒ…‚©‚ç“Ç‚Ýž‚ß‚½
+ (*map_cache)++;
+ } else {
+ int s;
+ int wh;
+ int x,y,xs,ys;
+ struct gat_1cell {float high[4]; int type;} *p=NULL;
+ // read & convert fn
+ // again, might not need to be unsigned char
+ gat = (char*)grfio_read(fn);
+ if(gat==NULL) {
+ return -1;
+ // ‚³‚·‚ª‚Ƀ}ƒbƒv‚ª“Ç‚ß‚È‚¢‚Ì‚Í‚Ü‚¸‚¢‚Ì‚ÅI—¹‚·‚é
+ //printf("Can't load map %s\n",fn);
+ //exit(1);
+ }
- map[m].m=m;
- xs=map[m].xs=*(int*)(gat+6);
- ys=map[m].ys=*(int*)(gat+10);
- map[m].gat = (unsigned char *)aCalloc(s = map[m].xs * map[m].ys,sizeof(unsigned char));
- map[m].npc_num=0;
- map[m].users=0;
- memset(&map[m].flag,0,sizeof(map[m].flag));
- if(battle_config.pk_mode) map[m].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris]
- wh=map_waterheight(map[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){
- // …ê”»’è
- map[m].gat[x+y*xs]=(p->high[0]>wh || p->high[1]>wh || p->high[2]>wh || p->high[3]>wh) ? 3 : 0;
- } else {
- map[m].gat[x+y*xs]=p->type;
+ xs=map[m].xs=*(int*)(gat+6);
+ ys=map[m].ys=*(int*)(gat+10);
+ map[m].gat = (unsigned char *)aCallocA(s = map[m].xs * map[m].ys,sizeof(unsigned char));
+ wh=map_waterheight(map[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){
+ // …ê”»’è
+ map[m].gat[x+y*xs]=(p->high[0]>wh || p->high[1]>wh || p->high[2]>wh || p->high[3]>wh) ? 3 : 0;
+ } else {
+ map[m].gat[x+y*xs]=p->type;
+ }
+ p++;
}
- p++;
}
+ map_cache_write(&map[m]);
+ aFree(gat);
}
- free(gat);
- map[m].bxs=(xs+BLOCK_SIZE-1)/BLOCK_SIZE;
- map[m].bys=(ys+BLOCK_SIZE-1)/BLOCK_SIZE;
+ map[m].m=m;
+ map[m].npc_num=0;
+ map[m].users=0;
+ memset(&map[m].flag,0,sizeof(map[m].flag));
+ if(battle_config.pk_mode)
+ map[m].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris]
+ map[m].bxs=(map[m].xs+BLOCK_SIZE-1)/BLOCK_SIZE;
+ map[m].bys=(map[m].ys+BLOCK_SIZE-1)/BLOCK_SIZE;
size = map[m].bxs * map[m].bys * sizeof(struct block_list*);
map[m].block = (struct block_list **)aCalloc(1,size);
map[m].block_mob = (struct block_list **)aCalloc(1,size);
size = map[m].bxs*map[m].bys*sizeof(int);
- map[m].block_count = (int *)aCalloc(1,size);
- map[m].block_mob_count=(int *)aCalloc(1,size);
+ map[m].block_count = (int *)aCallocA(1,size);
+ map[m].block_mob_count=(int *)aCallocA(1,size);
+ if (alias)
+ strdb_insert(map_db,alias,&map[m]);
+ else
strdb_insert(map_db,map[m].name,&map[m]);
// printf("%s read done\n",fn);
@@ -1612,57 +2577,90 @@ static int map_readmap(int m,char *fn, char *alias) {
}
/*==========================================
- * ‘S‚Ä‚Ìmapƒf[ƒ^‚ð“Ç‚Ýž‚Þ
+ * ‘S‚Ä‚Ìmapƒf?ƒ^‚ð?‚Ý?‚Þ
*------------------------------------------
*/
int map_readallmap(void) {
int i,maps_removed=0;
char fn[256];
+#ifdef USE_AFM
FILE *afm_file;
+#endif
+ int map_cache = 0;
+
+ // ƒ}ƒbƒvƒLƒƒƒbƒVƒ…‚ðŠJ‚­
+ if(map_read_flag >= READ_FROM_BITMAP) {
+ map_cache_open(map_cache_file);
+ }
+
+ sprintf(tmp_output, "Loading Maps%s...\n",
+ (map_read_flag == CREATE_BITMAP_COMPRESSED ? " (Generating Map Cache w/ Compression)" :
+ map_read_flag == CREATE_BITMAP ? " (Generating Map Cache)" :
+ map_read_flag >= READ_FROM_BITMAP ? " (w/ Map Cache)" :
+ map_read_flag == READ_FROM_AFM ? " (w/ AFM)" : ""));
+ ShowStatus(tmp_output);
// æ‚É‘S•”‚̃ƒbƒv‚Ì‘¶Ý‚ðŠm”F
for(i=0;i<map_num;i++){
- char afm_name[256] = "";
- strncpy(afm_name, map[i].name, strlen(map[i].name) - 4);
- strcat(afm_name, ".afm");
+#ifdef USE_AFM
+ char afm_name[256] = "";
+ char *p;
+ if(!strstr(map[i].name,".afm")) {
+ // check if it's necessary to replace the extension - speeds up loading abit
+ strncpy(afm_name, map[i].name, strlen(map[i].name) - 4);
+ strcat(afm_name, ".afm");
+ }
+ map[i].alias = NULL;
sprintf(fn,"%s\\%s",afm_dir,afm_name);
+ for(p=&fn[0];*p!=0;p++) if (*p=='\\') *p = '/'; // * At the time of Unix
+
afm_file = fopen(fn, "r");
if (afm_file != NULL) {
map_readafm(i,fn);
fclose(afm_file);
}
else if(strstr(map[i].name,".gat")!=NULL) {
- char *p = strstr(map[i].name, ">"); // [MouseJstr]
+#else
+ if(strstr(map[i].name,".gat")!=NULL) {
+#endif
+ char *p = strstr(map[i].name, "<"); // [MouseJstr]
if (p != NULL) {
- char alias[64];
- *p = '\0';
- strcpy(alias, map[i].name);
- strcpy(map[i].name, p + 1);
- sprintf(fn,"data\\%s",map[i].name);
- if(map_readmap(i,fn, alias) == -1) {
- map_delmap(map[i].name);
- maps_removed++;
- }
- } else {
- sprintf(fn,"data\\%s",map[i].name);
- if(map_readmap(i,fn, NULL) == -1) {
- map_delmap(map[i].name);
- maps_removed++;
- }
+ char buf[64];
+ *p++ = '\0';
+ sprintf(buf,"data\\%s", p);
+ map[i].alias = aStrdup(buf);
+ } else
+ map[i].alias = NULL;
+
+ sprintf(fn,"data\\%s",map[i].name);
+ if(map_readmap(i,fn, p, &map_cache, map_num) == -1) {
+ map_delmap(map[i].name);
+ maps_removed++;
+ i--;
}
}
}
- free(waterlist);
- printf("\rMaps Loaded: %d %60s\n",map_num,"");
- printf("\rMaps Removed: %d \n",maps_removed);
+ aFree(waterlist);
+ printf("\r");
+ snprintf(tmp_output,sizeof(tmp_output),"Successfully loaded '"CL_WHITE"%d"CL_RESET"' maps.%30s\n",map_num,"");
+ ShowInfo(tmp_output);
+
+ map_cache_close();
+ if(map_read_flag == CREATE_BITMAP || map_read_flag == CREATE_BITMAP_COMPRESSED) {
+ --map_read_flag;
+ }
+ if (maps_removed) {
+ snprintf(tmp_output,sizeof(tmp_output),"Maps Removed: '"CL_WHITE"%d"CL_RESET"'\n",maps_removed);
+ ShowNotice(tmp_output);
+ }
return 0;
}
/*==========================================
- * “Ç‚Ýž‚Þmap‚ð’ljÁ‚·‚é
+ * ?‚Ý?‚Þmap‚ð’ljÁ‚·‚é
*------------------------------------------
*/
int map_addmap(char *mapname) {
@@ -1672,7 +2670,9 @@ int map_addmap(char *mapname) {
}
if (map_num >= MAX_MAP_PER_SERVER - 1) {
- printf("too many map\n");
+ snprintf(tmp_output,sizeof(tmp_output),"Could not add map '"
+ CL_WHITE"%s"CL_RESET"', the limit of maps has been reached.\n",mapname);
+ ShowError(tmp_output);
return 1;
}
memcpy(map[map_num].name, mapname, 24);
@@ -1681,7 +2681,7 @@ int map_addmap(char *mapname) {
}
/*==========================================
- * “Ç‚Ýž‚Þmap‚ð휂·‚é
+ * ?‚Ý?‚Þmap‚ð휂·‚é
*------------------------------------------
*/
int map_delmap(char *mapname) {
@@ -1705,6 +2705,7 @@ int map_delmap(char *mapname) {
static int map_ip_set_ = 0;
static int char_ip_set_ = 0;
+//static int bind_ip_set_ = 0;
/*==========================================
* Console Command Parser [Wizputer]
@@ -1716,15 +2717,15 @@ int parse_console(char *buf) {
int m, n;
struct map_session_data *sd;
- sd = calloc(sizeof(*sd), 1);
+ sd = (struct map_session_data*)aCalloc(sizeof(*sd), 1);
sd->fd = 0;
strcpy( sd->status.name , "console");
- type = (char *)malloc(64);
- command = (char *)malloc(64);
- map = (char *)malloc(64);
- buf2 = (char *)malloc(72);
+ type = (char *)aMallocA(64);
+ command = (char *)aMallocA(64);
+ map = (char *)aMallocA(64);
+ buf2 = (char *)aMallocA(72);
memset(type,0,64);
memset(command,0,64);
@@ -1781,18 +2782,18 @@ int parse_console(char *buf) {
}
end:
- free(buf);
- free(type);
- free(command);
- free(map);
- free(buf2);
- free(sd);
+ aFree(buf);
+ aFree(type);
+ aFree(command);
+ aFree(map);
+ aFree(buf2);
+ aFree(sd);
return 0;
}
/*==========================================
- * Ý’èƒtƒ@ƒCƒ‹‚ð“Ç‚Ýž‚Þ
+ * Ý’èƒtƒ@ƒCƒ‹‚ð?‚Ý?‚Þ
*------------------------------------------
*/
int map_config_read(char *cfgName) {
@@ -1817,7 +2818,7 @@ int map_config_read(char *cfgName) {
char_ip_set_ = 1;
h = gethostbyname (w2);
if(h != NULL) {
- snprintf(tmp_output,sizeof(tmp_output),"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]);
+ snprintf(tmp_output,sizeof(tmp_output),"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]);
ShowInfo(tmp_output);
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]);
}
@@ -1828,10 +2829,20 @@ int map_config_read(char *cfgName) {
map_ip_set_ = 1;
h = gethostbyname (w2);
if (h != NULL) {
- printf("Map 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]);
+ snprintf(tmp_output,sizeof(tmp_output),"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]);
+ ShowInfo(tmp_output);
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) {
+ snprintf(tmp_output,sizeof(tmp_output),"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]);
+ ShowInfo(tmp_output);
+ 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));
@@ -1861,11 +2872,22 @@ int map_config_read(char *cfgName) {
strcpy(help_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, "import") == 0) {
map_config_read(w2);
} else if (strcmpi(w1, "console") == 0) {
- if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 ) {
console = 1;
+ ShowNotice("Console Commands is enabled.\n");
+ }
} else if(strcmpi(w1,"imalive_on")==0){ //Added by Mugendai for I'm Alive mod
imalive_on = atoi(w2); //Added by Mugendai for I'm Alive mod
} else if(strcmpi(w1,"imalive_time")==0){ //Added by Mugendai for I'm Alive mod
@@ -1883,82 +2905,7 @@ int map_config_read(char *cfgName) {
return 0;
}
-#ifndef TXT_ONLY
-/*=======================================
- * MySQL Init
- *---------------------------------------
- */
-
-int map_sql_init(void){
-
- mysql_init(&mmysql_handle);
-
- //DB connection start
- printf("Connect 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
- printf("%s\n",mysql_error(&mmysql_handle));
- exit(1);
- }
- else {
- printf ("connect success! (Map Server Connection)\n");
- }
-
- mysql_init(&lmysql_handle);
-
- //DB connection start
- printf("Connect 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
- printf("%s\n",mysql_error(&lmysql_handle));
- exit(1);
- }
- else {
- printf ("connect success! (Login Server Connection)\n");
- }
-
- if(battle_config.mail_system) { // mail system [Valaris]
- mysql_init(&mail_handle);
- if(!mysql_real_connect(&mail_handle, map_server_ip, map_server_id, map_server_pw,
- map_server_db ,map_server_port, (char *)NULL, 0)) {
- printf("%s\n",mysql_error(&mail_handle));
- exit(1);
- }
- }
-
- return 0;
-}
-
-int map_sql_close(void){
- mysql_close(&mmysql_handle);
- printf("Close Map DB Connection....\n");
-
- mysql_close(&lmysql_handle);
- printf("Close Login DB Connection....\n");
- return 0;
-}
-
-int log_sql_init(void){
-
- mysql_init(&mmysql_handle);
-
- //DB connection start
- printf("\033[1;29m[SQL]\033[0;0m: Connecting to Log Database \033[1;29m%s\033[0;0m At \033[1;29m%s\033[0;0m...\n",log_db,log_db_ip);
- if(!mysql_real_connect(&mmysql_handle, log_db_ip, log_db_id, log_db_pw,
- log_db ,log_db_port, (char *)NULL, 0)) {
- //pointer check
- printf("\033[1;29m[SQL Error]\033[0;0m: %s\n",mysql_error(&mmysql_handle));
- exit(1);
- } else {
- printf("\033[1;29m[SQL]\033[0;0m: Successfully \033[1;32mconnected\033[0;0m to Database \033[1;29m%s\033[0;0m.\n", log_db);
- }
-
- return 0;
-}
-
-int sql_config_read(char *cfgName)
+int inter_config_read(char *cfgName)
{
int i;
char line[1024],w1[1024],w2[1024];
@@ -1966,7 +2913,8 @@ int sql_config_read(char *cfgName)
fp=fopen(cfgName,"r");
if(fp==NULL){
- printf("file not found: %s\n",cfgName);
+ snprintf(tmp_output,sizeof(tmp_output),"File not found: '%s'.\n",cfgName);
+ ShowError(tmp_output);
return 1;
}
while(fgets(line,1020,fp)){
@@ -1975,7 +2923,11 @@ int sql_config_read(char *cfgName)
i=sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
if(i!=2)
continue;
- if(strcmpi(w1,"item_db_db")==0){
+ //support the import command, just like any other config
+ if(strcmpi(w1,"import")==0){
+ inter_config_read(w2);
+ #ifndef TXT_ONLY
+ } 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);
@@ -1996,45 +2948,32 @@ int sql_config_read(char *cfgName)
//Map Server SQL DB
} else if(strcmpi(w1,"map_server_ip")==0){
strcpy(map_server_ip, w2);
- printf ("set map_server_ip : %s\n",w2);
} else if(strcmpi(w1,"map_server_port")==0){
map_server_port=atoi(w2);
- printf ("set map_server_port : %s\n",w2);
} else if(strcmpi(w1,"map_server_id")==0){
strcpy(map_server_id, w2);
- printf ("set map_server_id : %s\n",w2);
} else if(strcmpi(w1,"map_server_pw")==0){
strcpy(map_server_pw, w2);
- printf ("set map_server_pw : %s\n",w2);
} else if(strcmpi(w1,"map_server_db")==0){
strcpy(map_server_db, w2);
- printf ("set map_server_db : %s\n",w2);
- //Map server option to use SQL db or not
} else if(strcmpi(w1,"use_sql_db")==0){
- if (strcmpi(w2,"yes")){db_use_sqldbs=0;} else if (strcmpi(w2,"no")){db_use_sqldbs=1;}
+ db_use_sqldbs = battle_config_switch(w2);
printf ("Using SQL dbs: %s\n",w2);
//Login Server SQL DB
} else if(strcmpi(w1,"login_server_ip")==0){
strcpy(login_server_ip, w2);
- printf ("set login_server_ip : %s\n",w2);
} else if(strcmpi(w1,"login_server_port")==0){
login_server_port = atoi(w2);
- printf ("set login_server_port : %s\n",w2);
} else if(strcmpi(w1,"login_server_id")==0){
strcpy(login_server_id, w2);
- printf ("set login_server_id : %s\n",w2);
} else if(strcmpi(w1,"login_server_pw")==0){
strcpy(login_server_pw, w2);
- printf ("set login_server_pw : %s\n",w2);
} else if(strcmpi(w1,"login_server_db")==0){
strcpy(login_server_db, w2);
- printf ("set login_server_db : %s\n",w2);
} else if(strcmpi(w1,"lowest_gm_level")==0){
lowest_gm_level = atoi(w2);
- printf ("set lowest_gm_level : %s\n",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
- printf ("set read_gm_interval : %s\n",w2);
} else if(strcmpi(w1,"log_db")==0) {
strcpy(log_db, w2);
} else if(strcmpi(w1,"log_db_ip")==0) {
@@ -2047,9 +2986,7 @@ int sql_config_read(char *cfgName)
strcpy(log_db_pw, w2);
} else if(strcmpi(w1,"log_db_port")==0) {
log_db_port = atoi(w2);
- //support the import command, just like any other config
- } else if(strcmpi(w1,"import")==0){
- sql_config_read(w2);
+ #endif
}
}
fclose(fp);
@@ -2057,63 +2994,100 @@ int sql_config_read(char *cfgName)
return 0;
}
-// sql online status checking [Valaris]
-void char_offline(struct map_session_data *sd)
-{
- if(sd && sd->status.char_id) {
- sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `char_id`='%d'", char_db, sd->status.char_id);
- if(mysql_query(&mmysql_handle, tmp_sql) ) {
- printf("DB server Error (update online `%s`)- %s\n", char_db, mysql_error(&mmysql_handle) );
- }
+#ifndef TXT_ONLY
+/*=======================================
+ * MySQL Init
+ *---------------------------------------
+ */
+
+int map_sql_init(void){
+
+ mysql_init(&mmysql_handle);
+
+ //DB connection start
+ printf("Connect 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
+ printf("%s\n",mysql_error(&mmysql_handle));
+ exit(1);
+ }
+ else {
+ printf ("connect success! (Map Server Connection)\n");
}
-}
-void do_reset_online(void)
-{
- sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `online`='1'", char_db);
- if(mysql_query(&mmysql_handle, tmp_sql) ) {
- printf("DB server Error (reset_online `%s`)- %s\n", char_db, mysql_error(&mmysql_handle) );
+ mysql_init(&lmysql_handle);
+
+ //DB connection start
+ printf("Connect 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
+ printf("%s\n",mysql_error(&lmysql_handle));
+ exit(1);
+ }
+ else {
+ printf ("connect success! (Login Server Connection)\n");
+ }
+
+ if(battle_config.mail_system) { // mail system [Valaris]
+ mysql_init(&mail_handle);
+ if(!mysql_real_connect(&mail_handle, map_server_ip, map_server_id, map_server_pw,
+ map_server_db ,map_server_port, (char *)NULL, 0)) {
+ printf("%s\n",mysql_error(&mail_handle));
+ exit(1);
+ }
}
+
+ return 0;
}
-int online_timer(int tid,unsigned int tick,int id,int data)
-{
- if(check_online_timer != tid)
- return 0;
+int map_sql_close(void){
+ mysql_close(&mmysql_handle);
+ printf("Close Map DB Connection....\n");
- char_online_check();
+ mysql_close(&lmysql_handle);
+ printf("Close Login DB Connection....\n");
+ return 0;
+}
+
+int log_sql_init(void){
+
+ mysql_init(&mmysql_handle);
- check_online_timer=add_timer(gettick()+CHECK_INTERVAL,online_timer,0,0);
+ //DB connection start
+ printf(""CL_WHITE"[SQL]"CL_RESET": Connecting to Log Database "CL_WHITE"%s"CL_RESET" At "CL_WHITE"%s"CL_RESET"...\n",log_db,log_db_ip);
+ if(!mysql_real_connect(&mmysql_handle, log_db_ip, log_db_id, log_db_pw,
+ log_db ,log_db_port, (char *)NULL, 0)) {
+ //pointer check
+ printf(""CL_WHITE"[SQL Error]"CL_RESET": %s\n",mysql_error(&mmysql_handle));
+ exit(1);
+ } else {
+ printf(""CL_WHITE"[SQL]"CL_RESET": Successfully '"CL_GREEN"connected"CL_RESET"' to Database '"CL_WHITE"%s"CL_RESET"'.\n", log_db);
+ }
return 0;
}
+int online_timer (int tid,unsigned int tick,int id,int data)
+{
+ char_online_check();
+ return 0;
+}
void char_online_check(void)
{
int i;
- struct map_session_data *sd=NULL;
-
- do_reset_online();
+ struct map_session_data *sd;
- for(i=0;i<fd_max;i++){
- if (session[i] && (sd = session[i]->session_data) && sd && sd->state.auth &&
- !(battle_config.hide_GM_session && pc_isGM(sd)))
- if(sd->status.char_id) {
- sprintf(tmp_sql,"UPDATE `%s` SET `online`='1' WHERE `char_id`='%d'", char_db, sd->status.char_id);
- if(mysql_query(&mmysql_handle, tmp_sql) ) {
- printf("DB server Error (update online `%s`)- %s\n", char_db, mysql_error(&mmysql_handle) );
- }
- }
- }
+ chrif_char_reset_offline();
-
- if(check_online_timer && check_online_timer != -1) {
- delete_timer(check_online_timer,online_timer);
- add_timer(gettick()+CHECK_INTERVAL,online_timer,0,0);
+ 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)))
+ if(sd->status.char_id)
+ chrif_char_online(sd);
}
-
}
-
#endif /* not TXT_ONLY */
//-----------------------------------------------------
@@ -2135,23 +3109,32 @@ int flush_timer(int tid, unsigned int tick, int id, int data){
return 0;
}
-int id_db_final(void *k,void *d,va_list ap){ return 0; }
-int map_db_final(void *k,void *d,va_list ap){ return 0; }
-int nick_db_final(void *k,void *d,va_list ap){ return 0; }
-int charid_db_final(void *k,void *d,va_list ap){ return 0; }
-
-static int cleanup_sub(struct block_list *bl, va_list ap) {
+int id_db_final(void *k,void *d,va_list ap) { return 0; }
+int map_db_final(void *k,void *d,va_list ap) { return 0; }
+int nick_db_final(void *k,void *d,va_list ap)
+{
+ char *p = (char *) d;
+ if (p) aFree(p);
+ return 0;
+}
+int charid_db_final(void *k,void *d,va_list ap)
+{
+ struct charid2nick *p = (struct charid2nick *) 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_delblock(bl); // There is something better...
+ map_quit((struct map_session_data *) bl);
break;
case BL_NPC:
- npc_delete((struct npc_data *)bl);
+ npc_unload((struct npc_data *)bl);
break;
case BL_MOB:
- mob_delete((struct mob_data *)bl);
+ mob_unload((struct mob_data *)bl);
break;
case BL_PET:
pet_remove_map((struct map_session_data *)bl);
@@ -2168,47 +3151,100 @@ static int cleanup_sub(struct block_list *bl, va_list ap) {
}
/*==========================================
- * mapŽII—¹Žžˆ—
+ * mapŽII—¹Žž?—
*------------------------------------------
*/
void do_final(void) {
- int map_id, i;
+ int i;
+ ShowStatus("Terminating...\n");
- for (map_id = 0; map_id < map_num;map_id++) {
- if(map[map_id].m)
- map_foreachinarea(cleanup_sub, map_id, 0, 0, map[map_id].xs, map[map_id].ys, 0, 0);
- }
+ for (i = 0; i < map_num; i++)
+ if(map[i].m)
+ map_foreachinarea(cleanup_sub, i, 0, 0, map[i].xs, map[i].ys, 0, 0);
- for (i = 0; i < fd_max; i++)
- delete_session(i);
+#ifndef TXT_ONLY
+ chrif_char_reset_offline();
+#endif
- map_removenpc();
- timer_final();
+ chrif_flush_fifo();
+
+//#if 0 // why is this here? >_>
+ 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_msg();
+
+ for (i=0; i<map_num; i++) {
+ if(map[i].gat) aFree(map[i].gat);
+ 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);
+ }
+// do_final_timer(); (we used timer_final() instead)
+ timer_final();
numdb_final(id_db, id_db_final);
- strdb_final(map_db, map_db_final);
+ strdb_final(map_db, map_db_final);
strdb_final(nick_db, nick_db_final);
numdb_final(charid_db, charid_db_final);
+ exit_dbn();
+
+//#endif
- for(i=0;i<=map_num;i++){
- if(map[i].gat) free(map[i].gat);
- if(map[i].block) free(map[i].block);
- if(map[i].block_mob) free(map[i].block_mob);
- if(map[i].block_count) free(map[i].block_count);
- if(map[i].block_mob_count) free(map[i].block_mob_count);
- }
- do_final_script();
- do_final_itemdb();
- do_final_storage();
- do_final_guild();
#ifndef TXT_ONLY
- do_reset_online();
map_sql_close();
#endif /* not TXT_ONLY */
+ ShowStatus("Successfully terminated.\n");
}
-void map_helpscreen() {
- exit(1);
+/*======================================================
+ * 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);
}
/*======================================================
@@ -2220,42 +3256,52 @@ int do_init(int argc, char *argv[]) {
FILE *data_conf;
char line[1024], w1[1024], w2[1024];
-#ifndef TXT_ONLY
- unsigned char *SQL_CONF_NAME="conf/inter_athena.conf";
- unsigned char *LOG_CONF_NAME="conf/log_athena.conf";
+ SERVER_TYPE = SERVER_MAP;
+#ifdef GCOLLECT
+ GC_enable_incremental();
#endif
- unsigned char *MAP_CONF_NAME = "conf/map_athena.conf";
- unsigned char *BATTLE_CONF_FILENAME = "conf/battle_athena.conf";
- unsigned char *ATCOMMAND_CONF_FILENAME = "conf/atcommand_athena.conf";
- unsigned char *CHARCOMMAND_CONF_FILENAME = "conf/charcommand_athena.conf";
- unsigned char *SCRIPT_CONF_NAME = "conf/script_athena.conf";
- unsigned char *MSG_CONF_NAME = "conf/msg_athena.conf";
- unsigned char *GRF_PATH_FILENAME = "conf/grf-files.txt";
+
+ 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();
- else if (strcmp(argv[i], "--map_config") == 0)
+ map_helpscreen(1);
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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],"--sql_config") == 0)
- SQL_CONF_NAME = argv[i+1];
+ else if (strcmp(argv[i],"--inter_config") == 0 || strcmp(argv[i],"--inter-config") == 0)
+ INTER_CONF_NAME = argv[i+1];
#endif /* not TXT_ONLY */
+ 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);
@@ -2285,16 +3331,14 @@ int do_init(int argc, char *argv[]) {
if (ptr[0] == 192 && ptr[1] == 168)
printf("\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);
-#ifndef TXT_ONLY
- sql_config_read(SQL_CONF_NAME);
+ inter_config_read(INTER_CONF_NAME);
log_config_read(LOG_CONF_NAME);
-#endif /* not TXT_ONLY */
atexit(do_final);
@@ -2323,45 +3367,48 @@ int do_init(int argc, char *argv[]) {
map_readallmap();
+ add_timer_func_list(map_freeblock_timer,"map_freeblock_timer");
add_timer_func_list(map_clearflooritem_timer, "map_clearflooritem_timer");
+ add_timer_interval(gettick()+1000,map_freeblock_timer,0,0,60*1000);
//Added by Mugendai for GUI support
if (flush_on)
- {
add_timer_interval(gettick()+10, flush_timer,0,0,flush_time);
- }
+ //Added for Mugendais I'm Alive mod
+ if (imalive_on)
+ add_timer_interval(gettick()+10, imalive_timer,0,0,imalive_time*1000);
#ifndef TXT_ONLY // online status timer, checks every hour [Valaris]
add_timer_func_list(online_timer, "online_timer");
- check_online_timer=add_timer(gettick()+CHECK_INTERVAL,online_timer,0,0);
+ add_timer_interval(gettick()+10, online_timer, 0, 0, CHECK_INTERVAL);
#endif /* not TXT_ONLY */
do_init_chrif();
do_init_clif();
do_init_itemdb();
- do_init_mob(); // npc‚̉Šú‰»Žž“à‚Åmob_spawn‚µ‚ÄAmob_db‚ðŽQÆ‚·‚é‚Ì‚Åinit_npc‚æ‚èæ
+ do_init_mob(); // npc‚̉Šú‰»Žž?‚Åmob_spawn‚µ‚ÄAmob_db‚ð?Æ‚·‚é‚Ì‚Åinit_npc‚æ‚èæ
do_init_script();
- do_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(battle_config.mail_system)
do_init_mail();
- if (log_config.branch || log_config.drop || log_config.mvpdrop ||
- log_config.present || log_config.produce || log_config.refine ||
- log_config.trade)
+ if (log_config.sql_logs && (log_config.branch || log_config.drop || log_config.mvpdrop ||
+ log_config.present || log_config.produce || log_config.refine || log_config.trade))
{
log_sql_init();
}
#endif /* not TXT_ONLY */
- npc_event_do_oninit(); // npc‚ÌOnInitƒCƒxƒ“ƒgŽÀs
+ npc_event_do_oninit(); // npc‚ÌOnInitƒCƒxƒ“ƒg?s
if ( console ) {
set_defaultconsoleparse(parse_console);
@@ -2369,15 +3416,22 @@ int do_init(int argc, char *argv[]) {
}
if (battle_config.pk_mode == 1)
- printf("The server is running in \033[1;31mPK Mode\033[0m.\n");
-
- //Added for Mugendais I'm Alive mod
- if (imalive_on)
- add_timer_interval(gettick()+10, imalive_timer,0,0,imalive_time*1000);
-
- printf("The map-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n", map_port);
- ticks = gettick();
+ ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
+ sprintf(tmp_output,"Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port);
+ ShowStatus(tmp_output);
return 0;
}
+
+int compare_item(struct item *a, struct item *b) {
+ return (
+ (a->nameid == b->nameid) &&
+ (a->identify == b->identify) &&
+ (a->refine == b->refine) &&
+ (a->attribute == b->attribute) &&
+ (a->card[0] == b->card[0]) &&
+ (a->card[1] == b->card[1]) &&
+ (a->card[2] == b->card[2]) &&
+ (a->card[3] == b->card[3]));
+}
diff --git a/src/map/map.h b/src/map/map.h
index bf443bf46..01d9fef0e 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -10,7 +10,7 @@
#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 BLOCK_SIZE 8 // Never zero
#define AREA_SIZE battle_config.area_size
#define LOCAL_REG_NUM 16
#define LIFETIME_FLOORITEM 60
@@ -20,7 +20,7 @@
#define MAX_STATUSCHANGE 210
#define MAX_SKILLUNITGROUP 32
#define MAX_MOBSKILLUNITGROUP 8
-#define MAX_SKILLUNITGROUPTICKSET 128
+#define MAX_SKILLUNITGROUPTICKSET 32
#define MAX_SKILLTIMERSKILL 32
#define MAX_MOBSKILLTIMERSKILL 10
#define MAX_MOBSKILL 32
@@ -32,6 +32,7 @@
#define MAX_WALKPATH 32
#define MAX_DROP_PER_MAP 48
#define MAX_IGNORE_LIST 80
+#define MAX_VENDING 12
#define DEFAULT_AUTOSAVE_INTERVAL 60*1000
@@ -52,6 +53,12 @@ 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;
@@ -84,13 +91,13 @@ struct skill_unit_group {
int src_id;
int party_id;
int guild_id;
- int map,range;
+ int map;
int target_flag;
unsigned int tick;
int limit,interval;
int skill_id,skill_lv;
- int val1,val2;
+ int val1,val2,val3;
char *valstr;
int unit_id;
int group_id;
@@ -99,7 +106,7 @@ struct skill_unit_group {
};
struct skill_unit_group_tickset {
unsigned int tick;
- int group_id;
+ int id;
};
struct skill_timerskill {
int timer;
@@ -137,6 +144,12 @@ struct map_session_data {
unsigned make_arrow_flag : 1;
unsigned potionpitcher_flag : 1;
unsigned storage_flag : 1;
+ unsigned snovice_flag : 4;
+ int gmaster_flag;
+ // originally by Qamera, adapted by celest
+ unsigned event_death : 1;
+ unsigned event_kill : 1;
+ unsigned event_disconnect : 1;
} state;
struct {
unsigned killer : 1;
@@ -149,15 +162,14 @@ struct map_session_data {
unsigned no_weapon_damage : 1;
unsigned no_gemstone : 1;
unsigned infinite_endure : 1;
- unsigned unbreakable_weapon : 1;
- unsigned unbreakable_armor : 1;
- unsigned infinite_autospell : 1;
} special_state;
int char_id, login_id1, login_id2, sex;
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])
struct mmo_charstatus status;
struct item_data *inventory_data[MAX_INVENTORY];
short equip_index[11];
+ unsigned short unbreakable_equip;
+ unsigned short unbreakable; // chance to prevent equipment breaking [celest]
int weight,max_weight;
int cart_weight,cart_max_weight,cart_num,cart_max_num;
char mapname[24];
@@ -169,6 +181,7 @@ struct map_session_data {
unsigned int client_tick,server_tick;
struct walkpath_data walkpath;
int walktimer;
+ int next_walktime;
int npc_id,areanpc_id,npc_shopid;
int npc_pos;
int npc_menu;
@@ -178,6 +191,7 @@ struct map_session_data {
char *npc_stackbuf;
char npc_str[256];
unsigned int chatID;
+ unsigned long idletime;
struct{
char name[24];
@@ -192,6 +206,8 @@ struct map_session_data {
int followtimer; // [MouseJstr]
int followtarget;
+ time_t emotionlasttime; // to limit flood with emotion packets
+
short attackrange,attackrange_;
int skilltimer;
int skilltarget;
@@ -203,17 +219,21 @@ struct map_session_data {
struct skill_unit_group skillunit[MAX_SKILLUNITGROUP];
struct skill_unit_group_tickset skillunittick[MAX_SKILLUNITGROUPTICKSET];
struct skill_timerskill skilltimerskill[MAX_SKILLTIMERSKILL];
- int cloneskill_id,cloneskill_lv;
+ char blockskill[MAX_SKILL]; // [celest]
+ //unsigned int skillstatictimer[MAX_SKILL];
+ unsigned short timerskill_count; // [celest]
+ int cloneskill_id;
int potion_hp,potion_sp,potion_per_hp,potion_per_sp;
int invincible_timer;
unsigned int canact_tick;
unsigned int canmove_tick;
unsigned int canlog_tick;
+ unsigned int canregen_tick;
int hp_sub,sp_sub;
int inchealhptick,inchealsptick,inchealspirithptick,inchealspiritsptick;
// -- moonsoul (new tick for berserk self-damage)
- int berserkdamagetick;
+// int berserkdamagetick;
int fame;
short view_class;
@@ -224,12 +244,13 @@ struct map_session_data {
int watk,watk2,atkmods[3];
int def,def2,mdef,mdef2,critical,matk1,matk2;
int atk_ele,def_ele,star,overrefine;
- int castrate,hprate,sprate,dsprate;
+ int castrate,delayrate,hprate,sprate,dsprate;
int addele[10],addrace[12],addsize[3],subele[10],subrace[12];
int addeff[10],addeff2[10],reseff[10];
int watk_,watk_2,atkmods_[3],addele_[10],addrace_[12],addsize_[3]; //“ñ“—¬‚Ì‚½‚߂ɒljÁ
int atk_ele_,star_,overrefine_; //“ñ“—¬‚Ì‚½‚߂ɒljÁ
int base_atk,atk_rate;
+ int weapon_atk[16],weapon_atk_rate[16];
int arrow_atk,arrow_ele,arrow_cri,arrow_hit,arrow_range;
int arrow_addele[10],arrow_addrace[12],arrow_addsize[3],arrow_addeff[10],arrow_addeff2[10];
int nhealhp,nhealsp,nshealhp,nshealsp,nsshealhp,nsshealsp;
@@ -258,18 +279,42 @@ struct map_session_data {
short hp_drain_value,sp_drain_value,hp_drain_value_,sp_drain_value_;
int short_weapon_damage_return,long_weapon_damage_return;
int weapon_coma_ele[10],weapon_coma_race[12];
- short break_weapon_rate,break_armor_rate;
+ int break_weapon_rate,break_armor_rate;
short add_steal_rate;
+ //--- 02/15's new card effects [celest]
+ int crit_atk_rate;
+ int critaddrace[12];
+ short no_regen;
+ int addeff3[10];
+ short addeff3_type[10];
+ short autospell2_id,autospell2_lv,autospell2_rate,autospell2_type;
+ int skillatk[2];
+ unsigned short unstripable_equip;
+ short add_damage_classid2[10],add_damage_class_count2;
+ int add_damage_classrate2[10];
+ short sp_gain_value, hp_gain_value;
+ short sp_drain_type;
+ short ignore_def_mob, ignore_def_mob_;
+ int hp_loss_tick, hp_loss_rate;
+ short hp_loss_value, hp_loss_type;
+ int addrace2[12],addrace2_[12];
+ int subsize[3];
+ short unequip_losehp[11];
+ short unequip_losesp[11];
+ int itemid;
+ int itemhealrate[7];
+ //--- 03/15's new card effects
+ int expaddrace[12];
+ int subrace2[12];
+ short sp_gain_race[12];
short spiritball, spiritball_old;
int spirit_timer[MAX_SKILL_LEVEL];
int magic_damage_return; // AppleGirl Was Here
int random_attack_increase_add,random_attack_increase_per; // [Valaris]
int perfect_hiding; // [Valaris]
- int unbreakable;
int classchange; // [Valaris]
-
int die_counter;
short doridori_counter;
@@ -299,7 +344,7 @@ struct map_session_data {
int vender_id;
int vend_num;
char message[80];
- struct vending vending[12];
+ struct vending vending[MAX_VENDING];
int catch_target_class;
struct s_pet pet;
@@ -311,11 +356,15 @@ struct map_session_data {
char eventqueue[MAX_EVENTQUEUE][50];
int eventtimer[MAX_EVENTTIMER];
+ unsigned short eventcount; // [celest]
int last_skillid,last_skilllv; // Added by RoVeRT
- short sg_count;
unsigned char change_level; // [celest]
+ int autoloot; //by Upa-Kun
+ unsigned nodelay :1;
+ unsigned noexp :1;
+ unsigned detach :1;
#ifndef TXT_ONLY
int mail_counter; // mail counter for mail system [Valaris]
@@ -336,7 +385,7 @@ struct npc_item_list {
struct npc_data {
struct block_list bl;
short n;
- short class,dir;
+ short class_,dir;
short speed;
char name[24];
char exname[24];
@@ -360,7 +409,7 @@ struct npc_data {
char *script;
short xs,ys;
int guild_id;
- int timer,timerid,timeramount,nexttimer;
+ int timer,timerid,timeramount,nexttimer,rid;
unsigned int timertick;
struct npc_timerevent_list *timer_event;
int label_list_num;
@@ -379,11 +428,13 @@ struct npc_data {
char eventqueue[MAX_EVENTQUEUE][50];
int eventtimer[MAX_EVENTTIMER];
short arenaflag;
+
+ void *chatdb;
};
struct mob_data {
struct block_list bl;
short n;
- short base_class,class,dir,mode,level;
+ short base_class,class_,dir,mode,level;
short m,x0,y0,xs,ys;
char name[24];
int spawndelay1,spawndelay2;
@@ -398,9 +449,12 @@ struct mob_data {
unsigned change_walk_target : 1;
unsigned walk_easy : 1;
unsigned special_mob_ai : 3;
+ unsigned soul_change_flag : 1; // Celest
+ int provoke_flag; // Celest
} state;
int timer;
short to_x,to_y;
+ short target_dir;
short speed;
int hp;
int target_id,attacked_id;
@@ -422,7 +476,6 @@ struct mob_data {
short sc_count;
short opt1,opt2,opt3,option;
short min_chase;
- short sg_count;
int guild_id;
int deletetimer;
@@ -438,18 +491,22 @@ struct mob_data {
struct skill_unit_group skillunit[MAX_MOBSKILLUNITGROUP];
struct skill_unit_group_tickset skillunittick[MAX_SKILLUNITGROUPTICKSET];
char npc_event[50];
- short size;
+ unsigned char size;
+ short recall_flag;
+ int recallmob_count;
+ short recallcount;
};
struct pet_data {
struct block_list bl;
short n;
- short class,dir;
+ short class_,dir;
short speed;
char name[24];
struct {
unsigned state : 8 ;
unsigned skillstate : 8 ;
unsigned change_walk_target : 1 ;
+ short skillbonus;
} state;
int timer;
short to_x,to_y;
@@ -460,7 +517,8 @@ struct pet_data {
int move_fail_count;
unsigned int attackabletime,next_walktime,last_thinktime;
int skilltype,skillval,skilltimer,skillduration; // [Valaris]
- int skillbonustype,skillbonusval,skillbonustimer,skillbonusduration; // [Valaris]
+ //int skillbonustype,skillbonusval,skillbonustimer,skillbonusduration; // [Valaris]
+ int skillbonustype,skillbonusval,skillbonustimer;
struct item *lootitem;
short loot; // [Valaris]
short lootmax; // [Valaris]
@@ -479,10 +537,18 @@ enum { NONE_ATTACKABLE,ATTACKABLE };
enum { ATK_LUCKY=1,ATK_FLEE,ATK_DEF}; // ˆÍ‚Ü‚êƒyƒiƒ‹ƒeƒBŒvŽZ—p
+// ‘•”õƒR[ƒh
+enum {
+ EQP_WEAPON = 0x0002, // ‰EŽè
+ EQP_ARMOR = 0x0010, // ‘Ì
+ EQP_SHIELD = 0x0020, // ¶Žè
+ EQP_HELM = 0x0100, // “ªã’i
+};
+
struct map_data {
char name[24];
- char alias[24]; // [MouseJstr]
unsigned char *gat; // NULL‚Ȃ牺‚Ìmap_data_other_server‚Æ‚µ‚Ĉµ‚¤
+ char *alias; // [MouseJstr]
struct block_list **block;
struct block_list **block_mob;
int *block_count,*block_mob_count;
@@ -535,9 +601,8 @@ struct map_data_other_server {
unsigned char *gat; // NULLŒÅ’è‚É‚µ‚Ä”»’f
unsigned long ip;
unsigned int port;
+ struct map_data* map;
};
-#define read_gat(m,x,y) (map[m].gat[(x)+(y)*map[m].xs])
-#define read_gatp(m,x,y) (m->gat[(x)+(y)*m->xs])
struct flooritem_data {
struct block_list bl;
@@ -556,7 +621,7 @@ enum {
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-58
+ SP_UPPER,SP_PARTNER,SP_CART,SP_FAME,SP_UNBREAKABLE, //56-60
SP_CARTINFO=99, // 99
SP_BASEJOB=119, // 100+19 - celest
@@ -584,15 +649,51 @@ enum {
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_RECORVER=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 // 2006-2009
+ 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
};
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
};
+// CELL
+#define CELL_MASK 0x0f
+#define CELL_NPC 0x80 // NPCƒZƒ‹
+#define CELL_BASILICA 0x40 // BASILICAƒZƒ‹
+#define CELL_MOONLIT 0x100
+#define CELL_REGEN 0x200
+/*
+ * 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_CHKNPC=0x10, // ƒ^ƒbƒ`ƒ^ƒCƒv‚ÌNPC(ƒZƒ‹ƒ^ƒCƒv0x80ƒtƒ‰ƒO)
+ CELL_CHKBASILICA, // ƒoƒWƒŠƒJ(ƒZƒ‹ƒ^ƒCƒv0x40ƒtƒ‰ƒO)
+} cell_t;
+// map_setcell()‚ÅŽg—p‚³‚ê‚éƒtƒ‰ƒO
+enum {
+ CELL_SETNPC=0x10, // ƒ^ƒbƒ`ƒ^ƒCƒv‚ÌNPC‚ðƒZƒbƒg
+ CELL_SETBASILICA, // ƒoƒWƒŠƒJ‚ðƒZƒbƒg
+ CELL_CLRBASILICA, // ƒoƒWƒŠƒJ‚ðƒNƒŠƒA
+};
+
struct chat_data {
struct block_list bl;
@@ -614,6 +715,17 @@ extern int autosave_interval;
extern int agit_flag;
extern int night_flag; // 0=day, 1=night [Yor]
+// 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«Õ«¡«¤«ë 1: «­«ã«Ã«·«å 2: «­«ã«Ã«·«å(?õê)
+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[];
@@ -635,9 +747,11 @@ void map_foreachinarea(int (*)(struct block_list*,va_list),int,int,int,int,int,i
// -- moonsoul (added map_foreachincell)
void map_foreachincell(int (*)(struct block_list*,va_list),int,int,int,int,...);
void map_foreachinmovearea(int (*)(struct block_list*,va_list),int,int,int,int,int,int,int,int,...);
+void 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_countnearpc(int,int,int);
//blockŠÖ˜A‚ɒljÁ
int map_count_oncell(int m,int x,int y);
+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);
@@ -659,6 +773,7 @@ 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);
@@ -666,15 +781,13 @@ int map_mapname2mapid(char*);
int map_mapname2ipport(char*,int*,int*);
int map_setipport(char *name,unsigned long ip,int port);
int map_eraseipport(char *name,unsigned long ip,int port);
+int map_eraseallipport(void);
void map_addiddb(struct block_list *);
void map_deliddb(struct block_list *bl);
int map_foreachiddb(int (*)(void*,void*,va_list),...);
void map_addnickdb(struct map_session_data *);
struct map_session_data * map_nick2sd(char*);
-
-// gatŠÖ˜A
-int map_getcell(int,int,int);
-int map_setcell(int,int,int,int);
+int compare_item(struct item *a, struct item *b);
// ‚»‚Ì‘¼
int map_check_dir(int s_dir,int t_dir);
@@ -682,18 +795,33 @@ int map_calc_dir( struct block_list *src,int x,int y);
// 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);
int map_who(int fd);
+int cleanup_sub(struct block_list *bl, va_list ap);
+
void map_helpscreen(); // [Valaris]
int map_delmap(char *mapname);
-extern unsigned long ticks;
+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;
#ifndef TXT_ONLY
// MySQL
+#ifdef __WIN32
+#include <my_global.h>
+#include <my_sys.h>
+#endif
#include <mysql.h>
void char_online_check(void); // [Valaris]
diff --git a/src/map/mob.c b/src/map/mob.c
index ef67341f8..f076b7530 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -13,6 +13,7 @@
#include "clif.h"
#include "intif.h"
#include "pc.h"
+#include "status.h"
#include "mob.h"
#include "guild.h"
#include "itemdb.h"
@@ -21,6 +22,7 @@
#include "party.h"
#include "npc.h"
#include "log.h"
+#include "showmsg.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -31,7 +33,9 @@
#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)
-struct mob_db mob_db[2001];
+struct mob_db mob_db[MAX_MOB_DB+1];
+
+#define CLASSCHANGE_BOSS_NUM 21
/*==========================================
* Local prototype declaration (only required thing)
@@ -42,7 +46,7 @@ static int mob_makedummymobdb(int);
static int mob_timer(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 mob_skillid2skillidx(int class_,int skillid);
int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx);
static int mob_unlocktarget(struct mob_data *md,int tick);
@@ -67,7 +71,7 @@ int mobdb_searchname(const char *str)
* Id Mob is checked.
*------------------------------------------
*/
-int mobdb_checkid(const int id)
+int mobdb_checkid(const int id)
{
if (id <= 0 || id >= (sizeof(mob_db) / sizeof(mob_db[0])) || mob_db[id].name[0] == '\0')
return 0;
@@ -79,28 +83,28 @@ int mobdb_checkid(const int id)
* The minimum data set for MOB spawning
*------------------------------------------
*/
-int mob_spawn_dataset(struct mob_data *md,const char *mobname,int class)
+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;
if(strcmp(mobname,"--en--")==0)
- memcpy(md->name,mob_db[class].name,24);
+ memcpy(md->name,mob_db[class_].name,24);
else if(strcmp(mobname,"--ja--")==0)
- memcpy(md->name,mob_db[class].jname,24);
+ memcpy(md->name,mob_db[class_].jname,24);
else
memcpy(md->name,mobname,24);
md->n = 0;
- md->base_class = md->class = class;
+ md->base_class = md->class_ = class_;
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->speed=mob_db[class].speed;
+ md->speed=mob_db[class_].speed;
return 0;
}
@@ -110,97 +114,108 @@ int mob_spawn_dataset(struct mob_data *md,const char *mobname,int 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)
+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,r=class;
-
- if( sd )
- lv=sd->status.base_level;
+ 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;
+ if(sd && strcmp(mapname,"this")==0)
+ m = sd->bl.m;
else
- m=map_mapname2mapid(mapname);
+ m = map_mapname2mapid(mapname);
- if(m<0 || amount<=0 || (class>=0 && class<=1000) || class>6000) // ’l‚ªˆÙí‚Ȃ碊«‚ðŽ~‚ß‚é
+ if (m < 0 || amount <= 0 || (class_ >= 0 && class_ <= 1000) || class_ > MAX_MOB_DB + 4000) // ’l‚ªˆÙí‚Ȃ碊«‚ðŽ~‚ß‚é
return 0;
- if(class<0){ // ƒ‰ƒ“ƒ_ƒ€‚É¢Š«
- int i=0;
- int j=-class-1;
+ if (class_ < 0) { // ƒ‰ƒ“ƒ_ƒ€‚É¢Š«
int k;
- if(j>=0 && j<MAX_RANDOMMONSTER){
- do{
- class=rand()%1000+1001;
- k=rand()%1000000;
- }while((mob_db[class].max_hp <= 0 || mob_db[class].summonper[j] <= k ||
- (lv<mob_db[class].lv && battle_config.random_monster_checklv)) && (i++) < 2000);
- if(i>=2000){
- class=mob_db[0].summonper[j];
- }
- }else{
+ i = 0;
+ j = -class_-1;
+ if(j >= 0 && j < MAX_RANDOMMONSTER) {
+ do {
+ class_ = rand() % 1000 + 1001;
+ k = rand() % 1000000;
+ } while ((mob_db[class_].max_hp <= 0 || mob_db[class_].summonper[j] <= k ||
+ (battle_config.random_monster_checklv && lv < mob_db[class_].lv)) && (i++) < 2000);
+ if(i >= 2000)
+ class_ = mob_db[0].summonper[j];
+ } else
return 0;
- }
// if(battle_config.etc_log)
-// printf("mobclass=%d try=%d\n",class,i);
+// printf("mobclass=%d try=%d\n",class_,i);
}
- if(sd){
- if(x<=0) x=sd->bl.x;
- if(y<=0) y=sd->bl.y;
- }else if(x<=0 || y<=0){
- printf("mob_once_spawn: ??\n");
+ 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;
+ printf("mob_once_spawn: %i at %s x:%i y:%i\n ??\n",class_,map[m].name,x,y); //got idea from Freya [Lupus]
+ 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));
- memset(md, '\0', sizeof *md);
+ for (count = 0; count < amount; count++) {
+ md = (struct mob_data *)aCalloc(1,sizeof(struct mob_data));
+ memset (md, '\0', sizeof *md);
- if(class>4000) { // large/tiny mobs [Valaris]
- md->size=2;
- class-=4000;
- }
- else if(class>2000) {
- md->size=1;
- class-=2000;
+ if (class_ > MAX_MOB_DB + 2000) { // large/tiny mobs [Valaris]
+ md->size = 2;
+ class_ -= (MAX_MOB_DB + 2000);
+ } else if (class_ > MAX_MOB_DB) {
+ md->size = 1;
+ class_ -= MAX_MOB_DB;
}
- if(mob_db[class].mode&0x02)
- md->lootitem=(struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
+ if(mob_db[class_].mode & 0x02)
+ md->lootitem = (struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
else
- md->lootitem=NULL;
-
- mob_spawn_dataset(md,mobname,class);
- md->bl.m=m;
- md->bl.x=x;
- md->bl.y=y;
- if(r<0&&battle_config.dead_branch_active) md->mode=0x1+0x4+0x80; //ˆÚ“®‚µ‚ăAƒNƒeƒBƒu‚Å”½Œ‚‚·‚é
- 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
+ md->lootitem = NULL;
- memcpy(md->npc_event,event,sizeof(md->npc_event));
-
- md->bl.type=BL_MOB;
- map_addiddb(&md->bl);
- mob_spawn(md->bl.id);
-
- if(class==1288) { // emperium hp based on defense level [Valaris]
- struct guild_castle *gc=guild_mapname2gc(map[md->bl.m].name);
+ mob_spawn_dataset (md, mobname, class_);
+ md->bl.m = m;
+ md->bl.x = x;
+ md->bl.y = y;
+ if (class_ < 0 && battle_config.dead_branch_active)
+ md->mode = 0x1 + 0x4 + 0x80; //ˆÚ“®‚µ‚ăAƒNƒeƒBƒu‚Å”½Œ‚‚·‚é
+ 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
+
+ memcpy(md->npc_event, event, strlen(event));
+
+ md->bl.type = BL_MOB;
+ map_addiddb (&md->bl);
+ mob_spawn (md->bl.id);
+
+ if(class_ == 1288) { // emperium hp based on defense level [Valaris]
+ struct guild_castle *gc = guild_mapname2gc(map[md->bl.m].name);
if(gc) {
- mob_db[class].max_hp+=2000*gc->defense;
- md->hp=mob_db[class].max_hp;
+ mob_db[class_].max_hp += 2000 * gc->defense;
+ md->hp = mob_db[class_].max_hp;
}
} // end addition [Valaris]
-
-
}
- return (amount>0)?md->bl.id:0;
+ return (amount > 0) ? md->bl.id : 0;
}
/*==========================================
* The MOB appearance for one time (& area specification for scripts)
@@ -208,9 +223,9 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
*/
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)
+ const char *mobname,int class_,int amount,const char *event)
{
- int x,y,i,c,max,lx=-1,ly=-1,id=0;
+ int x,y,i,max,lx=-1,ly=-1,id=0;
int m;
if(strcmp(mapname,"this")==0)
@@ -221,7 +236,7 @@ int mob_once_spawn_area(struct map_session_data *sd,char *mapname,
max=(y1-y0+1)*(x1-x0+1)*3;
if(max>1000)max=1000;
- if(m<0 || amount<=0 || (class>=0 && class<=1000) || class>6000) // A summon is stopped if a value is unusual
+ if(m<0 || amount<=0 || (class_>=0 && class_<=1000) || class_>MAX_MOB_DB) // A summon is stopped if a value is unusual
return 0;
for(i=0;i<amount;i++){
@@ -229,15 +244,17 @@ int mob_once_spawn_area(struct map_session_data *sd,char *mapname,
do{
x=rand()%(x1-x0+1)+x0;
y=rand()%(y1-y0+1)+y0;
- }while( ( (c=map_getcell(m,x,y))==1 || c==5)&& (++j)<max );
+ } 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){ // ŒŸõ‚ÉŽ¸”s‚µ‚½‚̂ňȑO‚É•¦‚¢‚½êŠ‚ðŽg‚¤
+ if(lx>=0){ // Since reference went wrong, the place which boiled before is used.
x=lx;
y=ly;
}else
- return 0; // ʼn‚É•¦‚­êŠ‚ÌŒŸõ‚ðŽ¸”s‚µ‚½‚Ì‚Å‚â‚ß‚é
+ return 0; // Since reference of the place which boils first went wrong, it stops.
}
- id=mob_once_spawn(sd,mapname,x,y,mobname,class,1,event);
+ if(x==0||y==0) printf("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;
}
@@ -249,7 +266,7 @@ int mob_once_spawn_area(struct map_session_data *sd,char *mapname,
*------------------------------------------
*/
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)
+ int x,int y,const char *mobname,int class_,int amount,const char *event,int guardian)
{
struct mob_data *md=NULL;
int m,count=1,lv=255;
@@ -262,33 +279,27 @@ int mob_spawn_guardian(struct map_session_data *sd,char *mapname,
else
m=map_mapname2mapid(mapname);
- if(m<0 || amount<=0 || (class>=0 && class<=1000) || class>2000) // ’l‚ªˆÙí‚Ȃ碊«‚ðŽ~‚ß‚é
+ if(m<0 || amount<=0 || (class_>=0 && class_<=1000) || class_>MAX_MOB_DB) // Invalid monster classes
return 0;
- if(class<0)
+ if(class_<0)
return 0;
-
+
if(sd){
if(x<=0) x=sd->bl.x;
if(y<=0) y=sd->bl.y;
}
-
+
else if(x<=0 || y<=0)
printf("mob_spawn_guardian: ??\n");
-
+
for(count=0;count<amount;count++){
struct guild_castle *gc;
- md=calloc(sizeof(struct mob_data), 1);
- if(md==NULL){
- printf("mob_spawn_guardian: out of memory !\n");
- exit(1);
- }
+ md=(struct mob_data *) aCalloc(sizeof(struct mob_data), 1);
memset(md, '\0', sizeof *md);
-
-
- mob_spawn_dataset(md,mobname,class);
+ mob_spawn_dataset(md,mobname,class_);
md->bl.m=m;
md->bl.x=x;
md->bl.y=y;
@@ -308,7 +319,7 @@ int mob_spawn_guardian(struct map_session_data *sd,char *mapname,
gc=guild_mapname2gc(map[md->bl.m].name);
if(gc) {
- mob_db[class].max_hp+=2000*gc->defense;
+ mob_db[class_].max_hp+=2000*gc->defense;
if(guardian==0) { md->hp=gc->Ghp0; gc->GID0=md->bl.id; }
if(guardian==1) { md->hp=gc->Ghp1; gc->GID1=md->bl.id; }
if(guardian==2) { md->hp=gc->Ghp2; gc->GID2=md->bl.id; }
@@ -317,7 +328,6 @@ int mob_spawn_guardian(struct map_session_data *sd,char *mapname,
if(guardian==5) { md->hp=gc->Ghp5; gc->GID5=md->bl.id; }
if(guardian==6) { md->hp=gc->Ghp6; gc->GID6=md->bl.id; }
if(guardian==7) { md->hp=gc->Ghp7; gc->GID7=md->bl.id; }
-
}
}
@@ -366,49 +376,49 @@ int mob_exclusion_check(struct mob_data *md,struct map_session_data *sd)
* Appearance income of mob
*------------------------------------------
*/
-int mob_get_viewclass(int class)
+int mob_get_viewclass(int class_)
{
- return mob_db[class].view_class;
+ return mob_db[class_].view_class;
}
-int mob_get_sex(int class)
+int mob_get_sex(int class_)
{
- return mob_db[class].sex;
+ return mob_db[class_].sex;
}
-short mob_get_hair(int class)
+short mob_get_hair(int class_)
{
- return mob_db[class].hair;
+ return mob_db[class_].hair;
}
-short mob_get_hair_color(int class)
+short mob_get_hair_color(int class_)
{
- return mob_db[class].hair_color;
+ return mob_db[class_].hair_color;
}
-short mob_get_weapon(int class)
+short mob_get_weapon(int class_)
{
- return mob_db[class].weapon;
+ return mob_db[class_].weapon;
}
-short mob_get_shield(int class)
+short mob_get_shield(int class_)
{
- return mob_db[class].shield;
+ return mob_db[class_].shield;
}
-short mob_get_head_top(int class)
+short mob_get_head_top(int class_)
{
- return mob_db[class].head_top;
+ return mob_db[class_].head_top;
}
-short mob_get_head_mid(int class)
+short mob_get_head_mid(int class_)
{
- return mob_db[class].head_mid;
+ return mob_db[class_].head_mid;
}
-short mob_get_head_buttom(int class)
+short mob_get_head_buttom(int class_)
{
- return mob_db[class].head_buttom;
+ return mob_db[class_].head_buttom;
}
-short mob_get_clothes_color(int class) // Add for player monster dye - Valaris
+short mob_get_clothes_color(int class_) // Add for player monster dye - Valaris
{
- return mob_db[class].clothes_color; // End
+ return mob_db[class_].clothes_color; // End
}
-int mob_get_equip(int class) // mob equip [Valaris]
+int mob_get_equip(int class_) // mob equip [Valaris]
{
- return mob_db[class].equip;
+ return mob_db[class_].equip;
}
/*==========================================
* Is MOB in the state in which the present movement is possible or not?
@@ -425,7 +435,7 @@ int mob_can_move(struct mob_data *md)
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
- )
+ )
return 0;
return 1;
@@ -442,8 +452,8 @@ static int calc_next_walk_step(struct mob_data *md)
if(md->walkpath.path_pos>=md->walkpath.path_len)
return -1;
if(md->walkpath.path[md->walkpath.path_pos]&1)
- return battle_get_speed(&md->bl)*14/10;
- return battle_get_speed(&md->bl);
+ return status_get_speed(&md->bl)*14/10;
+ return status_get_speed(&md->bl);
}
static int mob_walktoxy_sub(struct mob_data *md);
@@ -455,7 +465,7 @@ static int mob_walktoxy_sub(struct mob_data *md);
static int mob_walk(struct mob_data *md,unsigned int tick,int data)
{
int moveblock;
- int i,ctype;
+ 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;
@@ -480,8 +490,7 @@ static int mob_walk(struct mob_data *md,unsigned int tick,int data)
x = md->bl.x;
y = md->bl.y;
- ctype = map_getcell(md->bl.m,x,y);
- if(ctype == 1 || ctype == 5) {
+ if(map_getcell(md->bl.m,x,y,CELL_CHKNOPASS)) {
mob_stop_walking(md,1);
return 0;
}
@@ -489,12 +498,20 @@ static int mob_walk(struct mob_data *md,unsigned int tick,int data)
dx = dirx[md->dir];
dy = diry[md->dir];
- ctype = map_getcell(md->bl.m,x+dx,y+dy);
- if(ctype == 1 || ctype == 5) {
+ if (map_getcell(md->bl.m,x+dx,y+dy,CELL_CHKBASILICA) && !(status_get_mode(&md->bl)&0x20)) {
+ 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;
}
+ if (skill_check_moonlit (&md->bl,x+dx,y+dy)) {
+ 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;
@@ -505,18 +522,18 @@ static int mob_walk(struct mob_data *md,unsigned int tick,int data)
if(md->min_chase>13)
md->min_chase--;
+ skill_unit_move(&md->bl,tick,0);
if(moveblock) map_delblock(&md->bl);
md->bl.x = x;
md->bl.y = y;
if(moveblock) map_addblock(&md->bl);
+ skill_unit_move(&md->bl,tick,1);
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);
-
- skill_unit_move(&md->bl,tick,1); // ƒXƒLƒ‹ƒ†ƒjƒbƒg‚ÌŒŸ¸
}
if((i=calc_next_walk_step(md))>0){
i = i>>1;
@@ -591,11 +608,11 @@ static int mob_attack(struct mob_data *md,unsigned int tick,int data)
if(!md->mode)
- mode=mob_db[md->class].mode;
+ mode=mob_db[md->class_].mode;
else
mode=md->mode;
- race=mob_db[md->class].race;
+ race=mob_db[md->class_].race;
if(!(mode&0x80)){
md->target_id=0;
md->state.targettype = NONE_ATTACKABLE;
@@ -604,11 +621,11 @@ static int mob_attack(struct mob_data *md,unsigned int tick,int data)
if(tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 || tsd->sc_data[SC_BASILICA].timer != -1 ||
((pc_ishiding(tsd) || tsd->state.gangsterparadise) && !((race == 4 || race == 6) && !tsd->perfect_hiding) ) ) ) {
md->target_id=0;
- md->state.targettype = NONE_ATTACKABLE;
+ md->state.targettype = NONE_ATTACKABLE;
return 0;
}
- range = mob_db[md->class].range;
+ range = mob_db[md->class_].range;
if(mode&1)
range++;
if(distance(md->bl.x,md->bl.y,tbl->x,tbl->y) > range)
@@ -625,9 +642,9 @@ static int mob_attack(struct mob_data *md,unsigned int tick,int data)
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)
- skill_status_change_end(&md->bl,SC_CLOAKING,-1);
+ status_change_end(&md->bl,SC_CLOAKING,-1);
- md->attackabletime = tick + battle_get_adelay(&md->bl);
+ md->attackabletime = tick + status_get_adelay(&md->bl);
md->timer=add_timer(md->attackabletime,mob_timer,md->bl.id,0);
md->state.state=MS_ATTACK;
@@ -684,7 +701,7 @@ int mob_changestate(struct mob_data *md,int state,int type)
if(i>0 && i<2000)
md->timer=add_timer(md->attackabletime,mob_timer,md->bl.id,0);
else if(type) {
- md->attackabletime = tick + battle_get_amotion(&md->bl);
+ md->attackabletime = tick + status_get_amotion(&md->bl);
md->timer=add_timer(md->attackabletime,mob_timer,md->bl.id,0);
}
else {
@@ -702,8 +719,8 @@ int mob_changestate(struct mob_data *md,int state,int type)
md->last_deadtime=gettick();
// Since it died, all aggressors' attack to this mob is stopped.
clif_foreachclient(mob_stopattacked,md->bl.id);
- skill_unit_out_all(&md->bl,gettick(),1);
- skill_status_change_clear(&md->bl,2); // ƒXƒe[ƒ^ƒXˆÙí‚ð‰ðœ‚·‚é
+ skill_unit_move(&md->bl,gettick(),0);
+ 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)
@@ -730,15 +747,12 @@ static int mob_timer(int tid,unsigned int tick,int id,int data)
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->bl.type || md->bl.type!=BL_MOB)
- return 1;
-
if(md->timer != tid){
if(battle_config.error_log)
printf("mob_timer %d != %d\n",md->timer,tid);
@@ -764,6 +778,10 @@ static int mob_timer(int tid,unsigned int tick,int id,int data)
printf("mob_timer : %d ?\n",md->state.state);
break;
}
+
+ if (md->timer == -1)
+ mob_changestate(md,MS_WALK,0);
+
map_freeblock_unlock();
return 0;
}
@@ -775,11 +793,25 @@ static int mob_timer(int tid,unsigned int tick,int id,int data)
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)&0x20)) {
+ md->state.change_walk_target=0;
+ return 1;
+ }
+
memcpy(&md->walkpath,&wpd,sizeof(wpd));
md->state.change_walk_target=0;
@@ -857,7 +889,7 @@ int mob_setdelayspawn(int id)
spawntime1=md->last_spawntime+md->spawndelay1;
spawntime2=md->last_deadtime+md->spawndelay2;
- spawntime3=gettick()+5000;
+ spawntime3=gettick()+5000+rand()%5000; //Lupus
// spawntime = max(spawntime1,spawntime2,spawntime3);
if(DIFF_TICK(spawntime1,spawntime2)>0)
spawntime=spawntime1;
@@ -882,7 +914,8 @@ int mob_spawn(int id)
struct mob_data *md;
struct block_list *bl;
- nullpo_retr(-1, bl=map_id2bl(id));
+ //nullpo_retr(-1, bl=map_id2bl(id));
+ bl=map_id2bl(id);
if(!bl || !bl->type || bl->type!=BL_MOB)
return -1;
@@ -891,15 +924,15 @@ int mob_spawn(int id)
if(!md || !md->bl.type || md->bl.type!=BL_MOB)
return -1;
-
+
md->last_spawntime=tick;
if( md->bl.prev!=NULL ){
// clif_clearchar_area(&md->bl,3);
- skill_unit_out_all(&md->bl,gettick(),1);
+// skill_unit_move(&md->bl,tick,0);
map_delblock(&md->bl);
}
else
- md->class = md->base_class;
+ md->class_ = md->base_class;
md->bl.m =md->m;
do {
@@ -911,7 +944,7 @@ int mob_spawn(int id)
y=md->y0+rand()%(md->ys+1)-md->ys/2;
}
i++;
- } while(((c=map_getcell(md->bl.m,x,y))==1 || c==5) && i<50);
+ } while(map_getcell(md->bl.m,x,y,CELL_CHKNOPASS) && i<50);
if(i>=50){
// if(battle_config.error_log==1)
@@ -923,8 +956,7 @@ int mob_spawn(int id)
md->to_x=md->bl.x=x;
md->to_y=md->bl.y=y;
md->dir=0;
-
- map_addblock(&md->bl);
+ md->target_dir=0;
memset(&md->state,0,sizeof(md->state));
md->attacked_id = 0;
@@ -932,11 +964,11 @@ int mob_spawn(int id)
md->move_fail_count = 0;
if(!md->speed)
- md->speed = mob_db[md->class].speed;
- md->def_ele = mob_db[md->class].element;
+ md->speed = mob_db[md->class_].speed;
+ md->def_ele = mob_db[md->class_].element;
if(!md->level) // [Valaris]
- md->level=mob_db[md->class].lv;
+ md->level=mob_db[md->class_].lv;
md->master_id=0;
md->master_dist=0;
@@ -950,13 +982,12 @@ int mob_spawn(int id)
md->canmove_tick = tick;
md->guild_id = 0;
- if (md->class >= 1285 && md->class <= 1288) {
+ 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->sg_count=0;
+
md->deletetimer=-1;
md->skilltimer=-1;
@@ -983,12 +1014,15 @@ int mob_spawn(int id)
memset(md->skillunit,0,sizeof(md->skillunit));
memset(md->skillunittick,0,sizeof(md->skillunittick));
- md->hp = battle_get_max_hp(&md->bl);
+ md->hp = status_get_max_hp(&md->bl);
if(md->hp<=0){
- mob_makedummymobdb(md->class);
- md->hp = battle_get_max_hp(&md->bl);
+ mob_makedummymobdb(md->class_);
+ md->hp = status_get_max_hp(&md->bl);
}
+ map_addblock(&md->bl);
+ skill_unit_move(&md->bl,tick,1);
+
clif_spawnmob(md);
return 0;
@@ -1026,10 +1060,9 @@ 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&4){
dx=md->to_x-md->bl.x;
@@ -1054,9 +1087,9 @@ int mob_stop_walking(struct mob_data *md,int type)
if(type&0x01)
clif_fixmobpos(md);
if(type&0x02) {
- int delay=battle_get_dmotion(&md->bl);
+ int delay=status_get_dmotion(&md->bl);
unsigned int tick = gettick();
- if(md->canmove_tick < tick)
+ if(battle_config.monster_damage_delay && md->canmove_tick < tick)
md->canmove_tick = tick + delay;
}
@@ -1079,46 +1112,43 @@ int mob_can_reach(struct mob_data *md,struct block_list *bl,int range)
dx=abs(bl->x - md->bl.x);
dy=abs(bl->y - md->bl.y);
+ if( md->bl.m != bl->m) // ˆá‚¤ƒƒbƒv
+ return 0;
+
+ if( range>0 && range < ((dx>dy)?dx:dy) ) // ‰“‚·‚¬‚é
+ return 0;
+
+ if( md->bl.x==bl->x && md->bl.y==bl->y ) // “¯‚¶ƒ}ƒX
+ return 1;
+
//=========== guildcastle guardian no search start===========
//when players are the guild castle member not attack them !
- if(md->class >= 1285 && md->class <= 1287){
+ /*if(md->class_ >= 1285 && md->class_ <= 1287){
struct map_session_data *sd;
struct guild *g=NULL;
struct guild_castle *gc=guild_mapname2gc(map[bl->m].name);
if(gc && agit_flag==0) // Guardians will not attack during non-woe time [Valaris]
return 0; // end addition [Valaris]
-
- if(bl && bl->type == BL_PC){
+
+ if(gc && bl->type == BL_PC){
nullpo_retr(0, sd=(struct map_session_data *)bl);
- if(!gc)
- return 0;
- if(gc && sd && sd->status.guild_id) {
- g=guild_search(sd->status.guild_id); // don't attack guild members [Valaris]
+ if(gc && sd->status.guild_id > 0) {
+ g=guild_search(sd->status.guild_id); // don't attack guild members [Valaris]
if(g && g->guild_id == gc->guild_id)
return 0;
if(g && gc && guild_isallied(g,gc))
return 0;
-
}
}
- }
+ }*/
//========== guildcastle guardian no search eof==============
- if(bl && bl->type == BL_PC && battle_config.monsters_ignore_gm) { // option to have monsters ignore GMs [Valaris]
+ /*if(bl->type == BL_PC && battle_config.monsters_ignore_gm) { // option to have monsters ignore GMs [Valaris]
struct map_session_data *sd;
if((sd=(struct map_session_data *)bl) != NULL && pc_isGM(sd) >= battle_config.monsters_ignore_gm)
return 0;
- }
-
- if( md->bl.m != bl->m) // ˆá‚¤ƒƒbƒv
- return 0;
-
- if( range>0 && range < ((dx>dy)?dx:dy) ) // ‰“‚·‚¬‚é
- return 0;
-
- if( md->bl.x==bl->x && md->bl.y==bl->y ) // “¯‚¶ƒ}ƒX
- return 1;
+ }*/
// Obstacle judging
wpd.path_len=0;
@@ -1156,12 +1186,12 @@ int mob_target(struct mob_data *md,struct block_list *bl,int dist)
nullpo_retr(0, md);
nullpo_retr(0, bl);
- sc_data = battle_get_sc_data(bl);
- option = battle_get_option(bl);
- race=mob_db[md->class].race;
+ sc_data = status_get_sc_data(bl);
+ option = status_get_option(bl);
+ race=mob_db[md->class_].race;
if(!md->mode)
- mode=mob_db[md->class].mode;
+ mode=mob_db[md->class_].mode;
else
mode=md->mode;
@@ -1170,7 +1200,9 @@ int mob_target(struct mob_data *md,struct block_list *bl,int dist)
return 0;
}
// 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) && ( !(mode&0x04) || rand()%100>25) )
+ if( (md->target_id > 0 && md->state.targettype == ATTACKABLE) && (!(mode&0x04) || rand()%100>25) &&
+ // if the monster was provoked ignore the above rule [celest]
+ !(md->state.provoke_flag && md->state.provoke_flag == bl->id))
return 0;
if(mode&0x20 || // Coercion is exerted if it is MVPMOB.
@@ -1184,11 +1216,13 @@ int mob_target(struct mob_data *md,struct block_list *bl,int dist)
return 0;
}
- md->target_id=bl->id; // Since there was no disturbance, it locks on to target.
+ 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+13;
if(md->min_chase>26)
md->min_chase=26;
@@ -1223,18 +1257,18 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
return 0;
if(!smd->mode)
- mode=mob_db[smd->class].mode;
+ mode=mob_db[smd->class_].mode;
else
mode=smd->mode;
// ƒAƒNƒeƒBƒu‚Ń^[ƒQƒbƒgŽË’ö“à‚É‚¢‚é‚È‚çAƒƒbƒN‚·‚é
if( mode&0x04 ){
- race=mob_db[smd->class].race;
+ race=mob_db[smd->class_].race;
//‘ÎÛ‚ªPC‚Ìê‡
if(tsd &&
- !pc_isdead(tsd) &&
- tsd->bl.m == smd->bl.m &&
- tsd->invincible_timer == -1 &&
+ !pc_isdead(tsd) &&
+ tsd->bl.m == smd->bl.m &&
+ tsd->invincible_timer == -1 &&
!pc_isinvisible(tsd) &&
(dist=distance(smd->bl.x,smd->bl.y,tsd->bl.x,tsd->bl.y))<9
)
@@ -1246,7 +1280,7 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
rand()%1000<1000/(++(*pcc)) ){ // ”͈͓àPC‚Å“™Šm—¦‚É‚·‚é
smd->target_id=tsd->bl.id;
smd->state.targettype = ATTACKABLE;
- smd->min_chase=13;
+ smd->min_chase=13;
}
}
}
@@ -1282,10 +1316,10 @@ static int mob_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
nullpo_retr(0, itc=va_arg(ap,int *));
if(!md->mode)
- mode=mob_db[md->class].mode;
+ mode=mob_db[md->class_].mode;
else
mode=md->mode;
-
+
if( !md->target_id && mode&0x02){
if(!md->lootitem || (battle_config.monster_loot_type == 1 && md->lootitem_count >= LOOTITEM_SIZE) )
@@ -1319,8 +1353,8 @@ static int mob_ai_sub_hard_linksearch(struct block_list *bl,va_list ap)
nullpo_retr(0, target=va_arg(ap,struct block_list *));
// same family free in a range at a link monster -- it will be made to lock if MOB is
-/* if( (md->target_id > 0 && md->state.targettype == ATTACKABLE) && mob_db[md->class].mode&0x08){
- if( tmd->class==md->class && (!tmd->target_id || md->state.targettype == NONE_ATTACKABLE) && tmd->bl.m == md->bl.m){
+/* if( (md->target_id > 0 && md->state.targettype == ATTACKABLE) && mob_db[md->class_].mode&0x08){
+ if( tmd->class_==md->class_ && (!tmd->target_id || md->state.targettype == NONE_ATTACKABLE) && tmd->bl.m == md->bl.m){
if( mob_can_reach(tmd,target,12) ){ // Reachability judging
tmd->target_id=md->target_id;
tmd->state.targettype = ATTACKABLE;
@@ -1328,8 +1362,8 @@ static int mob_ai_sub_hard_linksearch(struct block_list *bl,va_list ap)
}
}
}*/
- if( md->attacked_id > 0 && mob_db[md->class].mode&0x08){
- if( tmd->class==md->class && tmd->bl.m == md->bl.m && (!tmd->target_id || md->state.targettype == NONE_ATTACKABLE)){
+ if( md->attacked_id > 0 && mob_db[md->class_].mode&0x08){
+ if( tmd->class_==md->class_ && tmd->bl.m == md->bl.m && (!tmd->target_id || md->state.targettype == NONE_ATTACKABLE)){
if( mob_can_reach(tmd,target,12) ){ // Reachability judging
tmd->target_id=md->attacked_id;
tmd->state.targettype = ATTACKABLE;
@@ -1355,12 +1389,24 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
if((bl=map_id2bl(md->master_id)) != NULL )
mmd=(struct mob_data *)bl;
- mode=mob_db[md->class].mode;
+ mode=mob_db[md->class_].mode;
// It is not main monster/leader.
if(!mmd || mmd->bl.type!=BL_MOB || mmd->bl.id!=md->master_id)
return 0;
+ // ŒÄ‚Ñ–ß‚µ
+ if(mmd->recall_flag == 1){
+ if (mmd->recallcount < (mmd->recallmob_count+2) ){
+ mob_warp(md,-1,mmd->bl.x,mmd->bl.y,3);
+ mmd->recallcount += 1;
+ } else{
+ mmd->recall_flag = 0;
+ mmd->recallcount=0;
+ }
+ md->state.master_check = 1;
+ return 0;
+ }
// Since it is in the map on which the master is not, teleport is carried out and it pursues.
if( mmd->bl.m != md->bl.m ){
mob_warp(md,mmd->bl.m,mmd->bl.x,mmd->bl.y,3);
@@ -1380,7 +1426,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
}
// 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) &&
+ if((!md->target_id || md->state.targettype == NONE_ATTACKABLE) && mob_can_move(md) &&
(md->walkpath.path_pos>=md->walkpath.path_len || md->walkpath.path_len==0) && md->master_dist<15){
int i=0,dx,dy,ret;
if(md->master_dist>4) {
@@ -1426,7 +1472,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
struct map_session_data *sd=map_id2sd(mmd->target_id);
if(sd!=NULL && !pc_isdead(sd) && sd->invincible_timer == -1 && !pc_isinvisible(sd)){
- race=mob_db[md->class].race;
+ race=mob_db[md->class_].race;
if(mode&0x20 ||
(sd->sc_data[SC_TRICKDEAD].timer == -1 && sd->sc_data[SC_BASILICA].timer == -1 &&
( (!pc_ishiding(sd) && !sd->state.gangsterparadise) || ((race == 4 || race == 6) && !sd->perfect_hiding) ) ) ){ // –WŠQ‚ª‚È‚¢‚©”»’è
@@ -1444,7 +1490,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
struct map_session_data *sd=map_id2sd(md->target_id);
if(sd!=NULL && !pc_isdead(sd) && sd->invincible_timer == -1 && !pc_isinvisible(sd)){
- race=mob_db[mmd->class].race;
+ race=mob_db[mmd->class_].race;
if(mode&0x20 ||
(sd->sc_data[SC_TRICKDEAD].timer == -1 &&
(!(sd->status.option&0x06) || race==4 || race==6)
@@ -1485,23 +1531,34 @@ static int mob_randomwalk(struct mob_data *md,int tick)
nullpo_retr(0, md);
- speed=battle_get_speed(&md->bl);
+ 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=md->bl.x+r%(d*2+1)-d;
- y=md->bl.y+r/(d*2+1)%(d*2+1)-d;
- if((c=map_getcell(md->bl.m,x,y))!=1 && c!=5 && mob_walktoxy(md,x,y,1)==0){
+ 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)
- printf("MOB cant move. random spawn %d, class = %d\n",md->bl.id,md->class);
+ printf("MOB cant move. random spawn %d, class = %d\n",md->bl.id,md->class_);
md->move_fail_count=0;
mob_spawn(md->bl.id);
}
@@ -1534,6 +1591,8 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
int i,dx,dy,ret,dist;
int attack_type=0;
int mode,race;
+ int search_size = AREA_SIZE*2;
+ int blind_flag = 0;
nullpo_retr(0, bl);
nullpo_retr(0, ap);
@@ -1541,7 +1600,6 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
tick=va_arg(ap,unsigned int);
-
if(DIFF_TICK(tick,md->last_thinktime)<MIN_MOBTHINKTIME)
return 0;
md->last_thinktime=tick;
@@ -1553,16 +1611,19 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
}
if(!md->mode)
- mode=mob_db[md->class].mode;
+ mode=mob_db[md->class_].mode;
else
mode=md->mode;
- race=mob_db[md->class].race;
+ race=mob_db[md->class_].race;
// Abnormalities
if((md->opt1 > 0 && md->opt1 != 6) || 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;
+
if(!(mode&0x80) && md->target_id > 0)
md->target_id = 0;
@@ -1587,7 +1648,8 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
if(abl->type==BL_PC)
asd=(struct map_session_data *)abl;
if(asd==NULL || md->bl.m != abl->m || abl->prev == NULL || asd->invincible_timer != -1 || pc_isinvisible(asd) ||
- (dist=distance(md->bl.x,md->bl.y,abl->x,abl->y))>=32 || battle_check_target(bl,abl,BCT_ENEMY)==0)
+ (dist=distance(md->bl.x,md->bl.y,abl->x,abl->y))>=32 || battle_check_target(bl,abl,BCT_ENEMY)==0 ||
+ (blind_flag && dist>3))
md->attacked_id=0;
else {
//‹——£‚ª‰“‚¢ê‡‚̓^ƒQ‚ð•ÏX‚µ‚È‚¢
@@ -1614,15 +1676,16 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
if( (!md->target_id || md->state.targettype == NONE_ATTACKABLE) && mode&0x04 && !md->state.master_check &&
battle_config.monster_active_enable){
i=0;
+ search_size = (blind_flag) ? 3 : AREA_SIZE*2;
if(md->state.special_mob_ai){
map_foreachinarea(mob_ai_sub_hard_activesearch,md->bl.m,
- md->bl.x-AREA_SIZE*2,md->bl.y-AREA_SIZE*2,
- md->bl.x+AREA_SIZE*2,md->bl.y+AREA_SIZE*2,
+ md->bl.x-search_size,md->bl.y-search_size,
+ md->bl.x+search_size,md->bl.y+search_size,
0,md,&i);
}else{
map_foreachinarea(mob_ai_sub_hard_activesearch,md->bl.m,
- md->bl.x-AREA_SIZE*2,md->bl.y-AREA_SIZE*2,
- md->bl.x+AREA_SIZE*2,md->bl.y+AREA_SIZE*2,
+ md->bl.x-search_size,md->bl.y-search_size,
+ md->bl.x+search_size,md->bl.y+search_size,
BL_PC,md,&i);
}
}
@@ -1630,9 +1693,10 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
// The item search of a route monster
if( !md->target_id && mode&0x02 && !md->state.master_check){
i=0;
+ search_size = (blind_flag) ? 3 : AREA_SIZE*2;
map_foreachinarea(mob_ai_sub_hard_lootsearch,md->bl.m,
- md->bl.x-AREA_SIZE*2,md->bl.y-AREA_SIZE*2,
- md->bl.x+AREA_SIZE*2,md->bl.y+AREA_SIZE*2,
+ md->bl.x-search_size,md->bl.y-search_size,
+ md->bl.x+search_size,md->bl.y+search_size,
BL_ITEM,md,&i);
}
@@ -1644,13 +1708,13 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
else if(tbl->type==BL_MOB)
tmd=(struct mob_data *)tbl;
if(tsd || tmd) {
- if(tbl->m != md->bl.m || tbl->prev == NULL || (dist=distance(md->bl.x,md->bl.y,tbl->x,tbl->y))>=md->min_chase)
+ if(tbl->m != md->bl.m || tbl->prev == NULL || (dist=distance(md->bl.x,md->bl.y,tbl->x,tbl->y)) >= search_size || (blind_flag && dist>3))
mob_unlocktarget(md,tick); // •Êƒ}ƒbƒv‚©AŽ‹ŠEŠO
else if( tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 || tsd->sc_data[SC_BASILICA].timer != -1 ||
((pc_ishiding(tsd) || tsd->state.gangsterparadise) &&
!((race == 4 || race == 6) && !tsd->perfect_hiding) )) )
mob_unlocktarget(md,tick); // ƒXƒLƒ‹‚È‚Ç‚É‚æ‚éô“G–WŠQ
- else if(!battle_check_range(&md->bl,tbl,mob_db[md->class].range)){
+ else if(!battle_check_range(&md->bl,tbl,mob_db[md->class_].range)){
// UŒ‚”͈͊O‚Ȃ̂ňړ®
if(!(mode&1)){ // ˆÚ“®‚µ‚È‚¢ƒ‚[ƒh
mob_unlocktarget(md,tick);
@@ -1663,9 +1727,11 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
// if(md->timer != -1 && (DIFF_TICK(md->next_walktime,tick)<0 || distance(md->to_x,md->to_y,tsd->bl.x,tsd->bl.y)<2) )
if(md->timer != -1 && md->state.state!=MS_ATTACK && (DIFF_TICK(md->next_walktime,tick)<0 || distance(md->to_x,md->to_y,tbl->x,tbl->y)<2) )
return 0; // Šù‚Ɉړ®’†
- if( !mob_can_reach(md,tbl,(md->min_chase>13)?md->min_chase:13) )
+ search_size = (blind_flag) ? 3 :
+ ((md->min_chase > 13) ? md->min_chase : 13);
+ if(!mob_can_reach(md,tbl, search_size))
mob_unlocktarget(md,tick); // ˆÚ“®‚Å‚«‚È‚¢‚̂Ń^ƒQ‰ðœiIW‚Æ‚©Hj
- else{
+ else {
// ’ÇÕ
md->next_walktime=tick+500;
i=0;
@@ -1692,15 +1758,15 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
ret=mob_walktoxy(md,md->bl.x+dx,md->bl.y+dy,0);
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;
mob_walktoxy(md,md->bl.x+dx,md->bl.y+dy,0);
+ }
}
- }
} else { // UŒ‚ŽË’ö”͈͓à
md->state.skillstate=MSS_ATTACK;
if(md->state.state==MS_WALK)
@@ -1708,23 +1774,17 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
if(md->state.state==MS_ATTACK)
return 0; // Šù‚ÉUŒ‚’†
mob_changestate(md,MS_ATTACK,attack_type);
-
-/* if(mode&0x08){ // ƒŠƒ“ƒNƒ‚ƒ“ƒXƒ^[
- map_foreachinarea(mob_ai_sub_hard_linksearch,md->bl.m,
- md->bl.x-13,md->bl.y-13,
- md->bl.x+13,md->bl.y+13,
- BL_MOB,md,&tsd->bl);
- }*/
}
return 0;
- }else{ // ƒ‹[ƒgƒ‚ƒ“ƒXƒ^[ˆ—
+ } else { // ƒ‹[ƒgƒ‚ƒ“ƒXƒ^[ˆ—
if(tbl == NULL || tbl->type != BL_ITEM ||tbl->m != md->bl.m ||
- (dist=distance(md->bl.x,md->bl.y,tbl->x,tbl->y))>=md->min_chase || !md->lootitem){
+ (dist=distance(md->bl.x,md->bl.y,tbl->x,tbl->y))>=md->min_chase || !md->lootitem |
+ (blind_flag && dist>=4)){
// ‰“‚·‚¬‚é‚©ƒAƒCƒeƒ€‚ª‚È‚­‚È‚Á‚½
mob_unlocktarget(md,tick);
if(md->state.state==MS_WALK)
mob_stop_walking(md,1); // •às’†‚È‚ç’âŽ~
- }else if(dist){
+ } else if(dist) {
if(!(mode&1)){ // ˆÚ“®‚µ‚È‚¢ƒ‚[ƒh
mob_unlocktarget(md,tick);
return 0;
@@ -1838,7 +1898,8 @@ static int mob_ai_hard(int tid,unsigned int tick,int id,int data)
*/
static int mob_ai_sub_lazy(void * key,void * data,va_list app)
{
- struct mob_data *md=data;
+ struct mob_data *md=(struct mob_data *)data;
+ struct mob_data *mmd=NULL;
unsigned int tick;
va_list ap;
@@ -1849,8 +1910,9 @@ static int mob_ai_sub_lazy(void * key,void * data,va_list app)
if(md->bl.type!=BL_MOB)
return 0;
- if(!md->bl.type || md->bl.type!=BL_MOB)
- return 0;
+ if (md->master_id > 0) {
+ mmd = (struct mob_data *)map_id2bl(md->master_id); //Ž©•ª‚ÌBOSS‚Ìî•ñ
+ }
tick=va_arg(ap,unsigned int);
@@ -1864,8 +1926,14 @@ static int mob_ai_sub_lazy(void * key,void * data,va_list app)
return 0;
}
+ // Žæ‚芪‚«ƒ‚ƒ“ƒXƒ^[‚̈—iŒÄ‚Ñ–ß‚µ‚³‚ꂽŽžj
+ if(mmd && md->state.special_mob_ai == 0 && mmd->recall_flag == 1) {
+ mob_ai_sub_hard_slavemob (md,tick);
+ return 0;
+ }
+
if(DIFF_TICK(md->next_walktime,tick)<0 &&
- (mob_db[md->class].mode&1) && mob_can_move(md) ){
+ (mob_db[md->class_].mode&1) && 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.
@@ -1876,7 +1944,7 @@ static int mob_ai_sub_lazy(void * key,void * data,va_list app)
// 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 &&
- mob_db[md->class].mexp <= 0 && !(mob_db[md->class].mode & 0x20))
+ mob_db[md->class_].mexp <= 0 && !(mob_db[md->class_].mode & 0x20))
mob_spawn(md->bl.id);
}else{
@@ -1884,7 +1952,7 @@ static int mob_ai_sub_lazy(void * key,void * data,va_list app)
// 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 &&
- mob_db[md->class].mexp <= 0 && !(mob_db[md->class].mode & 0x20))
+ mob_db[md->class_].mexp <= 0 && !(mob_db[md->class_].mode & 0x20))
mob_warp(md,-1,-1,-1,-1);
}
@@ -1931,7 +1999,7 @@ static int mob_delay_item_drop(int tid,unsigned int tick,int id,int data)
{
struct delay_item_drop *ditem;
struct item temp_item;
- int flag;
+ int flag, drop_flag = 1;
nullpo_retr(0, ditem=(struct delay_item_drop *)id);
@@ -1940,18 +2008,45 @@ static int mob_delay_item_drop(int tid,unsigned int tick,int id,int data)
temp_item.amount = ditem->amount;
temp_item.identify = !itemdb_isequip3(temp_item.nameid);
- if(battle_config.item_auto_get){
- if(ditem->first_sd && (flag = pc_additem(ditem->first_sd,&temp_item,ditem->amount))){
- clif_additem(ditem->first_sd,0,0,flag);
- map_addflooritem(&temp_item,1,ditem->m,ditem->x,ditem->y,ditem->first_sd,ditem->second_sd,ditem->third_sd,0);
+ if (ditem->first_sd){
+ #if 0
+ if (ditem->first_sd->status.party_id > 0){
+ struct party *p;
+ if((p=party_search(ditem->first_sd->status.party_id)) && p->item){
+ struct map_session_data *sd = NULL;
+ int i;
+ for (i = p->itemc + 1; i!=p->itemc; i++) { // initialise counter and loop through the party
+ if (i >= MAX_PARTY)
+ i = 0; // reset counter to 1st person in party so it'll stop when it reaches "itemc"
+ if ((sd=p->member[i].sd)!=NULL && sd->bl.m == ditem->first_sd->bl.m)
+ break;
+ }
+ if (sd){ // if an appropiate party member was found
+ drop_flag = 0;
+ if ((p->itemc++) >= MAX_PARTY)
+ p->itemc = 0;
+ if ((flag = pc_additem(ditem->first_sd,&temp_item,ditem->amount))) {
+ clif_additem(ditem->first_sd,0,0,flag);
+ drop_flag = 1;
+ }
+ }
+ }
+ } else
+ #endif
+ if(battle_config.item_auto_get || ditem->first_sd->autoloot){//Autoloot added by Upa-Kun
+ drop_flag = 0;
+ if((flag = pc_additem(ditem->first_sd,&temp_item,ditem->amount))){
+ clif_additem(ditem->first_sd,0,0,flag);
+ drop_flag = 1;
+ }
}
- free(ditem);
- return 0;
}
- map_addflooritem(&temp_item,1,ditem->m,ditem->x,ditem->y,ditem->first_sd,ditem->second_sd,ditem->third_sd,0);
+ if (drop_flag) {
+ map_addflooritem(&temp_item,1,ditem->m,ditem->x,ditem->y,ditem->first_sd,ditem->second_sd,ditem->third_sd,0);
+ }
- free(ditem);
+ aFree(ditem);
return 0;
}
@@ -1962,22 +2057,49 @@ static int mob_delay_item_drop(int tid,unsigned int tick,int id,int data)
static int mob_delay_item_drop2(int tid,unsigned int tick,int id,int data)
{
struct delay_item_drop2 *ditem;
- int flag;
+ int flag, drop_flag = 1;
nullpo_retr(0, ditem=(struct delay_item_drop2 *)id);
- if(battle_config.item_auto_get){
- if(ditem->first_sd && (flag = pc_additem(ditem->first_sd,&ditem->item_data,ditem->item_data.amount))){
- clif_additem(ditem->first_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);
+ if (ditem->first_sd){
+ #if 0
+ if (ditem->first_sd->status.party_id > 0){
+ struct party *p;
+ if((p=party_search(ditem->first_sd->status.party_id)) && p->item){
+ struct map_session_data *sd = NULL;
+ int i;
+ for (i = p->itemc + 1; i!=p->itemc; i++) { // initialise counter and loop through the party
+ if (i >= MAX_PARTY)
+ i = 0; // reset counter to 1st person in party so it'll stop when it reaches "itemc"
+ if ((sd=p->member[i].sd)!=NULL && sd->bl.m == ditem->first_sd->bl.m)
+ break;
+ }
+ if (sd){ // if an appropiate party member was found
+ drop_flag = 0;
+ if ((p->itemc++) >= MAX_PARTY)
+ p->itemc = 0;
+ if((flag = pc_additem(ditem->first_sd,&ditem->item_data,ditem->item_data.amount))){
+ clif_additem(ditem->first_sd,0,0,flag);
+ drop_flag = 1;
+ }
+ }
+ }
+ } else
+ #endif
+ if(battle_config.item_auto_get || ditem->first_sd->autoloot){//Autoloot added by Upa-Kun
+ drop_flag = 0;
+ if((flag = pc_additem(ditem->first_sd,&ditem->item_data,ditem->item_data.amount))){
+ clif_additem(ditem->first_sd,0,0,flag);
+ drop_flag = 1;
+ }
}
- free(ditem);
- return 0;
}
- 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);
+ if (drop_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);
+ }
- free(ditem);
+ aFree(ditem);
return 0;
}
@@ -1985,44 +2107,49 @@ static int mob_delay_item_drop2(int tid,unsigned int tick,int id,int data)
* mob data is erased.
*------------------------------------------
*/
-int mob_delete(struct mob_data *md)
+void mob_unload(struct mob_data *md)
+{
+ nullpo_retv(md);
+ mob_remove_map(md, 0);
+ map_deliddb(&md->bl);
+ aFree(md);
+ md = NULL;
+}
+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,1);
+ clif_clearchar_area(&md->bl,type);
map_delblock(&md->bl);
- if(mob_get_viewclass(md->class) <= 1000)
- clif_clearchar_delay(gettick()+3000,&md->bl,0);
- mob_deleteslave(md);
- mob_setdelayspawn(md->bl.id);
+ if (md->lootitem){
+ aFree(md->lootitem);
+ md->lootitem = NULL;
+ }
+
return 0;
}
-
-int mob_catch_delete(struct mob_data *md,int type)
+int mob_delete(struct mob_data *md)
{
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);
+ mob_remove_map(md, 1);
+ if (mob_get_viewclass(md->class_) <= 1000)
+ clif_clearchar_delay(gettick()+3000,&md->bl,0);
+ mob_deleteslave(md);
mob_setdelayspawn(md->bl.id);
return 0;
}
-
int mob_timer_delete(int tid, unsigned int tick, int id, int data)
{
- struct block_list *bl=map_id2bl(id);
- struct mob_data *md;
-
- nullpo_retr(0, bl);
+ struct mob_data *md=(struct mob_data *)map_id2bl(id);
+ nullpo_retr(0, md);
- md = (struct mob_data *)bl;
- mob_catch_delete(md,3);
+//for Alchemist CANNIBALIZE [Lupus]
+ mob_remove_map(md, 3);
+ mob_setdelayspawn(md->bl.id);
return 0;
}
@@ -2074,15 +2201,17 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
int mvp_damage,max_hp;
unsigned int tick = gettick();
struct map_session_data *mvp_sd = NULL, *second_sd = NULL,*third_sd = NULL;
- double dmg_rate,tdmg,temp;
+ struct block_list *master = NULL;
+ double tdmg,temp;
struct item item;
int ret;
int drop_rate;
- int skill,sp;
-
+ int race;
+
nullpo_retr(0, md); //src‚ÍNULL‚ŌĂ΂ê‚éê‡‚à‚ ‚é‚Ì‚ÅA‘¼‚Ń`ƒFƒbƒN
- max_hp = battle_get_max_hp(&md->bl);
+ 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;
@@ -2108,7 +2237,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
return 0;
}
- if(md->sc_data[SC_ENDURE].timer == -1)
+ if(battle_config.monster_damage_delay && md->sc_data[SC_ENDURE].timer == -1)
mob_stop_walking(md,3);
if(damage > max_hp>>2)
skill_stop_dancing(&md->bl,0);
@@ -2123,7 +2252,8 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
if(!(type&2)) {
if(sd!=NULL){
for(i=0,minpos=0,mindmg=0x7fffffff;i<DAMAGELOG_SIZE;i++){
- if(md->dmglog[i].id==sd->bl.id)
+ //if(md->dmglog[i].id==sd->bl.id)
+ if(md->dmglog[i].id==sd->status.char_id)
break;
if(md->dmglog[i].id==0){
minpos=i;
@@ -2137,7 +2267,8 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
if(i<DAMAGELOG_SIZE)
md->dmglog[i].dmg+=damage;
else {
- md->dmglog[minpos].id=sd->bl.id;
+ //md->dmglog[minpos].id=sd->bl.id;
+ md->dmglog[minpos].id=sd->status.char_id;
md->dmglog[minpos].dmg=damage;
}
@@ -2148,7 +2279,8 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
struct pet_data *pd = (struct pet_data *)src;
nullpo_retr(0, pd);
for(i=0,minpos=0,mindmg=0x7fffffff;i<DAMAGELOG_SIZE;i++){
- if(md->dmglog[i].id==pd->msd->bl.id)
+ //if(md->dmglog[i].id==pd->msd->bl.id)
+ if(md->dmglog[i].id==pd->msd->status.char_id)
break;
if(md->dmglog[i].id==0){
minpos=i;
@@ -2162,7 +2294,8 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
if(i<DAMAGELOG_SIZE)
md->dmglog[i].dmg+=(damage*battle_config.pet_attack_exp_rate)/100;
else {
- md->dmglog[minpos].id=pd->msd->bl.id;
+ //md->dmglog[minpos].id=pd->msd->bl.id;
+ md->dmglog[minpos].id=pd->msd->status.char_id;
md->dmglog[minpos].dmg=(damage*battle_config.pet_attack_exp_rate)/100;
}
}
@@ -2195,88 +2328,92 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
}
md->hp-=damage;
-
- if(md->class >= 1285 && md->class <=1287) { // guardian hp update [Valaris]
+
+ if(md->class_ >= 1285 && md->class_ <=1287) { // guardian hp update [Valaris]
struct guild_castle *gc=guild_mapname2gc(map[md->bl.m].name);
if(gc) {
- if(md->bl.id==gc->GID0) {
+ if(md->bl.id==gc->GID0) {
gc->Ghp0=md->hp;
if(gc->Ghp0<=0) {
guild_castledatasave(gc->castle_id,10,0);
guild_castledatasave(gc->castle_id,18,0);
}
- }
- if(md->bl.id==gc->GID1) {
+ }
+ if(md->bl.id==gc->GID1) {
gc->Ghp1=md->hp;
if(gc->Ghp1<=0) {
guild_castledatasave(gc->castle_id,11,0);
guild_castledatasave(gc->castle_id,19,0);
}
}
- if(md->bl.id==gc->GID2) {
+ if(md->bl.id==gc->GID2) {
gc->Ghp2=md->hp;
if(gc->Ghp2<=0) {
guild_castledatasave(gc->castle_id,12,0);
guild_castledatasave(gc->castle_id,20,0);
}
}
- if(md->bl.id==gc->GID3) {
+ if(md->bl.id==gc->GID3) {
gc->Ghp3=md->hp;
if(gc->Ghp3<=0) {
guild_castledatasave(gc->castle_id,13,0);
guild_castledatasave(gc->castle_id,21,0);
}
}
- if(md->bl.id==gc->GID4) {
+ if(md->bl.id==gc->GID4) {
gc->Ghp4=md->hp;
if(gc->Ghp4<=0) {
guild_castledatasave(gc->castle_id,14,0);
guild_castledatasave(gc->castle_id,22,0);
}
}
- if(md->bl.id==gc->GID5) {
+ if(md->bl.id==gc->GID5) {
gc->Ghp5=md->hp;
if(gc->Ghp5<=0) {
guild_castledatasave(gc->castle_id,15,0);
guild_castledatasave(gc->castle_id,23,0);
}
}
- if(md->bl.id==gc->GID6) {
+ if(md->bl.id==gc->GID6) {
gc->Ghp6=md->hp;
if(gc->Ghp6<=0) {
guild_castledatasave(gc->castle_id,16,0);
guild_castledatasave(gc->castle_id,24,0);
}
}
- if(md->bl.id==gc->GID7) {
+ if(md->bl.id==gc->GID7) {
gc->Ghp7=md->hp;
if(gc->Ghp7<=0) {
guild_castledatasave(gc->castle_id,17,0);
guild_castledatasave(gc->castle_id,25,0);
-
+
}
}
}
} // end addition [Valaris]
-
+
if(md->option&2 )
- skill_status_change_end(&md->bl, SC_HIDING, -1);
+ status_change_end(&md->bl, SC_HIDING, -1);
if(md->option&4 )
- skill_status_change_end(&md->bl, SC_CLOAKING, -1);
+ status_change_end(&md->bl, SC_CLOAKING, -1);
if(md->state.special_mob_ai == 2){//ƒXƒtƒBƒA[ƒ}ƒCƒ“
int skillidx=0;
-
- if((skillidx=mob_skillid2skillidx(md->class,NPC_SELFDESTRUCTION2))>=0){
+
+ if((skillidx=mob_skillid2skillidx(md->class_,NPC_SELFDESTRUCTION2))>=0){
md->mode |= 0x1;
md->next_walktime=tick;
mobskill_use_id(md,&md->bl,skillidx);//Ž©”š‰r¥ŠJŽn
md->state.special_mob_ai++;
}
+ if (src && md->master_id==src->id)
+ md->target_dir=map_calc_dir(src,md->bl.x,md->bl.y)+1;
}
if(md->hp>0){
+ if (battle_config.show_mob_hp)
+ clif_update_mobhp (md);
return 0;
}
@@ -2289,19 +2426,33 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
memset(tmpsd,0,sizeof(tmpsd));
memset(pt,0,sizeof(pt));
- max_hp = battle_get_max_hp(&md->bl);
+ max_hp = status_get_max_hp(&md->bl);
if(src && src->type == BL_MOB)
mob_unlocktarget((struct mob_data *)src,tick);
- /* ƒ\ƒEƒ‹ƒhƒŒƒCƒ“ */
- if(sd && (skill=pc_checkskill(sd,HW_SOULDRAIN))>0){
- clif_skill_nodamage(src,&md->bl,HW_SOULDRAIN,skill,1);
- sp = (battle_get_lv(&md->bl))*(65+15*skill)/100;
- if(sd->status.sp + sp > sd->status.max_sp)
- sp = sd->status.max_sp - sd->status.sp;
- sd->status.sp += sp;
- clif_heal(sd->fd,SP_SP,sp);
+
+ if(sd) {
+ int sp = 0, hp = 0;
+ if (sd->state.attack_type == BF_MAGIC && (i=pc_checkskill(sd,HW_SOULDRAIN))>0){ /* ƒ\ƒEƒ‹ƒhƒŒƒCƒ“ */
+ 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];
+ 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;
+ 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;
+ clif_heal(sd->fd,SP_HP,hp);
+ }
}
// mapŠO‚ÉÁ‚¦‚½l‚ÍŒvŽZ‚©‚眂­‚Ì‚Å
@@ -2311,7 +2462,12 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
for(i=0,count=0,mvp_damage=0;i<DAMAGELOG_SIZE;i++){
if(md->dmglog[i].id==0)
continue;
- tmpsd[i] = map_id2sd(md->dmglog[i].id);
+ // Will this slow things down too much?
+ tmpsd[i] = map_charid2sd(md->dmglog[i].id);
+ // try finding again
+ if(tmpsd[i] == NULL)
+ tmpsd[i] = map_id2sd(md->dmglog[i].id);
+ // if we still can't find the player
if(tmpsd[i] == NULL)
continue;
count++;
@@ -2327,64 +2483,81 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
}
}
- // [MouseJstr]
- if((map[md->bl.m].flag.pvp == 0) || (battle_config.pvp_exp == 1)) {
-
- if((double)max_hp < tdmg)
- dmg_rate = ((double)max_hp) / tdmg;
- else dmg_rate = 1;
+ // [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,base_exp,job_exp,flag=1,zeny=0;
double per;
struct party *p;
- if(tmpsd[i]==NULL || tmpsd[i]->bl.m != md->bl.m)
+ if(tmpsd[i]==NULL || tmpsd[i]->bl.m != md->bl.m || pc_isdead(tmpsd[i]))
continue;
-/* jAthena's exp formula
- per = ((double)md->dmglog[i].dmg)*(9.+(double)((count > 6)? 6:count))/10./((double)max_hp) * dmg_rate;
- temp = ((double)mob_db[md->class].base_exp * (double)battle_config.base_exp_rate / 100. * per);
- base_exp = (temp > 2147483647.)? 0x7fffffff:(int)temp;
- if(mob_db[md->class].base_exp > 0 && base_exp < 1) base_exp = 1;
- if(base_exp < 0) base_exp = 0;
- temp = ((double)mob_db[md->class].job_exp * (double)battle_config.job_exp_rate / 100. * per);
- job_exp = (temp > 2147483647.)? 0x7fffffff:(int)temp;
- if(mob_db[md->class].job_exp > 0 && job_exp < 1) job_exp = 1;
- if(job_exp < 0) job_exp = 0;
-*/
-//eAthena's exp formula rather than jAthena's
- per=(double)md->dmglog[i].dmg*256*(9+(double)((count > 6)? 6:count))/10/(double)max_hp;
- if(per>512) per=512;
- if(per<1) per=1;
- base_exp=mob_db[md->class].base_exp*per/256;
-
- if(base_exp < 1) base_exp = 1;
- if(sd && md && battle_config.pk_mode==1 && (mob_db[md->class].lv - sd->status.base_level >= 20)) {
- base_exp*=1.15; // pk_mode additional exp if monster >20 levels [Valaris]
- }
- job_exp=mob_db[md->class].job_exp*per/256;
- if(job_exp < 1) job_exp = 1;
- if(sd && md && battle_config.pk_mode==1 && (mob_db[md->class].lv - sd->status.base_level >= 20)) {
- job_exp*=1.15; // pk_mode additional exp if monster >20 levels [Valaris]
+
+ if (battle_config.exp_calc_type == 0) {
+ // jAthena's exp formula
+ per = ((double)md->dmglog[i].dmg)*(9.+(double)((count > 6)? 6:count))/10./tdmg;
+ temp = (double)mob_db[md->class_].base_exp * per;
+ base_exp = (temp > 2147483647.)? 0x7fffffff:(int)temp;
+ if(mob_db[md->class_].base_exp > 0 && base_exp < 1) base_exp = 1;
+ if(base_exp < 0) base_exp = 0;
+ temp = (double)mob_db[md->class_].job_exp * per;
+ job_exp = (temp > 2147483647.)? 0x7fffffff:(int)temp;
+ if(mob_db[md->class_].job_exp > 0 && job_exp < 1) job_exp = 1;
+ if(job_exp < 0) job_exp = 0;
}
- if(md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1) { // for summoned creatures [Valaris]
- base_exp = 0;
- job_exp = 0;
+ else if (battle_config.exp_calc_type == 1) {
+ //eAthena's exp formula rather than jAthena's
+ per=(double)md->dmglog[i].dmg*256*(9+(double)((count > 6)? 6:count))/10/(double)max_hp;
+ if(per>512) per=512;
+ if(per<1) per=1;
+ base_exp=(int) (mob_db[md->class_].base_exp*per/256);
+ if(base_exp < 1) base_exp = 1;
+ job_exp=(int) (mob_db[md->class_].job_exp*per/256);
+ if(job_exp < 1) job_exp = 1;
}
else {
- if(battle_config.zeny_from_mobs) {
- if(md->level > 0) zeny=(md->level+rand()%md->level)*per/256; // zeny calculation moblv + random moblv [Valaris]
- if(mob_db[md->class].mexp > 0)
+ //eAthena's exp formula rather than jAthena's, but based on total damage dealt
+ per=(double)md->dmglog[i].dmg*256*(9+(double)((count > 6)? 6:count))/10/tdmg;
+ if(per>512) per=512;
+ if(per<1) per=1;
+ base_exp=(int) (mob_db[md->class_].base_exp*per/256);
+ if(base_exp < 1) base_exp = 1;
+ job_exp=(int) (mob_db[md->class_].job_exp*per/256);
+ if(job_exp < 1) job_exp = 1;
+ }
+
+ if(sd) {
+ int rate;
+ if ((rate = sd->expaddrace[race]) > 0) {
+ base_exp = (100+rate)*base_exp/100;
+ job_exp = (100+rate)*job_exp/100;
+ }
+ if (battle_config.pk_mode && (mob_db[md->class_].lv - sd->status.base_level >= 20)) {
+ base_exp = (int) (base_exp *1.15); // pk_mode additional exp if monster >20 levels [Valaris]
+ job_exp = (int) (job_exp * 1.15);
+ }
+ }
+ if(md->master_id) {
+ if(((master = map_id2bl(md->master_id)) && status_get_mode(master)&0x20) || // check if its master is a boss (MVP's and minibosses)
+ (md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1)) { // for summoned creatures [Valaris]
+ base_exp = 0;
+ job_exp = 0;
+ }
+ } else {
+ if(battle_config.zeny_from_mobs) {
+ if(md->level > 0) zeny=(int) ((md->level+rand()%md->level)*per/256); // zeny calculation moblv + random moblv [Valaris]
+ if(mob_db[md->class_].mexp > 0)
zeny*=rand()%250;
}
- if(battle_config.mobs_level_up && md->level > mob_db[md->class].lv) { // [Valaris]
- job_exp+=((md->level-mob_db[md->class].lv)*mob_db[md->class].job_exp*.03)*per/256;
- base_exp+=((md->level-mob_db[md->class].lv)*mob_db[md->class].base_exp*.03)*per/256;
+ if(battle_config.mobs_level_up && md->level > mob_db[md->class_].lv) { // [Valaris]
+ job_exp+=(int) (((md->level-mob_db[md->class_].lv)*mob_db[md->class_].job_exp*.03)*per/256);
+ base_exp+=(int) (((md->level-mob_db[md->class_].lv)*mob_db[md->class_].base_exp*.03)*per/256);
}
}
-
+
if((pid=tmpsd[i]->status.party_id)>0){ // ƒp[ƒeƒB‚É“ü‚Á‚Ä‚¢‚é
- int j=0;
+ int j;
for(j=0;j<pnum;j++) // Œö•½ƒp[ƒeƒBƒŠƒXƒg‚É‚¢‚é‚©‚Ç‚¤‚©
if(pt[j].id==pid)
break;
@@ -2422,26 +2595,31 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
// item drop
if(!(type&1)) {
- int log_item[8] = {0};
- for(i=0;i<8;i++){
+ int log_item[10] = {0}; //8 -> 10 Lupus
+ int drop_ore = -1,drop_items=0; //slot N for DROP LOG, number of dropped items
+ for(i=0;i<10;i++){ // 8 -> 10 Lupus
struct delay_item_drop *ditem;
int drop_rate;
- if(md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1) // Added [Valaris]
+ if((master && status_get_mode(master)&0x20) || // check if its master is a boss (MVP's and minibosses)
+ (md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1)) // Added [Valaris]
break; // End
- if(mob_db[md->class].dropitem[i].nameid <= 0)
+ if(mob_db[md->class_].dropitem[i].nameid <= 0)
continue;
- drop_rate = mob_db[md->class].dropitem[i].p;
- if(drop_rate <= 0 && battle_config.drop_rate0item)
+ drop_rate = mob_db[md->class_].dropitem[i].p;
+ if(drop_rate <= 0 && !battle_config.drop_rate0item)
drop_rate = 1;
if(battle_config.drops_by_luk>0 && sd && md) drop_rate+=(sd->status.luk*battle_config.drops_by_luk)/100; // drops affected by luk [Valaris]
- if(sd && md && battle_config.pk_mode==1 && (mob_db[md->class].lv - sd->status.base_level >= 20)) drop_rate*=1.25; // pk_mode increase drops if 20 level difference [Valaris]
- if(drop_rate <= rand()%10000)
+ if(sd && md && battle_config.pk_mode==1 && (mob_db[md->class_].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=(struct delay_item_drop *)aCalloc(1,sizeof(struct delay_item_drop));
- ditem->nameid = mob_db[md->class].dropitem[i].nameid;
+ ditem->nameid = mob_db[md->class_].dropitem[i].nameid;
log_item[i] = ditem->nameid;
ditem->amount = 1;
ditem->m = md->bl.m;
@@ -2453,18 +2631,14 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
add_timer(tick+500+i,mob_delay_item_drop,(int)ditem,0);
}
- #ifndef TXT_ONLY
- if(log_config.drop > 0)
- log_drop(mvp_sd, md->class, log_item);
- #endif
-
// Ore Discovery [Celest]
- if (pc_checkskill(sd,BS_FINDINGORE)>0 && 1 >= rand()%1000) {
+ if (sd == mvp_sd && pc_checkskill(sd,BS_FINDINGORE)>0 && battle_config.finding_ore_rate/100 >= rand()%1000) {
struct delay_item_drop *ditem;
- int itemid[17] = { 714, 756, 757, 969, 984, 985, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1002 };
ditem=(struct delay_item_drop *)aCalloc(1,sizeof(struct delay_item_drop));
- ditem->nameid = itemid[rand()%17];
- log_item[i] = ditem->nameid;
+ ditem->nameid = itemdb_searchrandomid(6);
+ if (drop_ore<0) i=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[i] = ditem->nameid; //it's for logging only
+ drop_items++; //we count if there were any drops
ditem->amount = 1;
ditem->m = md->bl.m;
ditem->x = md->bl.x;
@@ -2475,20 +2649,18 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
add_timer(tick+500+i,mob_delay_item_drop,(int)ditem,0);
}
- #ifndef TXT_ONLY
- if(log_config.drop > 0)
- log_drop(mvp_sd, md->class, log_item);
- #endif
+ //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) {
for(i=0;i<sd->monster_drop_item_count;i++) {
struct delay_item_drop *ditem;
- int race = battle_get_race(&md->bl);
if(sd->monster_drop_itemid[i] <= 0)
continue;
- if(sd->monster_drop_race[i] & (1<<race) ||
- (mob_db[md->class].mode & 0x20 && sd->monster_drop_race[i] & 1<<10) ||
- (!(mob_db[md->class].mode & 0x20) && sd->monster_drop_race[i] & 1<<11) ) {
+ if(sd->monster_drop_race[i] & (1<<race) ||
+ (mob_db[md->class_].mode & 0x20 && sd->monster_drop_race[i] & 1<<10) ||
+ (!(mob_db[md->class_].mode & 0x20) && sd->monster_drop_race[i] & 1<<11) ) {
if(sd->monster_drop_itemrate[i] <= rand()%10000)
continue;
@@ -2505,7 +2677,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
}
}
if(sd->get_zeny_num > 0)
- pc_getzeny(sd,mob_db[md->class].lv*10 + rand()%(sd->get_zeny_num+1));
+ pc_getzeny(sd,mob_db[md->class_].lv*10 + rand()%(sd->get_zeny_num+1));
}
if(md->lootitem) {
for(i=0;i<md->lootitem_count;i++) {
@@ -2525,11 +2697,11 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
}
// mvpˆ—
- if(mvp_sd && mob_db[md->class].mexp > 0 ){
+ if(mvp_sd && mob_db[md->class_].mexp > 0 ){
int log_mvp[2] = {0};
int j;
int mexp;
- temp = ((double)mob_db[md->class].mexp * (double)battle_config.mvp_exp_rate * (9.+(double)count)/1000.);
+ temp = ((double)mob_db[md->class_].mexp * (9.+(double)count)/10.); //[Gengar]
mexp = (temp > 2147483647.)? 0x7fffffff:(int)temp;
if(mexp < 1) mexp = 1;
clif_mvp_effect(mvp_sd); // ƒGƒtƒFƒNƒg
@@ -2538,19 +2710,20 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
log_mvp[1] = mexp;
for(j=0;j<3;j++){
i = rand() % 3;
- if(mob_db[md->class].mvpitem[i].nameid <= 0)
+ if(mob_db[md->class_].mvpitem[i].nameid <= 0)
continue;
- drop_rate = mob_db[md->class].mvpitem[i].p;
- if(drop_rate <= 0 && battle_config.drop_rate0item)
+ drop_rate = mob_db[md->class_].mvpitem[i].p;
+ if(drop_rate <= 0 && !battle_config.drop_rate0item)
drop_rate = 1;
- if(drop_rate < battle_config.item_drop_mvp_min)
+/* if(drop_rate < battle_config.item_drop_mvp_min)
drop_rate = battle_config.item_drop_mvp_min;
- if(drop_rate > battle_config.item_drop_mvp_max)
+ else if(drop_rate > battle_config.item_drop_mvp_max) //fixed
drop_rate = battle_config.item_drop_mvp_max;
- if(drop_rate <= rand()%10000)
+*/
+ if(drop_rate <= rand()%10000+1) //if ==0, then it doesn't drop
continue;
memset(&item,0,sizeof(item));
- item.nameid=mob_db[md->class].mvpitem[i].nameid;
+ item.nameid=mob_db[md->class_].mvpitem[i].nameid;
item.identify=!itemdb_isequip3(item.nameid);
clif_mvp_item(mvp_sd,item.nameid);
log_mvp[0] = item.nameid;
@@ -2562,10 +2735,9 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
}
break;
}
- #ifndef TXT_ONLY
- if(log_config.mvpdrop > 0)
- log_mvpdrop(mvp_sd, md->class, log_mvp);
- #endif
+
+ if(log_config.mvpdrop > 0)
+ log_mvpdrop(mvp_sd, md->class_, log_mvp);
}
} // [MouseJstr]
@@ -2574,7 +2746,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
if(md->npc_event[0] && strcmp(((md->npc_event)+strlen(md->npc_event)-13),"::OnAgitBreak") == 0) {
printf("MOB.C: Run NPC_Event[OnAgitBreak].\n");
if (agit_flag == 1) //Call to Run NPC_Event[OnAgitBreak]
- guild_agit_break(md);
+ guild_agit_break(md);
}
// SCRIPTŽÀs
@@ -2590,7 +2762,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
struct map_session_data *tmpsd;
int i;
for(i=0;i<fd_max;i++){
- if(session[i] && (tmpsd=session[i]->session_data) && tmpsd->state.auth) {
+ if(session[i] && (tmpsd= (struct map_session_data *) session[i]->session_data) && tmpsd->state.auth) {
if(md->bl.m == tmpsd->bl.m) {
sd = tmpsd;
break;
@@ -2606,7 +2778,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
clif_clearchar_area(&md->bl,1);
if(md->level) md->level=0;
map_delblock(&md->bl);
- if(mob_get_viewclass(md->class) <= 1000)
+ if(mob_get_viewclass(md->class_) <= 1000)
clif_clearchar_delay(tick+3000,&md->bl,0);
mob_deleteslave(md);
mob_setdelayspawn(md->bl.id);
@@ -2622,26 +2794,26 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
int mob_class_change(struct mob_data *md,int *value)
{
unsigned int tick = gettick();
- int i,c,hp_rate,max_hp,class,count = 0;
+ int i,c,hp_rate,max_hp,class_,count = 0;
nullpo_retr(0, md);
nullpo_retr(0, value);
- if(value[0]<=1000 || value[0]>2000)
+ if(value[0]<=1000 || value[0]>MAX_MOB_DB)
return 0;
if(md->bl.prev == NULL) return 0;
- while(count < 5 && value[count] > 1000 && value[count] <= 2000) count++;
+ while(count < 5 && value[count] > 1000 && value[count] <= MAX_MOB_DB) count++;
if(count < 1) return 0;
- class = value[rand()%count];
- if(class<=1000 || class>2000) return 0;
+ class_ = value[rand()%count];
+ if(class_<=1000 || class_>MAX_MOB_DB) return 0;
- max_hp = battle_get_max_hp(&md->bl);
+ max_hp = status_get_max_hp(&md->bl);
hp_rate = md->hp*100/max_hp;
- clif_mob_class_change(md,class);
- md->class = class;
- max_hp = battle_get_max_hp(&md->bl);
+ clif_mob_class_change(md,class_);
+ md->class_ = class_;
+ max_hp = status_get_max_hp(&md->bl);
if(battle_config.monster_class_change_full_recover==1) {
md->hp = max_hp;
memset(md->dmglog,0,sizeof(md->dmglog));
@@ -2651,14 +2823,14 @@ int mob_class_change(struct mob_data *md,int *value)
if(md->hp > max_hp) md->hp = max_hp;
else if(md->hp < 1) md->hp = 1;
- memcpy(md->name,mob_db[class].jname,24);
+ memcpy(md->name,mob_db[class_].jname,24);
memset(&md->state,0,sizeof(md->state));
md->attacked_id = 0;
md->target_id = 0;
md->move_fail_count = 0;
- md->speed = mob_db[md->class].speed;
- md->def_ele = mob_db[md->class].element;
+ md->speed = mob_db[md->class_].speed;
+ md->def_ele = mob_db[md->class_].element;
mob_changestate(md,MS_IDLE,0);
skill_castcancel(&md->bl,0);
@@ -2667,14 +2839,13 @@ int mob_class_change(struct mob_data *md,int *value)
md->next_walktime = tick+rand()%50+5000;
md->attackabletime = tick;
md->canmove_tick = tick;
- md->sg_count=0;
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 && mob_db[class].mode&0x02)
+ if(md->lootitem == NULL && mob_db[class_].mode&0x02)
md->lootitem=(struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
skill_clear_unitgroup(&md->bl);
@@ -2692,15 +2863,16 @@ int mob_class_change(struct mob_data *md,int *value)
*/
int mob_heal(struct mob_data *md,int heal)
{
- int max_hp = battle_get_max_hp(&md->bl);
+ 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->class >= 1285 && md->class <=1287) { // guardian hp update [Valaris]
+ if(md->class_ >= 1285 && md->class_ <=1287) { // guardian hp update [Valaris]
struct guild_castle *gc=guild_mapname2gc(map[md->bl.m].name);
if(gc) {
if(md->bl.id==gc->GID0) gc->Ghp0=md->hp;
@@ -2714,6 +2886,9 @@ int mob_heal(struct mob_data *md,int heal)
}
} // end addition [Valaris]
+ if (battle_config.show_mob_hp)
+ clif_update_mobhp(md);
+
return 0;
}
@@ -2755,7 +2930,8 @@ int mob_warpslave(struct mob_data *md,int x, int y)
*/
int mob_warp(struct mob_data *md,int m,int x,int y,int type)
{
- int i=0,c,xs=0,ys=0,bx=x,by=y;
+ int i=0,xs=0,ys=0,bx=x,by=y;
+ int tick = gettick();
nullpo_retr(0, md);
@@ -2769,14 +2945,14 @@ int mob_warp(struct mob_data *md,int m,int x,int y,int type)
return 0;
clif_clearchar_area(&md->bl,type);
}
- skill_unit_out_all(&md->bl,gettick(),1);
+ skill_unit_move(&md->bl,tick,0);
map_delblock(&md->bl);
if(bx>0 && by>0){ // ˆÊ’uŽw’è‚ÌꇎüˆÍ‚XƒZƒ‹‚ð’Tõ
xs=ys=9;
}
- while( ( x<0 || y<0 || ((c=read_gat(m,x,y))==1 || c==5) ) && (i++)<1000 ){
+ 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;
@@ -2793,7 +2969,7 @@ int mob_warp(struct mob_data *md,int m,int x,int y,int type)
}else {
m=md->bl.m;
if(battle_config.error_log==1)
- printf("MOB %d warp failed, class = %d\n",md->bl.id,md->class);
+ printf("MOB %d warp failed, class = %d\n",md->bl.id,md->class_);
}
md->target_id=0; // ƒ^ƒQ‚ð‰ðœ‚·‚é
@@ -2804,10 +2980,11 @@ int mob_warp(struct mob_data *md,int m,int x,int y,int type)
if(type>0 && i==1000) {
if(battle_config.battle_log)
- printf("MOB %d warp to (%d,%d), class = %d\n",md->bl.id,x,y,md->class);
+ printf("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);
@@ -2833,7 +3010,6 @@ int mob_countslave_sub(struct block_list *bl,va_list ap)
nullpo_retr(0, c=va_arg(ap,int *));
nullpo_retr(0, md = (struct mob_data *)bl);
-
if( md->master_id==id )
(*c)++;
return 0;
@@ -2860,7 +3036,7 @@ int mob_countslave(struct mob_data *md)
int mob_summonslave(struct mob_data *md2,int *value,int amount,int flag)
{
struct mob_data *md;
- int bx,by,m,count = 0,class,k,a = amount;
+ int bx,by,m,count = 0,class_,k,a = amount;
nullpo_retr(0, md2);
nullpo_retr(0, value);
@@ -2869,24 +3045,24 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int flag)
by=md2->bl.y;
m=md2->bl.m;
- if(value[0]<=1000 || value[0]>2000) // ’l‚ªˆÙí‚Ȃ碊«‚ðŽ~‚ß‚é
+ if(value[0]<=1000 || value[0]>MAX_MOB_DB) // ’l‚ªˆÙí‚Ȃ碊«‚ðŽ~‚ß‚é
return 0;
- while(count < 5 && value[count] > 1000 && value[count] <= 2000) count++;
+ while(count < 21 && value[count] > 1000 && value[count] <= 2000) count++;
if(count < 1) return 0;
for(k=0;k<count;k++) {
amount = a;
- class = value[k];
- if(class<=1000 || class>2000) continue;
+ class_ = value[k];
+ if(class_<=1000 || class_>MAX_MOB_DB) continue;
for(;amount>0;amount--){
- int x=0,y=0,c=0,i=0;
+ int x=0,y=0,i=0;
md=(struct mob_data *)aCalloc(1,sizeof(struct mob_data));
- if(mob_db[class].mode&0x02)
+ if(mob_db[class_].mode&0x02)
md->lootitem=(struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
else
md->lootitem=NULL;
- while((x<=0 || y<=0 || (c=map_getcell(m,x,y))==1 || c==5 ) && (i++)<100){
+ while((x<=0 || y<=0 || map_getcell(m,x,y,CELL_CHKNOPASS)) && (i++)<100){
x=rand()%9-4+bx;
y=rand()%9-4+by;
}
@@ -2895,7 +3071,7 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int flag)
y=by;
}
- mob_spawn_dataset(md,"--ja--",class);
+ mob_spawn_dataset(md,"--ja--",class_);
md->bl.m=m;
md->bl.x=x;
md->bl.y=y;
@@ -2976,15 +3152,15 @@ int mob_counttargeted(struct mob_data *md,struct block_list *src,int target_lv)
*MOBskill‚©‚çŠY“–skillid‚Ìskillidx‚ð•Ô‚·
*------------------------------------------
*/
-int mob_skillid2skillidx(int class,int skillid)
+int mob_skillid2skillidx(int class_,int skillid)
{
int i;
- struct mob_skill *ms=mob_db[class].skill;
-
+ struct mob_skill *ms=mob_db[class_].skill;
+
if(ms==NULL)
return -1;
- for(i=0;i<mob_db[class].maxskill;i++){
+ for(i=0;i<mob_db[class_].maxskill;i++){
if(ms[i].skill_id == skillid)
return i;
}
@@ -3023,7 +3199,9 @@ int mobskill_castend_id( int tid, unsigned int tick, int id,int data )
md->skilltimer=-1;
//’¾–Ù‚âó‘ÔˆÙí‚È‚Ç
if(md->sc_data){
- if(md->opt1>0 || md->sc_data[SC_DIVINA].timer != -1 || md->sc_data[SC_ROKISWEIL].timer != -1 || md->sc_data[SC_STEELBODY].timer != -1)
+ if(md->opt1>0 || md->sc_data[SC_DIVINA].timer != -1 ||
+ (!(mob_db[md->class_].mode & 0x20) && md->sc_data[SC_ROKISWEIL].timer != -1) ||
+ md->sc_data[SC_STEELBODY].timer != -1)
return 0;
if(md->sc_data[SC_AUTOCOUNTER].timer != -1 && md->skillid != KN_AUTOCOUNTER) //ƒI[ƒgƒJƒEƒ“ƒ^[
return 0;
@@ -3033,7 +3211,7 @@ int mobskill_castend_id( int tid, unsigned int tick, int id,int data )
return 0;
}
if(md->skillid != NPC_EMOTION)
- md->last_thinktime=tick + battle_get_adelay(&md->bl);
+ md->last_thinktime=tick + status_get_adelay(&md->bl);
if((bl = map_id2bl(md->skilltarget)) == NULL || bl->prev==NULL){ //ƒXƒLƒ‹ƒ^[ƒQƒbƒg‚ª‘¶Ý‚µ‚È‚¢
//printf("mobskill_castend_id nullpo\n");//ƒ^[ƒQƒbƒg‚ª‚¢‚È‚¢‚Æ‚«‚Ínullpo‚¶‚á‚È‚­‚Ä•’Ê‚ÉI—¹
@@ -3043,12 +3221,12 @@ int mobskill_castend_id( int tid, unsigned int tick, int id,int data )
return 0;
if(md->skillid == PR_LEXAETERNA) {
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
if(sc_data && (sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0)))
return 0;
}
else if(md->skillid == RG_BACKSTAP) {
- int dir = map_calc_dir(&md->bl,bl->x,bl->y),t_dir = battle_get_dir(bl);
+ int dir = map_calc_dir(&md->bl,bl->x,bl->y),t_dir = status_get_dir(bl);
int dist = distance(md->bl.x,md->bl.y,bl->x,bl->y);
if(bl->type != BL_SKILL && (dist == 0 || map_check_dir(dir,t_dir)))
return 0;
@@ -3058,14 +3236,14 @@ int mobskill_castend_id( int tid, unsigned int tick, int id,int data )
return 0;
range = skill_get_range(md->skillid,md->skilllv);
if(range < 0)
- range = battle_get_range(&md->bl) - (range + 1);
+ range = status_get_range(&md->bl) - (range + 1);
if(range + battle_config.mob_skill_add_range < distance(md->bl.x,md->bl.y,bl->x,bl->y))
return 0;
md->skilldelay[md->skillidx]=tick;
if(battle_config.mob_skill_log)
- printf("MOB skill castend skill=%d, class = %d\n",md->skillid,md->class);
+ printf("MOB skill castend skill=%d, class = %d\n",md->skillid,md->class_);
// mob_stop_walking(md,0);
switch( skill_get_nk(md->skillid) )
@@ -3075,8 +3253,8 @@ int mobskill_castend_id( int tid, unsigned int tick, int id,int data )
skill_castend_damage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
break;
case 1:// Žx‰‡Œn
- if(!mob_db[md->class].skill[md->skillidx].val[0] &&
- (md->skillid==AL_HEAL || (md->skillid==ALL_RESURRECTION && bl->type != BL_PC)) && battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)) )
+ if(!mob_db[md->class_].skill[md->skillidx].val[0] &&
+ (md->skillid==AL_HEAL || (md->skillid==ALL_RESURRECTION && bl->type != BL_PC)) && battle_check_undead(status_get_race(bl),status_get_elem_type(bl)) )
skill_castend_damage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
else
skill_castend_nodamage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
@@ -3094,15 +3272,10 @@ 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 )
{
struct mob_data* md=NULL;
- struct block_list *bl;
int range,maxcount;
- //mobskill_castend_id“¯—l‰r¥‚µ‚½Mob‚ª‰r¥Š®—¹Žž‚É‚à‚¤‚¢‚È‚¢‚Æ‚¢‚¤‚Ì‚Í‚ ‚è‚»‚¤‚È‚Ì‚Ånullpo‚©‚眊O
- if((bl=map_id2bl(id))==NULL)
- return 0;
+ nullpo_retr(0, md=(struct mob_data *)map_id2bl(id));
- nullpo_retr(0, md=(struct mob_data *)bl);
-
if( md->bl.type!=BL_MOB || md->bl.prev==NULL )
return 0;
@@ -3111,7 +3284,9 @@ int mobskill_castend_pos( int tid, unsigned int tick, int id,int data )
md->skilltimer=-1;
if(md->sc_data){
- if(md->opt1>0 || md->sc_data[SC_DIVINA].timer != -1 || md->sc_data[SC_ROKISWEIL].timer != -1 || md->sc_data[SC_STEELBODY].timer != -1)
+ if(md->opt1>0 || md->sc_data[SC_DIVINA].timer != -1 ||
+ (!(mob_db[md->class_].mode & 0x20) && md->sc_data[SC_ROKISWEIL].timer != -1) ||
+ md->sc_data[SC_STEELBODY].timer != -1)
return 0;
if(md->sc_data[SC_AUTOCOUNTER].timer != -1 && md->skillid != KN_AUTOCOUNTER) //ƒI[ƒgƒJƒEƒ“ƒ^[
return 0;
@@ -3121,59 +3296,16 @@ int mobskill_castend_pos( int tid, unsigned int tick, int id,int data )
return 0;
}
- if(battle_config.monster_skill_reiteration == 0) {
- range = -1;
- switch(md->skillid) {
- case MG_SAFETYWALL:
- case WZ_FIREPILLAR:
- 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 PF_SPIDERWEB: /* ƒXƒpƒCƒ_[ƒEƒFƒbƒu */
- range = 0;
- break;
- case AL_PNEUMA:
- case AL_WARP:
- range = 1;
- break;
- }
- if(range >= 0) {
- if(skill_check_unit_range(md->bl.m,md->skillx,md->skilly,range,md->skillid) > 0)
- return 0;
- }
- }
- if(battle_config.monster_skill_nofootset) {
- range = -1;
- switch(md->skillid) {
- case WZ_FIREPILLAR:
- 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 AM_DEMONSTRATION:
- case PF_SPIDERWEB: /* ƒXƒpƒCƒ_[ƒEƒFƒbƒu */
- range = 1;
- break;
- case AL_WARP:
- range = 0;
- break;
- }
- if(range >= 0) {
- if(skill_check_unit_range2(md->bl.m,md->skillx,md->skilly,range) > 0)
- 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))
+ 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))
+ return 0;
+
if(battle_config.monster_land_skill_limit) {
maxcount = skill_get_maxcount(md->skillid);
@@ -3190,13 +3322,13 @@ int mobskill_castend_pos( int tid, unsigned int tick, int id,int data )
range = skill_get_range(md->skillid,md->skilllv);
if(range < 0)
- range = battle_get_range(&md->bl) - (range + 1);
+ range = status_get_range(&md->bl) - (range + 1);
if(range + battle_config.mob_skill_add_range < distance(md->bl.x,md->bl.y,md->skillx,md->skilly))
return 0;
md->skilldelay[md->skillidx]=tick;
if(battle_config.mob_skill_log)
- printf("MOB skill castend skill=%d, class = %d\n",md->skillid,md->class);
+ printf("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);
@@ -3216,8 +3348,8 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
int skill_id, skill_lv, forcecast = 0;
nullpo_retr(0, md);
- nullpo_retr(0, ms=&mob_db[md->class].skill[skill_idx]);
-
+ nullpo_retr(0, ms=&mob_db[md->class_].skill[skill_idx]);
+
if( target==NULL && (target=map_id2bl(md->target_id))==NULL )
return 0;
@@ -3229,7 +3361,9 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
// ’¾–Ù‚âˆÙí
if(md->sc_data){
- if(md->opt1>0 || md->sc_data[SC_DIVINA].timer != -1 || md->sc_data[SC_ROKISWEIL].timer != -1 || md->sc_data[SC_STEELBODY].timer != -1)
+ if(md->opt1>0 || md->sc_data[SC_DIVINA].timer != -1 ||
+ (!(mob_db[md->class_].mode & 0x20) && md->sc_data[SC_ROKISWEIL].timer != -1) ||
+ md->sc_data[SC_STEELBODY].timer != -1)
return 0;
if(md->sc_data[SC_AUTOCOUNTER].timer != -1 && md->skillid != KN_AUTOCOUNTER) //ƒI[ƒgƒJƒEƒ“ƒ^[
return 0;
@@ -3244,17 +3378,15 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
if(md->option&2 && skill_id!=TF_HIDING && skill_id!=AS_GRIMTOOTH && skill_id!=RG_BACKSTAP && skill_id!=RG_RAID)
return 0;
- if(map[md->bl.m].flag.gvg && (skill_id == SM_ENDURE || skill_id == AL_TELEPORT || skill_id == AL_WARP ||
- skill_id == WZ_ICEWALL || skill_id == TF_BACKSLIDING))
+ if(map[md->bl.m].flag.gvg && skill_db[skill_id].nocast & 4)
return 0;
-
if(skill_get_inf2(skill_id)&0x200 && md->bl.id == target->id)
return 0;
// ŽË’ö‚ÆáŠQ•¨ƒ`ƒFƒbƒN
range = skill_get_range(skill_id,skill_lv);
if(range < 0)
- range = battle_get_range(&md->bl) - (range + 1);
+ range = status_get_range(&md->bl) - (range + 1);
if(!battle_check_range(&md->bl,target,range))
return 0;
@@ -3266,7 +3398,7 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
switch(skill_id){ /* ‰½‚©“ÁŽê‚Ȉ—‚ª•K—v */
case ALL_RESURRECTION: /* ƒŠƒUƒŒƒNƒVƒ‡ƒ“ */
- if(target->type != BL_PC && battle_check_undead(battle_get_race(target),battle_get_elem_type(target))){ /* “G‚ªƒAƒ“ƒfƒbƒh‚È‚ç */
+ 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, skill_get_cast(PR_TURNUNDEAD,skill_lv) );
}
@@ -3276,10 +3408,15 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
case SA_SPELLBREAKER:
forcecast=1;
break;
+ case NPC_SUMMONSLAVE:
+ case NPC_SUMMONMONSTER:
+ if(md->master_id!=0)
+ return 0;
+ break;
}
if(battle_config.mob_skill_log)
- printf("MOB skill use target_id=%d skill=%d lv=%d cast=%d, class = %d\n",target->id,skill_id,skill_lv,casttime,md->class);
+ printf("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>0 || forcecast){ // ‰r¥‚ª•K—v
// struct mob_data *md2;
@@ -3288,8 +3425,9 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
md->bl.id, target->id, 0,0, skill_id,casttime);
// ‰r¥”½‰žƒ‚ƒ“ƒXƒ^[
-/* if( target->type==BL_MOB && mob_db[(md2=(struct mob_data *)target)->class].mode&0x10 &&
- md2->state.state!=MS_ATTACK){
+ // future homunculus support?
+/* if(md->master_id && target->type==BL_MOB && (md2=(struct mob_data *)target) &&
+ mob_db[md2->class_].mode&0x10 && md2->state.state!=MS_ATTACK){
md2->target_id=md->bl.id;
md->state.targettype = ATTACKABLE;
md2->min_chase=13;
@@ -3307,7 +3445,7 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
md->skillidx = skill_idx;
if(!(battle_config.monster_cloak_check_type&2) && md->sc_data[SC_CLOAKING].timer != -1 && md->skillid != AS_CLOAKING)
- skill_status_change_end(&md->bl,SC_CLOAKING,-1);
+ status_change_end(&md->bl,SC_CLOAKING,-1);
if( casttime>0 ){
md->skilltimer =
@@ -3332,7 +3470,7 @@ int mobskill_use_pos( struct mob_data *md,
int skill_id, skill_lv;
nullpo_retr(0, md);
- nullpo_retr(0, ms=&mob_db[md->class].skill[skill_idx]);
+ nullpo_retr(0, ms=&mob_db[md->class_].skill[skill_idx]);
if( md->bl.prev==NULL )
return 0;
@@ -3342,7 +3480,9 @@ int mobskill_use_pos( struct mob_data *md,
//’¾–Ù‚âó‘ÔˆÙí‚È‚Ç
if(md->sc_data){
- if(md->opt1>0 || md->sc_data[SC_DIVINA].timer != -1 || md->sc_data[SC_ROKISWEIL].timer != -1 || md->sc_data[SC_STEELBODY].timer != -1)
+ if(md->opt1>0 || md->sc_data[SC_DIVINA].timer != -1 ||
+ (!(mob_db[md->class_].mode & 0x20) && md->sc_data[SC_ROKISWEIL].timer != -1) ||
+ md->sc_data[SC_STEELBODY].timer != -1)
return 0;
if(md->sc_data[SC_AUTOCOUNTER].timer != -1 && md->skillid != KN_AUTOCOUNTER) //ƒI[ƒgƒJƒEƒ“ƒ^[
return 0;
@@ -3366,7 +3506,7 @@ int mobskill_use_pos( struct mob_data *md,
bl.y = skill_y;
range = skill_get_range(skill_id,skill_lv);
if(range < 0)
- range = battle_get_range(&md->bl) - (range + 1);
+ range = status_get_range(&md->bl) - (range + 1);
if(!battle_check_range(&md->bl,&bl,range))
return 0;
@@ -3377,7 +3517,7 @@ int mobskill_use_pos( struct mob_data *md,
if(battle_config.mob_skill_log)
printf("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);
+ skill_x,skill_y,skill_id,skill_lv,casttime,md->class_);
if( casttime>0 ) { // A cast time is required.
mob_stop_walking(md,0); // •às’âŽ~
@@ -3396,7 +3536,7 @@ int mobskill_use_pos( struct mob_data *md,
md->skilllv = skill_lv;
md->skillidx = skill_idx;
if(!(battle_config.monster_cloak_check_type&2) && md->sc_data[SC_CLOAKING].timer != -1)
- skill_status_change_end(&md->bl,SC_CLOAKING,-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 );
@@ -3428,7 +3568,7 @@ int mob_getfriendhpltmaxrate_sub(struct block_list *bl,va_list ap)
return 0;
rate=va_arg(ap,int);
fr=va_arg(ap,struct mob_data **);
- if( md->hp < mob_db[md->class].max_hp*rate/100 )
+ if( md->hp < mob_db[md->class_].max_hp*rate/100 )
(*fr)=md;
return 0;
}
@@ -3500,9 +3640,9 @@ int mobskill_use(struct mob_data *md,unsigned int tick,int event)
int i,max_hp;
nullpo_retr(0, md);
- nullpo_retr(0, ms = mob_db[md->class].skill);
+ nullpo_retr(0, ms = mob_db[md->class_].skill);
- max_hp = battle_get_max_hp(&md->bl);
+ max_hp = status_get_max_hp(&md->bl);
if(battle_config.mob_skill_use == 0 || md->skilltimer != -1)
return 0;
@@ -3513,7 +3653,7 @@ int mobskill_use(struct mob_data *md,unsigned int tick,int event)
if(md->sc_data[SC_SELFDESTRUCTION].timer!=-1) //Ž©”š’†‚̓XƒLƒ‹‚ðŽg‚í‚È‚¢
return 0;
- for(i=0;i<mob_db[md->class].maxskill;i++){
+ for(i=0;i<mob_db[md->class_].maxskill;i++){
int c2=ms[i].cond2,flag=0;
struct mob_data *fmd=NULL;
@@ -3579,24 +3719,24 @@ int mobskill_use(struct mob_data *md,unsigned int tick,int event)
continue;
// Ž©•ª‚ÌŽüˆÍ
if( ms[i].target>=MST_AROUND1 ){
- int bx=x, by=y, i=0, c, m=bl->m, r=ms[i].target-MST_AROUND1;
+ int bx=x, by=y, i=0, m=bl->m, r=ms[i].target-MST_AROUND1;
do{
bx=x + rand()%(r*2+3) - r;
by=y + rand()%(r*2+3) - r;
}while( ( bx<=0 || by<=0 || bx>=map[m].xs || by>=map[m].ys ||
- ((c=read_gat(m,bx,by))==1 || c==5) ) && (i++)<1000);
+ 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, c, m=bl->m, r=(ms[i].target-MST_AROUND5)+1;
+ 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( ( bx<=0 || by<=0 || bx>=map[m].xs || by>=map[m].ys ||
- ((c=read_gat(m,bx,by))==1 || c==5) ) && (i++)<1000);
+ map_getcell(m,bx,by,CELL_CHKNOPASS)) && (i++)<1000);
if(i<1000){
x=bx; y=by;
}
@@ -3645,27 +3785,30 @@ int mobskill_event(struct mob_data *md,int flag)
int mob_gvmobcheck(struct map_session_data *sd, struct block_list *bl)
{
struct mob_data *md=NULL;
-
+
nullpo_retr(0,sd);
nullpo_retr(0,bl);
-
+
if(bl->type==BL_MOB && (md=(struct mob_data *)bl) &&
- (md->class == 1288 || md->class == 1287 || md->class == 1286 || md->class == 1285))
+ (md->class_ == 1288 || md->class_ == 1287 || md->class_ == 1286 || md->class_ == 1285))
{
struct guild_castle *gc=guild_mapname2gc(map[sd->bl.m].name);
struct guild *g=guild_search(sd->status.guild_id);
- if(g == NULL && md->class == 1288)
+ if(g == NULL && md->class_ == 1288)
return 0;//ƒMƒ‹ƒh–¢‰Á“ü‚È‚çƒ_ƒ[ƒW–³‚µ
else if(gc != NULL && !map[sd->bl.m].flag.gvg)
return 0;//Ô“à‚ÅGv‚¶‚á‚È‚¢‚Æ‚«‚̓_ƒ[ƒW‚È‚µ
- else if(g && gc != NULL && g->guild_id == gc->guild_id)
- return 0;//Ž©è—̃Mƒ‹ƒh‚̃Gƒ“ƒy‚È‚çƒ_ƒ[ƒW–³‚µ
- else if(g && guild_checkskill(g,GD_APPROVAL) <= 0 && md->class == 1288)
- return 0;//³‹KƒMƒ‹ƒh³”F‚ª‚È‚¢‚ƃ_ƒ[ƒW–³‚µ
-
+ else if(g) {
+ if (gc != NULL && g->guild_id == gc->guild_id)
+ return 0;//Ž©è—̃Mƒ‹ƒh‚̃Gƒ“ƒy‚È‚çƒ_ƒ[ƒW–³‚µ
+ else if(guild_checkskill(g,GD_APPROVAL) <= 0 && md->class_ == 1288)
+ return 0;//³‹KƒMƒ‹ƒh³”F‚ª‚È‚¢‚ƃ_ƒ[ƒW–³‚µ
+ else if (gc && guild_check_alliance(gc->guild_id, g->guild_id, 0) == 1)
+ return 0; // “¯–¿‚È‚çƒ_ƒ[ƒW–³‚µ
+ }
}
-
+
return 1;
}
/*==========================================
@@ -3692,53 +3835,53 @@ int mobskill_deltimer(struct mob_data *md )
* Since un-setting [ mob ] up was used, it is an initial provisional value setup.
*------------------------------------------
*/
-static int mob_makedummymobdb(int class)
+static int mob_makedummymobdb(int class_)
{
int i;
- sprintf(mob_db[class].name,"mob%d",class);
- sprintf(mob_db[class].jname,"mob%d",class);
- mob_db[class].lv=1;
- mob_db[class].max_hp=1000;
- mob_db[class].max_sp=1;
- mob_db[class].base_exp=2;
- mob_db[class].job_exp=1;
- mob_db[class].range=1;
- mob_db[class].atk1=7;
- mob_db[class].atk2=10;
- mob_db[class].def=0;
- mob_db[class].mdef=0;
- mob_db[class].str=1;
- mob_db[class].agi=1;
- mob_db[class].vit=1;
- mob_db[class].int_=1;
- mob_db[class].dex=6;
- mob_db[class].luk=2;
- mob_db[class].range2=10;
- mob_db[class].range3=10;
- mob_db[class].size=0;
- mob_db[class].race=0;
- mob_db[class].element=0;
- mob_db[class].mode=0;
- mob_db[class].speed=300;
- mob_db[class].adelay=1000;
- mob_db[class].amotion=500;
- mob_db[class].dmotion=500;
- mob_db[class].dropitem[0].nameid=909; // Jellopy
- mob_db[class].dropitem[0].p=1000;
- for(i=1;i<8;i++){
- mob_db[class].dropitem[i].nameid=0;
- mob_db[class].dropitem[i].p=0;
+ sprintf(mob_db[class_].name,"mob%d",class_);
+ sprintf(mob_db[class_].jname,"mob%d",class_);
+ mob_db[class_].lv=1;
+ mob_db[class_].max_hp=1000;
+ mob_db[class_].max_sp=1;
+ mob_db[class_].base_exp=2;
+ mob_db[class_].job_exp=1;
+ mob_db[class_].range=1;
+ mob_db[class_].atk1=7;
+ mob_db[class_].atk2=10;
+ mob_db[class_].def=0;
+ mob_db[class_].mdef=0;
+ mob_db[class_].str=1;
+ mob_db[class_].agi=1;
+ mob_db[class_].vit=1;
+ mob_db[class_].int_=1;
+ mob_db[class_].dex=6;
+ mob_db[class_].luk=2;
+ mob_db[class_].range2=10;
+ mob_db[class_].range3=10;
+ mob_db[class_].size=0;
+ mob_db[class_].race=0;
+ mob_db[class_].element=0;
+ mob_db[class_].mode=0;
+ mob_db[class_].speed=300;
+ mob_db[class_].adelay=1000;
+ mob_db[class_].amotion=500;
+ mob_db[class_].dmotion=500;
+ //mob_db[class_].dropitem[0].nameid=909; // Jellopy
+ //mob_db[class_].dropitem[0].p=1000;
+ for(i=1;i<10;i++){ // 8-> 10 Lupus
+ mob_db[class_].dropitem[i].nameid=0;
+ mob_db[class_].dropitem[i].p=0;
}
// Item1,Item2
- mob_db[class].mexp=0;
- mob_db[class].mexpper=0;
+ mob_db[class_].mexp=0;
+ mob_db[class_].mexpper=0;
for(i=0;i<3;i++){
- mob_db[class].mvpitem[i].nameid=0;
- mob_db[class].mvpitem[i].p=0;
+ mob_db[class_].mvpitem[i].nameid=0;
+ mob_db[class_].mvpitem[i].p=0;
}
for(i=0;i<MAX_RANDOMMONSTER;i++)
- mob_db[class].summonper[i]=0;
+ mob_db[class_].summonper[i]=0;
return 0;
}
@@ -3764,13 +3907,13 @@ static int mob_readdb(void)
return -1;
}
while(fgets(line,1020,fp)){
- int class,i;
- char *str[55],*p,*np;
+ int class_,i;
+ char *str[60],*p,*np; // 55->60 Lupus
if(line[0] == '/' && line[1] == '/')
continue;
- for(i=0,p=line;i<55;i++){
+ for(i=0,p=line;i<60;i++){
if((np=strchr(p,','))!=NULL){
str[i]=p;
*np=0;
@@ -3779,113 +3922,122 @@ static int mob_readdb(void)
str[i]=p;
}
- class=atoi(str[0]);
- if(class<=1000 || class>2000)
+ class_=atoi(str[0]);
+ if(class_<=1000 || class_>MAX_MOB_DB)
continue;
- mob_db[class].view_class=class;
- memcpy(mob_db[class].name,str[1],24);
- memcpy(mob_db[class].jname,str[2],24);
- mob_db[class].lv=atoi(str[3]);
- mob_db[class].max_hp=atoi(str[4]);
- mob_db[class].max_sp=atoi(str[5]);
-
- mob_db[class].base_exp=atoi(str[6]);
- if(mob_db[class].base_exp < 0)
- mob_db[class].base_exp = 0;
- else if(mob_db[class].base_exp > 0 && (mob_db[class].base_exp*battle_config.base_exp_rate/100 > 1000000000 ||
- mob_db[class].base_exp*battle_config.base_exp_rate/100 < 0))
- mob_db[class].base_exp=1000000000;
- else
- mob_db[class].base_exp*= battle_config.base_exp_rate/100;
-
- mob_db[class].job_exp=atoi(str[7]);
- if(mob_db[class].job_exp < 0)
- mob_db[class].job_exp = 0;
- else if(mob_db[class].job_exp > 0 && (mob_db[class].job_exp*battle_config.job_exp_rate/100 > 1000000000 ||
- mob_db[class].job_exp*battle_config.job_exp_rate/100 < 0))
- mob_db[class].job_exp=1000000000;
- else
- mob_db[class].job_exp*=battle_config.job_exp_rate/100;
-
- mob_db[class].range=atoi(str[8]);
- mob_db[class].atk1=atoi(str[9]);
- mob_db[class].atk2=atoi(str[10]);
- mob_db[class].def=atoi(str[11]);
- mob_db[class].mdef=atoi(str[12]);
- mob_db[class].str=atoi(str[13]);
- mob_db[class].agi=atoi(str[14]);
- mob_db[class].vit=atoi(str[15]);
- mob_db[class].int_=atoi(str[16]);
- mob_db[class].dex=atoi(str[17]);
- mob_db[class].luk=atoi(str[18]);
- mob_db[class].range2=atoi(str[19]);
- mob_db[class].range3=atoi(str[20]);
- mob_db[class].size=atoi(str[21]);
- mob_db[class].race=atoi(str[22]);
- mob_db[class].element=atoi(str[23]);
- mob_db[class].mode=atoi(str[24]);
- mob_db[class].speed=atoi(str[25]);
- mob_db[class].adelay=atoi(str[26]);
- mob_db[class].amotion=atoi(str[27]);
- mob_db[class].dmotion=atoi(str[28]);
-
- for(i=0;i<8;i++){
+ mob_db[class_].view_class=class_;
+ memcpy(mob_db[class_].name,str[1],24);
+ memcpy(mob_db[class_].jname,str[2],24);
+ mob_db[class_].lv=atoi(str[3]);
+ mob_db[class_].max_hp=atoi(str[4]);
+ mob_db[class_].max_sp=atoi(str[5]);
+
+ mob_db[class_].base_exp = atoi(str[6]);
+ if (mob_db[class_].base_exp <= 0)
+ mob_db[class_].base_exp = 0;
+ else if (mob_db[class_].base_exp * battle_config.base_exp_rate / 100 > 1000000000 ||
+ mob_db[class_].base_exp * battle_config.base_exp_rate / 100 < 0)
+ mob_db[class_].base_exp = 1000000000;
+ else {
+ mob_db[class_].base_exp = mob_db[class_].base_exp * battle_config.base_exp_rate / 100;
+ if (mob_db[class_].base_exp < 1)
+ mob_db[class_].base_exp = 1;
+ }
+
+ mob_db[class_].job_exp = atoi(str[7]);
+ if (mob_db[class_].job_exp <= 0)
+ mob_db[class_].job_exp = 0;
+ else if (mob_db[class_].job_exp * battle_config.job_exp_rate / 100 > 1000000000 ||
+ mob_db[class_].job_exp * battle_config.job_exp_rate / 100 < 0)
+ mob_db[class_].job_exp = 1000000000;
+ else {
+ mob_db[class_].job_exp = mob_db[class_].job_exp * battle_config.job_exp_rate / 100;
+ if (mob_db[class_].job_exp < 1)
+ mob_db[class_].job_exp = 1;
+ }
+
+ mob_db[class_].range=atoi(str[8]);
+ mob_db[class_].atk1=atoi(str[9]);
+ mob_db[class_].atk2=atoi(str[10]);
+ mob_db[class_].def=atoi(str[11]);
+ mob_db[class_].mdef=atoi(str[12]);
+ mob_db[class_].str=atoi(str[13]);
+ mob_db[class_].agi=atoi(str[14]);
+ mob_db[class_].vit=atoi(str[15]);
+ mob_db[class_].int_=atoi(str[16]);
+ mob_db[class_].dex=atoi(str[17]);
+ mob_db[class_].luk=atoi(str[18]);
+ mob_db[class_].range2=atoi(str[19]);
+ mob_db[class_].range3=atoi(str[20]);
+ mob_db[class_].size=atoi(str[21]);
+ mob_db[class_].race=atoi(str[22]);
+ mob_db[class_].element=atoi(str[23]);
+ mob_db[class_].mode=atoi(str[24]);
+ mob_db[class_].speed=atoi(str[25]);
+ mob_db[class_].adelay=atoi(str[26]);
+ mob_db[class_].amotion=atoi(str[27]);
+ mob_db[class_].dmotion=atoi(str[28]);
+
+ for(i=0;i<10;i++){ // 8 -> 10 Lupus
int rate = 0,type,ratemin,ratemax;
- mob_db[class].dropitem[i].nameid=atoi(str[29+i*2]);
- type = itemdb_type(mob_db[class].dropitem[i].nameid);
- if (type == 0) { // Added [Valaris]
- rate = battle_config.item_rate_heal;
+ mob_db[class_].dropitem[i].nameid=atoi(str[29+i*2]);
+ type = itemdb_type(mob_db[class_].dropitem[i].nameid);
+ if (type == 0) {
+ rate = battle_config.item_rate_heal * atoi(str[30+i*2]) / 100; //fix by Yor
ratemin = battle_config.item_drop_heal_min;
ratemax = battle_config.item_drop_heal_max;
}
else if (type == 2) {
- rate = battle_config.item_rate_use;
+ rate = battle_config.item_rate_use * atoi(str[30+i*2]) / 100; //fix by Yor
ratemin = battle_config.item_drop_use_min;
ratemax = battle_config.item_drop_use_max; // End
}
else if (type == 4 || type == 5 || type == 8) { // Changed to include Pet Equip
- rate = battle_config.item_rate_equip;
+ rate = battle_config.item_rate_equip * atoi(str[30+i*2]) / 100;
ratemin = battle_config.item_drop_equip_min;
ratemax = battle_config.item_drop_equip_max;
}
else if (type == 6) {
- rate = battle_config.item_rate_card;
+ rate = battle_config.item_rate_card * atoi(str[30+i*2]) / 100;
ratemin = battle_config.item_drop_card_min;
ratemax = battle_config.item_drop_card_max;
}
else {
- rate = battle_config.item_rate_common;
+ rate = battle_config.item_rate_common * atoi(str[30+i*2]) / 100;
ratemin = battle_config.item_drop_common_min;
ratemax = battle_config.item_drop_common_max;
}
- rate = (rate / 100) * atoi(str[30+i*2]);
- rate = (rate < ratemin)? ratemin: (rate > ratemax)? ratemax: rate;
- mob_db[class].dropitem[i].p = rate;
+ mob_db[class_].dropitem[i].p = (rate < ratemin) ? ratemin : (rate > ratemax) ? ratemax: rate;
}
- // Item1,Item2
- mob_db[class].mexp=atoi(str[45])*battle_config.mvp_exp_rate/100;
- mob_db[class].mexpper=atoi(str[46]);
+ // MVP EXP Bonus, Chance: MEXP,ExpPer
+ mob_db[class_].mexp=atoi(str[49])*battle_config.mvp_exp_rate/100;
+ mob_db[class_].mexpper=atoi(str[50]);
+ // MVP Drops: MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
for(i=0;i<3;i++){
- mob_db[class].mvpitem[i].nameid=atoi(str[47+i*2]);
- mob_db[class].mvpitem[i].p=atoi(str[48+i*2])*battle_config.mvp_item_rate/100;
+ int rate=atoi(str[52+i*2])*battle_config.mvp_item_rate/100; //idea of the fix from Freya
+ mob_db[class_].mvpitem[i].nameid=atoi(str[51+i*2]);
+ mob_db[class_].mvpitem[i].p= (rate < battle_config.item_drop_mvp_min)
+ ? battle_config.item_drop_mvp_min : (rate > battle_config.item_drop_mvp_max)
+ ? battle_config.item_drop_mvp_max : rate;
}
for(i=0;i<MAX_RANDOMMONSTER;i++)
- mob_db[class].summonper[i]=0;
- mob_db[class].maxskill=0;
-
- mob_db[class].sex=0;
- mob_db[class].hair=0;
- mob_db[class].hair_color=0;
- mob_db[class].weapon=0;
- mob_db[class].shield=0;
- mob_db[class].head_top=0;
- mob_db[class].head_mid=0;
- mob_db[class].head_buttom=0;
- mob_db[class].clothes_color=0; //Add for player monster dye - Valaris
+ mob_db[class_].summonper[i]=0;
+ mob_db[class_].maxskill=0;
+
+ mob_db[class_].sex=0;
+ mob_db[class_].hair=0;
+ mob_db[class_].hair_color=0;
+ mob_db[class_].weapon=0;
+ mob_db[class_].shield=0;
+ mob_db[class_].head_top=0;
+ mob_db[class_].head_mid=0;
+ mob_db[class_].head_buttom=0;
+ mob_db[class_].clothes_color=0; //Add for player monster dye - Valaris
}
fclose(fp);
- printf("read %s done\n",filename[i]);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n",filename[i]);
+ ShowStatus(tmp_output);
}
return 0;
}
@@ -3899,7 +4051,7 @@ static int mob_readdb_mobavail(void)
FILE *fp;
char line[1024];
int ln=0;
- int class,j,k;
+ int class_,j,k;
char *str[20],*p,*np;
if( (fp=fopen("db/mob_avail.txt","r"))==NULL ){
@@ -3918,39 +4070,42 @@ static int mob_readdb_mobavail(void)
*np=0;
p=np+1;
} else
- str[j]=p;
- }
+ str[j]=p;
+ }
if(str[0]==NULL)
continue;
- class=atoi(str[0]);
-
- if(class<=1000 || class>2000) // ’l‚ªˆÙí‚Ȃ爗‚µ‚È‚¢B
+ class_=atoi(str[0]);
+ if(class_<=1000 || class_>MAX_MOB_DB) // ’l‚ªˆÙí‚Ȃ爗‚µ‚È‚¢B
continue;
+
k=atoi(str[1]);
- if(k >= 0)
- mob_db[class].view_class=k;
-
- if((mob_db[class].view_class < 24) || (mob_db[class].view_class > 4000)) {
- mob_db[class].sex=atoi(str[2]);
- mob_db[class].hair=atoi(str[3]);
- mob_db[class].hair_color=atoi(str[4]);
- mob_db[class].weapon=atoi(str[5]);
- mob_db[class].shield=atoi(str[6]);
- mob_db[class].head_top=atoi(str[7]);
- mob_db[class].head_mid=atoi(str[8]);
- mob_db[class].head_buttom=atoi(str[9]);
- mob_db[class].option=atoi(str[10])&~0x46;
- mob_db[class].clothes_color=atoi(str[11]); // Monster player dye option - Valaris
+ if(k < 0)
+ continue;
+ if (j > 3 && k > 23 && k < 69)
+ k += 3977; // advanced job/baby class
+ mob_db[class_].view_class=k;
+
+ if((k < 24) || (k > 4000)) {
+ mob_db[class_].sex=atoi(str[2]);
+ mob_db[class_].hair=atoi(str[3]);
+ mob_db[class_].hair_color=atoi(str[4]);
+ mob_db[class_].weapon=atoi(str[5]);
+ mob_db[class_].shield=atoi(str[6]);
+ mob_db[class_].head_top=atoi(str[7]);
+ mob_db[class_].head_mid=atoi(str[8]);
+ mob_db[class_].head_buttom=atoi(str[9]);
+ mob_db[class_].option=atoi(str[10])&~0x46;
+ mob_db[class_].clothes_color=atoi(str[11]); // Monster player dye option - Valaris
}
-
- else if(atoi(str[2]) > 0) mob_db[class].equip=atoi(str[2]); // mob equipment [Valaris]
+ else if(atoi(str[2]) > 0) mob_db[class_].equip=atoi(str[2]); // mob equipment [Valaris]
ln++;
}
fclose(fp);
- printf("read db/mob_avail.txt done (count=%d)\n",ln);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"db/mob_avail.txt");
+ ShowStatus(tmp_output);
return 0;
}
@@ -3978,7 +4133,7 @@ static int mob_read_randommonster(void)
return -1;
}
while(fgets(line,1020,fp)){
- int class,per;
+ int class_,per;
if(line[0] == '/' && line[1] == '/')
continue;
memset(str,0,sizeof(str));
@@ -3991,13 +4146,14 @@ static int mob_read_randommonster(void)
if(str[0]==NULL || str[2]==NULL)
continue;
- class = atoi(str[0]);
+ class_ = atoi(str[0]);
per=atoi(str[2]);
- if((class>1000 && class<=2000) || class==0)
- mob_db[class].summonper[i]=per;
+ if((class_>1000 && class_<=MAX_MOB_DB) || class_==0)
+ mob_db[class_].summonper[i]=per;
}
fclose(fp);
- printf("read %s done\n",mobfile[i]);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n",mobfile[i]);
+ ShowStatus(tmp_output);
}
return 0;
}
@@ -4116,7 +4272,10 @@ static int mob_readskilldb(void)
ms->state=state[j].id;
}
ms->skill_id=atoi(sp[3]);
- ms->skill_lv=atoi(sp[4]);
+ j=atoi(sp[4]);
+ if (j<=0 || j>MAX_SKILL_DB)
+ continue;
+ ms->skill_lv=j;
ms->permillage=atoi(sp[5]);
ms->casttime=atoi(sp[6]);
ms->delay=atoi(sp[7]);
@@ -4149,21 +4308,61 @@ static int mob_readskilldb(void)
mob_db[mob_id].maxskill=i+1;
}
fclose(fp);
- printf("read %s done\n",filename[x]);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n",filename[x]);
+ ShowStatus(tmp_output);
}
return 0;
}
-
-void mob_reload(void)
+/*==========================================
+ * db/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;
- <empty monster database>
- mob_read();
+ if( (fp=fopen("db/mob_race2_db.txt","r"))==NULL ){
+ printf("can't read db/mob_race2_db.txt\n");
+ 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;
- do_init_mob();
+ for (j=1; j<20; j++) {
+ if (!str[j])
+ break;
+ k=atoi(str[j]);
+ if (k < 1000 || k > MAX_MOB_DB)
+ continue;
+ mob_db[k].race2 = race;
+ //mob_race_db[race][j] = k;
+ }
+ }
+ fclose(fp);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/mob_race2_db.txt");
+ ShowStatus(tmp_output);
+ return 0;
}
#ifndef TXT_ONLY
@@ -4174,11 +4373,12 @@ void mob_reload(void)
static int mob_read_sqldb(void)
{
char line[1024];
- int i,class,ln=0;
- char *str[55],*p,*np;
-
+ int i,class_;
+ long unsigned int ln=0;
+ char *str[60],*p,*np; // 55->60 Lupus
+
memset(mob_db,0,sizeof(mob_db));
-
+
sprintf (tmp_sql, "SELECT * FROM `%s`",mob_db_db);
if(mysql_query(&mmysql_handle, tmp_sql) ) {
printf("DB server Error (select %s to Memory)- %s\n",mob_db_db,mysql_error(&mmysql_handle) );
@@ -4186,7 +4386,7 @@ static int mob_read_sqldb(void)
sql_res = mysql_store_result(&mmysql_handle);
if (sql_res) {
while((sql_row = mysql_fetch_row(sql_res))){
- sprintf(line,"%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s",
+ sprintf(line,"%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s",
sql_row[0],sql_row[1],sql_row[2],sql_row[3],sql_row[4],
sql_row[5],sql_row[6],sql_row[7],sql_row[8],sql_row[9],
sql_row[10],sql_row[11],sql_row[12],sql_row[13],sql_row[14],
@@ -4197,9 +4397,10 @@ static int mob_read_sqldb(void)
sql_row[35],sql_row[36],sql_row[37],sql_row[38],sql_row[39],
sql_row[40],sql_row[41],sql_row[42],sql_row[43],sql_row[44],
sql_row[45],sql_row[46],sql_row[47],sql_row[48],sql_row[49],
- sql_row[50],sql_row[51],sql_row[52]);
+ sql_row[50],sql_row[51],sql_row[52],sql_row[53],sql_row[54],
+ sql_row[55],sql_row[56]);
- for(i=0,p=line;i<55;i++){
+ for(i=0,p=line;i<57;i++){
if((np=strchr(p,','))!=NULL){
str[i]=p;
*np=0;
@@ -4207,109 +4408,141 @@ static int mob_read_sqldb(void)
} else
str[i]=p;
}
-
- class=atoi(str[0]);
- if(class<=1000 || class>2000)
+
+ class_=atoi(str[0]);
+ if(class_<=1000 || class_>MAX_MOB_DB)
continue;
-
+
ln++;
-
- mob_db[class].view_class=class;
- memcpy(mob_db[class].name,str[1],24);
- memcpy(mob_db[class].jname,str[2],24);
- mob_db[class].lv=atoi(str[3]);
- mob_db[class].max_hp=atoi(str[4]);
- mob_db[class].max_sp=atoi(str[5]);
- mob_db[class].base_exp=atoi(str[6])*
- battle_config.base_exp_rate/100;
- if(mob_db[class].base_exp <= 0)
- mob_db[class].base_exp = 1;
- mob_db[class].job_exp=atoi(str[7])*
- battle_config.job_exp_rate/100;
- if(mob_db[class].job_exp <= 0)
- mob_db[class].job_exp = 1;
- mob_db[class].range=atoi(str[8]);
- mob_db[class].atk1=atoi(str[9]);
- mob_db[class].atk2=atoi(str[10]);
- mob_db[class].def=atoi(str[11]);
- mob_db[class].mdef=atoi(str[12]);
- mob_db[class].str=atoi(str[13]);
- mob_db[class].agi=atoi(str[14]);
- mob_db[class].vit=atoi(str[15]);
- mob_db[class].int_=atoi(str[16]);
- mob_db[class].dex=atoi(str[17]);
- mob_db[class].luk=atoi(str[18]);
- mob_db[class].range2=atoi(str[19]);
- mob_db[class].range3=atoi(str[20]);
- mob_db[class].size=atoi(str[21]);
- mob_db[class].race=atoi(str[22]);
- mob_db[class].element=atoi(str[23]);
- mob_db[class].mode=atoi(str[24]);
- mob_db[class].speed=atoi(str[25]);
- mob_db[class].adelay=atoi(str[26]);
- mob_db[class].amotion=atoi(str[27]);
- mob_db[class].dmotion=atoi(str[28]);
-
- for(i=0;i<8;i++){
+
+ mob_db[class_].view_class=class_;
+ memcpy(mob_db[class_].name,str[1],24);
+ memcpy(mob_db[class_].jname,str[2],24);
+ mob_db[class_].lv=atoi(str[3]);
+ mob_db[class_].max_hp=atoi(str[4]);
+ mob_db[class_].max_sp=atoi(str[5]);
+
+ mob_db[class_].base_exp = atoi(str[6]);
+ if (mob_db[class_].base_exp <= 0)
+ mob_db[class_].base_exp = 0;
+ else if (mob_db[class_].base_exp * battle_config.base_exp_rate / 100 > 1000000000 ||
+ mob_db[class_].base_exp * battle_config.base_exp_rate / 100 < 0)
+ mob_db[class_].base_exp = 1000000000;
+ else {
+ mob_db[class_].base_exp = mob_db[class_].base_exp * battle_config.base_exp_rate / 100;
+ if (mob_db[class_].base_exp < 1)
+ mob_db[class_].base_exp = 1;
+ }
+ mob_db[class_].job_exp = atoi(str[7]);
+ if (mob_db[class_].job_exp <= 0)
+ mob_db[class_].job_exp = 0;
+ else if (mob_db[class_].job_exp * battle_config.job_exp_rate / 100 > 1000000000 ||
+ mob_db[class_].job_exp * battle_config.job_exp_rate / 100 < 0)
+ mob_db[class_].job_exp = 1000000000;
+ else {
+ mob_db[class_].job_exp = mob_db[class_].job_exp * battle_config.job_exp_rate / 100;
+ if (mob_db[class_].job_exp < 1)
+ mob_db[class_].job_exp = 1;
+ }
+
+ mob_db[class_].range=atoi(str[8]);
+ mob_db[class_].atk1=atoi(str[9]);
+ mob_db[class_].atk2=atoi(str[10]);
+ mob_db[class_].def=atoi(str[11]);
+ mob_db[class_].mdef=atoi(str[12]);
+ mob_db[class_].str=atoi(str[13]);
+ mob_db[class_].agi=atoi(str[14]);
+ mob_db[class_].vit=atoi(str[15]);
+ mob_db[class_].int_=atoi(str[16]);
+ mob_db[class_].dex=atoi(str[17]);
+ mob_db[class_].luk=atoi(str[18]);
+ mob_db[class_].range2=atoi(str[19]);
+ mob_db[class_].range3=atoi(str[20]);
+ mob_db[class_].size=atoi(str[21]);
+ mob_db[class_].race=atoi(str[22]);
+ mob_db[class_].element=atoi(str[23]);
+ mob_db[class_].mode=atoi(str[24]);
+ mob_db[class_].speed=atoi(str[25]);
+ mob_db[class_].adelay=atoi(str[26]);
+ mob_db[class_].amotion=atoi(str[27]);
+ mob_db[class_].dmotion=atoi(str[28]);
+
+ for(i=0;i<10;i++){ // 8 -> 10 Lupus
int rate = 0,type,ratemin,ratemax;
- mob_db[class].dropitem[i].nameid=atoi(str[29+i*2]);
- type = itemdb_type(mob_db[class].dropitem[i].nameid);
+ mob_db[class_].dropitem[i].nameid=atoi(str[29+i*2]);
+ type = itemdb_type(mob_db[class_].dropitem[i].nameid);
if (type == 0) { // Added by Valaris
- rate = battle_config.item_rate_heal;
+ rate = battle_config.item_rate_heal * atoi(str[30+i*2]) / 100;
ratemin = battle_config.item_drop_heal_min;
ratemax = battle_config.item_drop_heal_max;
}
else if (type == 2) {
- rate = battle_config.item_rate_use;
+ rate = battle_config.item_rate_use * atoi(str[30+i*2]) / 100;
ratemin = battle_config.item_drop_use_min;
ratemax = battle_config.item_drop_use_max; // End
}
else if (type == 4 || type == 5 || type == 8) { // Changed to include Pet Equip
- rate = battle_config.item_rate_equip;
+ rate = battle_config.item_rate_equip * atoi(str[30+i*2]) / 100;
ratemin = battle_config.item_drop_equip_min;
ratemax = battle_config.item_drop_equip_max;
}
else if (type == 6) {
- rate = battle_config.item_rate_card;
+ rate = battle_config.item_rate_card * atoi(str[30+i*2]) / 100;
ratemin = battle_config.item_drop_card_min;
ratemax = battle_config.item_drop_card_max;
}
else {
- rate = battle_config.item_rate_common;
+ rate = battle_config.item_rate_common * atoi(str[30+i*2]) / 100;
ratemin = battle_config.item_drop_common_min;
ratemax = battle_config.item_drop_common_max;
}
- rate = (rate / 100) * atoi(str[30+i*2]);
- rate = (rate < ratemin)? ratemin: (rate > ratemax)? ratemax: rate;
- mob_db[class].dropitem[i].p = rate;
+
+ mob_db[class_].dropitem[i].p = (rate < ratemin) ? ratemin : (rate > ratemax) ? ratemax: rate;
}
-
- mob_db[class].mexp=atoi(str[45])*battle_config.mvp_exp_rate/100;
- mob_db[class].mexpper=atoi(str[46]);
+ // MVP EXP Bonus, Chance: MEXP,ExpPer
+ mob_db[class_].mexp=atoi(str[49])*battle_config.mvp_exp_rate/100;
+ mob_db[class_].mexpper=atoi(str[50]);
+ // MVP Drops: MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
for(i=0;i<3;i++){
- mob_db[class].mvpitem[i].nameid=atoi(str[47+i*2]);
- mob_db[class].mvpitem[i].p=atoi(str[48+i*2])*battle_config.mvp_item_rate/100;
+ mob_db[class_].mvpitem[i].nameid=atoi(str[51+i*2]);
+ mob_db[class_].mvpitem[i].p=atoi(str[52+i*2])*battle_config.mvp_item_rate/100;
}
for(i=0;i<MAX_RANDOMMONSTER;i++)
- mob_db[class].summonper[i]=0;
- mob_db[class].maxskill=0;
-
- mob_db[class].sex=0;
- mob_db[class].hair=0;
- mob_db[class].hair_color=0;
- mob_db[class].weapon=0;
- mob_db[class].shield=0;
- mob_db[class].head_top=0;
- mob_db[class].head_mid=0;
- mob_db[class].head_buttom=0;
+ mob_db[class_].summonper[i]=0;
+ mob_db[class_].maxskill=0;
+
+ mob_db[class_].sex=0;
+ mob_db[class_].hair=0;
+ mob_db[class_].hair_color=0;
+ mob_db[class_].weapon=0;
+ mob_db[class_].shield=0;
+ mob_db[class_].head_top=0;
+ mob_db[class_].head_mid=0;
+ mob_db[class_].head_buttom=0;
}
mysql_free_result(sql_res);
- printf("read %s done (count=%d)\n",mob_db_db,ln);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,mob_db_db);
+ ShowStatus(tmp_output);
}
return 0;
}
-
#endif /* not TXT_ONLY */
+
+void mob_reload(void)
+{
+#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();
+}
+
/*==========================================
* Circumference initialization of mob
*------------------------------------------
@@ -4319,13 +4552,14 @@ int do_init_mob(void)
#ifndef TXT_ONLY
if(db_use_sqldbs)
mob_read_sqldb();
- else
+ 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");
diff --git a/src/map/mob.h b/src/map/mob.h
index e5a83be0f..6613c5b6b 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -3,6 +3,10 @@
#define _MOB_H_
#define MAX_RANDOMMONSTER 3
+#define MAX_MOB_RACE_DB 6
+#define MAX_MOB_DB 2000 /* Change this to increase the table size in your mob_db to accomodate
+ numbers more than 2000 for mobs if you want to (and know what you're doing).
+ Be sure to note that 4001 to 4047 are for advanced classes. */
struct mob_skill {
short state;
@@ -26,9 +30,10 @@ struct mob_db {
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[8];
+ 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]
@@ -72,32 +77,35 @@ enum {
};
enum {
- MSS_IDLE, // ‘Ò‹@
- MSS_WALK, // ˆÚ“®
- MSS_ATTACK, // UŒ‚
- MSS_DEAD, // Ž€–S
- MSS_LOOT, // ƒ‹[ƒg
- MSS_CHASE, // “ËŒ‚
+ MSS_IDLE, // ?@
+ MSS_WALK, // ?
+ MSS_ATTACK, // U
+ MSS_DEAD, // S
+ MSS_LOOT, // [g
+ MSS_CHASE, // ?
};
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 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);
+ 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 x,int y,const char *mobname,int class_,int amount,const char *event,int guardian); // Spawning Guardians [Valaris]
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_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);
@@ -116,8 +124,9 @@ short mob_get_clothes_color(int); //player mob dye [Valaris]
int mob_get_equip(int); // mob equip [Valaris]
int do_init_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_catch_delete(struct mob_data *md,int type);
int mob_timer_delete(int tid, unsigned int tick, int id, int data);
int mob_deleteslave(struct mob_data *md);
@@ -132,6 +141,7 @@ 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 flag);
+int mob_countslave(struct mob_data *md);
int mob_gvmobcheck(struct map_session_data *sd, struct block_list *bl);
void mob_reload(void);
diff --git a/src/map/npc.c b/src/map/npc.c
index b1f9c54ec..069597f83 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -15,29 +15,39 @@
#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 MEMWATCH
#include "memwatch.h"
#endif
-
+#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;
+// struct npc_src_list * prev; //[Shinomori]
char name[4];
-} ;
+};
-static struct npc_src_list *npc_src_first,*npc_src_last;
+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,npc_shop,npc_script,npc_mob;
-
+static int npc_warp=0;
+static int npc_shop=0;
+static int npc_script=0;
+static int npc_mob=0;
+char *current_file = NULL;
int npc_get_new_npc_id(void){ return npc_id++; }
static struct dbt *ev_db;
@@ -62,31 +72,33 @@ int npc_enable_sub( struct block_list *bl, va_list ap )
{
struct map_session_data *sd;
struct npc_data *nd;
- char *name=(char *)aCalloc(50,sizeof(char));
+ //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;
- memcpy(name,nd->name,50);
if(sd->areanpc_id==nd->bl.id)
return 1;
sd->areanpc_id=nd->bl.id;
- npc_event(sd,strcat(name,"::OnTouch"),0);
+
+ sprintf(name,"%s::OnTouch", nd->name);
+ npc_event(sd,name,0);
}
- free(name);
+ //aFree(name);
return 0;
}
int npc_enable(const char *name,int flag)
{
- struct npc_data *nd=strdb_search(npcname_db,name);
+ struct npc_data *nd= (struct npc_data *) strdb_search(npcname_db,name);
if (nd==NULL)
return 0;
-
+
if (flag&1) { // —LŒø‰»
nd->flag&=~1;
clif_spawnnpc(nd);
@@ -114,8 +126,17 @@ int npc_enable(const char *name,int flag)
*/
struct npc_data* npc_name2id(const char *name)
{
- return strdb_search(npcname_db,name);
+ return (struct npc_data *) strdb_search(npcname_db,name);
+}
+
+void ev_release(struct dbn *db, int which)
+{
+ if (which & 0x1)
+ aFree(db->key);
+ if (which & 0x2)
+ aFree(db->data);
}
+
/*==========================================
* ƒCƒxƒ“ƒgƒLƒ…[‚̃Cƒxƒ“ƒgˆ—
*------------------------------------------
@@ -126,47 +147,69 @@ int npc_event_dequeue(struct map_session_data *sd)
sd->npc_id=0;
if (sd->eventqueue[0][0]) { // ƒLƒ…[‚̃Cƒxƒ“ƒgˆ—
- char *name=(char *)aCalloc(50,sizeof(char));
- int i;
+ size_t ev;
- memcpy(name,sd->eventqueue[0],50);
- for(i=MAX_EVENTQUEUE-2;i>=0;i--)
- memcpy(sd->eventqueue[i],sd->eventqueue[i+1],50);
- add_timer(gettick()+100,npc_event_timer,sd->bl.id,(int)name);
+ // 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
+ printf("npc_event_dequeue: event timer is full !\n");
}
return 0;
}
-int npc_delete(struct npc_data *nd)
-{
- nullpo_retr(1, nd);
-
- if(nd->bl.prev == NULL)
- return 1;
-
- clif_clearchar_area(&nd->bl,1);
- map_delblock(&nd->bl);
- return 0;
-}
-
/*==========================================
* ƒCƒxƒ“ƒg‚Ì’x‰„ŽÀs
*------------------------------------------
*/
int npc_event_timer(int tid,unsigned int tick,int id,int data)
{
+ char *eventname = (char *)data;
+ struct event_data *ev = (struct event_data *)strdb_search(ev_db,eventname);
+ struct npc_data *nd;
struct map_session_data *sd=map_id2sd(id);
- if (sd==NULL)
- return 0;
-
- npc_event(sd,(const char *)data,0);
- free((void*)data);
+ size_t i;
+
+ if((ev==NULL || (nd=ev->nd)==NULL))
+ {
+ if(battle_config.error_log)
+ printf("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)
+ printf("npc_event_timer: event timer not found [%s]!\n",eventname);
+ }
+
+ aFree(eventname);
return 0;
}
int npc_timer_event(const char *eventname) // Added by RoVeRT
{
- struct event_data *ev=strdb_search(ev_db,eventname);
+ struct event_data *ev=(struct event_data *) strdb_search(ev_db,eventname);
struct npc_data *nd;
// int xs,ys;
@@ -220,7 +263,7 @@ int npc_timer(int tid,unsigned int tick,int id,int data) // Added by RoVeRT
{
strdb_foreach(npcname_db,npc_timer_sub);
- free((void*)data);
+ aFree((void*)data);
return 0;
}*/
/*==========================================
@@ -233,14 +276,14 @@ int npc_event_export(void *key,void *data,va_list ap)
char *lname=(char *)key;
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;
char *buf;
char *p=strchr(lname,':');
// ƒGƒNƒXƒ|[ƒg‚³‚ê‚é
- ev=calloc(sizeof(struct event_data), 1);
- buf=calloc(50, 1);
+ ev=(struct event_data *) aCalloc(sizeof(struct event_data), 1);
+ buf=(char *) aCallocA(50, 1);
if (ev==NULL || buf==NULL) {
printf("npc_event_export: out of memory !\n");
exit(1);
@@ -261,62 +304,6 @@ int npc_event_export(void *key,void *data,va_list ap)
return 0;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/*==========================================
* ‘S‚Ä‚ÌNPC‚ÌOn*ƒCƒxƒ“ƒgŽÀs
*------------------------------------------
@@ -326,29 +313,39 @@ int npc_event_doall_sub(void *key,void *data,va_list ap)
char *p=(char *)key;
struct event_data *ev;
int *c;
+ int rid;
const 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 char *);
+ rid=va_arg(ap, int);
if( (p=strchr(p,':')) && p && strcmpi(name,p)==0 ){
- run_script(ev->nd->u.scr.script,ev->pos,0,ev->nd->bl.id);
+ run_script(ev->nd->u.scr.script,ev->pos,rid,ev->nd->bl.id);
(*c)++;
}
-
+
return 0;
}
int npc_event_doall(const char *name)
{
int c=0;
char buf[64]="::";
-
+
+ strncpy(buf+2,name,62);
+ strdb_foreach(ev_db,npc_event_doall_sub,&c,buf,0);
+ return c;
+}
+int npc_event_doall_id(const char *name, int rid)
+{
+ int c=0;
+ char buf[64]="::";
+
strncpy(buf+2,name,62);
- strdb_foreach(ev_db,npc_event_doall_sub,&c,buf);
- return c;
+ strdb_foreach(ev_db,npc_event_doall_sub,&c,buf,rid);
+ return c;
}
int npc_event_do_sub(void *key,void *data,va_list ap)
@@ -374,7 +371,7 @@ int npc_event_do_sub(void *key,void *data,va_list ap)
int npc_event_do(const char *name)
{
int c=0;
-
+
if (*name==':' && name[1]==':') {
return npc_event_doall(name+2);
}
@@ -394,7 +391,7 @@ int npc_event_do_clock(int tid,unsigned int tick,int id,int data)
char buf[64];
char *day="";
int c=0;
-
+
time(&timer);
t=localtime(&timer);
@@ -407,7 +404,7 @@ int npc_event_do_clock(int tid,unsigned int tick,int id,int data)
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);
@@ -433,8 +430,10 @@ int npc_event_do_clock(int tid,unsigned int tick,int id,int data)
*/
int npc_event_do_oninit(void)
{
- int c = npc_event_doall("OnInit");
- printf("npc: OnInit Event done. (%d npc)\n",c);
+// int c = npc_event_doall("OnInit");
+ sprintf(tmp_output,"Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"
+ CL_WHITE"%d"CL_RESET"' NPCs.\n",npc_event_doall("OnInit"));
+ ShowStatus(tmp_output);
add_timer_interval(gettick()+100,
npc_event_do_clock,0,0,1000);
@@ -452,7 +451,7 @@ int npc_addeventtimer(struct npc_data *nd,int tick,const char *name)
if( nd->eventtimer[i]==-1 )
break;
if(i<MAX_EVENTTIMER){
- char *evname=malloc(24);
+ char *evname=(char *) aMallocA(24);
if(evname==NULL){
printf("npc_addeventtimer: out of memory !\n");exit(1);
}
@@ -493,33 +492,33 @@ int npc_cleareventtimer(struct npc_data *nd)
int npc_do_ontimer_sub(void *key,void *data,va_list ap)
{
- char *p=(char *)key;
- struct event_data *ev=(struct event_data *)data;
- int *c=va_arg(ap,int *);
+ char *p = (char *)key;
+ 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;
+ 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,':')) && p && strnicmp("::OnTimer",p,8)==0 ){
- sscanf(&p[9],"%s",temp);
- tick=atoi(temp);
+ 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);
+ strcpy(event, ev->nd->name);
+ strcat(event, p);
if (option!=0) {
- npc_addeventtimer(ev->nd,tick,event);
+ npc_addeventtimer(ev->nd, tick, event);
} else {
- npc_deleventtimer(ev->nd,event);
+ npc_deleventtimer(ev->nd, event);
}
}
return 0;
}
-int npc_do_ontimer(int npc_id, struct map_session_data *sd, int option)
+int npc_do_ontimer(int npc_id, int option)
{
- strdb_foreach(ev_db,npc_do_ontimer_sub,&npc_id,sd,option);
+ strdb_foreach(ev_db, npc_do_ontimer_sub, &npc_id, option);
return 0;
}
/*==========================================
@@ -533,13 +532,13 @@ int npc_timerevent_import(void *key,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=malloc(sizeof(struct npc_timerevent_list));
- else te=realloc( te, sizeof(struct npc_timerevent_list) * (i+1) );
+ 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){
printf("npc_timerevent_import: out of memory !\n");
exit(1);
@@ -573,7 +572,7 @@ int npc_timerevent(int tid,unsigned int tick,int id,int data)
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 ){
@@ -581,14 +580,14 @@ int npc_timerevent(int tid,unsigned int tick,int id,int data)
nd->u.scr.timerid = add_timer(tick+next,npc_timerevent,id,next);
}
- run_script(nd->u.scr.script,te->pos,0,nd->bl.id);
+ 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 npc_timerevent_start(struct npc_data *nd, int rid)
{
int j,n, next;
@@ -597,17 +596,19 @@ int npc_timerevent_start(struct npc_data *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]
- if(j>=n)
- return 0;
-
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;
@@ -626,6 +627,7 @@ int npc_timerevent_stop(struct npc_data *nd)
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;
}
@@ -660,7 +662,7 @@ int npc_settimerevent_tick(struct npc_data *nd,int newtimer)
npc_timerevent_stop(nd);
nd->u.scr.timer=newtimer;
if(flag>=0)
- npc_timerevent_start(nd);
+ npc_timerevent_start(nd, -1);
return 0;
}
@@ -670,7 +672,7 @@ int npc_settimerevent_tick(struct npc_data *nd,int newtimer)
*/
int npc_event(struct map_session_data *sd,const char *eventname,int mob_kill)
{
- struct event_data *ev=strdb_search(ev_db,eventname);
+ struct event_data *ev=(struct event_data *) strdb_search(ev_db,eventname);
struct npc_data *nd;
int xs,ys;
char mobevent[100];
@@ -686,7 +688,7 @@ int npc_event(struct map_session_data *sd,const char *eventname,int mob_kill)
if(mob_kill && (ev==NULL || (nd=ev->nd)==NULL)){
strcpy( mobevent, eventname);
strcat( mobevent, "::OnMyMobDead");
- ev=strdb_search(ev_db,mobevent);
+ ev= (struct event_data *) strdb_search(ev_db,mobevent);
if (ev==NULL || (nd=ev->nd)==NULL) {
if (strnicmp(eventname,"GM_MONSTER",10)!=0)
printf("npc_event: event not found [%s]\n",mobevent);
@@ -732,7 +734,7 @@ int npc_event(struct map_session_data *sd,const char *eventname,int mob_kill)
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;
@@ -753,7 +755,7 @@ int npc_command_sub(void *key,void *data,va_list ap)
if (strcmp(command,temp)==0)
run_script(ev->nd->u.scr.script,ev->pos,0,ev->nd->bl.id);
}
-
+
return 0;
}
@@ -782,7 +784,7 @@ int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y)
f=0;
continue;
}
-
+
switch(map[m].npc[i]->bl.subtype) {
case WARP:
xs=map[m].npc[i]->u.warp.xs;
@@ -813,15 +815,18 @@ int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y)
break;
case SCRIPT:
{
- char *name=(char *)aCalloc(50,sizeof(char));
+ //char *name=(char *)aCallocA(50,sizeof(char)); // fixed [Shinomori]
+ char name[50]; // need 24 max + 9 for "::OnTouch"
- memcpy(name,map[m].npc[i]->name,50);
- if(sd->areanpc_id==map[m].npc[i]->bl.id)
+ if(sd->areanpc_id == map[m].npc[i]->bl.id)
return 1;
- sd->areanpc_id=map[m].npc[i]->bl.id;
- if(npc_event(sd,strcat(name,"::OnTouch"),0)>0)
+ sd->areanpc_id = map[m].npc[i]->bl.id;
+
+ sprintf(name,"%s::OnTouch", map[m].npc[i]->name);
+
+ if( npc_event(sd,name,0)>0 )
npc_click(sd,map[m].npc[i]->bl.id);
- free(name);
+ //aFree(name);
break;
}
}
@@ -844,8 +849,8 @@ int npc_checknear(struct map_session_data *sd,int id)
printf("no such npc : %d\n",id);
return 1;
}
-
- if (nd->class<0) // ƒCƒxƒ“ƒgŒn‚Íí‚ÉOK
+
+ if (nd->class_<0) // ƒCƒxƒ“ƒgŒn‚Íí‚ÉOK
return 0;
// ƒGƒŠƒA”»’è
@@ -858,6 +863,32 @@ int npc_checknear(struct map_session_data *sd,int id)
}
/*==========================================
+ * NPC‚̃I[ƒvƒ“ƒ`ƒƒƒbƒg”­Œ¾
+ *------------------------------------------
+ */
+int npc_globalmessage(const char *name,char *mes)
+{
+ struct npc_data *nd=(struct npc_data *) strdb_search(npcname_db,name);
+ char temp[100];
+ char ntemp[50];
+ char *ltemp;
+
+ if(nd==NULL) return 0;
+ if(name==NULL) return 0;
+
+ ltemp=strchr(name,'#');
+ if(ltemp!=NULL) {
+ strncpy(ntemp,name,ltemp - name); // 123#456 ‚Ì # ‚©‚çŒã‚ë‚ð휂·‚é
+ ntemp[ltemp - name]=0x00; // strncpy ‚̃oƒOHŽg‚¢•ûŠÔˆá‚Á‚Ä‚éH
+ }
+
+ snprintf(temp, sizeof temp ,"%s : %s",ntemp,mes);
+ clif_GlobalMessage(&nd->bl,temp);
+
+ return 0;
+}
+
+/*==========================================
* ƒNƒŠƒbƒNŽž‚ÌNPCˆ—
*------------------------------------------
*/
@@ -957,7 +988,7 @@ 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;
+ int i,j,w,skill,itemamount=0,new_=0;
nullpo_retr(3, sd);
nullpo_retr(3, item_list);
@@ -987,7 +1018,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
case ADDITEM_EXIST:
break;
case ADDITEM_NEW:
- new++;
+ new_++;
break;
case ADDITEM_OVERAMOUNT:
return 2;
@@ -999,7 +1030,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
return 1; // zeny•s‘«
if (w+sd->weight > sd->max_weight)
return 2; // d—Ê’´‰ß
- if (pc_inventoryblank(sd)<new)
+ if (pc_inventoryblank(sd)<new_)
return 3; // Ží—Þ”’´‰ß
pc_payzeny(sd,(int)z);
@@ -1014,7 +1045,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
}
//¤lŒoŒ±’l
-/* if ((sd->status.class == 5) || (sd->status.class == 10) || (sd->status.class == 18)) {
+/* if ((sd->status.class_ == 5) || (sd->status.class_ == 10) || (sd->status.class_ == 18)) {
z = z * pc_checkskill(sd,MC_DISCOUNT) / ((1 + 300 / itemamount) * 4000) * battle_config.shop_exp;
pc_gainexp(sd,0,z);
}*/
@@ -1022,7 +1053,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
if (sd->status.skill[MC_DISCOUNT].flag != 0)
skill = sd->status.skill[MC_DISCOUNT].flag - 2;
if (skill > 0) {
- z = (log(z * (double)skill) * (double)battle_config.shop_exp/100.);
+ z = z * (double)skill * (double)battle_config.shop_exp/10000.;
if (z < 1)
z = 1;
pc_gainexp(sd,0,(int)z);
@@ -1074,7 +1105,7 @@ int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list)
}
//¤lŒoŒ±’l
-/* if ((sd->status.class == 5) || (sd->status.class == 10) || (sd->status.class == 18)) {
+/* if ((sd->status.class_ == 5) || (sd->status.class_ == 10) || (sd->status.class_ == 18)) {
z = z * pc_checkskill(sd,MC_OVERCHARGE) / ((1 + 500 / itemamount) * 4000) * battle_config.shop_exp ;
pc_gainexp(sd,0,z);
}*/
@@ -1082,7 +1113,7 @@ int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list)
if (sd->status.skill[MC_OVERCHARGE].flag != 0)
skill = sd->status.skill[MC_OVERCHARGE].flag - 2;
if (skill > 0) {
- z = (log(z * (double)skill) * (double)battle_config.shop_exp/100.);
+ z = z * (double)skill * (double)battle_config.shop_exp/10000.;
if (z < 1)
z = 1;
pc_gainexp(sd,0,(int)z);
@@ -1106,8 +1137,8 @@ static int calc_next_walk_step(struct npc_data *nd)
if(nd->walkpath.path_pos>=nd->walkpath.path_len)
return -1;
if(nd->walkpath.path[nd->walkpath.path_pos]&1)
- return battle_get_speed(&nd->bl)*14/10;
- return battle_get_speed(&nd->bl);
+ return status_get_speed(&nd->bl)*14/10;
+ return status_get_speed(&nd->bl);
}
@@ -1118,7 +1149,7 @@ static int calc_next_walk_step(struct npc_data *nd)
static int npc_walk(struct npc_data *nd,unsigned int tick,int data)
{
int moveblock;
- int i,ctype;
+ 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;
@@ -1143,8 +1174,7 @@ static int npc_walk(struct npc_data *nd,unsigned int tick,int data)
x = nd->bl.x;
y = nd->bl.y;
- ctype = map_getcell(nd->bl.m,x,y);
- if(ctype == 1 || ctype == 5) {
+ if(map_getcell(nd->bl.m,x,y,CELL_CHKNOPASS)) {
npc_stop_walking(nd,1);
return 0;
}
@@ -1152,8 +1182,7 @@ static int npc_walk(struct npc_data *nd,unsigned int tick,int data)
dx = dirx[nd->dir];
dy = diry[nd->dir];
- ctype = map_getcell(nd->bl.m,x+dx,y+dy);
- if(ctype == 1 || ctype == 5) {
+ if(map_getcell(nd->bl.m,x+dx,y+dy,CELL_CHKNOPASS)) {
npc_walktoxy_sub(nd);
return 0;
}
@@ -1183,7 +1212,7 @@ static int npc_walk(struct npc_data *nd,unsigned int tick,int data)
if(nd->walkpath.path_pos>=nd->walkpath.path_len)
clif_fixnpcpos(nd); // When npc stops, retransmission current of a position.
-
+
}
return 0;
}
@@ -1228,7 +1257,7 @@ static int npc_walktimer(int tid,unsigned int tick,int id,int data)
if(nd->walktimer != tid){
return 0;
}
-
+
nd->walktimer=-1;
if(nd->bl.prev == NULL)
@@ -1293,7 +1322,7 @@ int npc_stop_walking(struct npc_data *nd,int type)
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;
@@ -1318,7 +1347,7 @@ int npc_stop_walking(struct npc_data *nd,int type)
if(type&0x01)
clif_fixnpcpos(nd);
if(type&0x02) {
- int delay=battle_get_dmotion(&nd->bl);
+ int delay=status_get_dmotion(&nd->bl);
unsigned int tick = gettick();
if(nd->canmove_tick < tick)
nd->canmove_tick = tick + delay;
@@ -1327,6 +1356,56 @@ int npc_stop_walking(struct npc_data *nd,int type)
return 0;
}
+int npc_remove_map (struct npc_data *nd)
+{
+ nullpo_retr(1, nd);
+
+ if(nd->bl.prev == NULL)
+ return 1;
+
+#ifdef PCRE_SUPPORT
+ npc_chat_finalize(nd);
+#endif
+ clif_clearchar_area(&nd->bl,2);
+ strdb_erase(npcname_db, nd->name);
+ map_delblock(&nd->bl);
+ map_deliddb(&nd->bl);
+
+ return 0;
+}
+
+int npc_unload(struct npc_data *nd)
+{
+ nullpo_retr (0, 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) {
+ 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;
+ }
+ }
+ }
+ npc_remove_map (nd);
+ aFree(nd);
+ nd = NULL;
+
+ return 0;
+}
//
// ‰Šú‰»ŠÖŒW
@@ -1343,7 +1422,7 @@ void npc_clearsrcfile()
while( p ) {
struct npc_src_list *p2=p;
p=p->next;
- free(p2);
+ aFree(p2);
}
npc_src_first=NULL;
npc_src_last=NULL;
@@ -1354,7 +1433,7 @@ void npc_clearsrcfile()
*/
void npc_addsrcfile(char *name)
{
- struct npc_src_list *new;
+ struct npc_src_list *new_;
size_t len;
if ( strcmpi(name,"clear")==0 ) {
@@ -1362,16 +1441,27 @@ void npc_addsrcfile(char *name)
return;
}
- len = sizeof(*new) + strlen(name);
- new=(struct npc_src_list *)aCalloc(1,len);
- new->next = NULL;
- strncpy(new->name,name,strlen(name)+1);
+ {
+ // prevent multiple insert of source files
+ struct npc_src_list *p=npc_src_first;
+ while( p )
+ { // found the file, no need to insert it again
+ if( 0==strcmp(name,p->name) )
+ return;
+ p=p->next;
+ }
+ }
+
+ len = sizeof(*new_) + strlen(name);
+ new_=(struct npc_src_list *)aCalloc(1,len);
+ new_->next = NULL;
+ strncpy(new_->name,name,strlen(name)+1);
if (npc_src_first==NULL)
- npc_src_first = new;
+ npc_src_first = new_;
if (npc_src_last)
- npc_src_last->next = new;
+ npc_src_last->next = new_;
- npc_src_last=new;
+ npc_src_last=new_;
}
/*==========================================
* “Ç‚Ýž‚Þnpcƒtƒ@ƒCƒ‹‚Ìíœ
@@ -1391,7 +1481,7 @@ void npc_delsrcfile(char *name)
*lp=p->next;
if ( npc_src_last==p )
npc_src_last=pp;
- free(p);
+ aFree(p);
break;
}
}
@@ -1432,9 +1522,9 @@ int npc_parse_warp(char *w1,char *w2,char *w3,char *w4)
nd->chat_id=0;
if (!battle_config.warp_point_debug)
- nd->class=WARP_CLASS;
+ nd->class_=WARP_CLASS;
else
- nd->class=WARP_DEBUG_CLASS;
+ nd->class_=WARP_DEBUG_CLASS;
nd->speed=200;
nd->option = 0;
nd->opt1 = 0;
@@ -1449,11 +1539,9 @@ int npc_parse_warp(char *w1,char *w2,char *w3,char *w4)
for(i=0;i<ys;i++) {
for(j=0;j<xs;j++) {
- int t;
- t=map_getcell(m,x-xs/2+j,y-ys/2+i);
- if (t==1 || t==5)
+ 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,t|0x80);
+ map_setcell(m,x-xs/2+j,y-ys/2+i,CELL_SETNPC);
}
}
@@ -1494,20 +1582,26 @@ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4)
while (p && pos < max) {
int nameid,value;
+ struct item_data *id;
p++;
if (sscanf(p, "%d:%d", &nameid, &value) != 2)
break;
nd->u.shop_item[pos].nameid = nameid;
- if (value < 0) {
- struct item_data *id = itemdb_search(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) {
+ sprintf (tmp_output, "Item %s [%d] buying:%d < selling:%d\n",
+ id->name, id->nameid, value*75/100, id->value_sell*124/100);
+ ShowWarning (tmp_output);
+ }
pos++;
p=strchr(p,',');
}
if (pos == 0) {
- free(nd);
+ aFree(nd);
return 1;
}
nd->u.shop_item[pos++].nameid = 0;
@@ -1520,14 +1614,14 @@ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4)
nd->dir = dir;
nd->flag = 0;
memcpy(nd->name, w3, 24);
- nd->class = atoi(w4);
+ nd->class_ = atoi(w4);
nd->speed = 200;
nd->chat_id = 0;
nd->option = 0;
nd->opt1 = 0;
nd->opt2 = 0;
nd->opt3 = 0;
-
+
nd = (struct npc_data *)aRealloc(nd,
sizeof(struct npc_data) + sizeof(nd->u.shop_item[0]) * pos);
@@ -1554,20 +1648,28 @@ int npc_convertlabel_db(void *key,void *data,va_list ap)
struct npc_label_list *lst;
int num;
char *p=strchr(lname,':');
-
+
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 *)aCalloc(1,sizeof(struct npc_label_list));
+ 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));
*p='\0';
- strncpy(lst[num].name,lname,24);
+
+ // here we check if the label fit into the buffer
+ if (strlen(lname)>23) {
+ printf("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=':';
lst[num].pos=pos;
nd->u.scr.label_list=lst;
@@ -1580,7 +1682,7 @@ int npc_convertlabel_db(void *key,void *data,va_list ap)
*/
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
+ int x,y,dir=0,m,xs=0,ys=0,class_=0; // [Valaris] thanks to fov
char mapname[24];
unsigned char *srcbuf=NULL,*script;
int srcsize=65536;
@@ -1609,94 +1711,92 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
if(strcmp(w2,"script")==0){
// ƒXƒNƒŠƒvƒg‚̉ðÍ
- srcbuf=(char *)aCalloc(srcsize,sizeof(char));
+ srcbuf=(unsigned char *)aCallocA(srcsize,sizeof(char));
if (strchr(first_line,'{')) {
- strcpy(srcbuf,strchr(first_line,'{'));
+ strcpy((char *) srcbuf,strchr(first_line,'{'));
startline=*lines;
} else
srcbuf[0]=0;
while(1) {
- for(i=strlen(srcbuf)-1;i>=0 && isspace(srcbuf[i]);i--);
+ for(i=strlen((const char *) srcbuf)-1;i>=0 && isspace(srcbuf[i]);i--);
if (i>=0 && srcbuf[i]=='}')
break;
- fgets(line,1020,fp);
+ fgets((char *) line,1020,fp);
(*lines)++;
if (feof(fp))
break;
- if (strlen(srcbuf)+strlen(line)+1>=srcsize) {
+ if (strlen((char *) srcbuf)+strlen((char *) line)+1>=srcsize) {
srcsize += 65536;
- srcbuf = (char *)aRealloc(srcbuf, srcsize);
+ srcbuf = (unsigned char *)aRealloc(srcbuf, srcsize);
memset(srcbuf + srcsize - 65536, '\0', 65536);
}
if (srcbuf[0]!='{') {
- if (strchr(line,'{')) {
- strcpy(srcbuf,strchr(line,'{'));
+ if (strchr((char *) line,'{')) {
+ strcpy((char *) srcbuf,strchr((const char *) line,'{'));
startline=*lines;
}
} else
- strcat(srcbuf,line);
+ strcat((char *) srcbuf,(const char *) line);
}
- script=parse_script(srcbuf,startline);
+ script=(unsigned char *) parse_script((unsigned char *) srcbuf,startline);
if (script==NULL) {
// script parse error?
- free(srcbuf);
+ aFree(srcbuf);
return 1;
}
}else{
// duplicate‚·‚é
-
+
char srcname[128];
struct npc_data *nd2;
if( sscanf(w2,"duplicate(%[^)])",srcname)!=1 ){
- printf("bad duplicate name! : %s",w2);
+ printf("bad duplicate name (in %s)! : %s",current_file, w2);
return 0;
}
if( (nd2=npc_name2id(srcname))==NULL ){
- printf("bad duplicate name! (not exist) : %s\n",srcname);
+ printf("bad duplicate name (in %s)! (not exist) : %s\n", current_file, srcname);
return 0;
}
- script=nd2->u.scr.script;
+ 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) {
+
+ }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) {
+
+ if (class_>=0) {
for(i=0;i<ys;i++) {
for(j=0;j<xs;j++) {
- int t;
- t=map_getcell(m,x-xs/2+j,y-ys/2+i);
- if (t==1 || t==5)
+ 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,t|0x80);
+ 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);
+ class_=atoi(w4);
nd->u.scr.xs=0;
nd->u.scr.ys=0;
}
-
- if (class<0 && m>=0) { // ƒCƒxƒ“ƒgŒ^NPC
+
+ if (class_<0 && m>=0) { // ƒCƒxƒ“ƒgŒ^NPC
evflag=1;
}
@@ -1719,9 +1819,9 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
nd->bl.id=npc_get_new_npc_id();
nd->dir = dir;
nd->flag=0;
- nd->class=class;
+ nd->class_=class_;
nd->speed=200;
- nd->u.scr.script=script;
+ nd->u.scr.script=(char *) script;
nd->u.scr.src_id=src_id;
nd->chat_id=0;
nd->option = 0;
@@ -1730,7 +1830,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
nd->opt3 = 0;
nd->walktimer=-1;
- //printf("script npc %s %d %d read done\n",mapname,nd->bl.id,nd->class);
+ //printf("script npc %s %d %d read done\n",mapname,nd->bl.id,nd->class_);
npc_script++;
nd->bl.type=BL_NPC;
nd->bl.subtype=SCRIPT;
@@ -1738,6 +1838,11 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
nd->n=map_addnpc(m,nd);
map_addblock(&nd->bl);
+ // clear event timers upon initialise
+ memset(nd->eventqueue, 0, sizeof(nd->eventqueue));
+ for(i = 0; i < MAX_EVENTTIMER; i++)
+ nd->eventtimer[i] = -1;
+
if (evflag) { // ƒCƒxƒ“ƒgŒ^
struct event_data *ev=(struct event_data *)aCalloc(1,sizeof(struct event_data));
ev->nd=nd;
@@ -1750,21 +1855,21 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
//-----------------------------------------
- // ƒ‰ƒxƒ‹ƒf[ƒ^‚Ì€”õ
+ // ƒ‰ƒxƒ‹ƒf[ƒ^‚Ì€”õ
if(srcbuf){
// script–{‘Ì‚ª‚ ‚éꇂ̈—
-
+
// ƒ‰ƒxƒ‹ƒf[ƒ^‚̃Rƒ“ƒo[ƒg
label_db=script_get_label_db();
strdb_foreach(label_db,npc_convertlabel_db,nd);
-
+
// ‚à‚¤Žg‚í‚È‚¢‚̂Ńoƒbƒtƒ@‰ð•ú
- free(srcbuf);
+ aFree(srcbuf);
}else{
// duplicate
-// nd->u.scr.label_list=malloc(sizeof(struct npc_label_list)*label_dupnum);
+// nd->u.scr.label_list=aMallocA(sizeof(struct npc_label_list)*label_dupnum);
// memcpy(nd->u.scr.label_list,label_dup,sizeof(struct npc_label_list)*label_dupnum);
nd->u.scr.label_list=label_dup; // ƒ‰ƒxƒ‹ƒf[ƒ^‹¤—L
@@ -1776,25 +1881,76 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
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')) {
+/*
+I rearrange the code so this is just for commenting; remove it if you have enough if it [Shinomori]
struct event_data *ev;
char *buf;
// ƒGƒNƒXƒ|[ƒg‚³‚ê‚é
ev=(struct event_data *)aCalloc(1,sizeof(struct event_data));
- buf=(char *)aCalloc(50,sizeof(char));
+why allocing 50 chars ?
+ buf=(char *)aCallocA(50,sizeof(char));
+why checking here?
+lname is identical to nd->u.scr.label_list[i].name which is only 24 chars so check for strlen should be 23
if (strlen(lname)>24) {
- printf("npc_parse_script: label name error !\n");
+ printf("npc_parse_script: label name error (%s) !\n", current_file);
exit(1);
}else{
+ //struct event_data *ev2;
ev->nd=nd;
ev->pos=pos;
sprintf(buf,"%s::%s",nd->exname,lname);
+ //ev2 = strdb_search(ev_db,buf);
+ //if(ev2 != NULL) {
+ // printf("npc_parse_script : duplicate event %s\n",buf);
+ // aFree(ev2);
+ //}
+you are sure reentering the same database key will overwrite the existing entry?
strdb_insert(ev_db,buf,ev);
+anyway instead of removing data from the db and inserting a new one
+wouldn't it be easier just not to insert the new duplicate event, it is a duplicate anyway?
+ }
+*/
+ // 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)>23) {
+ printf("npc_parse_script: label name longer than 23 chars! '%s' (%s)\n", lname, current_file);
+ exit(1);
+ }else{
+ struct event_data *ev;
+ struct event_data *ev2;
+ char *buf;
+ // ƒGƒNƒXƒ|[ƒg‚³‚ê‚é
+
+ // 51 comes from: 24 for npc name + 24 for label + 2 for a "::" and 1 for EOS
+ //buf=(char *)aMalloc(51,sizeof(char));
+ // but to save some memory we alloc only the really necessary space
+ buf=(char *)aMalloc( (3+strlen(nd->exname)+strlen(lname))*sizeof(char));
+ sprintf(buf,"%s::%s",nd->exname,lname);
+
+ // search the label in ev_db;
+ // remember the label is max 50 chars + eos; see the strdb_init below
+ ev2 = (struct event_data *)strdb_search(ev_db,buf);
+ if(ev2 != NULL) {
+ printf("npc_parse_script : duplicate event %s (%s)\n",buf, current_file);
+
+ // just skip the label insertion and free the alloced buffer
+ aFree(buf);
+ }
+ else
+ { // generate the data and insert it
+ ev=(struct event_data *)aCalloc(1,sizeof(struct event_data));
+ ev->nd=nd;
+ ev->pos=pos;
+ strdb_insert(ev_db,buf,ev);
+ }
+
}
}
}
-
+
//-----------------------------------------
// ƒ‰ƒxƒ‹ƒf[ƒ^‚©‚çƒ^ƒCƒ}[ƒCƒxƒ“ƒgŽæ‚èž‚Ý
for(i=0;i<nd->u.scr.label_list_num;i++){
@@ -1806,7 +1962,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
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 *)aCalloc(1,sizeof(struct npc_timerevent_list));
+ 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++){
@@ -1824,7 +1980,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
nd->u.scr.nexttimer=-1;
nd->u.scr.timerid=-1;
-
+
return 0;
}
@@ -1843,7 +1999,7 @@ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_li
char *p;
// ƒXƒNƒŠƒvƒg‚̉ðÍ
- srcbuf=(char *)aCalloc(srcsize,sizeof(char));
+ srcbuf=(char *)aCallocA(srcsize,sizeof(char));
if (strchr(first_line,'{')) {
strcpy(srcbuf,strchr(first_line,'{'));
startline=*lines;
@@ -1870,14 +2026,14 @@ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_li
} else
strcat(srcbuf,line);
}
- script=parse_script(srcbuf,startline);
+ script= parse_script((unsigned char *) srcbuf,startline);
if (script==NULL) {
// script parse error?
- free(srcbuf);
+ aFree(srcbuf);
return 1;
}
- p=(char *)aCalloc(50,sizeof(char));
+ p=(char *)aCallocA(50,sizeof(char));
strncpy(p,w3,50);
strdb_insert(script_get_userfunc_db(),p,script);
@@ -1885,10 +2041,10 @@ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_li
// label_db=script_get_label_db();
// ‚à‚¤Žg‚í‚È‚¢‚̂Ńoƒbƒtƒ@‰ð•ú
- free(srcbuf);
-
+ aFree(srcbuf);
+
// printf("function %s => %p\n",p,script);
-
+
return 0;
}
@@ -1899,7 +2055,7 @@ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_li
*/
int npc_parse_mob(char *w1,char *w2,char *w3,char *w4)
{
- int m,x,y,xs,ys,class,num,delay1,delay2,level;
+ int m,x,y,xs,ys,class_,num,delay1,delay2,level;
int i;
char mapname[24];
char mobname[24];
@@ -1910,7 +2066,7 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4)
delay1=delay2=0;
// ˆø”‚̌”ƒ`ƒFƒbƒN
if (sscanf(w1,"%[^,],%d,%d,%d,%d",mapname,&x,&y,&xs,&ys) < 3 ||
- sscanf(w4,"%d,%d,%d,%d,%s",&class,&num,&delay1,&delay2,eventname) < 2 ) {
+ sscanf(w4,"%d,%d,%d,%d,%s",&class_,&num,&delay1,&delay2,eventname) < 2 ) {
printf("bad monster line : %s\n",w3);
return 1;
}
@@ -1925,13 +2081,13 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4)
for(i=0;i<num;i++) {
md=(struct mob_data *)aCalloc(1,sizeof(struct mob_data));
- if(class>4000) { // large/tiny mobs [Valaris]
+ if(class_>4000) { // large/tiny mobs [Valaris]
md->size=2;
- class-=4000;
+ class_-=4000;
}
- else if(class>2000) {
+ else if(class_>2000) {
md->size=1;
- class-=2000;
+ class_-=2000;
}
md->bl.prev=NULL;
@@ -1940,19 +2096,16 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4)
md->bl.x=x;
md->bl.y=y;
- if(sscanf(w3,"%[^,],%d",mobname,&level) > 1) {
- if(strcmp(mobname,"--en--")==0)
- memcpy(md->name,mob_db[class].name,24);
- else if(strcmp(mobname,"--ja--")==0)
- memcpy(md->name,mob_db[class].jname,24);
+ if(sscanf(w3,"%[^,],%d",mobname,&level) > 1)
md->level=level;
- }
-
- else
- memcpy(md->name,w3,24);
+ if(strcmp(mobname,"--en--")==0)
+ memcpy(md->name,mob_db[class_].name,24);
+ else if(strcmp(mobname,"--ja--")==0)
+ memcpy(md->name,mob_db[class_].jname,24);
+ else memcpy(md->name,mobname,24);
md->n = i;
- md->base_class = md->class = class;
+ md->base_class = md->class_ = class_;
md->bl.id=npc_get_new_npc_id();
md->m =m;
md->x0=x;
@@ -1966,9 +2119,9 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4)
md->timer = -1;
md->target_id=0;
md->attacked_id=0;
- md->speed=mob_db[class].speed;
+ md->speed=mob_db[class_].speed;
- if (mob_db[class].mode&0x02)
+ if (mob_db[class_].mode&0x02)
md->lootitem=(struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
else
md->lootitem=NULL;
@@ -2013,7 +2166,7 @@ static int npc_parse_mapflag(char *w1,char *w2,char *w3,char *w4)
//ƒ}ƒbƒvƒtƒ‰ƒO
if ( strcmpi(w3,"nosave")==0) {
if (strcmp(w4,"SavePoint")==0) {
- memcpy(map[m].save.map,"SavePoint",16);
+ memcpy(map[m].save.map,"SavePoint",10);
map[m].save.x=-1;
map[m].save.y=-1;
}else if (sscanf(w4,"%[^,],%d,%d",savemap,&savex,&savey)==3) {
@@ -2106,19 +2259,19 @@ static int npc_parse_mapflag(char *w1,char *w2,char *w3,char *w4)
}
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,"fog")==0) { // fog [Valaris]
map[m].flag.fog=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;
}
@@ -2128,15 +2281,116 @@ static int npc_parse_mapflag(char *w1,char *w2,char *w3,char *w4)
else if (strcmpi(w3,"nogo")==0) { // celest
map[m].flag.nogo=1;
}
-
+
+ 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, 1020, 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(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];
+ }
+ // ʼ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);
+ m = map_mapname2mapid(mapname);
+ if (strlen(mapname)>16 || m<0) {
+ // "mapname" is not assigned to this server
+ 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);
+ }
+ }
+ 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 buf2[64];
+
+ if(sscanf(p,"%[^#]#",buf2) == 1){
+ char map_name[64] = "";
+ strncpy(map_name, buf2, strlen(buf2) - 4);
+ strcat(map_name, ".gat");
+ if ((m = map_mapname2mapid(map_name)) >= 0)
+ map[m].flag.indoors=1;
+ }
+
+ p=strchr(p,10);
+ if(!p) break;
+ p++;
+ }
+ aFree(buf);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\indoorrswtable.txt");
+ ShowStatus(tmp_output);
+
return 0;
}
static int ev_db_final(void *key,void *data,va_list ap)
{
- free(data);
- if(strstr(key,"::")!=NULL)
- free(key);
+ aFree(data);
+ if(strstr((const char *) key,"::")!=NULL)
+ aFree(key);
return 0;
}
static int npcname_db_final(void *key,void *data,va_list ap)
@@ -2144,6 +2398,75 @@ static int npcname_db_final(void *key,void *data,va_list ap)
return 0;
}
/*==========================================
+ *
+ *------------------------------------------
+ */
+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;
+}
+int npc_reload(void)
+{
+ struct npc_src_list *nsl;
+ int m, last_npc_id;
+ time_t last_time = time(0);
+ int busy = 0;
+ char c = '-';
+
+ for (m = 0; m < map_num; m++) {
+ map_foreachinarea(npc_cleanup_sub, m, 0, 0, map[m].xs, map[m].ys, 0);
+ map[m].npc_num = 0;
+ }
+ if(ev_db)
+ strdb_final(ev_db,ev_db_final);
+ if(npcname_db)
+ strdb_final(npcname_db,npcname_db_final);
+
+ // anything else we should cleanup?
+ // Reloading npc's now
+ ev_db = strdb_init(51);
+ npcname_db = strdb_init(24);
+ ev_db->release = ev_release;
+ npc_warp = npc_shop = npc_script = npc_mob = 0;
+ last_npc_id = npc_id;
+
+ for (nsl = npc_src_first; nsl; nsl = nsl->next) {
+ npc_parsesrcfile(nsl->name);
+ printf("\r");
+ 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",
+ npc_id - last_npc_id, "", npc_warp, npc_shop, npc_script, npc_mob);
+
+ return 0;
+}
+/*==========================================
* I—¹
*------------------------------------------
*/
@@ -2153,7 +2476,6 @@ int do_final_npc(void)
struct block_list *bl;
struct npc_data *nd;
struct mob_data *md;
- struct chat_data *cd;
struct pet_data *pd;
if(ev_db)
@@ -2161,53 +2483,27 @@ int do_final_npc(void)
if(npcname_db)
strdb_final(npcname_db,npcname_db_final);
- for(i=START_NPC_NUM;i<npc_id;i++){
- if((bl=map_id2bl(i))){
+ npc_clearsrcfile();
+
+ for (i = START_NPC_NUM; i < npc_id; i++){
+ if((bl = map_id2bl(i))){
if(bl->type == BL_NPC && (nd = (struct npc_data *)bl)){
- if(nd->chat_id && (cd=(struct chat_data*)map_id2bl(nd->chat_id))){
- free(cd);
- cd = NULL;
- }
- if(nd->bl.subtype == SCRIPT){
- if(nd->u.scr.timer_event)
- free(nd->u.scr.timer_event);
- if(nd->u.scr.src_id==0){
- if(nd->u.scr.script){
- free(nd->u.scr.script);
- nd->u.scr.script=NULL;
- }
- if(nd->u.scr.label_list){
- free(nd->u.scr.label_list);
- nd->u.scr.label_list = NULL;
- }
- }
- }
- free(nd);
- nd = NULL;
- }else if(bl->type == BL_MOB && (md = (struct mob_data *)bl)){
- if(md->lootitem){
- free(md->lootitem);
+ npc_unload(nd);
+ }else if (bl->type == BL_MOB && (md = (struct mob_data *)bl)){
+ if (md->lootitem){
+ aFree(md->lootitem);
md->lootitem = NULL;
}
- free(md);
+ aFree(md);
md = NULL;
}else if(bl->type == BL_PET && (pd = (struct pet_data *)bl)){
- free(pd);
+ aFree(pd);
pd = NULL;
}
}
}
-
- return 0;
-}
-
-void ev_release(struct dbn *db, int which)
-{
- if (which & 0x1)
- free(db->key);
- if (which & 0x2)
- free(db->data);
+ return 0;
}
/*==========================================
@@ -2217,86 +2513,56 @@ void ev_release(struct dbn *db, int which)
int do_init_npc(void)
{
struct npc_src_list *nsl;
- FILE *fp;
- char line[1024];
- int m,lines;
-
- ev_db=strdb_init(24);
- npcname_db=strdb_init(24);
-
- ev_db->release = ev_release;
-
- memset(&ev_tm_b,-1,sizeof(ev_tm_b));
-
- for(nsl=npc_src_first;nsl;nsl=nsl->next) {
- if(nsl->prev){
- free(nsl->prev);
+ 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();
+ //npc_read_weather();
+
+ // 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=strdb_init(24);
+ ev_db = strdb_init(51);
+ npcname_db = strdb_init(24);
+ ev_db->release = ev_release;
+
+ memset(&ev_tm_b, -1, sizeof(ev_tm_b));
+
+ for (nsl = npc_src_first; nsl; nsl = nsl->next) {
+ /*if(nsl->prev){ // [Shinomori]
+ aFree(nsl->prev);
nsl->prev = NULL;
- }
- fp=fopen(nsl->name,"r");
- if (fp==NULL) {
- printf("file not found : %s\n",nsl->name);
- exit(1);
- }
- lines=0;
- while(fgets(line,1020,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(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];
- }
- // ʼ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);
- m = map_mapname2mapid(mapname);
- if (strlen(mapname)>16 || m<0) {
- // "mapname" is not assigned to this server
- 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);
+ }*/
+ //
+ npc_parsesrcfile(nsl->name);
+ current_file = NULL;
+ printf("\r");
+ 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;
}
}
- fclose(fp);
+ printf("[%c]",c);
+ fflush(stdout);
// printf("\rLoading NPCs [%d]: %-54s",npc_id-START_NPC_NUM,nsl->name);
// fflush(stdout);
}
- printf("\rNPCs Loaded: %d [Warps:%d Shops:%d Scripts:%d Mobs:%d]\n",
- npc_id-START_NPC_NUM,npc_warp,npc_shop,npc_script,npc_mob);
-
+ 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",
+ npc_id - START_NPC_NUM, "", npc_warp, npc_shop, npc_script, npc_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");
diff --git a/src/map/npc.h b/src/map/npc.h
index 4f0c43cba..2f81345d7 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -8,6 +8,10 @@
#define WARP_DEBUG_CLASS 722
#define INVISIBLE_CLASS 32767
+#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 char *npcname,int);
@@ -22,6 +26,7 @@ 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_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);
struct npc_data* npc_name2id(const char *name);
@@ -37,16 +42,21 @@ void npc_delsrcfile(char *);
int do_final_npc(void);
int do_init_npc(void);
int npc_event_do_oninit(void);
-int npc_do_ontimer(int,struct map_session_data *,int);
+int npc_do_ontimer(int,int);
int npc_event_doall(const char *name);
int npc_event_do(const char *name);
+int npc_event_doall_id(const char *name, int id);
-int npc_timerevent_start(struct npc_data *nd);
+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_delete(struct npc_data *nd);
+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..5ec8540ae
--- /dev/null
+++ b/src/map/npc_chat.c
@@ -0,0 +1,502 @@
+#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) {
+ free(e->pcre_);
+ free(e->pcre_extra_);
+ 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_;
+ else if(active == 1)
+ 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_);
+ 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_);
+}
+
+/**
+ * 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) {
+ printf("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
index 82b77cf6b..7eb3f02dc 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -30,7 +30,7 @@ int party_send_xyhp_timer(int tid,unsigned int tick,int id,int data);
*/
static int party_db_final(void *key,void *data,va_list ap)
{
- free(data);
+ aFree(data);
return 0;
}
void do_final_party(void)
@@ -49,7 +49,7 @@ void do_init_party(void)
// ŒŸõ
struct party *party_search(int party_id)
{
- return numdb_search(party_db,party_id);
+ return (struct party *) numdb_search(party_db,party_id);
}
int party_searchname_sub(void *key,void *data,va_list ap)
{
@@ -69,12 +69,12 @@ struct party* party_searchname(char *str)
return p;
}
// 쬗v‹
-int party_create(struct map_session_data *sd,char *name)
+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);
+ intif_create_party(sd,name,item,item2);
else
clif_party_created(sd,2);
return 0;
@@ -91,7 +91,7 @@ int party_created(int account_id,int fail,int party_id,char *name)
if(fail==0){
struct party *p;
sd->status.party_id=party_id;
- if((p=numdb_search(party_db,party_id))!=NULL){
+ if((p=(struct party *) numdb_search(party_db,party_id))!=NULL){
printf("party: id already exists!\n");
exit(1);
}
@@ -121,7 +121,7 @@ int party_check_member(struct party *p)
nullpo_retr(0, p);
for(i=0;i<fd_max;i++){
- if(session[i] && (sd=session[i]->session_data) && sd->state.auth){
+ if(session[i] && (sd=(struct map_session_data *) session[i]->session_data) && sd->state.auth){
if(sd->status.party_id==p->party_id){
int j,f=1;
for(j=0;j<MAX_PARTY;j++){ // ƒp[ƒeƒB‚Ƀf[ƒ^‚ª‚ ‚é‚©Šm”F
@@ -149,7 +149,7 @@ int party_recv_noinfo(int party_id)
int i;
struct map_session_data *sd;
for(i=0;i<fd_max;i++){
- if(session[i] && (sd=session[i]->session_data) && sd->state.auth){
+ if(session[i] && (sd=(struct map_session_data *) session[i]->session_data) && sd->state.auth){
if(sd->status.party_id==party_id)
sd->status.party_id=0;
}
@@ -164,7 +164,7 @@ int party_recv_info(struct party *sp)
nullpo_retr(0, sp);
- if((p=numdb_search(party_db,sp->party_id))==NULL){
+ if((p=(struct party *) numdb_search(party_db,sp->party_id))==NULL){
p=(struct party *)aCalloc(1,sizeof(struct party));
numdb_insert(party_db,sp->party_id,p);
@@ -175,7 +175,7 @@ int party_recv_info(struct party *sp)
for(i=0;i<MAX_PARTY;i++){ // sd‚ÌÝ’è
struct map_session_data *sd = map_id2sd(p->member[i].account_id);
- p->member[i].sd=(sd!=NULL && sd->status.party_id==p->party_id)?sd:NULL;
+ p->member[i].sd=(sd!=NULL && sd->status.party_id==p->party_id && !sd->state.waitingdisconnect)?sd:NULL;
}
clif_party_info(p,-1);
@@ -250,11 +250,13 @@ int party_reply_invite(struct map_session_data *sd,int account_id,int flag)
// ƒp[ƒeƒB‚ª’ljÁ‚³‚ꂽ
int party_member_added(int party_id,int account_id,int flag)
{
- struct map_session_data *sd= map_id2sd(account_id),*sd2;
- if(sd==NULL && flag==0){
- if(battle_config.error_log)
- printf("party: member added error %d is not online\n",account_id);
- intif_party_leave(party_id,account_id); // ƒLƒƒƒ‰‘¤‚É“o˜^‚Å‚«‚È‚©‚Á‚½‚½‚ß’E‘Þ—v‹‚ðo‚·
+ struct map_session_data *sd = map_id2sd(account_id),*sd2;
+ if(sd == NULL){
+ if (flag == 0) {
+ if(battle_config.error_log)
+ printf("party: member added error %d is not online\n",account_id);
+ intif_party_leave(party_id,account_id); // ƒLƒƒƒ‰‘¤‚É“o˜^‚Å‚«‚È‚©‚Á‚½‚½‚ß’E‘Þ—v‹‚ðo‚·
+ }
return 0;
}
sd2=map_id2sd(sd->party_invite_account);
@@ -417,7 +419,7 @@ int party_recv_movemap(int party_id,int account_id,char *map,int online,int lv)
for(i=0;i<MAX_PARTY;i++){ // sdÄÝ’è
struct map_session_data *sd= map_id2sd(p->member[i].account_id);
- p->member[i].sd=(sd!=NULL && sd->status.party_id==p->party_id)?sd:NULL;
+ p->member[i].sd=(sd!=NULL && sd->status.party_id==p->party_id && !sd->state.waitingdisconnect)?sd:NULL;
}
party_send_xy_clear(p); // À•WÄ’Ê’m—v¿
@@ -481,6 +483,7 @@ 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);
return 0;
}
@@ -583,16 +586,23 @@ int party_exp_share(struct party *p,int map,int base_exp,int job_exp,int zeny)
nullpo_retr(0, p);
- for(i=c=0;i<MAX_PARTY;i++)
- if((sd=p->member[i].sd)!=NULL && sd->bl.m==map)
+ for (i=c=0; i < MAX_PARTY; i++)
+ if ((sd = p->member[i].sd) != NULL && p->member[i].online && sd->bl.m == map /*&& session[sd->fd] != NULL*/) // should be done in socket.c
c++;
- if(c==0)
+
+ if(c == 0)
return 0;
- for(i=0;i<MAX_PARTY;i++)
- if((sd=p->member[i].sd)!=NULL && sd->bl.m==map) {
- pc_gainexp(sd,base_exp/c+1,job_exp/c+1);
- if(battle_config.zeny_from_mobs) // zeny from mobs [Valaris]
- pc_getzeny(sd,zeny/c+1);
+ for (i = 0; i < MAX_PARTY; i++)
+ if ((sd = p->member[i].sd) != NULL && p->member[i].online && sd->bl.m == map /*&& session[sd->fd] != NULL*/) {
+ if (battle_config.idle_no_share && (/* pc_issit(sd) || */ sd->chatID || (sd->idletime < (tick_ - 120))))
+ continue;
+ #ifdef TWILIGHT
+ pc_gainexp(sd,base_exp,job_exp);
+ #else
+ pc_gainexp(sd,(base_exp/c)+1,(job_exp/c)+1);
+ #endif
+ if (battle_config.zeny_from_mobs) // zeny from mobs [Valaris]
+ pc_getzeny(sd,(zeny/c)+1);
}
return 0;
}
diff --git a/src/map/party.h b/src/map/party.h
index 5259df7ff..203dd1057 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -13,7 +13,7 @@ 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 party_create(struct map_session_data *sd,char *name, int item, int item2);
int party_created(int account_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);
diff --git a/src/map/path.c b/src/map/path.c
index b2e0a78a8..c2b852469 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -168,17 +168,13 @@ static int add_path(int *heap,struct tmp_path *tp,int x,int y,int dist,int dir,i
*/
static int can_place(struct map_data *m,int x,int y,int flag)
{
- int c;
-
nullpo_retr(0, m);
- c=read_gatp(m,x,y);
-
- if(c==1)
- return 0;
- if(!(flag&0x10000) && c==5)
- return 0;
- return 1;
+ if(map_getcellp(m,x,y,CELL_CHKPASS))
+ return 1;
+ else if((flag&0x10000)&&map_getcellp(m,x,y,CELL_CHKGROUND))
+ return 1;
+ return 0;
}
/*==========================================
@@ -246,6 +242,76 @@ int path_blownpos(int m,int x0,int y0,int dx,int dy,int count)
}
/*==========================================
+ * êÀËå×îÍô?ª¬Ê¦Òöª«ªÉª¦ª«ªòÚ÷ª¹
+ *------------------------------------------
+ */
+#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)
*------------------------------------------
*/
@@ -262,7 +328,7 @@ int path_search(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int
if(!map[m].gat)
return -1;
md=&map[m];
- if(x1<0 || x1>=md->xs || y1<0 || y1>=md->ys || (i=read_gatp(md,x1,y1))==1 || i==5)
+ if(x1<0 || x1>=md->xs || y1<0 || y1>=md->ys || map_getcellp(md,x1,y1,CELL_CHKNOPASS))
return -1;
// easy
diff --git a/src/map/pc.c b/src/map/pc.c
index 917bbf0a4..e0c13012d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1,4 +1,4 @@
-// $Id: pc.c 101 2004-11-26 5:47:29 PM Celestia $
+// $Id: pc.c 101 2004-12-13 7:23:07 PM Celestia $
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -15,6 +15,7 @@
#include "clif.h"
#include "intif.h"
#include "pc.h"
+#include "status.h"
#include "npc.h"
#include "mob.h"
#include "pet.h"
@@ -43,29 +44,16 @@
#define PVP_CALCRANK_INTERVAL 1000 // PVP‡ˆÊŒvŽZ‚ÌŠÔŠu
-#define STATE_BLIND 0x10
-
-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];
-static char job_bonus[3][MAX_PC_CLASS][MAX_LEVEL];
static int exp_table[14][MAX_LEVEL];
-static char statp[255][7];
+static short statp[MAX_LEVEL];
-/*static struct {
- int id;
- int max;
- struct {
- short id,lv;
- } need[6];
-} skill_tree[3][MAX_PC_CLASS][100];*/ // moved to pc.h - celest
+extern char msg_table[1000][256];
-static int atkmods[3][20]; // •ŠíATKƒTƒCƒYC³(size_fix.txt)
-static int refinebonus[5][3]; // ¸?ƒ{?ƒiƒXƒe?ƒuƒ‹(refine_db.txt)
-static int percentrefinery[5][10]; // ¸?¬Œ÷—¦(refine_db.txt)
+// h-files are for declarations, not for implementations... [Shinomori]
+struct skill_tree_entry skill_tree[3][25][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};
@@ -89,11 +77,11 @@ int pc_isGM(struct map_session_data *sd) {
if (p == NULL)
return 0;
return p->level;*/
-
+
//For console [Wizputer]
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;
@@ -128,18 +116,12 @@ int pc_set_gm_level(int account_id, int level) {
}
GM_num++;
- gm_account = realloc(gm_account, sizeof(struct gm_account) * 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;
}
-int pc_getrefinebonus(int lv, int type) {
- if (lv >= 0 && lv < 5 && type >= 0 && type < 3)
- return refinebonus[lv][type];
- return 0;
-}
-
static int distance(int x0, int y0, int x1, int y1) {
int dx, dy;
@@ -160,6 +142,7 @@ static int pc_invincible_timer(int tid,unsigned int tick,int id,int data) {
return 0;
}
sd->invincible_timer=-1;
+ skill_unit_move(&sd->bl,tick,1);
return 0;
}
@@ -180,12 +163,12 @@ int pc_delinvincibletimer(struct map_session_data *sd) {
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;
- int i;
if( (sd=(struct map_session_data *)map_id2sd(id)) == NULL || sd->bl.type!=BL_PC )
return 1;
@@ -195,22 +178,26 @@ static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data) {
printf("spirit_timer %d != %d\n",sd->spirit_timer[0],tid);
return 0;
}
- sd->spirit_timer[0]=-1;
- for(i=1;i<sd->spiritball;i++) {
- sd->spirit_timer[i-1] = sd->spirit_timer[i];
- sd->spirit_timer[i] = -1;
+
+ if(sd->spiritball <= 0) {
+ if(battle_config.error_log)
+ printf("Spiritballs are already 0 when pc_spiritball_timer gets called");
+ sd->spiritball = 0;
+ return 0;
}
+
sd->spiritball--;
- if(sd->spiritball < 0)
- sd->spiritball = 0;
+ // 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) {
- int i;
-
nullpo_retr(0, sd);
if(max > MAX_SKILL_LEVEL)
@@ -219,16 +206,13 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max) {
sd->spiritball = 0;
if(sd->spiritball >= max) {
- if(sd->spirit_timer[0] != -1) {
+ if(sd->spirit_timer[0] != -1)
delete_timer(sd->spirit_timer[0],pc_spiritball_timer);
- sd->spirit_timer[0] = -1;
- }
- for(i=1;i<max;i++) {
- sd->spirit_timer[i-1] = sd->spirit_timer[i];
- sd->spirit_timer[i] = -1;
- }
- }
- else
+ // 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);
@@ -276,13 +260,18 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) {
nullpo_retr(0, sd);
- s_class = pc_calc_base_job(sd->status.class);
+ s_class = pc_calc_base_job(sd->status.class_);
//-----------------------
// Ž€–S‚µ‚½
- if(sd->special_state.restart_full_recover) { // ƒIƒVƒŠƒXƒJ?ƒh
+ 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(s_class.job == 0 && battle_config.restart_hp_rate < 50) { //ƒmƒr‚Í”¼•ª‰ñ•œ
@@ -310,7 +299,7 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) {
/* removed exp penalty on spawn [Valaris] */
- if(type&2 && sd->status.class != 0 && battle_config.zeny_penalty > 0 && !map[sd->bl.m].flag.nozenypenalty) {
+ if(type&2 && sd->status.class_ != 0 && 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;
@@ -378,37 +367,40 @@ int pc_makesavestatus(struct map_session_data *sd)
{
nullpo_retr(0, sd);
- // •ž‚ÌF‚ÍF?•¾ŠQ‚ª‘½‚¢‚Ì‚Å•Û‘¶?Û‚É‚Í‚µ‚È‚¢
+ // •bÌF‚ÍF?•¾ŠQ‚ª‘½‚¢‚Ì‚Å•Û‘¶?Û‚É‚Í‚µ‚È‚¢
if(!battle_config.save_clothcolor)
sd->status.clothes_color=0;
// Ž€–S?‘Ô‚¾‚Á‚½‚Ì‚Åhp‚ð1AˆÊ’u‚ðƒZ?ƒuꊂÉ?X
- if(pc_isdead(sd)){
- pc_setrestartvalue(sd,0);
- memcpy(&sd->status.last_point,&sd->status.save_point,sizeof(sd->status.last_point));
- } else {
- memcpy(sd->status.last_point.map,sd->mapname,24);
- 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(strcmp(m->save.map,"SavePoint")==0)
+ 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
- memcpy(&sd->status.last_point,&m->save,sizeof(sd->status.last_point));
+ } else {
+ memcpy(sd->status.last_point.map,sd->mapname,24);
+ 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(strcmp(m->save.map,"SavePoint")==0)
+ memcpy(&sd->status.last_point,&sd->status.save_point,sizeof(sd->status.last_point));
+ else
+ memcpy(&sd->status.last_point,&m->save,sizeof(sd->status.last_point));
+ }
}
//ƒ}ƒi?ƒ|ƒCƒ“ƒg‚ªƒvƒ‰ƒX‚¾‚Á‚½ê‡0‚É
if(battle_config.muting_players && sd->status.manner > 0)
sd->status.manner = 0;
+
return 0;
}
/*==========================================
- * Ú?Žž‚̉Šú‰»
+ * Ú?Žb̉Šú‰»
*------------------------------------------
*/
int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, int client_tick, int sex, int fd) {
@@ -437,7 +429,7 @@ int pc_equippoint(struct map_session_data *sd,int n)
nullpo_retr(0, sd);
- s_class = pc_calc_base_job(sd->status.class);
+ s_class = pc_calc_base_job(sd->status.class_);
if(sd->inventory_data[n]) {
ep = sd->inventory_data[n]->equip;
@@ -543,8 +535,8 @@ int pc_isequip(struct map_session_data *sd,int n)
nullpo_retr(0, sd);
item = sd->inventory_data[n];
- sc_data = battle_get_sc_data(&sd->bl);
- //s_class = pc_calc_base_job(sd->status.class);
+ sc_data = status_get_sc_data(&sd->bl);
+ //s_class = pc_calc_base_job(sd->status.class_);
if( battle_config.gm_allequip>0 && pc_isGM(sd)>=battle_config.gm_allequip )
return 1;
@@ -559,18 +551,18 @@ int pc_isequip(struct map_session_data *sd,int n)
// as it allows all advanced classes to equip items their normal versions
// could equip)
//
- if(((sd->status.class==13 || sd->status.class==4014) && ((1<<7)&item->class) == 0) || // have mounted classes use unmounted equipment [Valaris]
- ((sd->status.class==21 || sd->status.class==4022) && ((1<<14)&item->class) == 0))
+ if(((sd->status.class_==13 || sd->status.class_==4014) && ((1<<7)&item->class_) == 0) || // have mounted classes use unmounted equipment [Valaris]
+ ((sd->status.class_==21 || sd->status.class_==4022) && ((1<<14)&item->class_) == 0))
return 0;
- if(sd->status.class!=13 && sd->status.class!=4014 && sd->status.class!=21 && sd->status.class!=4022)
- if((sd->status.class<=4000 && ((1<<sd->status.class)&item->class) == 0) || (sd->status.class>4000 && sd->status.class<4023 && ((1<<(sd->status.class-4001))&item->class) == 0) ||
- (sd->status.class>=4023 && ((1<<(sd->status.class-4023))&item->class) == 0))
+ if(sd->status.class_!=13 && sd->status.class_!=4014 && sd->status.class_!=21 && sd->status.class_!=4022)
+ if((sd->status.class_<=4000 && ((1<<sd->status.class_)&item->class_) == 0) || (sd->status.class_>4000 && sd->status.class_<4023 && ((1<<(sd->status.class_-4001))&item->class_) == 0) ||
+ (sd->status.class_>=4023 && ((1<<(sd->status.class_-4023))&item->class_) == 0))
return 0;
-// if(((1<<sd->status.class)&item->class) == 0)
+// if(((1<<sd->status.class_)&item->class_) == 0)
// return 0;
- if(map[sd->bl.m].flag.pvp && (item->flag.no_equip==1 || item->flag.no_equip==3))
+ if(map[sd->bl.m].flag.pvp && (item->flag.no_equip&1)) //optimized by Lupus
return 0;
- if(map[sd->bl.m].flag.gvg && (item->flag.no_equip==2 || item->flag.no_equip==3))
+ if(map[sd->bl.m].flag.gvg && (item->flag.no_equip>1)) //optimized by Lupus
return 0;
if(item->equip & 0x0002 && sc_data && sc_data[SC_STRIPWEAPON].timer != -1)
return 0;
@@ -583,69 +575,52 @@ int pc_isequip(struct map_session_data *sd,int n)
return 1;
}
-/*==========================================
- * Weapon Breaking [Valaris]
- *------------------------------------------
- */
-int pc_breakweapon(struct map_session_data *sd)
+//‘•”õ”j‰ó
+int pc_break_equip(struct map_session_data *sd, unsigned short where)
{
- struct item_data* item;
- char output[255];
int i;
+ int sc;
- if(sd==NULL)
- return -1;
- if(sd->unbreakable>=rand()%100)
+ nullpo_retr(-1, sd);
+ if(sd->unbreakable_equip & where)
return 0;
- if(sd->sc_data && sd->sc_data[SC_CP_WEAPON].timer != -1)
+ if(sd->unbreakable >= rand()%100)
return 0;
-
- for(i=0;i<MAX_INVENTORY;i++){
- if(sd->status.inventory[i].equip && sd->status.inventory[i].equip & 0x0002 && !sd->status.inventory[i].attribute==1){
- item=sd->inventory_data[i];
- sd->status.inventory[i].attribute=1;
- pc_unequipitem(sd,i,0,BF_NORMAL);
- sprintf(output, "%s has broken.",item->jname);
- clif_emotion(&sd->bl,23);
- clif_displaymessage(sd->fd, output);
- clif_equiplist(sd);
- return 1;
- }
+ switch (where) {
+ case EQP_WEAPON:
+ sc = SC_CP_WEAPON;
+ break;
+ case EQP_ARMOR:
+ sc = SC_CP_ARMOR;
+ break;
+ case EQP_SHIELD:
+ sc = SC_CP_SHIELD;
+ break;
+ case EQP_HELM:
+ sc = SC_CP_HELM;
+ break;
+ default:
+ return 0;
}
-
- return 0;
-}
-/*==========================================
- * Armor Breaking [Valaris]
- *------------------------------------------
- */
-int pc_breakarmor(struct map_session_data *sd)
-{
- struct item_data* item;
- char output[255];
- int i;
-
- if(sd==NULL)
- return -1;
- if(sd->unbreakable>=rand()%100)
- return 0;
- if(sd->sc_data && sd->sc_data[SC_CP_ARMOR].timer != -1)
+ if(sd->sc_count && sd->sc_data[sc].timer != -1)
return 0;
- for(i=0;i<MAX_INVENTORY;i++){
- if(sd->status.inventory[i].equip && sd->status.inventory[i].equip & 0x0010 && !sd->status.inventory[i].attribute==1){
- item=sd->inventory_data[i];
- sd->status.inventory[i].attribute=1;
- pc_unequipitem(sd,i,0,BF_NORMAL);
- sprintf(output, "%s has broken.",item->jname);
+ for (i=0;i<MAX_INVENTORY;i++) {
+ if (sd->status.inventory[i].equip & where &&
+ sd->status.inventory[i].attribute != 1) {
+ sd->status.inventory[i].attribute = 1;
+ pc_unequipitem(sd,i,3);
+ sprintf(tmp_output, "%s has broken.",sd->inventory_data[i]->jname);
clif_emotion(&sd->bl,23);
- clif_displaymessage(sd->fd, output);
+ clif_displaymessage(sd->fd, tmp_output);
clif_equiplist(sd);
+ break;
}
}
- return 0;
+ return 1;
}
+
/*==========================================
* session id‚É–â‘è–³‚µ
* charŽI‚©‚ç‘—‚ç‚ê‚Ä‚«‚½ƒXƒe?ƒ^ƒX‚ðÝ’è
@@ -663,8 +638,14 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd = map_id2sd(id);
nullpo_retr(1, sd);
+ // check if double login occured
+ if(sd->new_fd){
+ // 2dloginó‘Ô‚¾‚Á‚½‚Ì‚ÅA—¼•û—Ž‚·
+ clif_authfail_fd(sd->fd,2); // same id
+ clif_authfail_fd(sd->new_fd,8); // same id
+ return 1;
+ }
sd->login_id2 = login_id2;
-
memcpy(&sd->status, st, sizeof(*st));
if (sd->status.sex != sd->sex) {
@@ -678,21 +659,21 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd->bl.prev = sd->bl.next = NULL;
sd->weapontype1 = sd->weapontype2 = 0;
- sd->view_class = sd->status.class;
+ sd->view_class = sd->status.class_;
sd->speed = DEFAULT_WALK_SPEED;
sd->state.dead_sit = 0;
sd->dir = 0;
sd->head_dir = 0;
sd->state.auth = 1;
sd->walktimer = -1;
+ sd->next_walktime = -1;
sd->attacktimer = -1;
sd->followtimer = -1; // [MouseJstr]
sd->skilltimer = -1;
sd->skillitem = -1;
sd->skillitemlv = -1;
sd->invincible_timer = -1;
- sd->sg_count = 0;
-
+
sd->deal_locked = 0;
sd->trade_partner = 0;
@@ -704,11 +685,11 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd->inchealspiritsptick = 0;
sd->canact_tick = tick;
sd->canmove_tick = tick;
+ sd->canregen_tick = tick;
sd->attackabletime = tick;
-
+ sd->reg_num = 0;
sd->doridori_counter = 0;
-
- sd->change_level = pc_readglobalreg(sd,"jobchange_level");
+ sd->change_level = pc_readglobalreg(sd,"jobchange_level");
#ifndef TXT_ONLY // mail system [Valaris]
if(battle_config.mail_system)
@@ -719,13 +700,16 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd->spirit_timer[i] = -1;
for(i = 0; i < MAX_SKILLTIMERSKILL; i++)
sd->skilltimerskill[i].timer = -1;
+ sd->timerskill_count=0;
+
+ memset(sd->blockskill,0,sizeof(sd->blockskill));
memset(&sd->dev,0,sizeof(struct square));
for(i = 0; i < 5; i++) {
sd->dev.val1[i] = 0;
sd->dev.val2[i] = 0;
}
-
+
// ƒAƒJƒEƒ“ƒg??‚Ì‘—M—v‹
intif_request_accountreg(sd);
@@ -753,7 +737,7 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
// ƒXƒLƒ‹ƒ†ƒjƒbƒg?ŒW‚̉Šú‰»
memset(sd->skillunit, 0, sizeof(sd->skillunit));
- memset(sd->skillunittick, 0, sizeof(sd->skillunittick));
+ memset(sd->skillunittick, 0, sizeof(sd->skillunittick));
// ƒp?ƒeƒB??ŒW‚̉Šú‰»
sd->party_sended = 0;
@@ -771,9 +755,22 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
memset(sd->eventqueue, 0, sizeof(sd->eventqueue));
for(i = 0; i < MAX_EVENTTIMER; i++)
sd->eventtimer[i] = -1;
+ sd->eventcount=0;
// ˆÊ’u‚ÌÝ’è
- pc_setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, 0);
+ if (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) {
+ char buf[32];
+ sprintf(buf, "Last_point_map %s not found\n", sd->status.last_point.map);
+ ShowError (buf);
+ }
+ // try warping to a default map instead
+ if (pc_setpos(sd, "prontera.gat", 273, 354, 0) != 0) {
+ // if we fail again
+ clif_authfail_fd(sd->fd, 0);
+ return 1;
+ }
+ }
// pet
if (sd->status.pet_id > 0)
@@ -800,6 +797,18 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
//ƒXƒpƒmƒr—pŽ€‚ɃJƒEƒ“ƒ^?‚̃XƒNƒŠƒvƒg??‚©‚ç‚Ì?‚Ýo‚µ‚Æsd‚ւ̃Zƒbƒg
sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER");
+ // 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 (night_flag == 1 && !map[sd->bl.m].flag.indoors) {
char tmpstr[1024];
strcpy(tmpstr, msg_txt(500)); // Actually, it's the night...
@@ -812,16 +821,28 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
}
// ƒXƒe?ƒ^ƒX‰ŠúŒvŽZ‚È‚Ç
- pc_calcstatus(sd,1);
+ status_calc_pc(sd,1);
if (pc_isGM(sd))
- printf("Connection accepted: character '%s' (account: %d; GM level %d).\n", sd->status.name, sd->status.account_id, pc_isGM(sd));
+ sprintf(tmp_output,"GM Character '"CL_WHITE"%s"CL_RESET"' logged in. (Acc. ID: '"CL_WHITE"%d"CL_RESET"', GM Level '"CL_WHITE"%d"CL_RESET"').\n", sd->status.name, sd->status.account_id, pc_isGM(sd));
else
- printf("Connection accepted: Character '%s' (account: %d).\n", sd->status.name, sd->status.account_id);
+ sprintf(tmp_output,"Character '"CL_WHITE"%s"CL_RESET"' logged in. (Account ID: '"CL_WHITE"%d"CL_RESET"').\n", sd->status.name, sd->status.account_id);
+ ShowInfo(tmp_output);
+
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ //printf("pc: OnPCLogin event done. (%d events)\n", npc_event_doall("OnPCLogin") );
+ if ((npc = npc_name2id(script_config.login_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCLoginNPC
+ sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.login_event_name);
+ ShowStatus(tmp_output);
+ }
+ } else {
+ sprintf (tmp_output, "%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);
+ ShowStatus(tmp_output);
+ }
- //printf("pc: OnPCLogin event done. (%d events)\n", npc_event_doall("OnPCLogin") );
- if (npc_name2id("PCLoginEvent"))
- run_script(npc_name2id("PCLoginEvent")->u.scr.script,0,sd->bl.id,npc_name2id("PCLoginEvent")->bl.id); // PCLoginNPC
// Send friends list
clif_friends_list_send(sd);
@@ -838,13 +859,16 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
break;
}
}
- clif_displaymessage(sd->fd, buf);
+ if (battle_config.motd_type)
+ clif_disp_onlyself(sd,buf,strlen(buf));
+ else
+ clif_displaymessage(sd->fd, buf);
}
fclose(fp);
}
else if(battle_config.error_log) {
- sprintf(buf, "%s not found\n", motd_txt);
- ShowWarning (buf);
+ sprintf(tmp_output, "In function pc_atuhok() -> File '"CL_WHITE"%s"CL_RESET"' not found.\n", motd_txt);
+ ShowWarning(tmp_output);
}
}
@@ -874,6 +898,13 @@ int pc_authfail(int id) {
if (sd == NULL)
return 1;
+ if(sd->new_fd){
+ // 2dloginó‘Ô‚¾‚Á‚½‚Ì‚ÅAV‚µ‚¢Ú‘±‚Ì‚Ý—Ž‚·
+ clif_authfail_fd(sd->new_fd,0);
+ sd->new_fd=0;
+ return 0;
+ }
+
clif_authfail_fd(sd->fd, 0);
return 0;
@@ -913,7 +944,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
nullpo_retr(0, sd);
- s_class = pc_calc_base_job(sd->status.class);
+ s_class = pc_calc_base_job(sd->status.class_);
c = s_class.job;
//s = (s_class.upper==1) ? 1 : 0 ; //?¶ˆÈŠO‚Í’Êí‚̃XƒLƒ‹H
s = s_class.upper;
@@ -921,7 +952,10 @@ int pc_calc_skilltree(struct map_session_data *sd)
c = pc_calc_skilltree_normalize_job(c, sd);
for(i=0;i<MAX_SKILL;i++){
- if (sd->status.skill[i].flag != 13) sd->status.skill[i].id=0;
+// if(skill_get_inf2(i) & 0x01)
+// continue;
+ if (sd->status.skill[i].flag != 13)
+ 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‚É‚µ‚Ä‚¨‚­
@@ -934,39 +968,60 @@ int pc_calc_skilltree(struct map_session_data *sd)
sd->status.skill[i].id=i;
for(i=210;i<291;i++)
sd->status.skill[i].id=i;
- for(i=304;i<337;i++){
+ for(i=304;i<338;i++){
if(i==331) continue;
sd->status.skill[i].id=i;
}
- if(battle_config.enable_upper_class){ //conf‚Å–³?‚Å‚È‚¯‚ê‚Î?‚Ý?‚Þ
- for(i=355;i<MAX_SKILL;i++)
+ for(i=355;i<411;i++)
sd->status.skill[i].id=i;
- }
- }else{
- // ’Êí‚ÌŒvŽZ
- do{
- flag=0;
- for(i=0;(id=skill_tree[s][c][i].id)>0;i++){
- int j,f=1;
- if(!battle_config.skillfree) {
- for(j=0;j<5;j++) {
- if( skill_tree[s][c][i].need[j].id &&
- pc_checkskill(sd,skill_tree[s][c][i].need[j].id) < skill_tree[s][c][i].need[j].lv)
+ for(i=475;i<480;i++)
+ sd->status.skill[i].id=i;
+ } else {
+ do {
+ flag=0;
+ for(i=0;(id=skill_tree[s][c][i].id)>0;i++){
+ int j,f=1;
+ if(!battle_config.skillfree) {
+ for(j=0;j<5;j++) {
+ if( skill_tree[s][c][i].need[j].id &&
+ pc_checkskill(sd,skill_tree[s][c][i].need[j].id) <
+ skill_tree[s][c][i].need[j].lv) {
+ f=0;
+ break;
+ }
+ }
+ if (sd->status.job_level < skill_tree[s][c][i].joblv)
f=0;
+ else if (id >= 2 && id <= 53 && pc_checkskill(sd, NV_BASIC) < 9)
+ f=0;
+ }
+ if(f && sd->status.skill[id].id==0 ){
+ sd->status.skill[id].id=id;
+ flag=1;
}
}
- if(f && sd->status.skill[id].id==0 ){
- sd->status.skill[id].id=id;
- flag=1;
- }
- }
- }while(flag);
+ } while(flag);
}
// if(battle_config.etc_log)
// printf("calc skill_tree\n");
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(int c, struct map_session_data *sd) {
//if((battle_config.skillup_limit) && ((c >= 0 && c < 23) || (c >= 4001 && c < 4023) || (c >= 4023 && c < 4045))) {
if (battle_config.skillup_limit && c >= 0 && c < 23) {
@@ -975,10 +1030,12 @@ int pc_calc_skilltree_normalize_job(int c, struct map_session_data *sd) {
c = 0;
//else if((sd->status.skill_point >= sd->status.job_level && skill_point < 58) && ((c > 6 && c < 23) || (c > 4007 && c < 4023) || (c > 4029 && c < 4045))) {
//else if ((sd->status.skill_point >= sd->status.job_level && skill_point < 58) && (c > 6 && c < 23)) {
- else if ((sd->status.skill_point >= sd->status.job_level && skill_point < sd->change_level+8) && (c > 6 && c < 23)) {
+ else if (sd->status.skill_point >= sd->status.job_level && ((sd->change_level > 0 && skill_point < sd->change_level+8) || skill_point < 58) && (c > 6 && c < 23)) {
switch(c) {
case 7:
+ case 13:
case 14:
+ case 21:
c = 1;
break;
case 8:
@@ -1002,8 +1059,11 @@ int pc_calc_skilltree_normalize_job(int c, struct map_session_data *sd) {
case 17:
c = 6;
break;
- /*case 4008:
+#if 0
+ case 4008:
+ case 4014:
case 4015:
+ case 4022:
c = 4002;
break;
case 4009:
@@ -1028,7 +1088,9 @@ int pc_calc_skilltree_normalize_job(int c, struct map_session_data *sd) {
c = 4007;
break;
case 4030:
+ case 4036:
case 4037:
+ case 4044:
c = 4024;
break;
case 4031:
@@ -1051,7 +1113,8 @@ int pc_calc_skilltree_normalize_job(int c, struct map_session_data *sd) {
case 4035:
case 4043:
c = 4029;
- break;*/
+ break;
+#endif
}
}
}
@@ -1072,1127 +1135,29 @@ int pc_checkweighticon(struct map_session_data *sd)
flag=1;
if(sd->weight*10 >= sd->max_weight*9)
flag=2;
-
+
if(flag==1){
if(sd->sc_data[SC_WEIGHT50].timer==-1)
- skill_status_change_start(&sd->bl,SC_WEIGHT50,0,0,0,0,0,0);
+ status_change_start(&sd->bl,SC_WEIGHT50,0,0,0,0,0,0);
}else{
- skill_status_change_end(&sd->bl,SC_WEIGHT50,-1);
+ status_change_end(&sd->bl,SC_WEIGHT50,-1);
}
if(flag==2){
if(sd->sc_data[SC_WEIGHT90].timer==-1)
- skill_status_change_start(&sd->bl,SC_WEIGHT90,0,0,0,0,0,0);
+ status_change_start(&sd->bl,SC_WEIGHT90,0,0,0,0,0,0);
}else{
- skill_status_change_end(&sd->bl,SC_WEIGHT90,-1);
+ status_change_end(&sd->bl,SC_WEIGHT90,-1);
}
return 0;
}
/*==========================================
- * ƒpƒ‰ƒ?ƒ^ŒvŽZ
- * first==0‚ÌŽžAŒvŽZ?ۂ̃pƒ‰ƒ?ƒ^‚ªŒÄ‚Ño‚µ‘O‚©‚ç
- * ? ‰»‚µ‚½ê‡Ž©“®‚Åsend‚·‚邪A
- * ”\“®“I‚É?‰»‚³‚¹‚½ƒpƒ‰ƒ?ƒ^‚ÍŽ©‘O‚Åsend‚·‚é‚悤‚É
- *------------------------------------------
- */
-int pc_calcstatus(struct map_session_data* sd,int first)
-{
- 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,aspd_rate,wele,wele_,def_ele,refinedef=0;
- int pele=0,pdef_ele=0;
- int str,dstr,dex;
- struct pc_base_job s_class;
-
- nullpo_retr(0, sd);
-
- //?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
- s_class = pc_calc_base_job(sd->status.class);
-
- 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->watk;
- b_def = sd->def;
- b_watk2 = sd->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[s_class.job]+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++;
- }
- }
-
- memset(sd->paramb,0,sizeof(sd->paramb));
- memset(sd->parame,0,sizeof(sd->parame));
- sd->hit = 0;
- sd->flee = 0;
- sd->flee2 = 0;
- sd->critical = 0;
- sd->aspd = 0;
- sd->watk = 0;
- sd->def = 0;
- sd->mdef = 0;
- sd->watk2 = 0;
- sd->def2 = 0;
- sd->mdef2 = 0;
- sd->status.max_hp = 0;
- sd->status.max_sp = 0;
- sd->attackrange = 0;
- sd->attackrange_ = 0;
- sd->atk_ele = 0;
- sd->def_ele = 0;
- sd->star =0;
- sd->overrefine =0;
- sd->matk1 =0;
- sd->matk2 =0;
- sd->speed = DEFAULT_WALK_SPEED ;
- sd->hprate=100;
- sd->sprate=100;
- sd->castrate=100;
- sd->dsprate=100;
- sd->base_atk=0;
- sd->arrow_atk=0;
- sd->arrow_ele=0;
- sd->arrow_hit=0;
- sd->arrow_range=0;
- sd->nhealhp=sd->nhealsp=sd->nshealhp=sd->nshealsp=sd->nsshealhp=sd->nsshealsp=0;
- memset(sd->addele,0,sizeof(sd->addele));
- memset(sd->addrace,0,sizeof(sd->addrace));
- memset(sd->addsize,0,sizeof(sd->addsize));
- memset(sd->addele_,0,sizeof(sd->addele_));
- memset(sd->addrace_,0,sizeof(sd->addrace_));
- memset(sd->addsize_,0,sizeof(sd->addsize_));
- memset(sd->subele,0,sizeof(sd->subele));
- memset(sd->subrace,0,sizeof(sd->subrace));
- memset(sd->addeff,0,sizeof(sd->addeff));
- memset(sd->addeff2,0,sizeof(sd->addeff2));
- memset(sd->reseff,0,sizeof(sd->reseff));
- memset(&sd->special_state,0,sizeof(sd->special_state));
- memset(sd->weapon_coma_ele,0,sizeof(sd->weapon_coma_ele));
- memset(sd->weapon_coma_race,0,sizeof(sd->weapon_coma_race));
-
- sd->watk_ = 0; //“ñ“—¬—p(?)
- sd->watk_2 = 0;
- sd->atk_ele_ = 0;
- sd->star_ = 0;
- sd->overrefine_ = 0;
-
- sd->aspd_rate = 100;
- sd->speed_rate = 100;
- sd->hprecov_rate = 100;
- sd->sprecov_rate = 100;
- sd->critical_def = 0;
- sd->double_rate = 0;
- sd->near_attack_def_rate = sd->long_attack_def_rate = 0;
- sd->atk_rate = sd->matk_rate = 100;
- sd->ignore_def_ele = sd->ignore_def_race = 0;
- sd->ignore_def_ele_ = sd->ignore_def_race_ = 0;
- sd->ignore_mdef_ele = sd->ignore_mdef_race = 0;
- sd->arrow_cri = 0;
- sd->magic_def_rate = sd->misc_def_rate = 0;
- memset(sd->arrow_addele,0,sizeof(sd->arrow_addele));
- memset(sd->arrow_addrace,0,sizeof(sd->arrow_addrace));
- memset(sd->arrow_addsize,0,sizeof(sd->arrow_addsize));
- memset(sd->arrow_addeff,0,sizeof(sd->arrow_addeff));
- memset(sd->arrow_addeff2,0,sizeof(sd->arrow_addeff2));
- memset(sd->magic_addele,0,sizeof(sd->magic_addele));
- memset(sd->magic_addrace,0,sizeof(sd->magic_addrace));
- memset(sd->magic_subrace,0,sizeof(sd->magic_subrace));
- sd->perfect_hit = 0;
- 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->def_ratio_atk_ele = sd->def_ratio_atk_ele_ = 0;
- sd->def_ratio_atk_race = sd->def_ratio_atk_race_ = 0;
- sd->get_zeny_num = 0;
- sd->add_damage_class_count = sd->add_damage_class_count_ = sd->add_magic_damage_class_count = 0;
- sd->add_def_class_count = sd->add_mdef_class_count = 0;
- sd->monster_drop_item_count = 0;
- memset(sd->add_damage_classrate,0,sizeof(sd->add_damage_classrate));
- memset(sd->add_damage_classrate_,0,sizeof(sd->add_damage_classrate_));
- memset(sd->add_magic_damage_classrate,0,sizeof(sd->add_magic_damage_classrate));
- memset(sd->add_def_classrate,0,sizeof(sd->add_def_classrate));
- memset(sd->add_mdef_classrate,0,sizeof(sd->add_mdef_classrate));
- memset(sd->monster_drop_race,0,sizeof(sd->monster_drop_race));
- memset(sd->monster_drop_itemrate,0,sizeof(sd->monster_drop_itemrate));
- sd->speed_add_rate = sd->aspd_add_rate = 100;
- sd->double_add_rate = sd->perfect_hit_add = sd->get_zeny_add_num = 0;
- sd->splash_range = sd->splash_add_range = 0;
- sd->autospell_id = sd->autospell_lv = sd->autospell_rate = 0;
- sd->hp_drain_rate = sd->hp_drain_per = sd->sp_drain_rate = sd->sp_drain_per = 0;
- sd->hp_drain_rate_ = sd->hp_drain_per_ = sd->sp_drain_rate_ = sd->sp_drain_per_ = 0;
- sd->short_weapon_damage_return = sd->long_weapon_damage_return = 0;
- sd->magic_damage_return = 0; //AppleGirl Was Here
- sd->random_attack_increase_add = sd->random_attack_increase_per = 0;
-
- if(!sd->disguiseflag && sd->disguise) {
- sd->disguise=0;
- clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
- clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
- 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);
- clif_clearchar(&sd->bl, 9);
- pc_setpos(sd, sd->mapname, sd->bl.x, sd->bl.y, 3);
- }
-
- for(i=0;i<10;i++) {
- index = sd->equip_index[i];
- 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) {
- 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;
- }
- }
- }
- }
- else if(sd->inventory_data[index]->type==5){ // –h‹ï
- 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);
- }
- }
- }
- }
- }
- wele = sd->atk_ele;
- wele_ = sd->atk_ele_;
- def_ele = sd->def_ele;
- if(sd->status.pet_id > 0) {
- struct pet_data *pd=sd->pd;
- if((pd && battle_config.pet_status_support==1) && (battle_config.pet_equip_required==0 || (battle_config.pet_equip_required && pd->equip > 0))) {
- if(sd->status.pet_id > 0 && sd->petDB && sd->pet.intimate > 0)
- run_script(sd->petDB->script,0,sd->bl.id,0);
- pele = sd->atk_ele;
- pdef_ele = sd->def_ele;
- sd->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++) {
- index = sd->equip_index[i];
- 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(i == 8 && sd->status.inventory[index].equip == 0x20) {
- //“ñ“—¬—pƒf?ƒ^“ü—Í
- sd->watk_ += sd->inventory_data[index]->atk;
- sd->watk_2 = (r=sd->status.inventory[index].refine)* // ¸?U?—Í
- refinebonus[wlv][0];
- if( (r-=refinebonus[wlv][2])>0 ) // ‰ß?¸?ƒ{?ƒiƒX
- sd->overrefine_ = r*refinebonus[wlv][1];
-
- if(sd->status.inventory[index].card[0]==0x00ff){ // »‘¢•Ší
- sd->star_ = (sd->status.inventory[index].card[1]>>8); // ¯‚Ì‚©‚¯‚ç
- 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]->equip_script,0,sd->bl.id,0);
- sd->state.lr_flag = 0;
- }
- else { //“ñ“—¬•ŠíˆÈŠO
- sd->watk += sd->inventory_data[index]->atk;
- sd->watk2 += (r=sd->status.inventory[index].refine)* // ¸?U?—Í
- refinebonus[wlv][0];
- if( (r-=refinebonus[wlv][2])>0 ) // ‰ß?¸?ƒ{?ƒiƒX
- sd->overrefine += r*refinebonus[wlv][1];
-
- if(sd->status.inventory[index].card[0]==0x00ff){ // »‘¢•Ší
- sd->star += (sd->status.inventory[index].card[1]>>8); // ¯‚Ì‚©‚¯‚ç
- wele = (sd->status.inventory[index].card[1]&0x0f); // ? «
- }
- sd->attackrange += sd->inventory_data[index]->range;
- run_script(sd->inventory_data[index]->equip_script,0,sd->bl.id,0);
- }
- }
- else if(sd->inventory_data[index]->type == 5) {
- sd->watk += sd->inventory_data[index]->atk;
- refinedef += sd->status.inventory[index].refine*refinebonus[0][0];
- run_script(sd->inventory_data[index]->equip_script,0,sd->bl.id,0);
- }
- }
- }
-
- if(sd->equip_index[10] >= 0){ // –î
- index = sd->equip_index[10];
- if(sd->inventory_data[index]){ //‚Ü‚¾?«‚ª“ü‚Á‚Ä‚¢‚È‚¢
- sd->state.lr_flag = 2;
- run_script(sd->inventory_data[index]->equip_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->atk_ele = wele;
- if(wele_ > 0)
- sd->atk_ele_ = wele_;
- if(def_ele > 0)
- sd->def_ele = def_ele;
- if(battle_config.pet_status_support) {
- if(pele > 0 && !sd->atk_ele)
- sd->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->get_zeny_num += sd->get_zeny_add_num;
- sd->splash_range += sd->splash_add_range;
- if(sd->speed_add_rate != 100)
- sd->speed_rate += sd->speed_add_rate - 100;
- if(sd->aspd_add_rate != 100)
- sd->aspd_rate += sd->aspd_add_rate - 100;
-
- // •ŠíATKƒTƒCƒY•â³ (‰EŽè)
- sd->atkmods[0] = atkmods[0][sd->weapontype1];
- sd->atkmods[1] = atkmods[1][sd->weapontype1];
- sd->atkmods[2] = atkmods[2][sd->weapontype1];
- //•ŠíATKƒTƒCƒY•â³ (¶Žè)
- sd->atkmods_[0] = atkmods[0][sd->weapontype2];
- sd->atkmods_[1] = atkmods[1][sd->weapontype2];
- sd->atkmods_[2] = atkmods[2][sd->weapontype2];
-
- // jobƒ{?ƒiƒX•ª
- for(i=0;i<sd->status.job_level && i<MAX_LEVEL;i++){
- if(job_bonus[s_class.upper][s_class.job][i])
- sd->paramb[job_bonus[s_class.upper][s_class.job][i]-1]++;
- }
-
- if( (skill=pc_checkskill(sd,MC_INCCARRY))>0 ) // skill can be used with an item now, thanks to orn [Valaris]
- sd->max_weight += skill*1000;
-
- if( (skill=pc_checkskill(sd,AC_OWL))>0 ) // ‚Ó‚­‚낤‚Ì–Ú
- sd->paramb[4] += skill;
-
- if((skill=pc_checkskill(sd,BS_HILTBINDING))>0) { // Hilt binding gives +1 str +4 atk
- sd->paramb[0] ++;
- sd->base_atk += 4;
- }
-
- // New guild skills - Celest
- if (sd->status.guild_id > 0) {
- struct guild *g;
- if ((g = guild_search(sd->status.guild_id)) && strcmp(sd->status.name,g->master)==0) {
- if (!sd->sc_data[SC_LEADERSHIP].val4 && guild_checkskill(g, GD_LEADERSHIP)>0) {
- //skill_status_change_start(&sd->bl,SC_LEADERSHIP,1,0,0,0,0,0 );
- skill_unitsetting(&sd->bl,GD_LEADERSHIP,1,sd->bl.x,sd->bl.y,0);
- }
- if (!sd->sc_data[SC_GLORYWOUNDS].val4 && guild_checkskill(g, GD_GLORYWOUNDS)>0) {
- //skill_status_change_start(&sd->bl,SC_GLORYWOUNDS,1,0,0,0,0,0 );
- skill_unitsetting(&sd->bl,GD_GLORYWOUNDS,1,sd->bl.x,sd->bl.y,0);
- }
- if (!sd->sc_data[SC_SOULCOLD].val4 && guild_checkskill(g, GD_SOULCOLD)>0) {
- //skill_status_change_start(&sd->bl,SC_SOULCOLD,1,0,0,0,0,0 );
- skill_unitsetting(&sd->bl,GD_SOULCOLD,1,sd->bl.x,sd->bl.y,0);
- }
- if (!sd->sc_data[SC_HAWKEYES].val4 && guild_checkskill(g, GD_HAWKEYES)>0) {
- //skill_status_change_start(&sd->bl,SC_HAWKEYES,1,0,0,0,0,0 );
- skill_unitsetting(&sd->bl,GD_HAWKEYES,1,sd->bl.x,sd->bl.y,0);
- }
- }
- else {
- if (sd->sc_data[SC_LEADERSHIP].timer != -1)
- sd->paramb[0] += 2;
- if (sd->sc_data[SC_GLORYWOUNDS].timer != -1)
- sd->paramb[2] += 2;
- if (sd->sc_data[SC_SOULCOLD].timer != -1)
- sd->paramb[1] += 2;
- if (sd->sc_data[SC_HAWKEYES].timer != -1)
- sd->paramb[4] += 2;
- if (sd->sc_data[SC_BATTLEORDERS].timer != -1) {
- sd->paramb[0]+= 5;
- sd->paramb[3]+= 5;
- sd->paramb[4]+= 5;
- }
- }
- }
-
- // ƒXƒe?ƒ^ƒX?‰»‚É‚æ‚éŠî–{ƒpƒ‰ƒ?ƒ^•â³
- if(sd->sc_count){
- if(sd->sc_data[SC_CONCENTRATE].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1){ // W’†—ÍŒüã
- 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;
- }
- if(sd->sc_data[SC_INCREASEAGI].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1){ // ‘¬“x?‰Á
- sd->paramb[1]+= 2+sd->sc_data[SC_INCREASEAGI].val1;
- sd->speed -= sd->speed *25/100;
- }
- if(sd->sc_data[SC_DECREASEAGI].timer!=-1) // ‘¬“xŒ¸­(agi‚Íbattle.c‚Å)
- sd->speed = sd->speed *125/100;
- if(sd->sc_data[SC_CLOAKING].timer!=-1) {
- sd->critical_rate += 100; // critical increases
- sd->speed = sd->speed * (sd->sc_data[SC_CLOAKING].val3-sd->sc_data[SC_CLOAKING].val1*3) /100;
- // Ours is accurate enough - refer skill_check_cloaking. ^^
- //sd->speed = (sd->speed*(76+(sd->sc_data[SC_CLOAKING].val1*3)))/100; // Fixed by MiKa & Asa [Lupus]
- }
- //sd->speed = (sd->speed*(76+(sd->sc_data[SC_INCREASEAGI].val1*3)))/100;
- if(sd->sc_data[SC_CHASEWALK].timer!=-1)
- sd->speed = sd->speed * sd->sc_data[SC_CHASEWALK].val3 /100; // slow down by chasewalk
- if(sd->sc_data[SC_BLESSING].timer!=-1){ // ƒuƒŒƒbƒVƒ“ƒO
- sd->paramb[0]+= sd->sc_data[SC_BLESSING].val1;
- sd->paramb[3]+= sd->sc_data[SC_BLESSING].val1;
- sd->paramb[4]+= sd->sc_data[SC_BLESSING].val1;
- }
- if(sd->sc_data[SC_GLORIA].timer!=-1) // ƒOƒƒŠƒA
- sd->paramb[5]+= 30;
- if(sd->sc_data[SC_LOUD].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1) // ƒ‰ƒEƒhƒ{ƒCƒX
- sd->paramb[0]+= 4;
- if(sd->sc_data[SC_QUAGMIRE].timer!=-1){ // ƒNƒ@ƒOƒ}ƒCƒA
- int agib = (sd->status.agi+sd->paramb[1]+sd->parame[1])*(sd->sc_data[SC_QUAGMIRE].val1*10)/100;
- int dexb = (sd->status.dex+sd->paramb[4]+sd->parame[4])*(sd->sc_data[SC_QUAGMIRE].val1*10)/100;
- sd->paramb[1]-= agib > 50 ? 50 : agib;
- sd->paramb[4]-= dexb > 50 ? 50 : dexb;
- sd->speed = sd->speed*3/2;
- }
- if(sd->sc_data[SC_TRUESIGHT].timer!=-1){ // ƒgƒDƒ‹?ƒTƒCƒg
- sd->paramb[0]+= 5;
- sd->paramb[1]+= 5;
- sd->paramb[2]+= 5;
- sd->paramb[3]+= 5;
- sd->paramb[4]+= 5;
- sd->paramb[5]+= 5;
- }
- if(sd->sc_data[SC_MARIONETTE].timer!=-1){
- sd->paramb[0]-= sd->status.str/2; // bonuses not included
- 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 = (struct map_session_data *)map_id2bl(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;
- }
- }
- }
-
- //1“x‚àŽ€‚ñ‚Å‚È‚¢Job70ƒXƒpƒmƒr‚É+10
- if(s_class.job == 23 && sd->die_counter == 0 && sd->status.job_level >= 70){
- sd->paramb[0]+= 15;
- sd->paramb[1]+= 15;
- sd->paramb[2]+= 15;
- sd->paramb[3]+= 15;
- sd->paramb[4]+= 15;
- sd->paramb[5]+= 15;
- }
- 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];
- for(i=0;i<6;i++)
- if(sd->paramc[i] < 0) sd->paramc[i] = 0;
-
- if(sd->status.weapon == 11 || sd->status.weapon == 13 || sd->status.weapon == 14) {
- str = sd->paramc[4];
- dex = sd->paramc[0];
- }
- else {
- str = sd->paramc[0];
- dex = sd->paramc[4];
- }
- dstr = str/10;
- sd->base_atk += str + dstr*dstr + dex/5 + sd->paramc[5]/5;
- 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;
- }
- sd->hit += sd->paramc[4] + sd->status.base_level;
- sd->flee += sd->paramc[1] + sd->status.base_level;
- sd->def2 += sd->paramc[2];
- sd->mdef2 += sd->paramc[3];
- sd->flee2 += sd->paramc[5]+10;
- sd->critical += (sd->paramc[5]*3)+10;
-
- if(sd->base_atk < 1)
- sd->base_atk = 1;
- if(sd->critical_rate != 100)
- sd->critical = (sd->critical*sd->critical_rate)/100;
- if(sd->critical < 10) sd->critical = 10;
- if(sd->hit_rate != 100)
- sd->hit = (sd->hit*sd->hit_rate)/100;
- if(sd->hit < 1) sd->hit = 1;
- if(sd->flee_rate != 100)
- sd->flee = (sd->flee*sd->flee_rate)/100;
- if(sd->flee < 1) sd->flee = 1;
- if(sd->flee2_rate != 100)
- sd->flee2 = (sd->flee2*sd->flee2_rate)/100;
- if(sd->flee2 < 10) sd->flee2 = 10;
- if(sd->def_rate != 100)
- sd->def = (sd->def*sd->def_rate)/100;
- if(sd->def < 0) sd->def = 0;
- if(sd->def2_rate != 100)
- sd->def2 = (sd->def2*sd->def2_rate)/100;
- if(sd->def2 < 1) sd->def2 = 1;
- if(sd->mdef_rate != 100)
- sd->mdef = (sd->mdef*sd->mdef_rate)/100;
- if(sd->mdef < 0) sd->mdef = 0;
- if(sd->mdef2_rate != 100)
- sd->mdef2 = (sd->mdef2*sd->mdef2_rate)/100;
- if(sd->mdef2 < 1) sd->mdef2 = 1;
-
- // “ñ“—¬ ASPD C³
- if (sd->status.weapon <= 16)
- sd->aspd += aspd_base[s_class.job][sd->status.weapon]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[s_class.job][sd->status.weapon]/1000;
- else
- sd->aspd += (
- (aspd_base[s_class.job][sd->weapontype1]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[s_class.job][sd->weapontype1]/1000) +
- (aspd_base[s_class.job][sd->weapontype2]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[s_class.job][sd->weapontype2]/1000)
- ) * 140 / 200;
-
- aspd_rate = sd->aspd_rate;
-
- //U?‘¬“x?‰Á
-
- if( (skill=pc_checkskill(sd,AC_VULTURE))>0){ // ƒƒV‚Ì–Ú
- sd->hit += skill;
- if(sd->status.weapon == 11)
- sd->attackrange += skill;
- }
-
- if( (skill=pc_checkskill(sd,BS_WEAPONRESEARCH))>0) // •Ší?‹†‚Ì–½’†—¦?‰Á
- sd->hit += skill*2;
- if(sd->status.option&2 && (skill = pc_checkskill(sd,RG_TUNNELDRIVE))>0 ) // ƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒu // ƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒu
- sd->speed += (1.2*DEFAULT_WALK_SPEED - skill*9);
- if (pc_iscarton(sd) && (skill=pc_checkskill(sd,MC_PUSHCART))>0) // ƒJ?ƒg‚É‚æ‚鑬“x’ቺ
- sd->speed += (10-skill) * (DEFAULT_WALK_SPEED * 0.1);
- else if (pc_isriding(sd)) { // ƒyƒRƒyƒR?‚è‚É‚æ‚鑬“x?‰Á
- sd->speed -= (0.25 * DEFAULT_WALK_SPEED);
- sd->max_weight += 10000;
- }
- if(sd->sc_count){
- if(sd->sc_data[SC_WINDWALK].timer!=-1) //ƒEƒBƒ“ƒhƒEƒH?ƒNŽž‚ÍLv*2%Œ¸ŽZ
- sd->speed -= sd->speed *(sd->sc_data[SC_WINDWALK].val1*2)/100;
- if(sd->sc_data[SC_CARTBOOST].timer!=-1) // ƒJ?ƒgƒu?ƒXƒg
- sd->speed -= (DEFAULT_WALK_SPEED * 20)/100;
- if(sd->sc_data[SC_BERSERK].timer!=-1) //ƒo?ƒT?ƒN’†‚ÍIA‚Æ“¯‚¶‚®‚ç‚¢‘¬‚¢H
- sd->speed -= sd->speed *25/100;
- if(sd->sc_data[SC_WEDDING].timer!=-1) //Œ‹¥’†‚Í?‚­‚Ì‚ª?‚¢
- sd->speed = 2*DEFAULT_WALK_SPEED;
- }
-
- if((skill=pc_checkskill(sd,CR_TRUST))>0) { // ƒtƒFƒCƒX
- sd->status.max_hp += skill*200;
- sd->subele[6] += skill*5;
- }
- if((skill=pc_checkskill(sd,BS_SKINTEMPER))>0)
- {
- sd->subele[0] += skill;
- sd->subele[3] += skill*5;
- }
-
- bl=sd->status.base_level;
-
- sd->status.max_hp += (3500 + bl*hp_coefficient2[s_class.job] + hp_sigma_val[s_class.job][(bl > 0)? bl-1:0])/100 * (100 + sd->paramc[2])/100 + (sd->parame[2] - sd->paramcard[2]);
- if (s_class.upper==1) // [MouseJstr]
- sd->status.max_hp = sd->status.max_hp * 130/100;
- else if (s_class.upper==2)
- sd->status.max_hp = sd->status.max_hp * 70/100;
-
- if(sd->hprate!=100)
- sd->status.max_hp = sd->status.max_hp*sd->hprate/100;
-
- if(sd->sc_data && sd->sc_data[SC_BERSERK].timer!=-1){ // ƒo?ƒT?ƒN
- sd->status.max_hp = sd->status.max_hp * 3;
- // sd->status.hp = sd->status.hp * 3;
- if(sd->status.max_hp > battle_config.max_hp) // removed negative max hp bug by Valaris
- sd->status.max_hp = battle_config.max_hp;
- if(sd->status.hp > battle_config.max_hp) // removed negative max hp bug by Valaris
- sd->status.hp = battle_config.max_hp;
- }
- if(s_class.job == 23 && sd->status.base_level >= 99){
- sd->status.max_hp = sd->status.max_hp + 2000;
- }
-
- if(sd->status.max_hp > battle_config.max_hp) // removed negative max hp bug by Valaris
- sd->status.max_hp = battle_config.max_hp;
- if(sd->status.max_hp <= 0) sd->status.max_hp = 1; // end
-
- // Å‘åSPŒvŽZ
- sd->status.max_sp += ((sp_coefficient[s_class.job] * bl) + 1000)/100 * (100 + sd->paramc[3])/100 + (sd->parame[3] - sd->paramcard[3]);
- if (s_class.upper==1) // [MouseJstr]
- sd->status.max_sp = sd->status.max_sp * 130/100;
- else if (s_class.upper==2)
- sd->status.max_sp = sd->status.max_sp * 70/100;
- if(sd->sprate!=100)
- sd->status.max_sp = sd->status.max_sp*sd->sprate/100;
-
- if((skill=pc_checkskill(sd,HP_MEDITATIO))>0) // ƒƒfƒBƒeƒCƒeƒBƒI
- sd->status.max_sp += sd->status.max_sp*skill/100;
- if((skill=pc_checkskill(sd,HW_SOULDRAIN))>0) /* ƒ\ƒEƒ‹ƒhƒŒƒCƒ“ */
- sd->status.max_sp += sd->status.max_sp*2*skill/100;
-
- if(sd->status.max_sp < 0 || sd->status.max_sp > battle_config.max_sp)
- sd->status.max_sp = battle_config.max_sp;
-
- //Ž©‘R‰ñ•œHP
- sd->nhealhp = 1 + (sd->paramc[2]/5) + (sd->status.max_hp/200);
- if((skill=pc_checkskill(sd,SM_RECOVERY)) > 0) { /* HP‰ñ•œ—ÍŒüã */
- sd->nshealhp = skill*5 + (sd->status.max_hp*skill/500);
- if(sd->nshealhp > 0x7fff) sd->nshealhp = 0x7fff;
- }
- //Ž©‘R‰ñ•œSP
- 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;
- if((skill=pc_checkskill(sd,MG_SRECOVERY)) > 0) { /* SP‰ñ•œ—ÍŒüã */
- sd->nshealsp = skill*3 + (sd->status.max_sp*skill/500);
- if(sd->nshealsp > 0x7fff) sd->nshealsp = 0x7fff;
- }
-
- if((skill = pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0) {
- sd->nsshealhp = skill*4 + (sd->status.max_hp*skill/500);
- sd->nsshealsp = skill*2 + (sd->status.max_sp*skill/500);
- if(sd->nsshealhp > 0x7fff) sd->nsshealhp = 0x7fff;
- if(sd->nsshealsp > 0x7fff) sd->nsshealsp = 0x7fff;
- }
- if(sd->hprecov_rate != 100) {
- sd->nhealhp = sd->nhealhp*sd->hprecov_rate/100;
- if(sd->nhealhp < 1) sd->nhealhp = 1;
- }
- if(sd->sprecov_rate != 100) {
- sd->nhealsp = sd->nhealsp*sd->sprecov_rate/100;
- if(sd->nhealsp < 1) sd->nhealsp = 1;
- }
- /* if((skill=pc_checkskill(sd,HP_MEDITATIO)) > 0) { // f?fffBfefCfefBfI,I'SPR,A*,I',E`,¡©Z((c)¡®R¢¶n~.©«,E',(c),(c),e'
- sd->nhealsp += 3*skill*(sd->status.max_sp)/100;
- if(sd->nhealsp > 0x7fff) sd->nhealsp = 0x7fff;
- } Increase natural SP regen instead of colossal SP Recovery effect [DracoRPG]*/
-
- // Ží‘°‘Ï«i‚±‚ê‚Å‚¢‚¢‚ÌH ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“‚Æ“¯‚¶?—‚ª‚¢‚é‚©‚àj
- if( (skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){ // ƒhƒ‰ƒSƒmƒƒW?
- skill = skill*4;
- sd->addrace[9]+=skill;
- sd->addrace_[9]+=skill;
- sd->subrace[9]+=skill;
- sd->magic_addrace[9]+=skill;
- sd->magic_subrace[9]-=skill;
- }
-
- //Fleeã¸
- if( (skill=pc_checkskill(sd,TF_MISS))>0 ){ // ‰ñ”ð—¦?‰Á
- if(sd->status.class==6||sd->status.class==4007 || sd->status.class==23){
- sd->flee += skill*3;
- }
- if(sd->status.class==12||sd->status.class==17||sd->status.class==4013||sd->status.class==4018)
- sd->flee += skill*4;
- if(sd->status.class==12||sd->status.class==4013)
- sd->speed -= sd->speed *(skill*1.5)/100;
- }
- if( (skill=pc_checkskill(sd,MO_DODGE))>0 ) // Œ©Ø‚è
- sd->flee += (skill*3)>>1;
-
- // ƒXƒLƒ‹‚âƒXƒe?ƒ^ƒXˆÙí‚É‚æ‚é?‚è‚̃pƒ‰ƒ?ƒ^•â³
- if(sd->sc_count){
- // ATK/DEF?‰»Œ`
- if(sd->sc_data[SC_ANGELUS].timer!=-1) // ƒGƒ“ƒWƒFƒ‰ƒX
- sd->def2 = sd->def2*(110+5*sd->sc_data[SC_ANGELUS].val1)/100;
- if(sd->sc_data[SC_IMPOSITIO].timer!=-1) {// ƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒX
- sd->watk += sd->sc_data[SC_IMPOSITIO].val1*5;
- index = sd->equip_index[8];
- if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
- sd->watk_ += sd->sc_data[SC_IMPOSITIO].val1*5;
- }
- if(sd->sc_data[SC_PROVOKE].timer!=-1){ // ƒvƒƒ{ƒbƒN
- sd->def2 = sd->def2*(100-6*sd->sc_data[SC_PROVOKE].val1)/100;
- sd->base_atk = sd->base_atk*(100+2*sd->sc_data[SC_PROVOKE].val1)/100;
- sd->watk = sd->watk*(100+2*sd->sc_data[SC_PROVOKE].val1)/100;
- index = sd->equip_index[8];
- if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
- sd->watk_ = sd->watk_*(100+2*sd->sc_data[SC_PROVOKE].val1)/100;
- }
- if(sd->sc_data[SC_ENDURE].timer!=-1)
- sd->mdef2 += sd->sc_data[SC_ENDURE].val1;
- if(sd->sc_data[SC_MINDBREAKER].timer!=-1){ // ƒvƒƒ{ƒbƒN
- sd->mdef2 = sd->mdef2*(100-6*sd->sc_data[SC_MINDBREAKER].val1)/100;
- sd->matk1 = sd->matk1*(100+2*sd->sc_data[SC_MINDBREAKER].val1)/100;
- sd->matk2 = sd->matk2*(100+2*sd->sc_data[SC_MINDBREAKER].val1)/100;
- }
- if(sd->sc_data[SC_POISON].timer!=-1) // “Å?‘Ô
- sd->def2 = sd->def2*75/100;
- if(sd->sc_data[SC_DRUMBATTLE].timer!=-1){ // ?‘¾ŒÛ‚Ì‹¿‚«
- sd->watk += sd->sc_data[SC_DRUMBATTLE].val2;
- sd->def += sd->sc_data[SC_DRUMBATTLE].val3;
- index = sd->equip_index[8];
- if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
- sd->watk_ += sd->sc_data[SC_DRUMBATTLE].val2;
- }
- if(sd->sc_data[SC_NIBELUNGEN].timer!=-1) { // ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö
- index = sd->equip_index[9];
- if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 3)
- sd->watk += sd->sc_data[SC_NIBELUNGEN].val3;
- index = sd->equip_index[8];
- if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 3)
- sd->watk_ += sd->sc_data[SC_NIBELUNGEN].val3;
- if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 4)
- sd->watk += 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->watk_ += sd->sc_data[SC_NIBELUNGEN].val2;
- }
-
- if(sd->sc_data[SC_VOLCANO].timer!=-1 && sd->def_ele==3){ // ƒ{ƒ‹ƒP?ƒm
- sd->watk += sd->sc_data[SC_VIOLENTGALE].val3;
- }
-
- if(sd->sc_data[SC_SIGNUMCRUCIS].timer!=-1)
- sd->def = sd->def * (100 - sd->sc_data[SC_SIGNUMCRUCIS].val2)/100;
- if(sd->sc_data[SC_ETERNALCHAOS].timer!=-1) // ƒGƒ^?ƒiƒ‹ƒJƒIƒX
- sd->def=0;
-
- if(sd->sc_data[SC_CONCENTRATION].timer!=-1){ //ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“
- sd->watk = sd->watk * (100 + 5*sd->sc_data[SC_CONCENTRATION].val1)/100;
- index = sd->equip_index[8];
- if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
- sd->watk_ = sd->watk * (100 + 5*sd->sc_data[SC_CONCENTRATION].val1)/100;
- sd->def = sd->def * (100 - 5*sd->sc_data[SC_CONCENTRATION].val1)/100;
- }
-
- if(sd->sc_data[SC_MAGICPOWER].timer!=-1){ //–‚–@—Í?•
- sd->matk1 = sd->matk1*(100+5*sd->sc_data[SC_MAGICPOWER].val1)/100;
- sd->matk2 = sd->matk2*(100+5*sd->sc_data[SC_MAGICPOWER].val1)/100;
- }
- if(sd->sc_data[SC_ATKPOT].timer!=-1)
- sd->watk += sd->sc_data[SC_ATKPOT].val1;
- if(sd->sc_data[SC_MATKPOT].timer!=-1){
- sd->matk1 += sd->sc_data[SC_MATKPOT].val1;
- sd->matk2 += sd->sc_data[SC_MATKPOT].val1;
- }
-
- // ASPD/ˆÚ“®‘¬“x?‰»Œn
- if(sd->sc_data[SC_TWOHANDQUICKEN].timer != -1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1) // 2HQ
- aspd_rate -= 30;
- if(sd->sc_data[SC_ADRENALINE].timer != -1 && sd->sc_data[SC_TWOHANDQUICKEN].timer == -1 &&
- sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1) { // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…
- if(sd->sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penaly)
- aspd_rate -= 30;
- else
- aspd_rate -= 25;
- }
- if(sd->sc_data[SC_SPEARSQUICKEN].timer != -1 && sd->sc_data[SC_ADRENALINE].timer == -1 &&
- sd->sc_data[SC_TWOHANDQUICKEN].timer == -1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1) // ƒXƒsƒAƒNƒBƒbƒPƒ“
- aspd_rate -= sd->sc_data[SC_SPEARSQUICKEN].val2;
- if(sd->sc_data[SC_ASSNCROS].timer!=-1 && // —[—z‚̃AƒTƒVƒ“ƒNƒƒX
- sd->sc_data[SC_TWOHANDQUICKEN].timer==-1 && sd->sc_data[SC_ADRENALINE].timer==-1 && sd->sc_data[SC_SPEARSQUICKEN].timer==-1 &&
- sd->sc_data[SC_DONTFORGETME].timer == -1)
- aspd_rate -= 5+sd->sc_data[SC_ASSNCROS].val1+sd->sc_data[SC_ASSNCROS].val2+sd->sc_data[SC_ASSNCROS].val3;
- if(sd->sc_data[SC_DONTFORGETME].timer!=-1){ // Ž„‚ð–Y‚ê‚È‚¢‚Å
- aspd_rate += sd->sc_data[SC_DONTFORGETME].val1*3 + sd->sc_data[SC_DONTFORGETME].val2 + (sd->sc_data[SC_DONTFORGETME].val3>>16);
- sd->speed= sd->speed*(100+sd->sc_data[SC_DONTFORGETME].val1*2 + sd->sc_data[SC_DONTFORGETME].val2 + (sd->sc_data[SC_DONTFORGETME].val3&0xffff))/100;
- }
- if( sd->sc_data[i=SC_SPEEDPOTION2].timer!=-1 ||
- sd->sc_data[i=SC_SPEEDPOTION1].timer!=-1 ||
- sd->sc_data[i=SC_SPEEDPOTION0].timer!=-1) // ? ‘¬ƒ|?ƒVƒ‡ƒ“
- aspd_rate -= sd->sc_data[i].val2;
-
- // HIT/FLEE?‰»Œn
- if(sd->sc_data[SC_WHISTLE].timer!=-1){ // Œû“J
- sd->flee += sd->flee * (sd->sc_data[SC_WHISTLE].val1
- +sd->sc_data[SC_WHISTLE].val2+(sd->sc_data[SC_WHISTLE].val3>>16))/100;
- sd->flee2+= (sd->sc_data[SC_WHISTLE].val1+sd->sc_data[SC_WHISTLE].val2+(sd->sc_data[SC_WHISTLE].val3&0xffff)) * 10;
- }
- if(sd->sc_data[SC_HUMMING].timer!=-1) // ƒnƒ~ƒ“ƒO
- sd->hit += (sd->sc_data[SC_HUMMING].val1*2+sd->sc_data[SC_HUMMING].val2
- +sd->sc_data[SC_HUMMING].val3) * sd->hit/100;
- if(sd->sc_data[SC_VIOLENTGALE].timer!=-1 && sd->def_ele==4){ // ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹
- sd->flee += sd->flee*sd->sc_data[SC_VIOLENTGALE].val3/100;
- }
- if(sd->sc_data[SC_BLIND].timer!=-1){ // ˆÃ?
- sd->hit -= sd->hit*25/100;
- sd->flee -= sd->flee*25/100;
- }
- if(sd->sc_data[SC_WINDWALK].timer!=-1) // ƒEƒBƒ“ƒhƒEƒH?ƒN
- sd->flee += sd->flee*(sd->sc_data[SC_WINDWALK].val2)/100;
- if(sd->sc_data[SC_SPIDERWEB].timer!=-1) //ƒXƒpƒCƒ_?ƒEƒFƒu
- sd->flee -= sd->flee*50/100;
- if(sd->sc_data[SC_TRUESIGHT].timer!=-1) //ƒgƒDƒ‹?ƒTƒCƒg
- sd->hit += 3*(sd->sc_data[SC_TRUESIGHT].val1);
- if(sd->sc_data[SC_CONCENTRATION].timer!=-1) //ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“
- sd->hit += (10*(sd->sc_data[SC_CONCENTRATION].val1));
-
- // ‘Ï«
- if(sd->sc_data[SC_SIEGFRIED].timer!=-1){ // •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh
- 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){ // ƒvƒƒ”ƒBƒfƒ“ƒX
- sd->subele[6] += sd->sc_data[SC_PROVIDENCE].val2; // ? ¹?«
- sd->subrace[6] += sd->sc_data[SC_PROVIDENCE].val2; // ? ?–‚
- }
-
- // ‚»‚Ì‘¼
- if(sd->sc_data[SC_APPLEIDUN].timer!=-1){ // ƒCƒhƒDƒ“‚Ì—ÑŒç
- sd->status.max_hp += ((5+sd->sc_data[SC_APPLEIDUN].val1*2+((sd->sc_data[SC_APPLEIDUN].val2+1)>>1)
- +sd->sc_data[SC_APPLEIDUN].val3/10) * sd->status.max_hp)/100;
- if(sd->status.max_hp < 0 || sd->status.max_hp > battle_config.max_hp)
- sd->status.max_hp = battle_config.max_hp;
- }
- if(sd->sc_data[SC_DELUGE].timer!=-1 && sd->def_ele==1){ // ƒfƒŠƒ…?ƒW
- sd->status.max_hp += sd->status.max_hp*sd->sc_data[SC_DELUGE].val3/100;
- if(sd->status.max_hp < 0 || sd->status.max_hp > battle_config.max_hp)
- sd->status.max_hp = battle_config.max_hp;
- }
- if(sd->sc_data[SC_SERVICE4U].timer!=-1) { // ƒT?ƒrƒXƒtƒH?ƒ†?
- sd->status.max_sp += sd->status.max_sp*(10+sd->sc_data[SC_SERVICE4U].val1+sd->sc_data[SC_SERVICE4U].val2
- +sd->sc_data[SC_SERVICE4U].val3)/100;
- if(sd->status.max_sp < 0 || sd->status.max_sp > battle_config.max_sp)
- sd->status.max_sp = battle_config.max_sp;
- sd->dsprate-=(10+sd->sc_data[SC_SERVICE4U].val1*3+sd->sc_data[SC_SERVICE4U].val2
- +sd->sc_data[SC_SERVICE4U].val3);
- if(sd->dsprate<0)sd->dsprate=0;
- }
-
- if(sd->sc_data[SC_FORTUNE].timer!=-1) // K‰^‚̃LƒX
- sd->critical += (10+sd->sc_data[SC_FORTUNE].val1+sd->sc_data[SC_FORTUNE].val2
- +sd->sc_data[SC_FORTUNE].val3)*10;
-
- if(sd->sc_data[SC_EXPLOSIONSPIRITS].timer!=-1){ // ”š—ô”g“®
- if(s_class.job==23)
- sd->critical += sd->sc_data[SC_EXPLOSIONSPIRITS].val1*100;
- else
- sd->critical += sd->sc_data[SC_EXPLOSIONSPIRITS].val2;
- }
-
- if(sd->sc_data[SC_STEELBODY].timer!=-1){ // ‹à„
- sd->def = 90;
- sd->mdef = 90;
- aspd_rate += 25;
- sd->speed = (sd->speed * 125) / 100;
- }
- if(sd->sc_data[SC_DEFENDER].timer != -1) {
- sd->aspd += (550 - sd->sc_data[SC_DEFENDER].val1*50);
- sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100;
- }
- if(sd->sc_data[SC_ENCPOISON].timer != -1)
- sd->addeff[4] += sd->sc_data[SC_ENCPOISON].val2;
-
- if( sd->sc_data[SC_DANCING].timer!=-1 ){ // ‰‰‘t/ƒ_ƒ“ƒXŽg—p’†
- sd->speed*=4;
- sd->nhealsp = 0;
- sd->nshealsp = 0;
- sd->nsshealsp = 0;
- }
- if(sd->sc_data[SC_CURSE].timer!=-1)
- sd->speed += 450;
-
- if(sd->sc_data[SC_TRUESIGHT].timer!=-1) //ƒgƒDƒ‹?ƒTƒCƒg
- sd->critical += sd->critical*(sd->sc_data[SC_TRUESIGHT].val1)/100;
-
-/* if(sd->sc_data[SC_VOLCANO].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“(?«‚Íbattle.c‚Å)
- sd->addeff[2]+=sd->sc_data[SC_VOLCANO].val2;//% of granting
- if(sd->sc_data[SC_DELUGE].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“(?«‚Íbattle.c‚Å)
- sd->addeff[0]+=sd->sc_data[SC_DELUGE].val2;//% of granting
- */
- if(sd->sc_data[SC_BERSERK].timer!=-1) { //All Def/MDef reduced to 0 while in Berserk [DracoRPG]
- sd->def = sd->def2 = 0;
- sd->mdef = sd->mdef2 = 0;
- sd->flee -= sd->flee*50/100;
- aspd_rate -= 30;
- //sd->base_atk *= 3;
- }
- if(sd->sc_data[SC_KEEPING].timer!=-1)
- sd->def = 100;
- if(sd->sc_data[SC_BARRIER].timer!=-1)
- sd->mdef = 100;
- }
-
- if(sd->speed_rate != 100)
- sd->speed = sd->speed*sd->speed_rate/100;
- if(sd->speed < 1) sd->speed = 1;
- if(aspd_rate != 100)
- sd->aspd = sd->aspd*aspd_rate/100;
- if(pc_isriding(sd)) // ‹R•ºC—û
- sd->aspd = sd->aspd*(100 + 10*(5 - pc_checkskill(sd,KN_CAVALIERMASTERY)))/ 100;
- if(sd->aspd < battle_config.max_aspd) sd->aspd = battle_config.max_aspd;
- sd->amotion = sd->aspd;
- sd->dmotion = 800-sd->paramc[1]*4;
- if(sd->dmotion<400)
- sd->dmotion = 400;
- if(sd->skilltimer != -1 && (skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
- sd->prev_speed = sd->speed;
- sd->speed = sd->speed*(175 - skill*5)/100;
- }
-
- if(sd->status.hp>sd->status.max_hp)
- sd->status.hp=sd->status.max_hp;
- if(sd->status.sp>sd->status.max_sp)
- sd->status.sp=sd->status.max_sp;
-
- if(first&4)
- 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);
- }
- return 0;
- }
-
- 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
- }
-
- if( memcmp(b_skill,sd->status.skill,sizeof(sd->status.skill)) || b_attackrange != sd->attackrange)
- clif_skillinfoblock(sd); // ƒXƒLƒ‹‘—M
-
- 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->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->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);
-
-/* if(before.cart_num != before.cart_num || before.cart_max_num != before.cart_max_num ||
- before.cart_weight != before.cart_weight || before.cart_max_weight != before.cart_max_weight )
- clif_updatestatus(sd,SP_CARTINFO);*/
-
- if(sd->status.hp<sd->status.max_hp>>2 && pc_checkskill(sd,SM_AUTOBERSERK)>0 &&
- (sd->sc_data[SC_PROVOKE].timer==-1 || sd->sc_data[SC_PROVOKE].val2==0 ) && !pc_isdead(sd))
- // ƒI?ƒgƒo?ƒT?ƒN?“®
- skill_status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
-
- return 0;
-}
-
-/*==========================================
- * For quick calculating [Celest]
- *------------------------------------------
- */
-int pc_calcspeed (struct map_session_data *sd)
-{
- int b_speed, skill;
- struct pc_base_job s_class;
-
- nullpo_retr(0, sd);
-
- s_class = pc_calc_base_job(sd->status.class);
-
- b_speed = sd->speed;
- sd->speed = DEFAULT_WALK_SPEED ;
-
- if(sd->sc_count){
- if(sd->sc_data[SC_INCREASEAGI].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1){ // ‘¬“x?‰Á
- sd->speed -= sd->speed *25/100;
- }
- if(sd->sc_data[SC_DECREASEAGI].timer!=-1) {
- sd->speed = sd->speed *125/100;
- }
- if(sd->sc_data[SC_CLOAKING].timer!=-1) {
- sd->speed = sd->speed * (sd->sc_data[SC_CLOAKING].val3-sd->sc_data[SC_CLOAKING].val1*3) /100;
- }
- if(sd->sc_data[SC_CHASEWALK].timer!=-1) {
- sd->speed = sd->speed * sd->sc_data[SC_CHASEWALK].val3 /100;
- }
- if(sd->sc_data[SC_QUAGMIRE].timer!=-1){
- sd->speed = sd->speed*3/2;
- }
- if(sd->sc_data[SC_WINDWALK].timer!=-1) {
- sd->speed -= sd->speed *(sd->sc_data[SC_WINDWALK].val1*2)/100;
- }
- if(sd->sc_data[SC_CARTBOOST].timer!=-1) {
- sd->speed -= (DEFAULT_WALK_SPEED * 20)/100;
- }
- if(sd->sc_data[SC_BERSERK].timer!=-1) {
- sd->speed -= sd->speed *25/100;
- }
- if(sd->sc_data[SC_WEDDING].timer!=-1) {
- sd->speed = 2*DEFAULT_WALK_SPEED;
- }
- if(sd->sc_data[SC_DONTFORGETME].timer!=-1){
- sd->speed= sd->speed*(100+sd->sc_data[SC_DONTFORGETME].val1*2 + sd->sc_data[SC_DONTFORGETME].val2 + (sd->sc_data[SC_DONTFORGETME].val3&0xffff))/100;
- }
- if(sd->sc_data[SC_STEELBODY].timer!=-1){
- sd->speed = (sd->speed * 125) / 100;
- }
- if(sd->sc_data[SC_DEFENDER].timer != -1) {
- sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100;
- }
- if( sd->sc_data[SC_DANCING].timer!=-1 ){
- sd->speed*=4;
- }
- if(sd->sc_data[SC_CURSE].timer!=-1)
- sd->speed += 450;
- }
-
- if(sd->status.option&2 && (skill = pc_checkskill(sd,RG_TUNNELDRIVE))>0 )
- sd->speed += (1.2*DEFAULT_WALK_SPEED - skill*9);
- if (pc_iscarton(sd) && (skill=pc_checkskill(sd,MC_PUSHCART))>0)
- sd->speed += (10-skill) * (DEFAULT_WALK_SPEED * 0.1);
- else if (pc_isriding(sd)) {
- sd->speed -= (0.25 * DEFAULT_WALK_SPEED);
- }
- if((skill=pc_checkskill(sd,TF_MISS))>0)
- if(s_class.job==12)
- sd->speed -= sd->speed *(skill*1.5)/100;
-
- if(sd->speed_rate != 100)
- sd->speed = sd->speed*sd->speed_rate/100;
- if(sd->speed < 1) sd->speed = 1;
-
- if(sd->skilltimer != -1 && (skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
- sd->prev_speed = sd->speed;
- sd->speed = sd->speed*(175 - skill*5)/100;
- }
-
- if(b_speed != sd->speed)
- clif_updatestatus(sd,SP_SPEED);
-
- 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){
@@ -2523,20 +1488,12 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
sd->parame[SP_INT-SP_STR]+=val;
sd->parame[SP_DEX-SP_STR]+=val;
sd->parame[SP_LUK-SP_STR]+=val;
- clif_updatestatus(sd,13);
- clif_updatestatus(sd,14);
- clif_updatestatus(sd,15);
- clif_updatestatus(sd,16);
- clif_updatestatus(sd,17);
- clif_updatestatus(sd,18);
}
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;
- clif_updatestatus(sd,14);
- clif_updatestatus(sd,15);
}
break;
case SP_AGI_DEX_STR: // [Valaris]
@@ -2544,9 +1501,6 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
sd->parame[SP_AGI-SP_STR]+=val;
sd->parame[SP_DEX-SP_STR]+=val;
sd->parame[SP_STR-SP_STR]+=val;
- clif_updatestatus(sd,14);
- clif_updatestatus(sd,17);
- clif_updatestatus(sd,13);
}
break;
case SP_PERFECT_HIDE: // [Valaris]
@@ -2570,11 +1524,106 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
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->status.weapon == 11 && sd->state.lr_flag != 2)
+ sd->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_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->ignore_def_mob |= 1<<val;
+ else if(sd->state.lr_flag == 1)
+ sd->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++) {
+ if (sd->inventory_data[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]) {
+ sd->unequip_losesp[i] += val;
+ break;
+ }
+ }
+ }
+ break;
default:
if(battle_config.error_log)
printf("pc_bonus: unknown type %d %d !\n",type,val);
@@ -2754,8 +1803,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
else if(sd->state.lr_flag == 1) {
sd->sp_drain_rate_ += type2;
- sd->sp_drain_per_ += val;
+ sd->sp_drain_per_ += val;
}
+ sd->sp_drain_type = 0;
break;
case SP_SP_DRAIN_VALUE:
if(!sd->state.lr_flag) {
@@ -2766,7 +1816,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->sp_drain_rate_ += type2;
sd->sp_drain_value_ += val;
}
-
+ sd->sp_drain_type = 0;
break;
case SP_WEAPON_COMA_ELE:
if(sd->state.lr_flag != 2)
@@ -2780,8 +1830,92 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
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;
+ break;
+ case SP_ADDEFF_WHENHIT:
+ if(sd->state.lr_flag != 2) {
+ sd->addeff3[type2]+=val;
+ sd->addeff3_type[type2]=1;
+ }
break;
+ case SP_ADDEFF_WHENHIT_SHORT:
+ if(sd->state.lr_flag != 2) {
+ sd->addeff3[type2]+=val;
+ sd->addeff3_type[type2]=0;
+ }
+ break;
+ case SP_SKILL_ATK:
+ if(sd->state.lr_flag != 2) {
+ if (sd->skillatk[0] == type2)
+ sd->skillatk[1] += val;
+ else {
+ sd->skillatk[0] = type2;
+ sd->skillatk[1] = val;
+ }
+ }
+ break;
+ case SP_ADD_DAMAGE_BY_CLASS:
+ if(sd->state.lr_flag != 2) {
+ for(i=0;i<sd->add_damage_class_count2;i++) {
+ if(sd->add_damage_classid2[i] == type2) {
+ sd->add_damage_classrate2[i] += val;
+ break;
+ }
+ }
+ if(i >= sd->add_damage_class_count2 && sd->add_damage_class_count2 < 10) {
+ sd->add_damage_classid2[sd->add_damage_class_count2] = type2;
+ sd->add_damage_classrate2[sd->add_damage_class_count2] += val;
+ sd->add_damage_class_count2++;
+ }
+ }
+ 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->addrace2[type2] += val;
+ else
+ sd->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;
+
default:
if(battle_config.error_log)
printf("pc_bonus2: unknown type %d %d %d!\n",type,type2,val);
@@ -2819,6 +1953,42 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
sd->autospell_rate = val;
}
break;
+ case SP_AUTOSPELL_WHENHIT:
+ if(sd->state.lr_flag != 2){
+ sd->autospell2_id = type2;
+ sd->autospell2_lv = type3;
+ sd->autospell2_rate = val;
+ sd->autospell2_type = 1; // enemy
+ }
+ 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->sp_drain_rate += type2;
+ sd->sp_drain_per += type3;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->sp_drain_rate_ += type2;
+ sd->sp_drain_per_ += type3;
+ }
+ sd->sp_drain_type = val;
+ break;
+ case SP_SP_DRAIN_VALUE:
+ if(!sd->state.lr_flag) {
+ sd->sp_drain_rate += type2;
+ sd->sp_drain_value += type3;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->sp_drain_rate_ += type2;
+ sd->sp_drain_value_ += type3;
+ }
+ sd->sp_drain_type = val;
default:
if(battle_config.error_log)
printf("pc_bonus3: unknown type %d %d %d %d!\n",type,type2,type3,val);
@@ -2828,6 +1998,26 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
return 0;
}
+int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4,int val)
+{
+ switch(type){
+ case SP_AUTOSPELL_WHENHIT:
+ if(sd->state.lr_flag != 2){
+ sd->autospell2_id = type2;
+ sd->autospell2_lv = type3;
+ sd->autospell2_rate = type4;
+ sd->autospell2_type = val; // 0: self, 1: enemy
+ }
+ break;
+ default:
+ if(battle_config.error_log)
+ printf("pc_bonus4: unknown type %d %d %d %d %d!\n",type,type2,type3,type4,val);
+ break;
+ }
+
+ return 0;
+}
+
/*==========================================
* ƒXƒNƒŠƒvƒg‚É‚æ‚éƒXƒLƒ‹Š“¾
*------------------------------------------
@@ -2843,12 +2033,12 @@ int pc_skill(struct map_session_data *sd,int id,int level,int flag)
}
if(!flag && (sd->status.skill[id].id == id || level == 0)){ // ƒNƒGƒXƒgŠ“¾‚Ȃ炱‚±‚Å?Œ‚ðŠm”F‚µ‚Ä‘—M‚·‚é
sd->status.skill[id].lv=level;
- pc_calcstatus(sd,0);
+ 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;
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
clif_skillinfoblock(sd);
}
else if(sd->status.skill[id].lv < level){ // ?‚¦‚ç‚ê‚邪lv‚ª¬‚³‚¢‚È‚ç
@@ -2865,6 +2055,32 @@ int pc_skill(struct map_session_data *sd,int id,int level,int flag)
}
/*==========================================
+ *
+ *------------------------------------------
+ */
+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?“ü
*------------------------------------------
*/
@@ -2950,7 +2166,7 @@ int pc_modifysellvalue(struct map_session_data *sd,int orig_value)
}
/*==========================================
- * ƒAƒCƒeƒ€‚𔃂Á‚½Žž‚ÉAV‚µ‚¢ƒAƒCƒeƒ€—“‚ðŽg‚¤‚©A
+ * ƒAƒCƒeƒ€‚𔃂Á‚½ŽbÉAV‚µ‚¢ƒAƒCƒeƒ€—“‚ðŽg‚¤‚©A
* 3–œŒÂ§ŒÀ‚É‚©‚©‚é‚©Šm”F
*------------------------------------------
*/
@@ -3074,7 +2290,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
i = MAX_INVENTORY;
if(!itemdb_isequip2(data)){
- // ? ”õ•i‚Å‚Í‚È‚¢‚Ì‚ÅA?Š—L•i‚È‚çŒÂ?‚Ì‚Ý?‰»‚³‚¹‚é
+ // ‘• ”õ•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] &&
@@ -3087,7 +2303,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
}
}
if(i >= MAX_INVENTORY){
- // ? ”õ•i‚©–¢Š—L•i‚¾‚Á‚½‚Ì‚Å‹ó‚«—“‚֒ljÁ
+ // ‘• ”õ•i‚©–¢Š—L•i‚¾‚Á‚½‚Ì‚Å‹ó‚«—“‚֒ljÁ
i = pc_search_inventory(sd,0);
if(i >= 0) {
memcpy(&sd->status.inventory[i],item_data,sizeof(sd->status.inventory[0]));
@@ -3118,7 +2334,7 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type)
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,0,BF_NORMAL);
+ pc_unequipitem(sd,n,3);
memset(&sd->status.inventory[n],0,sizeof(sd->status.inventory[0]));
sd->inventory_data[n] = NULL;
}
@@ -3139,19 +2355,17 @@ 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)
+ sd->status.inventory[n].amount <= 0 ||
+ itemdb_isdropable(sd->status.inventory[n].nameid) == 0 || // Celest
+ pc_candrop(sd,sd->status.inventory[n].nameid))
return 1;
map_addflooritem(&sd->status.inventory[n], amount, sd->bl.m, sd->bl.x, sd->bl.y, NULL, NULL, NULL, 0);
pc_delitem(sd, n, amount, 0);
@@ -3227,6 +2441,8 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if(item == NULL)
return 0;
+ if(item->type != 0 && item->type != 2)
+ return 0;
if((nameid == 605) && map[sd->bl.m].flag.gvg)
return 0;
if(nameid == 601 && (map[sd->bl.m].flag.noteleport || map[sd->bl.m].flag.gvg)) {
@@ -3241,18 +2457,16 @@ int pc_isUseitem(struct map_session_data *sd,int n)
return 0;
if(item->elv > 0 && sd->status.base_level < item->elv)
return 0;
- if(((sd->status.class==13 || sd->status.class==4014) && ((1<<7)&item->class) == 0) || // have mounted classes use unmounted items [Valaris]
- ((sd->status.class==21 || sd->status.class==4022) && ((1<<14)&item->class) == 0))
+ if(((sd->status.class_==13 || sd->status.class_==4014) && ((1<<7)&item->class_) == 0) || // have mounted classes use unmounted items [Valaris]
+ ((sd->status.class_==21 || sd->status.class_==4022) && ((1<<14)&item->class_) == 0))
return 0;
- if(sd->status.class!=13 && sd->status.class!=4014 && sd->status.class!=21 && sd->status.class!=4022)
- if((sd->status.class<=4000 && ((1<<sd->status.class)&item->class) == 0) || (sd->status.class>4000 && sd->status.class<4023 && ((1<<(sd->status.class-4001))&item->class) == 0) ||
- (sd->status.class>=4023 && ((1<<(sd->status.class-4023))&item->class) == 0))
+ if(sd->status.class_!=13 && sd->status.class_!=4014 && sd->status.class_!=21 && sd->status.class_!=4022)
+ if((sd->status.class_<=4000 && ((1<<sd->status.class_)&item->class_) == 0) || (sd->status.class_>4000 && sd->status.class_<4023 && ((1<<(sd->status.class_-4001))&item->class_) == 0) ||
+ (sd->status.class_>=4023 && ((1<<(sd->status.class_-4023))&item->class_) == 0))
return 0;
-#ifndef TXT_ONLY
if((log_config.branch > 0) && (nameid == 604))
log_branch(sd);
-#endif
return 1;
}
@@ -3263,28 +2477,31 @@ int pc_isUseitem(struct map_session_data *sd,int n)
*/
int pc_useitem(struct map_session_data *sd,int n)
{
- int nameid,amount;
+ int amount;
nullpo_retr(1, sd);
if(n >=0 && n < MAX_INVENTORY) {
- nameid = sd->status.inventory[n].nameid;
+ char *script;
+ sd->itemid = sd->status.inventory[n].nameid;
amount = sd->status.inventory[n].amount;
if(sd->status.inventory[n].nameid <= 0 ||
sd->status.inventory[n].amount <= 0 ||
sd->sc_data[SC_BERSERK].timer!=-1 ||
sd->sc_data[SC_MARIONETTE].timer!=-1 ||
+ (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[sd->bl.m].flag.gvg && (sd->inventory_data[n]->flag.no_equip>1) ) || // GVG
!pc_isUseitem(sd,n) ) {
clif_useitemack(sd,n,0,0);
return 1;
}
- if(sd->inventory_data[n])
- run_script(sd->inventory_data[n]->use_script,0,sd->bl.id,0);
-
- pc_delitem(sd,n,1,1);
+ script = sd->inventory_data[n]->use_script;
amount = sd->status.inventory[n].amount;
-
- clif_useitemack(sd,n,amount,1);
+ clif_useitemack(sd,n,amount-1,1);
+ run_script(script,0,sd->bl.id,0);
+ pc_delitem(sd,n,1,1);
}
return 0;
@@ -3311,7 +2528,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
i=MAX_CART;
if(!itemdb_isequip2(data)){
- // ? ”õ•i‚Å‚Í‚È‚¢‚Ì‚ÅA?Š—L•i‚È‚çŒÂ?‚Ì‚Ý?‰»‚³‚¹‚é
+ // ‘• ”õ•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] &&
@@ -3325,7 +2542,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
}
}
if(i >= MAX_CART){
- // ? ”õ•i‚©–¢Š—L•i‚¾‚Á‚½‚Ì‚Å‹ó‚«—“‚֒ljÁ
+ // ‘• ”õ•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]));
@@ -3380,6 +2597,10 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount) {
nullpo_retr(0, sd);
nullpo_retr(0, item_data = &sd->status.inventory[idx]);
+ if(itemdb_isdropable(sd->status.inventory[idx].nameid) == 0)
+ return 1;
+ if(pc_candrop(sd,sd->status.inventory[idx].nameid)==1)
+ return 1;
if (item_data->nameid==0 || item_data->amount<amount || sd->vender_id)
return 1;
if (pc_cart_additem(sd,item_data,amount) == 0)
@@ -3460,18 +2681,31 @@ int pc_item_identify(struct map_session_data *sd,int idx)
*/
int pc_item_repair(struct map_session_data *sd,int idx)
{
- int flag=1;
+ int flag=1, material;
+ int materials[5] = { 0, 1002, 998, 999, 756 };
+ struct item *item;
nullpo_retr(0, sd);
+ item = &sd->status.inventory[idx];
+
if(idx >= 0 && idx < MAX_INVENTORY) {
- if(sd->status.inventory[idx].nameid > 0 && sd->status.inventory[idx].attribute == 1 ) {
+ if(item->nameid > 0 && item->attribute == 1 ) {
+ if (itemdb_type(item->nameid)==4)
+ material = materials [itemdb_wlv (item->nameid)];
+ else
+ material = materials [3];
+
+ if (pc_search_inventory(sd, material) < 0 ) { //fixed by Lupus (item pos can be = 0!)
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return 0;
+ }
flag=0;
- sd->status.inventory[idx].attribute=0;
+ item->attribute=0;
//Temporary Weapon Repair code [DracoRPG]
- pc_delitem(sd, pc_search_inventory(sd, 999), 1, 0);
+ pc_delitem(sd, pc_search_inventory(sd, material), 1, 0);
clif_equiplist(sd);
- clif_produceeffect(sd, 0, sd->status.inventory[idx].nameid);
+ clif_produceeffect(sd, 0, item->nameid);
clif_misceffect(&sd->bl, 3);
clif_displaymessage(sd->fd,"Item has been repaired.");
}
@@ -3486,63 +2720,49 @@ int pc_item_repair(struct map_session_data *sd,int idx)
*/
int pc_item_refine(struct map_session_data *sd,int idx)
{
- int flag = 1, i = 0, count = 0, ep = 0, per, refine;
+ int flag = 1, i = 0, ep = 0, per;
int material[5] = { 0, 1010, 1011, 984, 984 };
-
+ struct item *item;
+
nullpo_retr(0, sd);
- struct item *item = &sd->status.inventory[idx];
+ item = &sd->status.inventory[idx];
if(idx >= 0 && idx < MAX_INVENTORY) {
if(item->nameid > 0 && itemdb_type(item->nameid)==4) {
// if it's no longer refineable
- if (item->refine == 10) {
+ if (item->refine >= sd->skilllv || item->refine == 10) {
clif_skill_fail(sd,sd->skillid,0,0);
return 0;
}
- refine = item->refine + sd->skilllv > 10
- ? 10 - item->refine : sd->skilllv;
- for (i=0; i < MAX_INVENTORY; i++)
- if(sd->status.inventory[i].nameid == material [itemdb_wlv (item->nameid)])
- count += sd->status.inventory[i].amount;
- if (count < refine ) {
+ if ((i=pc_search_inventory(sd, material [itemdb_wlv (item->nameid)])) < 0 ) { //fixed by Lupus (item pos can be = 0!)
clif_skill_fail(sd,sd->skillid,0,0);
return 0;
}
- per = percentrefinery [itemdb_wlv (item->nameid)][item->refine + refine - 1];
+
+ per = percentrefinery [itemdb_wlv (item->nameid)][(int)item->refine];
//per += pc_checkskill(sd,BS_WEAPONRESEARCH);
per *= (75 + sd->status.job_level/2)/100;
-
+
if (per > rand() % 100) {
flag = 0;
- item->refine += refine;
-
- for (i=0; i < MAX_INVENTORY; i++)
- if(sd->status.inventory[i].nameid == material [itemdb_wlv (item->nameid)]) {
- if (sd->status.inventory[i].amount >= refine) {
- pc_delitem(sd,i,refine,0);
- break;
- } else {
- refine -= sd->status.inventory[i].amount;
- pc_delitem(sd,i,sd->status.inventory[i].amount,0);
- }
- }
-
+ item->refine++;
+ pc_delitem(sd, i, 1, 0);
if(item->equip) {
ep = item->equip;
- pc_unequipitem(sd,idx,0, BF_NORMAL);
+ pc_unequipitem(sd,idx,3);
}
clif_refine(sd->fd,sd,0,idx,item->refine);
- clif_delitem(sd,idx,1);
+ clif_delitem(sd,idx,1);
clif_additem(sd,idx,1,0);
if (ep)
pc_equipitem(sd,idx,ep);
clif_misceffect(&sd->bl,3);
}
else {
- clif_delitem(sd,i,refine);
+ pc_delitem(sd, i, 1, 0);
item->refine = 0;
if(item->equip)
- pc_unequipitem(sd,idx,0, BF_NORMAL);
+ 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);
@@ -3596,28 +2816,29 @@ int pc_show_steal(struct block_list *bl,va_list ap)
int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
{
if(sd != NULL && bl != NULL && bl->type == BL_MOB) {
- int i,skill,rate,itemid,flag, count;
+ int i,skill,itemid,flag, count;
struct mob_data *md;
md=(struct mob_data *)bl;
- if(!md->state.steal_flag && mob_db[md->class].mexp <= 0 && !(mob_db[md->class].mode&0x20) && md->sc_data[SC_STONE].timer == -1 && md->sc_data[SC_FREEZE].timer == -1 &&
- (!(md->class>1324 && md->class<1364))) // prevent stealing from treasure boxes [Valaris]
+ if(!md->state.steal_flag && mob_db[md->class_].mexp <= 0 && !(mob_db[md->class_].mode&0x20) &&
+ (!(md->class_>1324 && md->class_<1364))) // prevent stealing from treasure boxes [Valaris]
{
+ if (md->sc_data && (md->sc_data[SC_STONE].timer != -1 || md->sc_data[SC_FREEZE].timer != -1))
+ return 0;
skill = battle_config.skill_steal_type == 1
- ? (sd->paramc[4] - mob_db[md->class].dex)/2 + pc_checkskill(sd,TF_STEAL)*6 + 10
- : sd->paramc[4] - mob_db[md->class].dex + pc_checkskill(sd,TF_STEAL)*3 + 10;
+ ? (sd->paramc[4] - mob_db[md->class_].dex)/2 + pc_checkskill(sd,TF_STEAL)*6 + 10
+ : sd->paramc[4] - mob_db[md->class_].dex + pc_checkskill(sd,TF_STEAL)*3 + 10;
if(0 < skill)
{
- for(count = 8; count <= 8 && count != 0; count--)
+ for(count = 10; count <= 10 && count != 0; count--) //8 -> 10 Lupus
{
- i = rand()%8;
- itemid = mob_db[md->class].dropitem[i].nameid;
+ i = rand()%10; //8 -> 10 Lupus
+ itemid = mob_db[md->class_].dropitem[i].nameid;
if(itemid > 0 && itemdb_type(itemid) != 6)
{
- rate = (mob_db[md->class].dropitem[i].p / battle_config.item_rate_common * 100 * skill)/100;
-
- if(rand()%10000 < rate)
+ //fixed rate. From Freya [Lupus]
+ if (rand() % 10000 < ((mob_db[md->class_].dropitem[i].p * skill) / 100 + sd->add_steal_rate))
{
struct item tmp_item;
memset(&tmp_item,0,sizeof(tmp_item));
@@ -3659,11 +2880,13 @@ 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 && md->sc_data && md->sc_data[SC_STONE].timer == -1 && md->sc_data[SC_FREEZE].timer == -1) {
+ 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 - mob_db[md->class].lv)*3 + sd->paramc[4]*2 + sd->paramc[5]*2;
+ rate = skill + (sd->status.base_level - mob_db[md->class_].lv)*3 + sd->paramc[4]*2 + sd->paramc[5]*2;
if(rand()%1000 < rate) {
- pc_getzeny(sd,mob_db[md->class].lv*10 + rand()%100);
+ pc_getzeny(sd,mob_db[md->class_].lv*10 + rand()%100);
md->state.steal_coin_flag = 1;
return 1;
}
@@ -3682,7 +2905,7 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *bl)
int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrtype)
{
char mapname[24];
- int m=0,c=0,disguise=0;
+ int m=0,disguise=0;
nullpo_retr(0, sd);
@@ -3711,43 +2934,58 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
skill_gangsterparadise(sd,0);
}
- if(sd->sc_data[SC_TRICKDEAD].timer != -1)
- skill_status_change_end(&sd->bl, SC_TRICKDEAD, -1);
+ 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_DANCING].timer!=-1) // clear dance effect when warping [Valaris]
+ skill_stop_dancing(&sd->bl,0);
+ if (sd->sc_data[SC_BASILICA].timer!=-1) {
+ /*int i;
+ for (i=0;i<MAX_SKILLUNITGROUP;i++)
+ if (sd->skillunit[i].skill_id==HP_BASILICA)
+ skill_delunitgroup(&sd->skillunit[i]);*/
+
+ struct skill_unit_group *sg = (struct skill_unit_group *)sd->sc_data[SC_BASILICA].val4;
+ if (sg && sg->src_id == sd->bl.id)
+ skill_delunitgroup (sg);
+ status_change_end(&sd->bl,SC_BASILICA,-1);
+ }
+ }
+
if(sd->status.option&2)
- skill_status_change_end(&sd->bl, SC_HIDING, -1);
+ status_change_end(&sd->bl, SC_HIDING, -1);
if(sd->status.option&4)
- skill_status_change_end(&sd->bl, SC_CLOAKING, -1);
- if(sd->status.option&16386)
- skill_status_change_end(&sd->bl, SC_CHASEWALK, -1);
- if(sd->sc_data[SC_BLADESTOP].timer!=-1)
- skill_status_change_end(&sd->bl,SC_BLADESTOP,-1);
- if(sd->sc_data[SC_DANCING].timer!=-1) // clear dance effect when warping [Valaris]
- skill_stop_dancing(&sd->bl,0);
+ status_change_end(&sd->bl, SC_CLOAKING, -1);
+ if(sd->status.option&16384)
+ 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(sd->disguise) { // clear disguises when warping [Valaris]
clif_clearchar(&sd->bl, 9);
disguise=sd->disguise;
sd->disguise=0;
}
- memcpy(mapname,mapname_org,24);
+ strncpy(mapname,mapname_org,sizeof(mapname));
mapname[16]=0;
- if(strstr(mapname,".gat")==NULL && strlen(mapname)<16){
+ if(strstr(mapname,".gat")==NULL && strstr(mapname,".afm")==NULL && strlen(mapname)<16){
strcat(mapname,".gat");
}
m=map_mapname2mapid(mapname);
+
if(m<0){
if(sd->mapname[0]){
int ip,port;
if(map_mapname2ipport(mapname,&ip,&port)==0){
skill_stop_dancing(&sd->bl,1);
- skill_unit_out_all(&sd->bl,gettick(),1);
+ skill_unit_move(&sd->bl,gettick(),0);
clif_clearchar_area(&sd->bl,clrtype&0xffff);
skill_gangsterparadise(sd,0);
map_delblock(&sd->bl);
@@ -3759,7 +2997,7 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
sd->pd = NULL;
sd->petDB = NULL;
if(battle_config.pet_status_support)
- pc_calcstatus(sd,2);
+ status_calc_pc(sd,2);
}
else if(sd->pet.intimate > 0) {
pet_stopattack(sd->pd);
@@ -3772,11 +3010,13 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
sd->bl.x=x;
sd->bl.y=y;
sd->state.waitingdisconnect=1;
+ pc_clean_skilltree(sd);
pc_makesavestatus(sd);
if(sd->status.pet_id > 0 && sd->pd)
intif_save_petdata(sd->status.account_id,&sd->pet);
chrif_save(sd);
storage_storage_save(sd);
+ storage_delete(sd->status.account_id);
chrif_changemapserver(sd, mapname, x, y, ip, port);
return 0;
}
@@ -3790,7 +3030,7 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
if(x <0 || x >= map[m].xs || y <0 || y >= map[m].ys)
x=y=0;
- if((x==0 && y==0) || (c=read_gat(m,x,y))==1 || c==5){
+ if((x==0 && y==0) || map_getcell(m,x,y,CELL_CHKNOPASS)){
if(x||y) {
if(battle_config.error_log)
printf("stacked (%d,%d)\n",x,y);
@@ -3798,11 +3038,11 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
do {
x=rand()%(map[m].xs-2)+1;
y=rand()%(map[m].ys-2)+1;
- } while((c=read_gat(m,x,y))==1 || c==5);
+ } while(map_getcell(m,x,y,CELL_CHKNOPASS));
}
if(sd->mapname[0] && sd->bl.prev != NULL){
- skill_unit_out_all(&sd->bl,gettick(),1);
+ skill_unit_move(&sd->bl,gettick(),0);
clif_clearchar_area(&sd->bl,clrtype&0xffff);
skill_gangsterparadise(sd,0);
map_delblock(&sd->bl);
@@ -3815,7 +3055,8 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
sd->pd = NULL;
sd->petDB = NULL;
if(battle_config.pet_status_support)
- pc_calcstatus(sd,2);
+ status_calc_pc(sd,2);
+ pc_clean_skilltree(sd);
pc_makesavestatus(sd);
chrif_save(sd);
storage_storage_save(sd);
@@ -3832,13 +3073,13 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
if(disguise) // disguise teleport fix [Valaris]
sd->disguise=disguise;
-
+
memcpy(sd->mapname,mapname,24);
sd->bl.m = m;
sd->to_x = x;
sd->to_y = y;
- // moved and changed dance effect stopping
+ // moved and changed dance effect stopping
sd->bl.x = x;
sd->bl.y = y;
@@ -3861,7 +3102,7 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
*------------------------------------------
*/
int pc_randomwarp(struct map_session_data *sd, int type) {
- int x,y,c,i=0;
+ int x,y,i=0;
int m;
nullpo_retr(0, sd);
@@ -3874,7 +3115,7 @@ int pc_randomwarp(struct map_session_data *sd, int type) {
do{
x=rand()%(map[m].xs-2)+1;
y=rand()%(map[m].ys-2)+1;
- } while (((c=read_gat(m,x,y)) == 1 || c == 5) && (i++) < 1000);
+ }while(map_getcell(m,x,y,CELL_CHKNOPASS) && (i++)<1000 );
if (i < 1000)
pc_setpos(sd,map[m].name,x,y,type);
@@ -3957,7 +3198,7 @@ int pc_can_reach(struct map_session_data *sd,int x,int y)
// ? s•¨
//
/*==========================================
- * ŽŸ‚Ì1?‚É‚©‚©‚鎞ŠÔ‚ðŒvŽZ
+ * ŽŸ‚Ì1?‚É‚©‚©‚éŽjÔ‚ðŒvŽZ
*------------------------------------------
*/
static int calc_next_walk_step(struct map_session_data *sd)
@@ -3979,12 +3220,11 @@ static int calc_next_walk_step(struct map_session_data *sd)
static int pc_walk(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd;
- int i,ctype;
+ int i;
int moveblock;
int x,y,dx,dy;
- sd=map_id2sd(id);
- if(sd==NULL)
+ if ((sd = map_id2sd(id)) == NULL)
return 0;
if(sd->walktimer != tid){
@@ -4001,32 +3241,34 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
sd->inchealspiritsptick = 0;
sd->walkpath.path_half ^= 1;
- if(sd->walkpath.path_half==0){ // ƒ}ƒX–Ú’†S‚Ö“ž’…
+ 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‚Ö“ž’…
+ } else { // ƒ}ƒX–Ú‹«ŠE‚Ö“r
if(sd->walkpath.path[sd->walkpath.path_pos]>=8)
return 1;
x = sd->bl.x;
y = sd->bl.y;
- ctype = map_getcell(sd->bl.m,x,y);
- if(ctype == 1 || ctype == 5) {
+ if(map_getcell(sd->bl.m,x,y,CELL_CHKNOPASS)) {
pc_stop_walking(sd,1);
return 0;
}
sd->dir=sd->head_dir=sd->walkpath.path[sd->walkpath.path_pos];
dx = dirx[(int)sd->dir];
dy = diry[(int)sd->dir];
- ctype = map_getcell(sd->bl.m,x+dx,y+dy);
- if(ctype == 1 || ctype == 5) {
+ if(map_getcell(sd->bl.m,x,y,CELL_CHKNOPASS)) {
pc_walktoxy_sub(sd);
return 0;
}
-
+ if (skill_check_moonlit (&sd->bl,x+dx,y+dy)) {
+ pc_stop_walking(sd,1);
+ return 0;
+ }
moveblock = ( x/BLOCK_SIZE != (x+dx)/BLOCK_SIZE || y/BLOCK_SIZE != (y+dy)/BLOCK_SIZE);
sd->walktimer = 1;
@@ -4035,26 +3277,12 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
x += dx;
y += dy;
+ skill_unit_move(&sd->bl,tick,0);
if(moveblock) map_delblock(&sd->bl);
sd->bl.x = x;
sd->bl.y = y;
if(moveblock) map_addblock(&sd->bl);
-
- if (sd->status.guild_id > 0) {
- struct skill_unit *su;
- if (sd->sc_data[SC_LEADERSHIP].val4 && (su=(struct skill_unit *)sd->sc_data[SC_LEADERSHIP].val4)) {
- skill_unit_move_unit_group(su->group,sd->bl.m,dx,dy);
- }
- if (sd->sc_data[SC_GLORYWOUNDS].val4 && (su=(struct skill_unit *)sd->sc_data[SC_GLORYWOUNDS].val4)) {
- skill_unit_move_unit_group(su->group,sd->bl.m,dx,dy);
- }
- if (sd->sc_data[SC_SOULCOLD].val4 && (su=(struct skill_unit *)sd->sc_data[SC_SOULCOLD].val4)) {
- skill_unit_move_unit_group(su->group,sd->bl.m,dx,dy);
- }
- if (sd->sc_data[SC_HAWKEYES].val4 && (su=(struct skill_unit *)sd->sc_data[SC_HAWKEYES].val4)) {
- skill_unit_move_unit_group(su->group,sd->bl.m,dx,dy);
- }
- }
+ skill_unit_move(&sd->bl,tick,1);
map_foreachinmovearea(clif_pcinsight,sd->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,-dx,-dy,0,sd);
sd->walktimer = -1;
@@ -4084,21 +3312,18 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
if (sd->sc_data[SC_DEVOTION].val1)
skill_devotion2(&sd->bl,sd->sc_data[SC_DEVOTION].val1);
- if (sd->sc_data[SC_BASILICA].timer != -1) { // Basilica cancels if caster moves [celest]
- struct skill_unit *su;
- if ((su = (struct skill_unit *)sd->sc_data[SC_BASILICA].val4)) {
- struct skill_unit_group *sg;
- if ((sg = su->group) && sg->src_id == sd->bl.id) {
- skill_status_change_end(&sd->bl,SC_BASILICA,-1);
- skill_delunitgroup (sg);
- }
- }
+ if (sd->sc_data[SC_BASILICA].timer!=-1) { // Basilica cancels if caster moves [celest]
+ /*int i;
+ for (i=0;i<MAX_SKILLUNITGROUP;i++)
+ if (sd->skillunit[i].skill_id==HP_BASILICA*/
+ struct skill_unit_group *sg = (struct skill_unit_group *)sd->sc_data[SC_BASILICA].val4;
+ if (sg && sg->src_id == sd->bl.id)
+ skill_delunitgroup (sg);
+ status_change_end(&sd->bl,SC_BASILICA,-1);
}
}
- skill_unit_move(&sd->bl,tick,1); // ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì?¸
-
- if(map_getcell(sd->bl.m,x,y)&0x80)
+ if(map_getcell(sd->bl.m,x,y,CELL_CHKNPC))
npc_touch_areanpc(sd,sd->bl.m,x,y);
else
sd->areanpc_id=0;
@@ -4109,6 +3334,8 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
i = 1;
sd->walktimer=add_timer(tick+i,pc_walk,id,sd->walkpath.path_pos);
}
+ if(battle_config.disp_hpmeter)
+ clif_hpmeter(sd);
return 0;
}
@@ -4151,15 +3378,24 @@ int pc_walktoxy(struct map_session_data *sd,int x,int y)
sd->to_x=x;
sd->to_y=y;
+ sd->idletime = tick_;
if(sd->walktimer != -1 && sd->state.change_walk_target==0){
- // Œ»Ý?‚¢‚Ä‚¢‚éÅ’†‚Ì–Ú“I’n?X‚Ȃ̂Ń}ƒX–Ú‚Ì’†S‚É?‚½Žž‚É
+ // Œ»Ý?‚¢‚Ä‚¢‚éÅ’†‚Ì–Ú“I’n?X‚Ȃ̂Ń}ƒX–Ú‚Ì’†S‚É?‚½ŽbÉ
// timer??‚©‚çpc_walktoxy_sub‚ðŒÄ‚Ԃ悤‚É‚·‚é
sd->state.change_walk_target=1;
} else {
pc_walktoxy_sub(sd);
}
+ if (sd->state.gmaster_flag > 0) {
+ struct guild *g = (struct guild *)sd->state.gmaster_flag;
+ if (g)
+ 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, g);
+ }
+
return 0;
}
@@ -4182,7 +3418,7 @@ int pc_stop_walking(struct map_session_data *sd,int type)
clif_fixpos(&sd->bl);
if(type&0x02 && battle_config.pc_damage_delay) {
unsigned int tick = gettick();
- int delay = battle_get_dmotion(&sd->bl);
+ int delay = status_get_dmotion(&sd->bl);
if(sd->canmove_tick < tick)
sd->canmove_tick = tick + delay;
}
@@ -4191,13 +3427,47 @@ int pc_stop_walking(struct map_session_data *sd,int type)
}
/*==========================================
+ * Random walk
+ *------------------------------------------
+ */
+int pc_randomwalk(struct map_session_data *sd,int tick)
+{
+ const int retrycount = 20;
+ nullpo_retr(0, sd);
+
+ if(DIFF_TICK(sd->next_walktime,tick)<0){
+ int i,x,y,d;
+ d = rand()%7+5;
+ for(i=0;i<retrycount;i++){ // Search of a movable place
+ int r=rand();
+ x=sd->bl.x+r%(d*2+1)-d;
+ y=sd->bl.y+r/(d*2+1)%(d*2+1)-d;
+ if((map_getcell(sd->bl.m,x,y,CELL_CHKPASS)) && pc_walktoxy(sd,x,y)==0)
+ break;
+ }
+ // Working on this part later [celest]
+ /*for(i=c=0;i<sd->walkpath.path_len;i++){ // The next walk start time is calculated.
+ if(sd->walkpath.path[i]&1)
+ c+=sd->speed*14/10;
+ else
+ c+=sd->speed;
+ }
+ sd->next_walktime = (d=tick+rand()%3000+c);
+ return d;*/
+ return 1;
+ }
+ return 0;
+}
+
+/*==========================================
*
*------------------------------------------
*/
int pc_movepos(struct map_session_data *sd,int dst_x,int dst_y)
{
int moveblock;
- int dx,dy,dist;
+ int dx,dy;
+ int tick = gettick();
struct walkpath_data wpd;
@@ -4210,16 +3480,17 @@ int pc_movepos(struct map_session_data *sd,int dst_x,int dst_y)
dx = dst_x - sd->bl.x;
dy = dst_y - sd->bl.y;
- dist = distance(sd->bl.x,sd->bl.y,dst_x,dst_y);
moveblock = ( sd->bl.x/BLOCK_SIZE != dst_x/BLOCK_SIZE || sd->bl.y/BLOCK_SIZE != dst_y/BLOCK_SIZE);
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,0,sd);
+ skill_unit_move(&sd->bl,tick,0);
if(moveblock) map_delblock(&sd->bl);
sd->bl.x = dst_x;
sd->bl.y = dst_y;
if(moveblock) map_addblock(&sd->bl);
+ skill_unit_move(&sd->bl,tick,1);
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,0,sd);
@@ -4236,9 +3507,7 @@ int pc_movepos(struct map_session_data *sd,int dst_x,int dst_y)
if(sd->status.option&4) // ƒNƒ?ƒLƒ“ƒO‚ÌÁ–Å?¸
skill_check_cloaking(&sd->bl);
- skill_unit_move(&sd->bl,gettick(),dist+7); // ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì?¸
-
- if(map_getcell(sd->bl.m,sd->bl.x,sd->bl.y)&0x80)
+ 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;
@@ -4281,46 +3550,44 @@ int pc_checkskill(struct map_session_data *sd,int skill_id)
int pc_checkallowskill(struct map_session_data *sd)
{
nullpo_retr(0, sd);
-
- if( sd->sc_data == NULL )
- return 0;
+ nullpo_retr(0, sd->sc_data);
if(!(skill_get_weapontype(KN_TWOHANDQUICKEN)&(1<<sd->status.weapon)) && sd->sc_data[SC_TWOHANDQUICKEN].timer!=-1) { // 2HQ
- skill_status_change_end(&sd->bl,SC_TWOHANDQUICKEN,-1); // 2HQ‚ð‰ðœ
+ status_change_end(&sd->bl,SC_TWOHANDQUICKEN,-1); // 2HQ‚ð‰ðœ
return -1;
}
if(!(skill_get_weapontype(LK_AURABLADE)&(1<<sd->status.weapon)) && sd->sc_data[SC_AURABLADE].timer!=-1) { /* ƒI?ƒ‰ƒuƒŒ?ƒh */
- skill_status_change_end(&sd->bl,SC_AURABLADE,-1); /* ƒI?ƒ‰ƒuƒŒ?ƒh‚ð‰ðœ */
+ status_change_end(&sd->bl,SC_AURABLADE,-1); /* ƒI?ƒ‰ƒuƒŒ?ƒh‚ð‰ðœ */
return -1;
}
if(!(skill_get_weapontype(LK_PARRYING)&(1<<sd->status.weapon)) && sd->sc_data[SC_PARRYING].timer!=-1) { /* ƒpƒŠƒCƒ“ƒO */
- skill_status_change_end(&sd->bl,SC_PARRYING,-1); /* ƒpƒŠƒCƒ“ƒO‚ð‰ðœ */
+ status_change_end(&sd->bl,SC_PARRYING,-1); /* ƒpƒŠƒCƒ“ƒO‚ð‰ðœ */
return -1;
}
if(!(skill_get_weapontype(LK_CONCENTRATION)&(1<<sd->status.weapon)) && sd->sc_data[SC_CONCENTRATION].timer!=-1) { /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
- skill_status_change_end(&sd->bl,SC_CONCENTRATION,-1); /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“‚ð‰ðœ */
+ status_change_end(&sd->bl,SC_CONCENTRATION,-1); /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“‚ð‰ðœ */
return -1;
}
if(!(skill_get_weapontype(CR_SPEARQUICKEN)&(1<<sd->status.weapon)) && sd->sc_data[SC_SPEARSQUICKEN].timer!=-1){ // ƒXƒsƒAƒNƒBƒbƒPƒ“
- skill_status_change_end(&sd->bl,SC_SPEARSQUICKEN,-1); // ƒXƒsƒAƒNƒCƒbƒPƒ“‚ð‰ðœ
+ status_change_end(&sd->bl,SC_SPEARSQUICKEN,-1); // ƒXƒsƒAƒNƒCƒbƒPƒ“‚ð‰ðœ
return -1;
}
if(!(skill_get_weapontype(BS_ADRENALINE)&(1<<sd->status.weapon)) && sd->sc_data[SC_ADRENALINE].timer!=-1){ // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…
- skill_status_change_end(&sd->bl,SC_ADRENALINE,-1); // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…‚ð‰ðœ
+ status_change_end(&sd->bl,SC_ADRENALINE,-1); // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…‚ð‰ðœ
return -1;
}
if(sd->status.shield <= 0) {
if(sd->sc_data[SC_AUTOGUARD].timer!=-1){ // ƒI?ƒgƒK?ƒh
- skill_status_change_end(&sd->bl,SC_AUTOGUARD,-1);
+ status_change_end(&sd->bl,SC_AUTOGUARD,-1);
return -1;
}
if(sd->sc_data[SC_DEFENDER].timer!=-1){ // ƒfƒBƒtƒFƒ“ƒ_?
- skill_status_change_end(&sd->bl,SC_DEFENDER,-1);
+ status_change_end(&sd->bl,SC_DEFENDER,-1);
return -1;
}
if(sd->sc_data[SC_REFLECTSHIELD].timer!=-1){ //ƒŠƒtƒŒƒNƒgƒV?ƒ‹ƒh
- skill_status_change_end(&sd->bl,SC_REFLECTSHIELD,-1);
+ status_change_end(&sd->bl,SC_REFLECTSHIELD,-1);
return -1;
}
}
@@ -4372,10 +3639,6 @@ struct pc_base_job pc_calc_base_job(int b_class)
bj.upper = 2;
}
- if(battle_config.enable_upper_class==0){ //conf‚Å–³?‚É‚È‚Á‚Ä‚¢‚½‚çupper=0
- bj.upper = 0;
- }
-
if(bj.job == 0){
bj.type = 0;
}else if(bj.job < 7){
@@ -4383,7 +3646,7 @@ struct pc_base_job pc_calc_base_job(int b_class)
}else{
bj.type = 2;
}
-
+
return bj;
}
@@ -4399,7 +3662,7 @@ int pc_calc_base_job2 (int b_class)
return b_class - 4001;
else if(b_class == 4045)
return 23;
- return b_class - 4023;
+ return b_class - 4023;
}
int pc_calc_upper(int b_class)
@@ -4426,6 +3689,9 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data)
sd=map_id2sd(id);
if(sd == NULL)
return 0;
+
+ sd->idletime = tick_;
+
if(sd->attacktimer != tid){
if(battle_config.error_log)
printf("pc_attack_timer %d != %d\n",sd->attacktimer,tid);
@@ -4440,8 +3706,12 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data)
if(bl==NULL || bl->prev == NULL)
return 0;
- if(bl->type == BL_PC && pc_isdead((struct map_session_data *)bl))
- return 0;
+ if(bl->type == BL_PC) {
+ if (pc_isdead((struct map_session_data *)bl))
+ return 0;
+ else if (pc_ishiding((struct map_session_data *)bl))
+ return 0;
+ }
// “¯‚¶map‚Å‚È‚¢‚È‚çU?‚µ‚È‚¢
// PC‚ªŽ€‚ñ‚Å‚Ä‚àU?‚µ‚È‚¢
@@ -4452,17 +3722,21 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data)
if( sd->opt1>0 || sd->status.option&2 || sd->status.option&16384) // ˆÙí‚È‚Ç‚ÅU?‚Å‚«‚È‚¢
return 0;
- if(sd->sc_data[SC_AUTOCOUNTER].timer != -1)
- return 0;
- if(sd->sc_data[SC_BLADESTOP].timer != -1)
- return 0;
+ if (sd->sc_count) {
+ if(sd->sc_data[SC_AUTOCOUNTER].timer != -1)
+ return 0;
+ if(sd->sc_data[SC_BLADESTOP].timer != -1)
+ return 0;
+ }
- //if((opt = battle_get_option(bl)) != NULL && *opt&0x46)
- if((opt = battle_get_option(bl)) != NULL && *opt&0x42)
+ //if((opt = status_get_option(bl)) != NULL && *opt&0x46)
+ if((opt = status_get_option(bl)) != NULL && *opt&0x42)
return 0;
- if(((sc_data = battle_get_sc_data(bl)) != NULL && sc_data[SC_TRICKDEAD].timer != -1) ||
- ((sc_data = battle_get_sc_data(bl)) != NULL && sc_data[SC_BASILICA].timer != -1 ))
+ if((sc_data = status_get_sc_data(bl)) != NULL) {
+ if (sc_data[SC_TRICKDEAD].timer != -1 ||
+ sc_data[SC_BASILICA].timer != -1)
return 0;
+ }
if(sd->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) <= 0)
return 0;
@@ -4474,6 +3748,11 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data)
}
}
+ if(sd->status.weapon == 11 && sd->equip_index[10] < 0) {
+ clif_arrow_fail(sd,0);
+ return 0;
+ }
+
dist = distance(sd->bl.x,sd->bl.y,bl->x,bl->y);
range = sd->attackrange;
if(sd->status.weapon != 11) range++;
@@ -4501,7 +3780,7 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data)
sd->attacktarget_lv = battle_weapon_attack(&sd->bl,bl,tick,0);
// &2 = ? - Celest
if(!(battle_config.pc_cloak_check_type&2) && sd->sc_data[SC_CLOAKING].timer != -1)
- skill_status_change_end(&sd->bl,SC_CLOAKING,-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();
@@ -4536,19 +3815,22 @@ int pc_attack(struct map_session_data *sd,int target_id,int type)
struct block_list *bl;
int d;
+
nullpo_retr(0, sd);
bl=map_id2bl(target_id);
if(bl==NULL)
return 1;
-
+
+ sd->idletime = tick_;
+
if(bl->type==BL_NPC) { // monster npcs [Valaris]
//npc_click(sd,RFIFOL(sd->fd,2));
npc_click(sd,target_id); // submitted by leinsirk10 [Celest]
return 0;
}
-
- if(!battle_check_target(&sd->bl,bl,BCT_ENEMY))
+
+ if(battle_check_target(&sd->bl,bl,BCT_ENEMY) <= 0)
return 1;
if(sd->attacktimer != -1)
pc_stopattack(sd);
@@ -4589,7 +3871,8 @@ int pc_follow_timer(int tid,unsigned int tick,int id,int data)
struct map_session_data *sd, *bl;
sd=map_id2sd(id);
- if(sd == NULL || sd->followtimer != tid)
+
+ if(sd == NULL || sd->followtimer != tid || pc_isdead(sd))
return 0;
sd->followtimer=-1;
@@ -4648,7 +3931,7 @@ int pc_checkbaselevelup(struct map_session_data *sd)
nullpo_retr(0, sd);
if(sd->status.base_exp >= next && next > 0){
- struct pc_base_job s_class = pc_calc_base_job(sd->status.class);
+ struct pc_base_job s_class = pc_calc_base_job(sd->status.class_);
// base‘¤ƒŒƒxƒ‹ƒAƒbƒv?—
sd->status.base_exp -= next;
@@ -4658,16 +3941,16 @@ int pc_checkbaselevelup(struct map_session_data *sd)
clif_updatestatus(sd,SP_STATUSPOINT);
clif_updatestatus(sd,SP_BASELEVEL);
clif_updatestatus(sd,SP_NEXTBASEEXP);
- pc_calcstatus(sd,0);
+ 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(s_class.job == 23){
- skill_status_change_start(&sd->bl,SkillStatusChangeTable[PR_KYRIE],1,0,0,0,skill_get_time(PR_KYRIE,1),0 );
- skill_status_change_start(&sd->bl,SkillStatusChangeTable[PR_IMPOSITIO],1,0,0,0,skill_get_time(PR_IMPOSITIO,1),0 );
- skill_status_change_start(&sd->bl,SkillStatusChangeTable[PR_MAGNIFICAT],1,0,0,0,skill_get_time(PR_MAGNIFICAT,1),0 );
- skill_status_change_start(&sd->bl,SkillStatusChangeTable[PR_GLORIA],1,0,0,0,skill_get_time(PR_GLORIA,1),0 );
- skill_status_change_start(&sd->bl,SkillStatusChangeTable[PR_SUFFRAGIUM],1,0,0,0,skill_get_time(PR_SUFFRAGIUM,1),0 );
+ 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);
@@ -4694,7 +3977,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
clif_updatestatus(sd,SP_NEXTJOBEXP);
sd->status.skill_point ++;
clif_updatestatus(sd,SP_SKILLPOINT);
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
clif_misceffect(&sd->bl,1);
return 1;
@@ -4710,6 +3993,8 @@ int pc_checkjoblevelup(struct map_session_data *sd)
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))
@@ -4734,11 +4019,17 @@ int pc_gainexp(struct map_session_data *sd,int base_exp,int job_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);
@@ -4751,14 +4042,14 @@ int pc_gainexp(struct map_session_data *sd,int base_exp,int job_exp)
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(battle_config.disp_experience){
- sprintf(output,
- "Experienced Gained Base:%d Job:%d",base_exp,job_exp);
+ if(battle_config.disp_experience && !sd->noexp){
+ 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));
}
@@ -4778,12 +4069,12 @@ int pc_nextbaseexp(struct map_session_data *sd)
if(sd->status.base_level>=MAX_LEVEL || sd->status.base_level<=0)
return 0;
- if(sd->status.class==0) i=0;
- else if(sd->status.class<=6) i=1;
- else if(sd->status.class<=22) i=2;
- else if(sd->status.class==23) i=3;
- else if(sd->status.class==4001) i=4;
- else if(sd->status.class<=4007) i=5;
+ if(sd->status.class_==0) i=0;
+ else if(sd->status.class_<=6) i=1;
+ else if(sd->status.class_<=22) i=2;
+ else if(sd->status.class_==23) i=3;
+ else if(sd->status.class_==4001) i=4;
+ else if(sd->status.class_<=4007) i=5;
else i=6;
return exp_table[i][sd->status.base_level-1];
@@ -4802,12 +4093,12 @@ int pc_nextjobexp(struct map_session_data *sd)
if(sd->status.job_level>=MAX_LEVEL || sd->status.job_level<=0)
return 0;
- if(sd->status.class==0) i=7;
- else if(sd->status.class<=6) i=8;
- else if(sd->status.class<=22) i=9;
- else if(sd->status.class==23) i=10;
- else if(sd->status.class==4001) i=11;
- else if(sd->status.class<=4007) i=12;
+ if(sd->status.class_==0) i=7;
+ else if(sd->status.class_<=6) i=8;
+ else if(sd->status.class_<=22) i=9;
+ else if(sd->status.class_==23) i=10;
+ else if(sd->status.class_==4001) i=11;
+ else if(sd->status.class_<=4007) i=12;
else i=13;
return exp_table[i][sd->status.job_level-1];
@@ -4826,12 +4117,12 @@ int pc_nextbaseafter(struct map_session_data *sd)
if(sd->status.base_level>=MAX_LEVEL || sd->status.base_level<=0)
return 0;
- if(sd->status.class==0) i=0;
- else if(sd->status.class<=6) i=1;
- else if(sd->status.class<=22) i=2;
- else if(sd->status.class==23) i=3;
- else if(sd->status.class==4001) i=4;
- else if(sd->status.class<=4007) i=5;
+ if(sd->status.class_==0) i=0;
+ else if(sd->status.class_<=6) i=1;
+ else if(sd->status.class_<=22) i=2;
+ else if(sd->status.class_==23) i=3;
+ else if(sd->status.class_==4001) i=4;
+ else if(sd->status.class_<=4007) i=5;
else i=6;
return exp_table[i][sd->status.base_level];
@@ -4850,12 +4141,12 @@ int pc_nextjobafter(struct map_session_data *sd)
if(sd->status.job_level>=MAX_LEVEL || sd->status.job_level<=0)
return 0;
- if(sd->status.class==0) i=7;
- else if(sd->status.class<=6) i=8;
- else if(sd->status.class<=22) i=9;
- else if(sd->status.class==23) i=10;
- else if(sd->status.class==4001) i=11;
- else if(sd->status.class<=4007) i=12;
+ if(sd->status.class_==0) i=7;
+ else if(sd->status.class_<=6) i=8;
+ else if(sd->status.class_<=22) i=9;
+ else if(sd->status.class_==23) i=10;
+ else if(sd->status.class_==4001) i=11;
+ else if(sd->status.class_<=4007) i=12;
else i=13;
return exp_table[i][sd->status.job_level];
@@ -4890,10 +4181,10 @@ int pc_need_status_point(struct map_session_data *sd,int type)
int pc_statusup(struct map_session_data *sd,int type)
{
int max, need,val = 0;
-
+
nullpo_retr(0, sd);
- max = (pc_calc_upper(sd->status.class)==2) ? 80 : battle_config.max_parameter;
+ max = (pc_calc_upper(sd->status.class_)==2) ? 80 : battle_config.max_parameter;
need=pc_need_status_point(sd,type);
if(type<SP_STR || type>SP_LUK || need<0 || need>sd->status.status_point){
@@ -4950,7 +4241,7 @@ int pc_statusup(struct map_session_data *sd,int type)
}
clif_updatestatus(sd,SP_STATUSPOINT);
clif_updatestatus(sd,type);
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
clif_statusupack(sd,type,1,val);
return 0;
@@ -5026,7 +4317,7 @@ int pc_statusup2(struct map_session_data *sd,int type,int val)
}
clif_updatestatus(sd,type-SP_STR+SP_USTR);
clif_updatestatus(sd,type);
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
clif_statusupack(sd,type,1,val);
return 0;
@@ -5048,11 +4339,11 @@ int pc_skillup(struct map_session_data *sd,int skill_num)
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 < skill_tree_get_max(skill_num, sd->status.class_) )
{
sd->status.skill[skill_num].lv++;
sd->status.skill_point--;
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
clif_skillup(sd,skill_num);
clif_updatestatus(sd,SP_SKILLPOINT);
clif_skillinfoblock(sd);
@@ -5074,7 +4365,7 @@ int pc_allskillup(struct map_session_data *sd)
nullpo_retr(0, sd);
- s_class = pc_calc_base_job(sd->status.class);
+ s_class = pc_calc_base_job(sd->status.class_);
c = s_class.job;
s = (s_class.upper==1) ? 1 : 0 ; //?¶ˆÈŠO‚Í’Êí‚̃XƒLƒ‹H
@@ -5092,21 +4383,25 @@ int pc_allskillup(struct map_session_data *sd)
sd->status.skill[i].lv=skill_get_max(i);
for(i=210;i<291;i++)
sd->status.skill[i].lv=skill_get_max(i);
- for(i=304;i<MAX_SKILL;i++){
+ for(i=304;i<338;i++){
if(i==331) continue;
sd->status.skill[i].lv=skill_get_max(i);
}
+ for(i=355;i<411;i++)
+ sd->status.skill[i].lv=skill_get_max(i);
+ for(i=475;i<480;i++)
+ sd->status.skill[i].lv=skill_get_max(i);
}
else {
for(i=0;(id=skill_tree[s][c][i].id)>0;i++){
if(sd->status.skill[id].id==0 && (!(skill_get_inf2(id)&0x01) || battle_config.quest_skill_learn) ) {
sd->status.skill[id].id = id; // celest
// sd->status.skill[id].lv=skill_get_max(id);
- sd->status.skill[id].lv = skill_tree_get_max(id, sd->status.class); // celest
+ sd->status.skill[id].lv = skill_tree_get_max(id, sd->status.class_); // celest
}
}
}
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
return 0;
}
@@ -5118,9 +4413,9 @@ int pc_allskillup(struct map_session_data *sd)
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;
}
@@ -5140,8 +4435,11 @@ int pc_resetlvl(struct map_session_data* sd,int type)
sd->status.int_=1;
sd->status.dex=1;
sd->status.luk=1;
- if(sd->status.class == 4001)
- sd->status.status_point=88;
+ if(sd->status.class_ == 4001)
+ 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){
@@ -5158,7 +4456,7 @@ int pc_resetlvl(struct map_session_data* sd,int type)
if(type == 4){
sd->status.job_level=1;
sd->status.job_exp=0;
- }
+ }
clif_updatestatus(sd,SP_STATUSPOINT);
clif_updatestatus(sd,SP_STR);
@@ -5184,11 +4482,11 @@ int pc_resetlvl(struct map_session_data* sd,int type)
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],1,BF_NORMAL);
+ pc_unequipitem(sd,sd->equip_index[i],2);
}
clif_skillinfoblock(sd);
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
return 0;
}
@@ -5200,14 +4498,17 @@ int pc_resetstate(struct map_session_data* sd)
{
#define sumsp(a) ((a)*((a-2)/10+2) - 5*((a-2)/10)*((a-2)/10) - 6*((a-2)/10) -2)
// int add=0; // Removed by Dexity
+ int lv;
nullpo_retr(0, sd);
+ // allow it to just read the last entry [celest]
+ lv = sd->status.base_level < MAX_LEVEL ? sd->status.base_level : MAX_LEVEL - 1;
// New statpoint table used here - Dexity
- sd->status.status_point = atoi (statp[sd->status.base_level - 1]);
- if(sd->status.class >= 4001 && sd->status.class <= 4024)
- sd->status.status_point+=40;
-// End addition
+ sd->status.status_point = statp[lv];
+ if(sd->status.class_ >= 4001 && sd->status.class_ <= 4024)
+ sd->status.status_point+=52; // extra 52+48=100 stat points
+// End addition
// Removed by Dexity - old count
// add += sumsp(sd->status.str);
@@ -5241,7 +4542,7 @@ int pc_resetstate(struct map_session_data* sd)
clif_updatestatus(sd,SP_UDEX);
clif_updatestatus(sd,SP_ULUK); // End Addition
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
return 0;
}
@@ -5257,7 +4558,8 @@ int pc_resetskill(struct map_session_data* sd)
nullpo_retr(0, sd);
for(i=1;i<MAX_SKILL;i++){
- if( (skill = pc_checkskill(sd,i)) > 0) {
+ skill = ( i >= 10000 ) ? pc_checkskill(sd,i) : sd->status.skill[i].lv;
+ if( skill > 0) {
if(!(skill_get_inf2(i)&0x01) || battle_config.quest_skill_learn) {
if(!sd->status.skill[i].flag)
sd->status.skill_point += skill;
@@ -5269,13 +4571,13 @@ int pc_resetskill(struct map_session_data* sd)
else if(battle_config.quest_skill_reset)
sd->status.skill[i].lv = 0;
sd->status.skill[i].flag = 0;
- }
- else
+ } else {
sd->status.skill[i].lv = 0;
+ }
}
clif_updatestatus(sd,SP_SKILLPOINT);
clif_skillinfoblock(sd);
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
return 0;
}
@@ -5292,7 +4594,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
nullpo_retr(0, sd);
//?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
- s_class = pc_calc_base_job(sd->status.class);
+ s_class = pc_calc_base_job(sd->status.class_);
// ?‚ÉŽ€‚ñ‚Å‚¢‚½‚ç–³?
if(pc_isdead(sd))
return 0;
@@ -5303,11 +4605,16 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
}
// ? ‚¢‚Ä‚¢‚½‚ç‘«‚ðŽ~‚ß‚é
- if(sd->sc_data[SC_ENDURE].timer == -1 && sd->sc_data[SC_BERSERK].timer && !sd->special_state.infinite_endure)
- pc_stop_walking(sd,3);
- else if(sd->sc_data[SC_ENDURE].timer != -1 && src->type==BL_MOB) // [Celest]
- if((--sd->sc_data[SC_ENDURE].val2) <= 0)
- skill_status_change_end(&sd->bl, SC_ENDURE, -1);
+ if (sd->sc_data) {
+ if (sd->sc_data[SC_BERSERK].timer != -1 ||
+ sd->special_state.infinite_endure)
+ ; // do nothing
+ else if (sd->sc_data[SC_ENDURE].timer != -1 && (src != NULL && src->type == BL_MOB) && !map[sd->bl.m].flag.gvg) {
+ if ((--sd->sc_data[SC_ENDURE].val2) < 0)
+ status_change_end(&sd->bl, SC_ENDURE, -1);
+ } else pc_stop_walking(sd,3);
+ }
+
// ‰‰‘t/ƒ_ƒ“ƒX‚Ì’†?
if(damage > sd->status.max_hp>>2)
skill_stop_dancing(&sd->bl,0);
@@ -5317,22 +4624,23 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
pet_target_check(sd,src,1);
if (sd->sc_data[SC_TRICKDEAD].timer != -1)
- skill_status_change_end(&sd->bl, SC_TRICKDEAD, -1);
+ status_change_end(&sd->bl, SC_TRICKDEAD, -1);
if(sd->status.option&2)
- skill_status_change_end(&sd->bl, SC_HIDING, -1);
+ status_change_end(&sd->bl, SC_HIDING, -1);
if(sd->status.option&4)
- skill_status_change_end(&sd->bl, SC_CLOAKING, -1);
- if(sd->status.option&16386)
- skill_status_change_end(&sd->bl, SC_CHASEWALK, -1);
+ status_change_end(&sd->bl, SC_CLOAKING, -1);
+ if(sd->status.option&16384)
+ status_change_end(&sd->bl, SC_CHASEWALK, -1);
if(sd->status.hp>0){
// ‚Ü‚¾¶‚«‚Ä‚¢‚é‚È‚çHPXV
clif_updatestatus(sd,SP_HP);
- if(sd->status.hp<sd->status.max_hp>>2 && pc_checkskill(sd,SM_AUTOBERSERK)>0 &&
+ //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?“®
- skill_status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
+ status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
sd->canlog_tick = gettick();
@@ -5344,7 +4652,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
return 0;
}
sd->status.hp = 0;
- pc_setdead(sd);
+ //pc_setdead(sd);
if(sd->vender_id)
vending_closevending(sd);
@@ -5360,45 +4668,104 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
pc_stop_walking(sd,0);
skill_castcancel(&sd->bl,0); // ‰r¥‚Ì’†Ž~
clif_clearchar_area(&sd->bl,1);
- skill_unit_out_all(&sd->bl,gettick(),1);
+ pc_setdead(sd);
+ skill_unit_move(&sd->bl,gettick(),0);
if(sd->sc_data[SC_BLADESTOP].timer!=-1)//”’n‚ÍŽ–‘O‚ɉðœ
- skill_status_change_end(&sd->bl,SC_BLADESTOP,-1);
+ status_change_end(&sd->bl,SC_BLADESTOP,-1);
pc_setglobalreg(sd,"PC_DIE_COUNTER",++sd->die_counter); //Ž€‚ɃJƒEƒ“ƒ^?‘‚«?‚Ý
- skill_status_change_clear(&sd->bl,0); // ƒXƒe?ƒ^ƒXˆÙí‚ð‰ðœ‚·‚é
+ status_change_clear(&sd->bl,0); // ƒXƒe?ƒ^ƒXˆÙí‚ð‰ðœ‚·‚é
clif_updatestatus(sd,SP_HP);
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
+
+ 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
+ sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.kill_event_name);
+ ShowStatus(tmp_output);
+ }
+ } else {
+ sprintf (tmp_output, "%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);
+ ShowStatus(tmp_output);
+ }
+ }
+ }
+ }
+
+ 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
+ sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.die_event_name);
+ ShowStatus(tmp_output);
+ }
+ } else {
+ sprintf (tmp_output, "%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);
+ ShowStatus(tmp_output);
+ }
+ }
+
+ 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=7005;
+ item_tmp.identify=1;
+ item_tmp.card[0]=0x00fe;
+ item_tmp.card[1]=0;
+ *((unsigned long *)(&item_tmp.card[2]))=sd->char_id; /* ƒLƒƒƒ‰ID */
+ 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 (s_class.job == 23) {
+ 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->dev.val1[i]){
- skill_status_change_end(&map_id2sd(sd->dev.val1[i])->bl,SC_DEVOTION,-1);
+ status_change_end(&map_id2sd(sd->dev.val1[i])->bl,SC_DEVOTION,-1);
sd->dev.val1[i] = sd->dev.val2[i]=0;
}
if(battle_config.death_penalty_type>0) { // changed penalty options, added death by player if pk_mode [Valaris]
- if(sd->status.class != 0 && !map[sd->bl.m].flag.nopenalty && !map[sd->bl.m].flag.gvg){ // only novices will recieve no penalty
+ if(sd->status.class_ != 0 && !map[sd->bl.m].flag.nopenalty && !map[sd->bl.m].flag.gvg && // only novices will recieve no penalty
+ !(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 -= (double)pc_nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000;
+ 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 -= (double)pc_nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000;
+ 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 -= (double)sd->status.base_exp * (double)battle_config.death_penalty_base/10000;
+ 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 -= (double)sd->status.base_exp * (double)battle_config.death_penalty_base/10000;
+ 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 -= (double)pc_nextjobexp(sd) * (double)battle_config.death_penalty_job/10000;
+ 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 -= (double)pc_nextjobexp(sd) * (double)battle_config.death_penalty_job/10000;
+ 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 -= (double)sd->status.job_exp * (double)battle_config.death_penalty_job/10000;
+ 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 -= (double)sd->status.job_exp * (double)battle_config.death_penalty_job/10000;
+ 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;
@@ -5415,7 +4782,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
if(md && md->state.state!=MS_DEAD && md->level < 99) {
clif_misceffect(&md->bl,0);
md->level++;
- md->hp+=sd->status.max_hp*.1;
+ md->hp+=(int) (sd->status.max_hp*.1);
}
}
@@ -5450,7 +4817,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
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,0,BF_NORMAL);
+ pc_unequipitem(sd,n,3);
pc_dropitem(sd,n,1);
}
}
@@ -5463,7 +4830,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
|| (type == 2 && sd->status.inventory[i].equip)
|| type == 3) ){
if(sd->status.inventory[i].equip)
- pc_unequipitem(sd,i,0,BF_NORMAL);
+ pc_unequipitem(sd,i,3);
pc_dropitem(sd,i,1);
break;
}
@@ -5510,8 +4877,8 @@ int pc_readparam(struct map_session_data *sd,int type)
{
int val=0;
struct pc_base_job s_class;
-
- s_class = pc_calc_base_job(sd->status.class);
+
+ s_class = pc_calc_base_job(sd->status.class_);
nullpo_retr(0, sd);
@@ -5535,7 +4902,7 @@ int pc_readparam(struct map_session_data *sd,int type)
if(val>=24 && val < 45)
val+=3978;
else
- val= sd->status.class;
+ val= sd->status.class_;
break;
case SP_BASEJOB:
val= s_class.job;
@@ -5594,6 +4961,12 @@ int pc_readparam(struct map_session_data *sd,int type)
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->fame;
break;
@@ -5613,7 +4986,7 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
nullpo_retr(0, sd);
- s_class = pc_calc_base_job(sd->status.class);
+ s_class = pc_calc_base_job(sd->status.class_);
switch(type){
case SP_BASELEVEL:
@@ -5627,24 +5000,27 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
clif_updatestatus(sd, SP_NEXTBASEEXP);
clif_updatestatus(sd, SP_STATUSPOINT);
clif_updatestatus(sd, SP_BASEEXP);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
pc_heal(sd, sd->status.max_hp, sd->status.max_sp);
break;
case SP_JOBLEVEL:
- if (sd->status.class == 0)
+ if (s_class.job == 0)
up_level -= 40;
- if ((sd->status.class == 23) || (sd->status.class >= 4001 && sd->status.class <= 4022))
+ // super novices can go up to 99 [celest]
+ else if (s_class.job == 23)
+ up_level += 49;
+ else if (sd->status.class_ >= 4008 && sd->status.class_ <= 4022)
up_level += 20;
if (val >= 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_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);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
clif_misceffect(&sd->bl, 1);
} else {
sd->status.job_level = val;
@@ -5652,7 +5028,7 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
clif_updatestatus(sd, SP_JOBLEVEL);
clif_updatestatus(sd, SP_NEXTJOBEXP);
clif_updatestatus(sd, SP_JOBEXP);
- pc_calcstatus(sd, 0);
+ status_calc_pc(sd, 0);
}
clif_updatestatus(sd,type);
break;
@@ -5663,7 +5039,21 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
sd->status.status_point = val;
break;
case SP_ZENY:
- sd->status.zeny = val;
+ if(val <= MAX_ZENY) {
+ // MAX_ZENY ˆÈ‰º‚È‚ç‘ã“ü
+ sd->status.zeny = val;
+ } else {
+ 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) {
@@ -5720,6 +5110,12 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
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->fame = val;
break;
@@ -5749,7 +5145,7 @@ int pc_heal(struct map_session_data *sd,int hp,int sp)
sp = 0;
}
- if(sd->sc_data && sd->sc_data[SC_BERSERK].timer!=-1) //ƒo?ƒT?ƒN’†‚͉ñ•œ‚³‚¹‚È‚¢‚炵‚¢
+ 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)
@@ -5784,13 +5180,13 @@ int pc_heal(struct map_session_data *sd,int hp,int sp)
*/
int pc_itemheal(struct map_session_data *sd,int hp,int sp)
{
- int bonus;
+ int bonus, type = 0;
// if(battle_config.battle_log)
// printf("heal %d %d\n",hp,sp);
nullpo_retr(0, sd);
- if(sd->sc_data && sd->sc_data[SC_GOSPEL].timer!=-1) //ƒo?ƒT?ƒN’†‚͉ñ•œ‚³‚¹‚È‚¢‚炵‚¢
+ if(sd->sc_count && sd->sc_data[SC_GOSPEL].timer!=-1) //ƒo?ƒT?ƒN’†‚͉ñ•œ‚³‚¹‚È‚¢‚炵‚¢
return 0;
if(sd->state.potionpitcher_flag) {
@@ -5807,19 +5203,33 @@ int pc_itemheal(struct map_session_data *sd,int hp,int sp)
if(sp > 0)
sp = 0;
}
+
+ if (sd->itemid >= 501 && sd->itemid <= 505)
+ type = 1; // potions
+ else if (sd->itemid >= 507 && sd->itemid <= 510)
+ type = 2; // herbs
+ else if (sd->itemid >= 512 && sd->itemid <= 516)
+ type = 3; // fruits
+ else if (sd->itemid == 517 || sd->itemid == 528)
+ type = 4; // meat
+ else if (sd->itemid == 529 || sd->itemid == 530)
+ type = 5; // candy
+ else if (sd->itemid >= 531 && sd->itemid <= 534)
+ type = 6; // juice
+ else if (sd->itemid == 544 || sd->itemid == 551)
+ type = 7; // sashimi
+
if(hp > 0) {
- bonus = (sd->paramc[2]<<1) + 100 + pc_checkskill(sd,SM_RECOVERY)*10;
- if(bonus != 100)
- hp = hp * bonus / 100;
- bonus = 100 + pc_checkskill(sd,AM_LEARNINGPOTION)*5;
+ bonus = (sd->paramc[2]<<1) + 100 + pc_checkskill(sd,SM_RECOVERY)*10
+ + pc_checkskill(sd,AM_LEARNINGPOTION)*5;
+ if (type > 0)
+ bonus += sd->itemhealrate[type - 1];
if(bonus != 100)
hp = hp * bonus / 100;
}
if(sp > 0) {
- bonus = (sd->paramc[3]<<1) + 100 + pc_checkskill(sd,MG_SRECOVERY)*10;
- if(bonus != 100)
- sp = sp * bonus / 100;
- bonus = 100 + pc_checkskill(sd,AM_LEARNINGPOTION)*5;
+ bonus = (sd->paramc[3]<<1) + 100 + pc_checkskill(sd,MG_SRECOVERY)*10
+ + pc_checkskill(sd,AM_LEARNINGPOTION)*5;
if(bonus != 100)
sp = sp * bonus / 100;
}
@@ -5920,13 +5330,13 @@ 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);
-
+ struct pc_base_job s_class = pc_calc_base_job(sd->status.class_);
+
nullpo_retr(0, sd);
if (upper < 0 || upper > 2) //Œ»Ý?¶‚©‚Ç‚¤‚©‚ð”»?‚·‚é
upper = s_class.upper;
-
+
b_class = job; //’ÊíE‚È‚çjob‚»‚Ì‚Ü‚ñ‚Ü
if (job < 23) {
if (upper == 1)
@@ -5948,7 +5358,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
if((sd->status.sex == 0 && job == 19) || (sd->status.sex == 1 && job == 20) ||
// not needed [celest]
//(sd->status.sex == 0 && job == 4020) || (sd->status.sex == 1 && job == 4021) ||
- job == 22 || sd->status.class == b_class) //Š‚̓o?ƒh‚É‚È‚ê‚È‚¢A‰‚̓_ƒ“ƒT?‚É‚È‚ê‚È‚¢AŒ‹¥ˆßÖ‚à‚¨?‚è
+ job == 22 || sd->status.class_ == b_class) //Š‚̓o?ƒh‚É‚È‚ê‚È‚¢A‰‚̓_ƒ“ƒT?‚É‚È‚ê‚È‚¢AŒ‹¥ˆßÖ‚à‚¨?‚è
return 1;
// check if we are changing from 1st to 2nd job
@@ -5958,12 +5368,12 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
else
sd->change_level = 40;
}
- else
- sd->change_level = 0;
+ else
+ sd->change_level = 0;
- pc_setglobalreg (sd, "jobchange_level", sd->change_level);
-
- sd->status.class = sd->view_class = b_class;
+ pc_setglobalreg (sd, "jobchange_level", sd->change_level);
+
+ sd->status.class_ = sd->view_class = b_class;
sd->status.job_level=1;
sd->status.job_exp=0;
@@ -5974,7 +5384,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
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],1,BF_NORMAL); // ?”õŠO‚µ
+ 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]
@@ -5983,18 +5393,18 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
if(battle_config.muting_players && sd->status.manner < 0)
clif_changestatus(&sd->bl,SP_MANNER,sd->status.manner);
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
pc_checkallowskill(sd);
pc_equiplookall(sd);
clif_equiplist(sd);
if(pc_isriding(sd)) { // remove peco status if changing into invalid class [Valaris]
- if(!(pc_checkskill(sd,KN_RIDING)))
+ if(!(pc_checkskill(sd,KN_RIDING)))
pc_setoption(sd,sd->status.option|-0x0000);
if(pc_checkskill(sd,KN_RIDING)>0)
pc_setriding(sd);
}
-
+
return 0;
}
@@ -6071,7 +5481,7 @@ int pc_setoption(struct map_session_data *sd,int type)
sd->status.option=type;
clif_changeoption(&sd->bl);
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
return 0;
}
@@ -6129,23 +5539,35 @@ 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|0x0020);
- if(sd->status.class==7)
- sd->status.class=sd->view_class=13;
-
- if(sd->status.class==14)
- sd->status.class=sd->view_class=21;
-
- if(sd->status.class==4008)
- sd->status.class=sd->view_class=4014;
-
- if(sd->status.class==4015)
- sd->status.class=sd->view_class=4022;
+ if(sd->status.class_==7)
+ sd->status.class_=sd->view_class=13;
+
+ if(sd->status.class_==14)
+ sd->status.class_=sd->view_class=21;
+
+ if(sd->status.class_==4008)
+ sd->status.class_=sd->view_class=4014;
+
+ if(sd->status.class_==4015)
+ sd->status.class_=sd->view_class=4022;
}
return 0;
}
/*==========================================
+ * ƒAƒCƒeƒ€ƒhƒƒbƒv‰Â•s‰Â”»’è
+ *------------------------------------------
+ */
+int pc_candrop(struct map_session_data *sd,int item_id)
+{
+ int level;
+ if((level=pc_isGM(sd))>0 && level < battle_config.gm_can_drop_lv) // search only once [Celest]
+ return 1;
+ return 0;
+}
+
+/*==========================================
* script—p??‚Ì’l‚ð?‚Þ
*------------------------------------------
*/
@@ -6178,14 +5600,7 @@ int pc_setreg(struct map_session_data *sd,int reg,int val)
}
}
sd->reg_num++;
- sd->reg = realloc(sd->reg, sizeof(*(sd->reg)) * sd->reg_num);
- if (sd->reg == NULL){
- printf("out of memory : pc_setreg\n");
- exit(1);
- }
-/* memset(sd->reg + (sd->reg_num - 1) * sizeof(*(sd->reg)), 0,
- sizeof(*(sd->reg)));
-*/
+ sd->reg = (struct script_reg *) aRealloc(sd->reg, sizeof(*(sd->reg)) * sd->reg_num);
sd->reg[i].index = reg;
sd->reg[i].data = val;
@@ -6229,7 +5644,7 @@ int pc_setregstr(struct map_session_data *sd,int reg,char *str)
return 0;
}
sd->regstr_num++;
- sd->regstr = realloc(sd->regstr, sizeof(sd->regstr[0]) * sd->regstr_num);
+ sd->regstr = (struct script_regstr *) aRealloc(sd->regstr, sizeof(sd->regstr[0]) * sd->regstr_num);
if(sd->regstr==NULL){
printf("out of memory : pc_setreg\n");
exit(1);
@@ -6271,11 +5686,18 @@ int pc_setglobalreg(struct map_session_data *sd,char *reg,int val)
nullpo_retr(0, sd);
- //PC_DIE_COUNTER‚ªƒXƒNƒŠƒvƒg‚È‚Ç‚Å?X‚³‚ꂽŽž‚Ì?—
+ //PC_DIE_COUNTER‚ªƒXƒNƒŠƒvƒg‚È‚Ç‚Å?X‚³‚ꂽŽbÌ?—
if(strcmp(reg,"PC_DIE_COUNTER") == 0 && sd->die_counter != val){
sd->die_counter = val;
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
+ } 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;
}
+
if(val==0){
for(i=0;i<sd->status.global_reg_num;i++){
if(strcmp(sd->status.global_reg[i].str,reg)==0){
@@ -6331,6 +5753,12 @@ int pc_setaccountreg(struct map_session_data *sd,char *reg,int val)
nullpo_retr(0, sd);
+ if (sd->status.account_reg_num == -1) {
+ if(battle_config.error_log)
+ printf("pc_setaccountreg : refusing to set until vars are received\n");
+ return 1;
+ }
+
if(val==0){
for(i=0;i<sd->status.account_reg_num;i++){
if(strcmp(sd->status.account_reg[i].str,reg)==0){
@@ -6418,29 +5846,6 @@ int pc_setaccountreg2(struct map_session_data *sd,char *reg,int val)
return 1;
}
-/*==========================================
- * ¸?¬Œ÷—¦
- *------------------------------------------
- */
-int pc_percentrefinery(struct map_session_data *sd,struct item *item)
-{
- int percent;
-
- nullpo_retr(0, item);
- percent=percentrefinery[itemdb_wlv(item->nameid)][(int)item->refine];
-
- percent += pc_checkskill(sd,BS_WEAPONRESEARCH); // •Ší?‹†ƒXƒLƒ‹ŠŽ
-
- // Šm—¦‚Ì—L?”Í?ƒ`ƒFƒbƒN
- if( percent > 100 ){
- percent = 100;
- }
- if( percent < 0 ){
- percent = 0;
- }
-
- return percent;
-}
/*==========================================
* ƒCƒxƒ“ƒgƒ^ƒCƒ}??—
@@ -6449,6 +5854,7 @@ int pc_percentrefinery(struct map_session_data *sd,struct item *item)
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;
@@ -6456,11 +5862,11 @@ int pc_eventtimer(int tid,unsigned int tick,int id,int data)
for(i=0;i<MAX_EVENTTIMER;i++){
if( sd->eventtimer[i]==tid ){
sd->eventtimer[i]=-1;
- npc_event(sd,(const char *)data,0);
+ npc_event(sd,p,0);
break;
}
}
- free((void *)data);
+ aFree(p);
if(i==MAX_EVENTTIMER) {
if(battle_config.error_log)
printf("pc_eventtimer: no such event timer\n");
@@ -6483,10 +5889,12 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
if( sd->eventtimer[i]==-1 )
break;
if(i<MAX_EVENTTIMER){
- char *evname=(char *)aCalloc(24,sizeof(char));
- memcpy(evname,name,24);
+ char *evname=strdup(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;
@@ -6502,12 +5910,19 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name)
nullpo_retr(0, sd);
+ if (sd->eventcount <= 0)
+ return 0;
+
for(i=0;i<MAX_EVENTTIMER;i++)
- if( sd->eventtimer[i]!=-1 && strcmp(
- (char *)(get_timer(sd->eventtimer[i])->data), name)==0 ){
+ if( sd->eventtimer[i]!=-1 ) {
+ char *p = (char *)(get_timer(sd->eventtimer[i])->data);
+ if(strcmp(p, name)==0) {
delete_timer(sd->eventtimer[i],pc_eventtimer);
sd->eventtimer[i]=-1;
+ sd->eventcount--;
+ aFree(p);
break;
+ }
}
return 0;
@@ -6543,10 +5958,15 @@ int pc_cleareventtimer(struct map_session_data *sd)
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;
+ aFree(p);
}
return 0;
@@ -6579,7 +5999,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos)
// -- moonsoul (if player is berserk then cannot equip)
//
- if(sd->sc_data[SC_BERSERK].timer!=-1){
+ if(sd->sc_count && sd->sc_data[SC_BERSERK].timer!=-1){
clif_equipitemack(sd,n,0,0); // fail
return 0;
}
@@ -6597,7 +6017,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos)
// “ñ“—¬?—
if ((pos==0x22) // ˆê?A?”õ—v‹‰ÓŠ‚ª“ñ“—¬•Ší‚©ƒ`ƒFƒbƒN‚·‚é
&& (id->equip==2) // ? Žè•Ší
- && (pc_checkskill(sd, AS_LEFT) > 0 || pc_calc_base_job2(sd->status.class) == 12) ) // ¶ŽèC?—L
+ && (pc_checkskill(sd, AS_LEFT) > 0 || pc_calc_base_job2(sd->status.class_) == 12) ) // ¶ŽèC?—L
{
int tpos=0;
if(sd->equip_index[8] >= 0)
@@ -6611,7 +6031,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos)
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],1,BF_NORMAL);
+ pc_unequipitem(sd,sd->equip_index[i],2);
}
}
// ‹|–î?”õ
@@ -6680,40 +6100,47 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos)
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){ // Added by RoVeRT
+ if (itemdb_look(sd->status.inventory[n].nameid) == 11 && (arrow >= 0)){ // Added by RoVeRT
clif_arrowequip(sd,arrow);
sd->status.inventory[arrow].equip=32768;
}
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
if(sd->special_state.infinite_endure) {
if(sd->sc_data[SC_ENDURE].timer == -1)
- skill_status_change_start(&sd->bl,SC_ENDURE,10,1,0,0,0,0);
+ status_change_start(&sd->bl,SC_ENDURE,10,1,0,0,0,0);
}
else {
- if(sd->sc_data[SC_ENDURE].timer != -1 && sd->sc_data[SC_ENDURE].val2)
- skill_status_change_end(&sd->bl,SC_ENDURE,-1);
+ 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_data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(7,sd->def_ele))
- skill_status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
- if(sd->sc_data[SC_DANCING].timer!=-1 && (sd->status.weapon != 13 && sd->status.weapon !=14))
- skill_stop_dancing(&sd->bl,0);
+ 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);
+ if(sd->sc_data[SC_DANCING].timer!=-1 && (sd->status.weapon != 13 && sd->status.weapon !=14))
+ skill_stop_dancing(&sd->bl,0);
+ }
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 type, int flag)
+int pc_unequipitem(struct map_session_data *sd,int n,int flag)
{
- nullpo_retr(0, sd);
+ short hp = 0, sp = 0;
+ nullpo_retr(0, sd);
// -- moonsoul (if player is berserk then cannot unequip)
//
- if(!flag && sd->sc_data[SC_BERSERK].timer!=-1){
+ 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;
}
@@ -6723,8 +6150,17 @@ int pc_unequipitem(struct map_session_data *sd,int n,int type, int flag)
if(sd->status.inventory[n].equip){
int i;
for(i=0;i<11;i++) {
- if(sd->status.inventory[n].equip & equip_pos[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;
@@ -6752,23 +6188,37 @@ int pc_unequipitem(struct map_session_data *sd,int n,int type, int flag)
if(sd->status.inventory[n].equip & 0x0040)
clif_changelook(&sd->bl,LOOK_SHOES,0);
- if(sd->sc_data[SC_BROKNWEAPON].timer != -1 && sd->status.inventory[n].equip & 0x0002 &&
- sd->status.inventory[i].attribute==1)
- skill_status_change_end(&sd->bl,SC_BROKNWEAPON,-1);
+ if(sd->sc_count) {
+ if (sd->sc_data[SC_BROKNWEAPON].timer != -1 && sd->status.inventory[n].equip & 0x0002 &&
+ sd->status.inventory[n].attribute == 1)
+ status_change_end(&sd->bl,SC_BROKNWEAPON,-1);
+ if(sd->sc_data[SC_BROKNARMOR].timer != -1 && sd->status.inventory[n].equip & 0x0010 &&
+ sd->status.inventory[n].attribute == 1)
+ status_change_end(&sd->bl,SC_BROKNARMOR,-1);
+ }
clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
sd->status.inventory[n].equip=0;
- if(!type)
+ if(flag&1)
pc_checkallowskill(sd);
if(sd->weapontype1 == 0 && sd->weapontype2 == 0)
- skill_encchant_eremental_end(&sd->bl,-1); //•ŠíŽ‚¿¾‚¦‚Í–³?Œ‚Å?«•t?‰ðœ
+ skill_enchant_elemental_end(&sd->bl,-1); //•ŠíŽ‚¿¾‚¦‚Í–³?Œ‚Å?«•t?‰ðœ
} else {
clif_unequipitemack(sd,n,0,0);
}
- if(!type) {
- pc_calcstatus(sd,0);
- if(sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(7,sd->def_ele))
- skill_status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
+
+ 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;
@@ -6838,10 +6288,10 @@ int pc_checkitem(struct map_session_data *sd)
calc_flag = 1;
}
//?”õ§ŒÀƒ`ƒFƒbƒN
- if(sd->status.inventory[i].equip && map[sd->bl.m].flag.pvp && (it->flag.no_equip==1 || it->flag.no_equip==3)){//PvP§ŒÀ
+ if(sd->status.inventory[i].equip && map[sd->bl.m].flag.pvp && (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[sd->bl.m].flag.gvg && (it->flag.no_equip==2 || it->flag.no_equip==3)){//GvG§ŒÀ
+ }else if(sd->status.inventory[i].equip && map[sd->bl.m].flag.gvg && (it->flag.no_equip>1)){//GvG optimized by [Lupus]
sd->status.inventory[i].equip=0;
calc_flag = 1;
}
@@ -6849,7 +6299,7 @@ int pc_checkitem(struct map_session_data *sd)
pc_setequipindex(sd);
if(calc_flag)
- pc_calcstatus(sd,2);
+ status_calc_pc(sd,2);
return 0;
}
@@ -6912,7 +6362,7 @@ int pc_calc_pvprank(struct map_session_data *sd)
nullpo_retr(0, sd);
nullpo_retr(0, m=&map[sd->bl.m]);
-
+
old=sd->pvp_rank;
if( !(m->flag.pvp) )
@@ -6958,12 +6408,12 @@ int pc_ismarried(struct map_session_data *sd)
return 0;
}
/*==========================================
- * sd‚ªdstsd‚ÆŒ‹¥(dstsd¨sd‚ÌŒ‹¥?—‚à“¯Žž‚És‚¤)
+ * 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 || pc_calc_upper(sd->status.class)==2)
+ if(sd == NULL || dstsd == NULL || sd->status.partner_id > 0 || dstsd->status.partner_id > 0 || pc_calc_upper(sd->status.class_)==2)
return -1;
sd->status.partner_id=dstsd->status.char_id;
dstsd->status.partner_id=sd->status.char_id;
@@ -6971,7 +6421,7 @@ int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd)
}
/*==========================================
- * sd‚ª—£¥(‘ŠŽè‚Ísd->status.partner_id‚Ɉ˂é)(‘ŠŽè‚à“¯Žž‚É—£¥?Œ‹¥Žw—ÖŽ©“®?’D)
+ * sd‚ª—£¥(‘ŠŽè‚Ísd->status.partner_id‚Ɉ˂é)(‘ŠŽè‚à“¯ŽbÉ—£¥?Œ‹¥Žw—ÖŽ©“®?’D)
*------------------------------------------
*/
int pc_divorce(struct map_session_data *sd)
@@ -7003,25 +6453,78 @@ int pc_divorce(struct map_session_data *sd)
}
/*==========================================
+ * 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)
+ clif_displaymessage(jasd->fd, msg_table[12]); // Your job has been changed.
+ else {
+ clif_displaymessage(jasd->fd, msg_table[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;
+ //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;
- nick=map_charid2nick(sd->status.partner_id);
+ if (sd && pc_ismarried(sd))
+ // charid2sd returns NULL if not found
+ return map_charid2sd(sd->status.partner_id);
- if (nick==NULL)
- return NULL;
+ return NULL;
+}
- if((p_sd=map_nick2sd(nick)) == NULL )
- return NULL;
+struct map_session_data *pc_get_father (struct map_session_data *sd)
+{
+ if (sd && pc_calc_upper(sd->status.class_) == 2 && sd->status.father > 0)
+ // charid2sd returns NULL if not found
+ return map_charid2sd(sd->status.father);
- return p_sd;
+ return NULL;
+}
+
+struct map_session_data *pc_get_mother (struct map_session_data *sd)
+{
+ if (sd && pc_calc_upper(sd->status.class_) == 2 && 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;
}
//
@@ -7054,8 +6557,8 @@ static int pc_spheal(struct map_session_data *sd)
if(gc) {
struct guild *g;
g=guild_search(sd->status.guild_id);
- if(g && g->guild_id == gc->guild_id)
- a += a;
+ if(g && g->guild_id == gc->guild_id)
+ a += a;
} // end addition [Valaris]
return a;
@@ -7084,8 +6587,8 @@ static int pc_hpheal(struct map_session_data *sd)
if(gc) {
struct guild *g;
g=guild_search(sd->status.guild_id);
- if(g && g->guild_id == gc->guild_id)
- a += a;
+ if(g && g->guild_id == gc->guild_id)
+ a += a;
} // end addition [Valaris]
return a;
@@ -7098,7 +6601,10 @@ static int pc_natural_heal_hp(struct map_session_data *sd)
nullpo_retr(0, sd);
- if (sd->sc_data[SC_TRICKDEAD].timer != -1) // Modified by RoVeRT
+ if (sd->sc_count && sd->sc_data[SC_TRICKDEAD].timer != -1) // Modified by RoVeRT
+ return 0;
+
+ if (sd->no_regen & 1)
return 0;
if(pc_checkoverhp(sd)) {
@@ -7111,11 +6617,11 @@ static int pc_natural_heal_hp(struct map_session_data *sd)
if(sd->walktimer == -1) {
inc_num = pc_hpheal(sd);
- if( sd->sc_data[SC_TENSIONRELAX].timer!=-1 ){ // ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX
+ 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;
+ } else {
+ sd->hp_sub += inc_num;
sd->inchealhptick += natural_heal_diff_tick;
}
}
@@ -7168,7 +6674,7 @@ static int pc_natural_heal_hp(struct map_session_data *sd)
return 0;
- if(sd->sc_data[SC_APPLEIDUN].timer!=-1) { // Apple of Idun
+ if(sd->sc_count && sd->sc_data[SC_APPLEIDUN].timer!=-1 && sd->sc_data[SC_BERSERK].timer==-1) { // Apple of Idun
if(sd->inchealhptick >= 6000 && sd->status.hp < sd->status.max_hp) {
bonus = skill*20;
while(sd->inchealhptick >= 6000) {
@@ -7196,8 +6702,12 @@ static int pc_natural_heal_sp(struct map_session_data *sd)
nullpo_retr(0, sd);
- if (sd->sc_data[SC_TRICKDEAD].timer != -1 || // Modified by RoVeRT
- sd->sc_data[SC_BERSERK].timer != -1)
+ if (sd->sc_count && (sd->sc_data[SC_TRICKDEAD].timer != -1 || // Modified by RoVeRT
+ sd->sc_data[SC_BERSERK].timer != -1 ||
+ sd->sc_data[SC_BLEEDING].timer != -1))
+ return 0;
+
+ if (sd->no_regen & 2)
return 0;
if(pc_checkoversp(sd)) {
@@ -7232,7 +6742,7 @@ static int pc_natural_heal_sp(struct map_session_data *sd)
if(sd->nshealsp > 0) {
if(sd->inchealsptick >= battle_config.natural_heal_skill_interval && sd->status.sp < sd->status.max_sp) {
- struct pc_base_job s_class = pc_calc_base_job(sd->status.class);
+ struct pc_base_job s_class = pc_calc_base_job(sd->status.class_);
if(sd->doridori_counter && s_class.job == 23)
bonus = sd->nshealsp*2;
else
@@ -7256,7 +6766,7 @@ static int pc_natural_heal_sp(struct map_session_data *sd)
return 0;
}
-static int pc_spirit_heal_hp(struct map_session_data *sd,int level)
+static int pc_spirit_heal_hp(struct map_session_data *sd)
{
int bonus_hp,interval = battle_config.natural_heal_skill_interval;
@@ -7296,7 +6806,7 @@ static int pc_spirit_heal_hp(struct map_session_data *sd,int level)
return 0;
}
-static int pc_spirit_heal_sp(struct map_session_data *sd,int level)
+static int pc_spirit_heal_sp(struct map_session_data *sd)
{
int bonus_sp,interval = battle_config.natural_heal_skill_interval;
@@ -7337,6 +6847,30 @@ static int pc_spirit_heal_sp(struct map_session_data *sd,int level)
return 0;
}
+static int pc_bleeding (struct map_session_data *sd)
+{
+ int interval, hp;
+
+ nullpo_retr(0, sd);
+ interval = sd->hp_loss_rate;
+ hp = sd->hp_loss_value;
+
+ sd->hp_loss_tick += natural_heal_diff_tick;
+ if(sd->hp_loss_tick >= interval) {
+ while(sd->hp_loss_tick >= interval) {
+ sd->hp_loss_tick -= interval;
+ if (sd->status.hp < hp)
+ hp = sd->status.hp;
+ if (sd->hp_loss_type == 1) {
+ clif_damage(&sd->bl,&sd->bl,gettick(),0,0,hp,0,0,0);
+ }
+ pc_heal(sd,-hp,0);
+ sd->hp_loss_tick = 0;
+ }
+ }
+ return 0;
+}
+
/*==========================================
* HP/SP Ž©‘R‰ñ•œ ŠeƒNƒ‰ƒCƒAƒ“ƒg
*------------------------------------------
@@ -7344,33 +6878,43 @@ static int pc_spirit_heal_sp(struct map_session_data *sd,int level)
static int pc_natural_heal_sub(struct map_session_data *sd,va_list ap) {
int skill;
+ 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 ((battle_config.natural_heal_weight_rate > 100 || sd->weight*100/sd->max_weight < battle_config.natural_heal_weight_rate) &&
- !pc_isdead(sd) &&
- !pc_ishiding(sd) &&
- !(sd->sc_data[SC_POISON].timer != -1 && sd->sc_data[SC_SLOWPOISON].timer == -1) &&
- sd->sc_data[SC_BERSERK].timer == -1 ) {
+ !pc_isdead(sd) &&
+ !pc_ishiding(sd) &&
+ //-- cannot regen for 5 minutes after using Berserk --- [Celest]
+ DIFF_TICK (tick, sd->canregen_tick)>=0 &&
+ (sd->sc_data && !(sd->sc_data[SC_POISON].timer != -1 && sd->sc_data[SC_SLOWPOISON].timer == -1) &&
+ sd->sc_data[SC_BERSERK].timer == -1 )) {
pc_natural_heal_hp(sd);
if( sd->sc_data && sd->sc_data[SC_EXTREMITYFIST].timer == -1 && //ˆ¢C—…?‘Ô‚Å‚ÍSP‚ª‰ñ•œ‚µ‚È‚¢
sd->sc_data[SC_DANCING].timer == -1 && //ƒ_ƒ“ƒX?‘Ô‚Å‚ÍSP‚ª‰ñ•œ‚µ‚È‚¢
sd->sc_data[SC_BERSERK].timer == -1 ) //ƒo?ƒT?ƒN?‘Ô‚Å‚ÍSP‚ª‰ñ•œ‚µ‚È‚¢
pc_natural_heal_sp(sd);
+ sd->canregen_tick = tick;
} else {
sd->hp_sub = sd->inchealhptick = 0;
sd->sp_sub = sd->inchealsptick = 0;
}
if((skill = pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0 && !pc_ishiding(sd) &&
sd->sc_data[SC_POISON].timer == -1 && sd->sc_data[SC_BERSERK].timer == -1){
- pc_spirit_heal_hp(sd,skill);
- pc_spirit_heal_sp(sd,skill);
+ pc_spirit_heal_hp(sd);
+ pc_spirit_heal_sp(sd);
}
else {
sd->inchealspirithptick = 0;
sd->inchealspiritsptick = 0;
}
+ if (sd->hp_loss_value > 0)
+ pc_bleeding(sd);
+ else
+ sd->hp_loss_tick = 0;
+
return 0;
}
@@ -7382,7 +6926,7 @@ 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);
+ clif_foreachclient(pc_natural_heal_sub, tick);
natural_heal_prev_tick = tick;
return 0;
@@ -7412,9 +6956,10 @@ static int pc_autosave_sub(struct map_session_data *sd,va_list ap)
{
nullpo_retr(0, sd);
- if(save_flag==0 && sd->fd>last_save_fd){
- struct guild_castle *gc=NULL;
- int i;
+ 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){
+
// if(battle_config.save_log)
// printf("autosave %d\n",sd->fd);
// pet
@@ -7424,19 +6969,6 @@ static int pc_autosave_sub(struct map_session_data *sd,va_list ap)
chrif_save(sd);
storage_storage_save(sd);
- for(i=0;i<MAX_GUILDCASTLE;i++){
- gc=guild_castle_search(i);
- if(!gc) continue;
- if(gc->visibleG0==1) guild_castledatasave(gc->castle_id,18,gc->Ghp0);
- if(gc->visibleG1==1) guild_castledatasave(gc->castle_id,19,gc->Ghp1);
- if(gc->visibleG2==1) guild_castledatasave(gc->castle_id,20,gc->Ghp2);
- if(gc->visibleG3==1) guild_castledatasave(gc->castle_id,21,gc->Ghp3);
- if(gc->visibleG4==1) guild_castledatasave(gc->castle_id,22,gc->Ghp4);
- if(gc->visibleG5==1) guild_castledatasave(gc->castle_id,23,gc->Ghp5);
- if(gc->visibleG6==1) guild_castledatasave(gc->castle_id,24,gc->Ghp6);
- if(gc->visibleG7==1) guild_castledatasave(gc->castle_id,25,gc->Ghp7);
- }
-
save_flag=1;
last_save_fd = sd->fd;
}
@@ -7471,10 +7003,10 @@ int pc_read_gm_account(int fd)
int i = 0;
#endif
if (gm_account != NULL)
- free(gm_account);
+ aFree(gm_account);
GM_num = 0;
#ifdef TXT_ONLY
- gm_account = calloc(sizeof(struct gm_account) * ((RFIFOW(fd,2) - 4) / 5), 1);
+ gm_account = (struct gm_account *) aCallocA(sizeof(struct gm_account) * ((RFIFOW(fd,2) - 4) / 5), 1);
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);
@@ -7488,7 +7020,7 @@ int pc_read_gm_account(int fd)
}
lsql_res = mysql_store_result(&lmysql_handle);
if (lsql_res) {
- gm_account = calloc(sizeof(struct gm_account) * mysql_num_rows(lsql_res), 1);
+ gm_account = (struct gm_account *) aCallocA(sizeof(struct gm_account) * mysql_num_rows(lsql_res), 1);
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]);
@@ -7496,7 +7028,7 @@ int pc_read_gm_account(int fd)
GM_num++;
}
}
-
+
mysql_free_result(lsql_res);
#endif /* TXT_ONLY */
return GM_num;
@@ -7516,9 +7048,13 @@ int map_day_timer(int tid, unsigned int tick, int id, int data) { // by [yor]
strcpy(tmpstr, msg_txt(502)); // The day has arrived!
night_flag = 0; // 0=day, 1=night [Yor]
for(i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) {
- pl_sd->opt2 &= ~STATE_BLIND;
- clif_changeoption(&pl_sd->bl);
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth) {
+ if (battle_config.night_darkness_level > 0)
+ clif_refresh (pl_sd);
+ else {
+ pl_sd->opt2 &= ~STATE_BLIND;
+ clif_changeoption(&pl_sd->bl);
+ }
clif_wis_message(pl_sd->fd, wisp_server_name, tmpstr, strlen(tmpstr)+1);
}
}
@@ -7542,7 +7078,7 @@ int map_night_timer(int tid, unsigned int tick, int id, int data) { // by [yor]
strcpy(tmpstr, msg_txt(503)); // The night has fallen...
night_flag = 1; // 0=day, 1=night [Yor]
for(i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && !map[pl_sd->bl.m].flag.indoors) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && !map[pl_sd->bl.m].flag.indoors) {
if (battle_config.night_darkness_level > 0)
clif_specialeffect(&pl_sd->bl, 474 + battle_config.night_darkness_level, 0);
else {
@@ -7562,8 +7098,8 @@ int map_night_timer(int tid, unsigned int tick, int id, int data) { // by [yor]
void pc_setstand(struct map_session_data *sd){
nullpo_retv(sd);
- if(sd->sc_data && sd->sc_data[SC_TENSIONRELAX].timer!=-1)
- skill_status_change_end(&sd->bl,SC_TENSIONRELAX,-1);
+ if(sd->sc_count && sd->sc_data[SC_TENSIONRELAX].timer!=-1)
+ status_change_end(&sd->bl,SC_TENSIONRELAX,-1);
sd->state.dead_sit = 0;
}
@@ -7590,7 +7126,7 @@ int pc_readdb(void)
char line[1024],*p;
// •K—v??’l?‚Ý?‚Ý
-
+ memset(exp_table,0,sizeof(exp_table));
fp=fopen("db/exp.txt","r");
if(fp==NULL){
printf("can't read db/exp.txt\n");
@@ -7622,93 +7158,8 @@ int pc_readdb(void)
break;
}
fclose(fp);
- printf("read db/exp.txt done\n");
-
- // JOB•â³?’l‚P
- fp=fopen("db/job_db1.txt","r");
- if(fp==NULL){
- printf("can't read db/job_db1.txt\n");
- return 1;
- }
- i=0;
- while(fgets(line, sizeof(line)-1, fp)){
- char *split[50];
- if(line[0]=='/' && line[1]=='/')
- continue;
- for(j=0,p=line;j<21 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- if(j<21)
- continue;
- max_weight_base[i]=atoi(split[0]);
- hp_coefficient[i]=atoi(split[1]);
- hp_coefficient2[i]=atoi(split[2]);
- sp_coefficient[i]=atoi(split[3]);
- for(j=0;j<17;j++)
- aspd_base[i][j]=atoi(split[j+4]);
- i++;
-// -- moonsoul (below two lines added to accommodate high numbered new class ids)
- if(i==24)
- i=4001;
- if(i==MAX_PC_CLASS)
- break;
- }
- fclose(fp);
- printf("read db/job_db1.txt done\n");
-
- // JOBƒ{?ƒiƒX
- fp=fopen("db/job_db2.txt","r");
- if(fp==NULL){
- printf("can't read db/job_db2.txt\n");
- return 1;
- }
- i=0;
- while(fgets(line, sizeof(line)-1, fp)){
- if(line[0]=='/' && line[1]=='/')
- continue;
- for(j=0,p=line;j<MAX_LEVEL && p;j++){
- if(sscanf(p,"%d",&k)==0)
- break;
- job_bonus[0][i][j]=k;
- job_bonus[2][i][j]=k; //—{ŽqE‚̃{?ƒiƒX‚Í•ª‚©‚ç‚È‚¢‚Ì‚Å?
- p=strchr(p,',');
- if(p) p++;
- }
- i++;
-// -- moonsoul (below two lines added to accommodate high numbered new class ids)
- if(i==24)
- i=4001;
- if(i==MAX_PC_CLASS)
- break;
- }
- fclose(fp);
- printf("read db/job_db2.txt done\n");
-
- // JOBƒ{?ƒiƒX2 ?¶E—p
- fp=fopen("db/job_db2-2.txt","r");
- if(fp==NULL){
- printf("can't read db/job_db2-2.txt\n");
- return 1;
- }
- i=0;
- while(fgets(line, sizeof(line)-1, fp)){
- if(line[0]=='/' && line[1]=='/')
- continue;
- for(j=0,p=line;j<MAX_LEVEL && p;j++){
- if(sscanf(p,"%d",&k)==0)
- break;
- job_bonus[1][i][j]=k;
- p=strchr(p,',');
- if(p) p++;
- }
- i++;
- if(i==MAX_PC_CLASS)
- break;
- }
- fclose(fp);
- printf("read db/job_db2-2.txt done\n");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/exp.txt");
+ ShowStatus(tmp_output);
// ƒXƒLƒ‹ƒcƒŠ?
memset(skill_tree,0,sizeof(skill_tree));
@@ -7720,36 +7171,41 @@ int pc_readdb(void)
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<13 && p;j++){
+ for(j=0,p=line;j<14 && p;j++){
split[j]=p;
p=strchr(p,',');
if(p) *p++=0;
}
if(j<13)
continue;
- //i=atoi(split[0]);
+ if (j == 14) {
+ f=1; // MinJobLvl has been added
+ m++;
+ }
s_class = pc_calc_base_job(atoi(split[0]));
i = s_class.job;
u = s_class.upper;
- for(j=0;skill_tree[u][i][j].id;j++);
+ // check for bounds [celest]
+ if (i > 25 || u > 3)
+ continue;
+ for(j = 0; skill_tree[u][i][j].id && j < MAX_SKILL_TREE; j++);
+ if (j == MAX_SKILL_TREE)
+ continue;
skill_tree[u][i][j].id=atoi(split[1]);
skill_tree[u][i][j].max=atoi(split[2]);
-
- //not required - Celest
- //skill_tree[2][i][j].id=atoi(split[1]); //—{ŽqE‚Í—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚ÅŽb’è
- //skill_tree[2][i][j].max=atoi(split[2]); //—{ŽqE‚Í—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚ÅŽb’è
+ if (f) skill_tree[u][i][j].joblv=atoi(split[3]);
for(k=0;k<5;k++){
- skill_tree[u][i][j].need[k].id=atoi(split[k*2+3]);
- skill_tree[u][i][j].need[k].lv=atoi(split[k*2+4]);
- //skill_tree[2][i][j].need[k].id=atoi(split[k*2+3]); //—{ŽqE‚Í—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚ÅŽb’è
- //skill_tree[2][i][j].need[k].lv=atoi(split[k*2+4]); //—{ŽqE‚Í—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚ÅŽb’è
+ skill_tree[u][i][j].need[k].id=atoi(split[k*2+m]);
+ skill_tree[u][i][j].need[k].lv=atoi(split[k*2+m+1]);
}
}
fclose(fp);
- printf("read db/skill_tree.txt done\n");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_tree.txt");
+ ShowStatus(tmp_output);
// ?«C³ƒe?ƒuƒ‹
for(i=0;i<4;i++)
@@ -7795,135 +7251,52 @@ int pc_readdb(void)
}
}
fclose(fp);
- printf("read db/attr_fix.txt done\n");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/attr_fix.txt");
+ ShowStatus(tmp_output);
- // ƒTƒCƒY•â³ƒe?ƒuƒ‹
- for(i=0;i<3;i++)
- for(j=0;j<20;j++)
- atkmods[i][j]=100;
- fp=fopen("db/size_fix.txt","r");
- if(fp==NULL){
- printf("can't read db/size_fix.txt\n");
- 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;
+ // ƒXƒLƒ‹ƒcƒŠ?
+ memset(statp,0,sizeof(statp));
+ i=1;
+ j=45; // base points
+ fp=fopen("db/statpoint.txt","r");
+ if(fp == NULL){
+ sprintf(tmp_output,"Can't read '"CL_WHITE"%s"CL_RESET"'... Generating DB.\n","db/statpoint.txt");
+ //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++;
}
- for(j=0;j<20 && split[j];j++)
- atkmods[i][j]=atoi(split[j]);
- i++;
- }
- fclose(fp);
- printf("read db/size_fix.txt done\n");
-
- // ¸?ƒf?ƒ^ƒe?ƒuƒ‹
- for(i=0;i<5;i++){
- for(j=0;j<10;j++)
- percentrefinery[i][j]=100;
- refinebonus[i][0]=0;
- refinebonus[i][1]=0;
- refinebonus[i][2]=10;
- }
- fp=fopen("db/refine_db.txt","r");
- if(fp==NULL){
- printf("can't read db/refine_db.txt\n");
- return 1;
+ fclose(fp);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/statpoint.txt");
}
- 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<10 && split[j];j++)
- percentrefinery[i][j]=atoi(split[j+3]);
- i++;
+ // generate the remaining parts of the db if necessary
+ for (; i < MAX_LEVEL; i++) {
+ j += (i+15)/5;
+ statp[i] = j;
}
- fclose(fp); //Lupus. close this file!!!
- printf("read db/refine_db.txt done\n");
-
- return 0;
-}
-
-static int pc_calc_sigma(void)
-{
- int i,j,k;
+ ShowStatus(tmp_output);
- 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;
}
-static void pc_statpointdb(void)
-{
- char * buf_stat;
- int i=0,j=0,k=0,l=0, end = 0;
-
- FILE *stp;
-
- stp=fopen("db/statpoint.txt","r");
-
- if(stp==NULL){
- printf("can't read db/statpoint.txt\n");
- return;
- }
-
- fseek(stp, 0, SEEK_END);
- end = ftell(stp);
- rewind(stp);
-
- buf_stat = (char *) malloc (end + 1);
- l = fread(buf_stat,1,end,stp);
- fclose(stp);
- printf("read db/statpoint.txt done (size=%d)\n",l);
-
- for(i=0;i<255;i++) {
- j=0;
- while (*(buf_stat+k)!='\n') {
- statp[i][j]=*(buf_stat+k);
- j++;k++;
- }
- statp[i][j+1]='\0';
- k++;
- }
-
- free(buf_stat);
-}
-
/*==========================================
* pc? ŒW‰Šú‰»
*------------------------------------------
*/
+void do_final_pc(void) {
+ if (gm_account)
+ aFree(gm_account);
+ return;
+}
int do_init_pc(void) {
pc_readdb();
- pc_statpointdb();
- pc_calc_sigma();
// gm_account_db = numdb_init();
@@ -7942,16 +7315,13 @@ int do_init_pc(void) {
pc_read_gm_account(0);
#endif /* not TXT_ONLY */
- // 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.day_duration > 0 && battle_config.night_duration > 0) {
int day_duration = battle_config.day_duration;
int night_duration = battle_config.night_duration;
- if (day_duration < 60000)
- day_duration = 60000;
- if (night_duration < 60000)
- night_duration = 60000;
+ // 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 == 0) {
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);
diff --git a/src/map/pc.h b/src/map/pc.h
index 372dd72f7..6aec36d38 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -7,6 +7,9 @@
#define OPTION_MASK 0xd7b8
#define CART_MASK 0x788
+#define STATE_BLIND 0x10
+
+#define MAX_SKILL_TREE 51
#define pc_setdead(sd) ((sd)->state.dead_sit = 1)
#define pc_setsit(sd) ((sd)->state.dead_sit = 2)
@@ -37,14 +40,19 @@ int pc_authfail(int);
int pc_isequip(struct map_session_data *sd,int n);
int pc_equippoint(struct map_session_data *sd,int n);
-int pc_breakweapon(struct map_session_data *sd); // weapon breaking [Valaris]
-int pc_breakarmor(struct map_session_data *sd); // armor breaking [Valaris]
+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(int c, 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*);
@@ -57,6 +65,8 @@ int pc_setpos(struct map_session_data*,char*,int,int,int);
int pc_setsavepoint(struct map_session_data*,char*,int,int);
int pc_randomwarp(struct map_session_data *sd,int type);
int pc_memo(struct map_session_data *sd,int i);
+int pc_randomwalk(struct map_session_data*,int tick);
+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*);
@@ -78,13 +88,14 @@ int pc_dropitem(struct map_session_data*,int,int);
int pc_checkweighticon(struct map_session_data *sd);
-int pc_calcstatus(struct map_session_data*,int);
-int pc_calcspeed(struct map_session_data*); // [Celest]
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_item_identify(struct map_session_data *sd,int idx);
@@ -117,7 +128,7 @@ 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_equipitem(struct map_session_data*,int,int);
-int pc_unequipitem(struct map_session_data*,int,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);
@@ -145,7 +156,6 @@ int pc_readaccountreg(struct map_session_data*,char*);
int pc_setaccountreg(struct map_session_data*,char*,int);
int pc_readaccountreg2(struct map_session_data*,char*);
int pc_setaccountreg2(struct map_session_data*,char*,int);
-int pc_percentrefinery(struct map_session_data *sd,struct item *item);
int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name);
int pc_deleventtimer(struct map_session_data *sd,const char *name);
@@ -158,10 +168,16 @@ 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ƒŠ)
@@ -174,12 +190,15 @@ int pc_calc_base_job2(int b_class); // Celest
int pc_calc_upper(int b_class);
struct skill_tree_entry {
- int id;
- int max;
+ short id;
+ unsigned char max;
+ unsigned char joblv;
struct {
- short id,lv;
- } need[6];
-} skill_tree[3][MAX_PC_CLASS][100]; // Celest
+ short id;
+ unsigned char lv;
+ } need[5];
+}; // Celest
+extern struct skill_tree_entry skill_tree[3][25][MAX_SKILL_TREE];
int pc_read_gm_account(int fd);
int pc_setinvincibletimer(struct map_session_data *sd,int);
@@ -187,13 +206,17 @@ 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);
+int pc_eventtimer(int tid,unsigned int tick,int id,int data); // for npc_dequeue
+
+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
-int day_timer_tid;
-int night_timer_tid;
+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]
diff --git a/src/map/pet.c b/src/map/pet.c
index 6026b1ebf..6f4713d75 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -9,6 +9,7 @@
#include "nullpo.h"
#include "malloc.h"
#include "pc.h"
+#include "status.h"
#include "map.h"
#include "intif.h"
#include "clif.h"
@@ -20,6 +21,7 @@
#include "npc.h"
#include "script.h"
#include "skill.h"
+#include "showmsg.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -48,6 +50,8 @@ 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)
@@ -59,6 +63,8 @@ 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)
@@ -71,6 +77,8 @@ 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)
@@ -89,6 +97,8 @@ static int pet_can_reach(struct pet_data *pd,int x,int y)
nullpo_retr(0, pd);
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
if( pd->bl.x==x && pd->bl.y==y ) // “¯‚¶ƒ}ƒX
return 1;
@@ -106,6 +116,8 @@ static int pet_calc_pos(struct pet_data *pd,int tx,int ty,int dir)
nullpo_retr(0, pd);
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
pd->to_x = tx;
pd->to_y = ty;
@@ -161,23 +173,27 @@ static int pet_attack(struct pet_data *pd,unsigned int tick,int data)
nullpo_retr(0, pd);
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
pd->state.state=MS_IDLE;
md=(struct mob_data *)map_id2bl(pd->target_id);
if(md == NULL || md->bl.type != BL_MOB || pd->bl.m != md->bl.m || md->bl.prev == NULL ||
- distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > 13) {
+ distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > 13 ||
+ (!agit_flag && md->class_ >= 1285 && md->class_ <= 1288)) // Cannot attack Guardians outside of WoE
+ {
pd->target_id=0;
return 0;
}
- mode=mob_db[pd->class].mode;
- race=mob_db[pd->class].race;
- if(mob_db[pd->class].mexp <= 0 && !(mode&0x20) && (md->option & 0x06 && race != 4 && race != 6) ) {
+ mode=mob_db[pd->class_].mode;
+ race=mob_db[pd->class_].race;
+ if(mob_db[pd->class_].mexp <= 0 && !(mode&0x20) && (md->option & 0x06 && race != 4 && race != 6) ) {
pd->target_id=0;
return 0;
}
- range = mob_db[pd->class].range + 1;
+ range = mob_db[pd->class_].range + 1;
if(distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > range)
return 0;
if(battle_config.monster_attack_direction_change)
@@ -187,7 +203,7 @@ static int pet_attack(struct pet_data *pd,unsigned int tick,int data)
pd->target_lv = battle_weapon_attack(&pd->bl,&md->bl,tick,0);
- pd->attackabletime = tick + battle_get_adelay(&pd->bl);
+ 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;
@@ -202,11 +218,13 @@ static int pet_attack(struct pet_data *pd,unsigned int tick,int data)
static int pet_walk(struct pet_data *pd,unsigned int tick,int data)
{
int moveblock;
- int i,ctype;
+ int i;
int x,y,dx,dy;
nullpo_retr(0, pd);
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
pd->state.state=MS_IDLE;
if(pd->walkpath.path_pos >= pd->walkpath.path_len || pd->walkpath.path_pos != data)
return 0;
@@ -234,8 +252,7 @@ static int pet_walk(struct pet_data *pd,unsigned int tick,int data)
dx = dirx[pd->dir];
dy = diry[pd->dir];
- ctype = map_getcell(pd->bl.m,x+dx,y+dy);
- if(ctype == 1 || ctype == 5) {
+ if(map_getcell(pd->bl.m,x+dx,y+dy,CELL_CHKNOPASS)){
pet_walktoxy_sub(pd);
return 0;
}
@@ -273,6 +290,8 @@ 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);
@@ -290,15 +309,17 @@ int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type)
pd = sd->pd;
- if(bl && pd && bl->type == BL_MOB && sd->pet.intimate > 900 && sd->pet.hungry > 0 && pd->class != battle_get_class(bl)
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if(bl && pd && bl->type == BL_MOB && sd->pet.intimate > 900 && sd->pet.hungry > 0 && pd->class_ != status_get_class(bl)
&& pd->state.state != MS_DELAY) {
- mode=mob_db[pd->class].mode;
- race=mob_db[pd->class].race;
+ mode=mob_db[pd->class_].mode;
+ race=mob_db[pd->class_].race;
md=(struct mob_data *)bl;
if(md->bl.type != BL_MOB || pd->bl.m != md->bl.m || md->bl.prev == NULL ||
distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > 13)
return 0;
- if(mob_db[pd->class].mexp <= 0 && !(mode&0x20) && (md->option & 0x06 && race!=4 && race!=6) )
+ if(mob_db[pd->class_].mexp <= 0 && !(mode&0x20) && (md->option & 0x06 && race!=4 && race!=6) )
return 0;
if(!type) {
rate = sd->petDB->attack_rate;
@@ -331,6 +352,8 @@ int pet_changestate(struct pet_data *pd,int state,int type)
nullpo_retr(0, pd);
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
if(pd->timer != -1)
delete_timer(pd->timer,pet_timer);
pd->timer=-1;
@@ -368,6 +391,8 @@ static int pet_timer(int tid,unsigned int tick,int id,int data)
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)
printf("pet_timer %d != %d\n",pd->timer,tid);
@@ -403,6 +428,8 @@ static int pet_walktoxy_sub(struct pet_data *pd)
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));
@@ -422,6 +449,8 @@ int pet_walktoxy(struct pet_data *pd,int x,int y)
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;
@@ -441,6 +470,8 @@ 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;
@@ -461,10 +492,13 @@ 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)
printf("pet_hungry_timer %d != %d\n",sd->pet_hungry_timer,tid);
@@ -485,9 +519,9 @@ static int pet_hungry(int tid,unsigned int tick,int id,int data)
sd->pet.intimate = 0;
if(battle_config.pet_status_support && t > 0) {
if(sd->bl.prev != NULL)
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
else
- pc_calcstatus(sd,2);
+ status_calc_pc(sd,2);
}
}
clif_send_petdata(sd,1,sd->pet.intimate);
@@ -510,11 +544,11 @@ int search_petDB_index(int key,int type)
int i;
for(i=0;i<MAX_PET_DB;i++) {
- if(pet_db[i].class <= 0)
+ if(pet_db[i].class_ <= 0)
continue;
switch(type) {
case PET_CLASS:
- if(pet_db[i].class == key)
+ if(pet_db[i].class_ == key)
return i;
break;
case PET_CATCH:
@@ -556,26 +590,29 @@ 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]
if(pd->skillbonustimer!=-1) pd->skillbonustimer=-1;
- if(pd->skillbonusduration!=-1) pd->skillbonusduration=-1;
- if(pd->skilltype !=-1) pd->skilltype=-1;
- if(pd->skillval !=-1) pd->skillval=-1;
+ pd->skilltype=0;
+ pd->skillval=0;
if(pd->skilltimer!=-1) pd->skilltimer=-1;
- if(pd->skillduration!=-1) pd->skillduration=-1;
- if(pd->skillbonustype!=-1) pd->skillbonustype=-1;
- if(pd->skillbonusval!=-1) pd->skillbonusval=-1;
- if(sd->perfect_hiding==1) sd->perfect_hiding=0; // end additions
+ pd->state.skillbonus=-1;
+ pd->skillduration=0;
+ pd->skillbonustype=0;
+ pd->skillbonusval=0;
+ if(sd->perfect_hiding==1) sd->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);
+ if (sd->pd->lootitem)
+ aFree(sd->pd->lootitem);
map_deliddb(&sd->pd->bl);
- map_freeblock(sd->pd);
}
return 0;
}
@@ -598,6 +635,8 @@ int pet_performance(struct map_session_data *sd)
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‚ð—Ž‚Æ‚³‚¹‚é
@@ -613,8 +652,11 @@ int pet_return_egg(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;
+ // ƒ‹[ƒg‚µ‚½Item‚ð—Ž‚Æ‚³‚¹‚é
+ pet_lootitem_drop(sd->pd,sd);
pet_remove_map(sd);
sd->status.pet_id = 0;
sd->pd = NULL;
@@ -634,12 +676,10 @@ int pet_return_egg(struct map_session_data *sd)
}
if(battle_config.pet_status_support && sd->pet.intimate > 0) {
if(sd->bl.prev != NULL)
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
else
- pc_calcstatus(sd,2);
+ status_calc_pc(sd,2);
}
- // ƒ‹[ƒg‚µ‚½Item‚ð—Ž‚Æ‚³‚¹‚é
- pet_lootitem_drop(pd,sd);
intif_save_petdata(sd->status.account_id,&sd->pet);
pc_makesavestatus(sd);
@@ -659,13 +699,15 @@ int pet_data_init(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.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);
+ i = search_petDB_index(sd->pet.class_,PET_CLASS);
if(i < 0) {
sd->status.pet_id = 0;
return 1;
@@ -682,7 +724,7 @@ int pet_data_init(struct map_session_data *sd)
pd->bl.y = pd->to_y;
pd->bl.id = npc_get_new_npc_id();
memcpy(pd->name,sd->pet.name,24);
- pd->class = sd->pet.class;
+ pd->class_ = sd->pet.class_;
pd->equip = sd->pet.equip;
pd->dir = sd->dir;
pd->speed = sd->petDB->speed;
@@ -696,9 +738,13 @@ int pet_data_init(struct map_session_data *sd)
pd->move_fail_count = 0;
pd->next_walktime = pd->attackabletime = pd->last_thinktime = gettick();
pd->msd = sd;
-
+
map_addiddb(&pd->bl);
+ // initialise
+ pd->state.skillbonus = -1;
+ run_script(pet_db[i].script,0,sd->bl.id,0);
+
if(sd->pet_hungry_timer != -1)
pet_hungry_timer_delete(sd);
if(battle_config.pet_hungry_delay_rate != 100)
@@ -719,6 +765,8 @@ 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;
@@ -747,6 +795,8 @@ int pet_birth_process(struct map_session_data *sd)
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;
}
@@ -766,7 +816,7 @@ int pet_recv_petdata(int account_id,struct s_pet *p,int flag)
pet_birth_process(sd);
else {
pet_data_init(sd);
- if(sd->bl.prev != NULL) {
+ if(sd->pd && sd->bl.prev != NULL) {
map_addblock(&sd->pd->bl);
clif_spawnpet(sd->pd);
clif_send_petdata(sd,0,0);
@@ -777,9 +827,9 @@ int pet_recv_petdata(int account_id,struct s_pet *p,int flag)
}
if(battle_config.pet_status_support && sd->pet.intimate > 0) {
if(sd->bl.prev != NULL)
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
else
- pc_calcstatus(sd,2);
+ status_calc_pc(sd,2);
}
return 0;
@@ -823,27 +873,28 @@ int pet_catch_process2(struct map_session_data *sd,int target_id)
return 1;
}
- i = search_petDB_index(md->class,PET_CLASS);
- if(md == NULL || md->bl.type != BL_MOB || md->bl.prev == NULL || i < 0 || sd->catch_target_class != md->class) {
+ i = search_petDB_index(md->class_,PET_CLASS);
+ if(md == NULL || md->bl.type != BL_MOB || md->bl.prev == NULL || i < 0 || sd->catch_target_class != md->class_) {
clif_pet_rulet(sd,0);
return 1;
}
//target_id‚É‚æ‚é“G¨—‘”»’è
// if(battle_config.etc_log)
-// printf("mob_id = %d, mob_class = %d\n",md->bl.id,md->class);
+// printf("mob_id = %d, mob_class = %d\n",md->bl.id,md->class_);
//¬Œ÷‚Ìê‡
- pet_catch_rate = (pet_db[i].capture + (sd->status.base_level - mob_db[md->class].lv)*30 + sd->paramc[5]*20)*(200 - md->hp*100/mob_db[md->class].max_hp)/100;
+ pet_catch_rate = (pet_db[i].capture + (sd->status.base_level - mob_db[md->class_].lv)*30 + sd->paramc[5]*20)*(200 - md->hp*100/mob_db[md->class_].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_catch_delete(md,0);
+ 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,
+ 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
@@ -869,7 +920,7 @@ int pet_get_egg(int account_id,int pet_id,int flag)
tmp_item.nameid = pet_db[i].EggID;
tmp_item.identify = 1;
tmp_item.card[0] = 0xff00;
- *((long *)(&tmp_item.card[1])) = pet_id;
+ tmp_item.card[1] = pet_id;
tmp_item.card[3] = sd->pet.rename_flag;
if((ret = pc_additem(sd,&tmp_item,1))) {
clif_additem(sd,0,0,ret);
@@ -913,7 +964,7 @@ int pet_change_name(struct map_session_data *sd,char *name)
nullpo_retr(1, sd);
- if(sd->pet.rename_flag == 1 && battle_config.pet_rename == 0)
+ if((sd->pd == NULL) || (sd->pet.rename_flag == 1 && battle_config.pet_rename == 0))
return 1;
for(i=0;i<24 && name[i];i++){
@@ -951,7 +1002,7 @@ int pet_equipitem(struct map_session_data *sd,int index)
else {
pc_delitem(sd,index,1,0);
sd->pet.equip = sd->pd->equip = nameid;
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
clif_pet_equip(sd->pd,nameid);
}
@@ -972,7 +1023,7 @@ int pet_unequipitem(struct map_session_data *sd)
nameid = sd->pet.equip;
sd->pet.equip = sd->pd->equip = 0;
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
clif_pet_equip(sd->pd,0);
memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = nameid;
@@ -991,6 +1042,8 @@ int pet_food(struct map_session_data *sd)
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);
@@ -1023,9 +1076,9 @@ int pet_food(struct map_session_data *sd)
sd->pet.intimate = 0;
if(battle_config.pet_status_support && t > 0) {
if(sd->bl.prev != NULL)
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
else
- pc_calcstatus(sd,2);
+ status_calc_pc(sd,2);
}
}
else if(sd->pet.intimate > 1000)
@@ -1048,7 +1101,9 @@ static int pet_randomwalk(struct pet_data *pd,int tick)
nullpo_retr(0, pd);
- speed = battle_get_speed(&pd->bl);
+ 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;
@@ -1057,7 +1112,7 @@ static int pet_randomwalk(struct pet_data *pd,int tick)
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((c=map_getcell(pd->bl.m,x,y))!=1 && c!=5 && pet_walktoxy(pd,x,y)==0){
+ if((map_getcell(pd->bl.m,x,y,CELL_CHKPASS))&&( pet_walktoxy(pd,x,y)==0)){
pd->move_fail_count=0;
break;
}
@@ -1065,7 +1120,7 @@ static int pet_randomwalk(struct pet_data *pd,int tick)
pd->move_fail_count++;
if(pd->move_fail_count>1000){
if(battle_config.error_log)
- printf("PET cant move. hold position %d, class = %d\n",pd->bl.id,pd->class);
+ printf("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;
@@ -1105,6 +1160,8 @@ static int pet_ai_sub_hard(struct pet_data *pd,unsigned int tick)
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;
@@ -1136,22 +1193,22 @@ static int pet_ai_sub_hard(struct pet_data *pd,unsigned int tick)
pet_randomwalk(pd,tick);
}
else if(pd->target_id - MAX_FLOORITEM > 0) {
- mode=mob_db[pd->class].mode;
- race=mob_db[pd->class].race;
+ mode=mob_db[pd->class_].mode;
+ race=mob_db[pd->class_].race;
md=(struct mob_data *)map_id2bl(pd->target_id);
if(md == NULL || md->bl.type != BL_MOB || pd->bl.m != md->bl.m || md->bl.prev == NULL ||
distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > 13)
pet_unlocktarget(pd);
- else if(mob_db[pd->class].mexp <= 0 && !(mode&0x20) && (md->option & 0x06 && race!=4 && race!=6) )
+ else if(mob_db[pd->class_].mexp <= 0 && !(mode&0x20) && (md->option & 0x06 && race!=4 && race!=6) )
pet_unlocktarget(pd);
- else if(!battle_check_range(&pd->bl,&md->bl,mob_db[pd->class].range)){
+ else if(!battle_check_range(&pd->bl,&md->bl,mob_db[pd->class_].range)){
if(pd->timer != -1 && pd->state.state == MS_WALK && distance(pd->to_x,pd->to_y,md->bl.x,md->bl.y) < 2)
return 0;
if( !pet_can_reach(pd,md->bl.x,md->bl.y))
pet_unlocktarget(pd);
else {
i=0;
- pd->speed = battle_get_speed(&pd->bl);
+ pd->speed = status_get_speed(&pd->bl);
do {
if(i==0) { // ʼn‚ÍAEGIS‚Æ“¯‚¶•û–@‚ÅŒŸõ
dx=md->bl.x - pd->bl.x;
@@ -1235,14 +1292,14 @@ static int pet_ai_sub_hard(struct pet_data *pd,unsigned int tick)
else {
if(dist <= 3 || (pd->timer != -1 && pd->state.state == MS_WALK && distance(pd->to_x,pd->to_y,sd->bl.x,sd->bl.y) < 3) )
return 0;
- pd->speed = battle_get_speed(&pd->bl);
+ 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 = battle_get_speed(&pd->bl);
+ pd->speed = status_get_speed(&pd->bl);
if(pd->state.state == MS_ATTACK)
pet_stopattack(pd);
pet_randomwalk(pd,tick);
@@ -1326,13 +1383,12 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
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);
}
- free(ditem);
+ aFree(ditem);
}
else
add_timer(gettick()+540+i,pet_delay_item_drop2,(int)ditem,0);
}
- pd->lootitem=NULL;
- pd->lootitem=(struct item *)aCalloc(PETLOOT_SIZE,sizeof(struct item));
+ memset(pd->lootitem,0,LOOTITEM_SIZE * sizeof(struct item));
pd->lootitem_count = 0;
pd->lootitem_weight = 0;
pd->lootitem_timer = gettick()+10000; // 10*1000ms‚ÌŠÔE‚í‚È‚¢
@@ -1349,7 +1405,7 @@ int pet_delay_item_drop2(int tid,unsigned int tick,int id,int data)
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);
- free(ditem);
+ aFree(ditem);
return 0;
}
@@ -1357,29 +1413,13 @@ int pet_delay_item_drop2(int tid,unsigned int tick,int id,int data)
* pet bonus giving skills [Valaris]
*------------------------------------------
*/
-
-int pet_skill_bonus(struct map_session_data *sd,struct pet_data *pd,int type,int val,int duration,int timer,int data)
-{
- if(pd==NULL || sd==NULL)
- return 1;
-
- pd->skillbonustype=type;
- pd->skillbonusval=val;
- pd->skillduration=duration;
- pd->skilltimer=timer;
-
- pd->skillbonustimer=add_timer(gettick()+pd->skilltimer*1000,pet_skill_bonus_timer,sd->bl.id,0);
-
- return 0;
-
-}
-
int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data)
{
- struct map_session_data *sd=(struct map_session_data*)map_id2bl(id);
+ struct map_session_data *sd=map_id2sd(id);
struct pet_data *pd;
+ int timer = 0;
- if(sd==NULL || sd->bl.type!=BL_PC)
+ if(sd==NULL)
return 1;
pd=sd->pd;
@@ -1390,38 +1430,26 @@ int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data)
if(pd->skillbonustimer != tid)
return 0;
- pd->skillbonustimer=-1;
-
- pc_bonus(sd,pd->skillbonustype,pd->skillbonusval);
- if(pd->skillbonustype < 56) clif_updatestatus(sd,pd->skillbonustype);
- pd->skillbonusduration=add_timer(gettick()+pd->skillduration*1000,pet_skill_bonus_duration,sd->bl.id,0);
-
- return 0;
-}
-
-int pet_skill_bonus_duration(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->bl.type!=BL_PC)
- return 1;
-
- pd=sd->pd;
-
- if(pd==NULL || pd->bl.type!=BL_PET)
- return 1;
-
- if(pd->skillbonusduration != tid)
- return 0;
-
- pd->skillbonusduration=-1;
+ // 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->skillduration; // 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->skilltimer; // the duration which pet bonuses will be reactivated again
+ }
- pc_bonus(sd,pd->skillbonustype,-pd->skillbonusval);
- if(pd->skillbonustype < 56) clif_updatestatus(sd,pd->skillbonustype);
+ if (pd->state.skillbonus == 1 && sd->petDB)
+ run_script(sd->petDB->script,0,sd->bl.id,0);
- pet_skill_bonus(sd,pd,pd->skillbonustype,pd->skillbonusval,pd->skillduration,pd->skilltimer,0);
+ // add/remove our bonuses, which will be handled by sd->petbonus[]
+ status_calc_pc(sd, 0);
+ // wait for the next timer
+ if (timer) pd->skillbonustimer=add_timer(gettick()+timer,pet_skill_bonus_timer,sd->bl.id,0);
+
return 0;
}
@@ -1442,7 +1470,7 @@ int pet_recovery_timer(int tid,unsigned int tick,int id,int data)
return 0;
if(sd->sc_data[pd->skilltype].timer != -1)
- skill_status_change_end(&sd->bl,pd->skilltype,-1);
+ status_change_end(&sd->bl,pd->skilltype,-1);
pd->skillbonustimer=add_timer(gettick()+pd->skilltimer*1000,pet_recovery_timer,sd->bl.id,0);
@@ -1493,7 +1521,7 @@ int pet_mag_timer(int tid,unsigned int tick,int id,int data)
if(sd->status.hp < sd->status.max_hp * pd->skilltype/100 && sd->status.sp < sd->status.max_sp * pd->skillduration/100) {
clif_skill_nodamage(&pd->bl,&sd->bl,PR_MAGNIFICAT,pd->skillval,1);
- skill_status_change_start(&sd->bl,SkillStatusChangeTable[PR_MAGNIFICAT],pd->skillval,0,0,0,skill_get_time(PR_MAGNIFICAT,pd->skillval),0 );
+ status_change_start(&sd->bl,SkillStatusChangeTable[PR_MAGNIFICAT],pd->skillval,0,0,0,skill_get_time(PR_MAGNIFICAT,pd->skillval),0 );
}
pd->skillbonustimer=add_timer(gettick()+pd->skilltimer*1000,pet_mag_timer,sd->bl.id,0);
@@ -1527,19 +1555,22 @@ int pet_skillattack_timer(int tid,unsigned int tick,int id,int data)
}
if(md && rand()%100 < sd->pet.intimate*pd->skilltimer/100 ) {
- if(pd->skilltype==6 || pd->skilltype==176) {
+ switch(pd->skilltype)
+ {
+ case SM_PROVOKE:
+ //case NPC_POISON: poison is not handled there
skill_castend_nodamage_id(&pd->bl,&md->bl,pd->skilltype,pd->skillval,tick,0);
- }
-
- else if(pd->skilltype==110){
+ break;
+ case BS_HAMMERFALL:
skill_castend_pos2(&pd->bl,md->bl.x,md->bl.y,pd->skilltype,pd->skillval,tick,0);
- }
-
- else if(pd->skilltype==91) {
+ break;
+ case WZ_HEAVENDRIVE:
skill_castend_pos2(&pd->bl,md->bl.x,md->bl.y,pd->skilltype,pd->skillval+rand()%100,tick,0);
- }
- else
+ break;
+ default:
skill_castend_damage_id(&pd->bl,&md->bl,pd->skilltype,pd->skillval,tick,0);
+ break;
+ }
pd->skillbonustimer=add_timer(gettick()+1000,pet_skillattack_timer,sd->bl.id,0);
return 0;
}
@@ -1557,9 +1588,11 @@ int read_petdb()
{
FILE *fp;
char line[1024];
- int i;
+ int nameid,i,k;
int j=0;
+ int lines;
char *filename[]={"db/pet_db.txt","db/pet_db2.txt"};
+ char *str[32],*p,*np;
memset(pet_db,0,sizeof(pet_db));
for(i=0;i<2;i++){
@@ -1570,20 +1603,21 @@ int read_petdb()
printf("can't read %s\n",filename[i]);
return -1;
}
+ lines = 0;
while(fgets(line,1020,fp)){
- int nameid,i;
- char *str[32],*p,*np;
+
+ lines++;
if(line[0] == '/' && line[1] == '/')
continue;
- for(i=0,p=line;i<20;i++){
+ for(k=0,p=line;k<20;k++){
if((np=strchr(p,','))!=NULL){
- str[i]=p;
+ str[k]=p;
*np=0;
p=np+1;
} else {
- str[i]=p;
+ str[k]=p;
p+=strlen(p);
}
}
@@ -1593,7 +1627,7 @@ int read_petdb()
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;
+ pet_db[j].class_ = nameid;
memcpy(pet_db[j].name,str[1],24);
memcpy(pet_db[j].jname,str[2],24);
pet_db[j].itemID=atoi(str[3]);
@@ -1618,11 +1652,12 @@ int read_petdb()
pet_db[j].script = NULL;
if((np=strchr(p,'{'))==NULL)
continue;
- pet_db[j].script = parse_script(np,0);
+ pet_db[j].script = parse_script((unsigned char *) np,lines);
j++;
}
fclose(fp);
- printf("read %s done (count=%d)\n",filename[i],j);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' pets in '"CL_WHITE"%s"CL_RESET"'.\n",j,filename[i]);
+ ShowStatus(tmp_output);
}
return 0;
}
@@ -1639,7 +1674,6 @@ int do_init_pet(void)
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_skill_bonus_duration,"pet_skill_bonus_duration"); // [Valaris]
add_timer_func_list(pet_recovery_timer,"pet_recovery_timer"); // [Valaris]
add_timer_func_list(pet_mag_timer,"pet_mag_timer"); // [Valaris]
add_timer_func_list(pet_heal_timer,"pet_heal_timer"); // [Valaris]
@@ -1649,3 +1683,12 @@ int do_init_pet(void)
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);
+ }
+ }
+ return 0;
+}
diff --git a/src/map/pet.h b/src/map/pet.h
index 365a4490f..4d81583b1 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -2,11 +2,11 @@
#ifndef _PET_H_
#define _PET_H_
-#define MAX_PET_DB 100
+#define MAX_PET_DB 300
#define PETLOOT_SIZE 20 // [Valaris]
struct pet_db {
- int class;
+ int class_;
char name[24],jname[24];
int itemID;
int EggID;
@@ -55,15 +55,15 @@ 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 pet_skill_bonus(struct map_session_data *sd,struct pet_data *pd,int type,int val,int duration,int timer,int data);
int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data); // [Valaris]
-int pet_skill_bonus_duration(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_mag_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_skillattack_timer(int tid,unsigned int tick,int id,int data); // [Valaris]
+int read_petdb();
int do_init_pet(void);
+int do_final_pet(void);
#endif
diff --git a/src/map/script.c b/src/map/script.c
index f198d42fe..9602f3505 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14,52 +14,58 @@
#include <time.h>
-#include "socket.h"
-#include "timer.h"
-#include "malloc.h"
-#include "lock.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/lock.h"
+#include "../common/db.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 "db.h"
#include "skill.h"
#include "chat.h"
#include "battle.h"
#include "party.h"
#include "guild.h"
-#include "lock.h"
#include "atcommand.h"
#include "log.h"
+#include "showmsg.h"
#ifdef MEMWATCH
#include "memwatch.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;
+static unsigned char * script_buf = NULL;
static int script_pos,script_size;
char *str_buf;
int str_pos,str_size;
-static struct {
+static struct str_data_struct {
int type;
int str;
int backpatch;
int label;
- int (*func)();
+ int (*func)(struct script_state *);
int val;
int next;
-} *str_data;
+} *str_data = NULL;
int str_num=LABEL_START,str_data_size;
int str_hash[16];
@@ -78,17 +84,13 @@ struct dbt* script_get_userfunc_db(){ if(!userfunc_db) userfunc_db=strdb_init(50
int scriptlabel_final(void *k,void *d,va_list ap){ return 0; }
static char pos[11][100] = {"“ª","‘Ì","¶Žè","‰EŽè","ƒ[ƒu","ŒC","ƒAƒNƒZƒTƒŠ[1","ƒAƒNƒZƒTƒŠ[2","“ª2","“ª3","‘•’…‚µ‚Ä‚¢‚È‚¢"};
-static struct Script_Config {
- int warn_func_no_comma;
- int warn_cmd_no_comma;
- int warn_func_mismatch_paramnum;
- int warn_cmd_mismatch_paramnum;
- int check_cmdcount;
- int check_gotocount;
-} script_config;
+struct Script_Config script_config;
+
static int parse_cmd_if=0;
static int parse_cmd;
+extern int current_equip_item_index; //for New CARS Scripts. It contains Inventory Index of the EQUIP_SCRIPT caller item. [Lupus]
+
/*==========================================
* ƒ[ƒJƒ‹ƒvƒƒgƒ^ƒCƒv錾 (•K—v‚È•¨‚Ì‚Ý)
*------------------------------------------
@@ -155,6 +157,7 @@ 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);
@@ -193,6 +196,8 @@ 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_announce(struct script_state *st);
int buildin_mapannounce(struct script_state *st);
int buildin_areaannounce(struct script_state *st);
@@ -250,6 +255,9 @@ 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_warppartner(struct script_state *st); // MouseJstr
int buildin_getitemname(struct script_state *st);
int buildin_makepet(struct script_state *st);
int buildin_getexp(struct script_state *st);
@@ -259,6 +267,7 @@ 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);
@@ -274,6 +283,7 @@ 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 [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]
@@ -289,6 +299,28 @@ 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_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_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
void push_val(struct script_stack *stack,int type,int val);
@@ -297,8 +329,15 @@ int run_func(struct script_state *st);
int mapreg_setreg(int num,int val);
int mapreg_setregstr(int num,const char *str);
+#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)();
+ int (*func)(struct script_state *);
char *name;
char *arg;
} buildin_func[]={
@@ -363,6 +402,7 @@ struct {
{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"},
@@ -403,6 +443,8 @@ struct {
{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_announce,"announce","si"},
{buildin_mapannounce,"mapannounce","ssi"},
{buildin_areaannounce,"areaannounce","siiiisi"},
@@ -460,7 +502,10 @@ struct {
{buildin_failedremovecards,"failedremovecards","ii"},
{buildin_marriage,"marriage","s"},
{buildin_wedding_effect,"wedding",""},
- {buildin_divorce,"divorce",""},
+ {buildin_divorce,"divorce","*"},
+ {buildin_ispartneron,"ispartneron","*"},
+ {buildin_getpartnerid,"getpartnerid","*"},
+ {buildin_warppartner,"warppartner","sii"},
{buildin_getitemname,"getitemname","i"},
{buildin_makepet,"makepet","i"},
{buildin_getexp,"getexp","ii"},
@@ -470,6 +515,7 @@ struct {
{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]
@@ -479,6 +525,7 @@ struct {
{buildin_petheal,"petheal","iii"}, // [Valaris]
{buildin_petmag,"petmag","iiii"}, // [Valaris]
{buildin_petskillattack,"petskillattack","iiii"}, // [Valaris]
+ {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]
@@ -493,16 +540,43 @@ struct {
{buildin_npctalk,"npctalk","*"}, // [Valaris]
{buildin_hasitems,"hasitems","*"}, // [Valaris]
{buildin_mobcount,"mobcount","ss"},
- {buildin_getlook,"getlook","i"},
+ {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_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 prints 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]
+#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
{NULL,NULL,NULL},
};
-int buildin_message(struct script_state *st); // [MouseJstr]
-
enum {
C_NOP,C_POS,C_INT,C_PARAM,C_FUNC,C_STR,C_CONSTSTR,C_ARG,
@@ -536,7 +610,7 @@ 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,p)==0){
+ if(strcmp(str_buf+str_data[i].str,(char *) p)==0){
return i;
}
i=str_data[i].next;
@@ -554,14 +628,14 @@ static int add_str(const unsigned char *p)
int i;
char *lowcase;
- lowcase=strdup(p);
+ lowcase=aStrdup((char *) p);
for(i=0;lowcase[i];i++)
lowcase[i]=tolower(lowcase[i]);
- if((i=search_str(lowcase))>=0){
- free(lowcase);
+ if((i=search_str((unsigned char *) lowcase))>=0){
+ aFree(lowcase);
return i;
}
- free(lowcase);
+ aFree(lowcase);
i=calc_hash(p);
if(str_hash[i]==0){
@@ -569,7 +643,7 @@ static int add_str(const unsigned char *p)
} else {
i=str_hash[i];
for(;;){
- if(strcmp(str_buf+str_data[i].str,p)==0){
+ if(strcmp(str_buf+str_data[i].str,(char *) p)==0){
return i;
}
if(str_data[i].next==0)
@@ -580,22 +654,22 @@ static int add_str(const unsigned char *p)
}
if(str_num>=str_data_size){
str_data_size+=128;
- str_data=aRealloc(str_data,sizeof(str_data[0])*str_data_size);
+ 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+strlen(p)+1>=str_size){
+ 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,p);
+ 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+=strlen(p)+1;
+ str_pos+=strlen( (char *) p)+1;
return str_num++;
}
@@ -608,7 +682,7 @@ static void check_script_buf(int size)
{
if(script_pos+size>=script_size){
script_size+=SCRIPT_BLOCK_SIZE;
- script_buf=(char *)aRealloc(script_buf,script_size);
+ script_buf=(unsigned char *)aRealloc(script_buf,script_size);
memset(script_buf + script_size - SCRIPT_BLOCK_SIZE, '\0',
SCRIPT_BLOCK_SIZE);
}
@@ -769,13 +843,17 @@ static void disp_error_message(const char *mes,const unsigned char *pos)
for(line=startline,p=startptr;p && *p;line++){
linestart=p;
- lineend=strchr(p,'\n');
+ lineend=(unsigned char *) strchr((char *) p,'\n');
if(lineend){
c=*lineend;
*lineend=0;
}
if(lineend==NULL || pos<lineend){
- printf("%s line %d : ",mes,line);
+ 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]);
@@ -819,9 +897,9 @@ unsigned char* parse_simpleexpr(unsigned char *p)
}
} else if(isdigit(*p) || ((*p=='-' || *p=='+') && isdigit(p[1]))){
char *np;
- i=strtoul(p,&np,0);
+ i=strtoul((char *) p,&np,0);
add_scripti(i);
- p=np;
+ p=(unsigned char *) np;
} else if(*p=='"'){
add_scriptc(C_STR);
p++;
@@ -848,12 +926,12 @@ unsigned char* parse_simpleexpr(unsigned char *p)
disp_error_message("unexpected character",p);
exit(1);
}
- p2=skip_word(p);
+ p2=(char *) skip_word(p);
c=*p2; *p2=0; // –¼‘O‚ðadd_str‚·‚é
l=add_str(p);
parse_cmd=l; // warn_*_mismatch_paramnum‚Ì‚½‚ß‚É•K—v
- if(l==search_str("if")) // warn_cmd_no_comma‚Ì‚½‚ß‚É•K—v
+ if(l== search_str((unsigned char *) "if")) // warn_cmd_no_comma‚Ì‚½‚ß‚É•K—v
parse_cmd_if++;
/*
// ”pŽ~—\’è‚Ìl14/l15,‚¨‚æ‚уvƒŒƒtƒBƒbƒNƒX‚Œ‚ÌŒx
@@ -864,11 +942,12 @@ unsigned char* parse_simpleexpr(unsigned char *p)
disp_error_message("prefix 'l' is DEPRECATED. use prefix '@' instead.",p2);
}
*/
- *p2=c; p=p2;
+ *p2=c;
+ p=(unsigned char *) p2;
if(str_data[l].type!=C_FUNC && c=='['){
// array(name[i] => getelementofarray(name,i) )
- add_scriptl(search_str("getelementofarray"));
+ add_scriptl(search_str((unsigned char *) "getelementofarray"));
add_scriptc(C_ARG);
add_scriptl(l);
p=parse_subexpr(p+1,-1);
@@ -906,14 +985,14 @@ unsigned char* parse_subexpr(unsigned char *p,int limit)
p=skip_space(p);
if(*p=='-'){
- tmpp=skip_space(p+1);
+ tmpp=(char *) skip_space((unsigned char *) (p+1));
if(*tmpp==';' || *tmpp==','){
add_scriptl(LABEL_NEXTLINE);
p++;
return p;
}
}
- tmpp=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);
@@ -945,13 +1024,13 @@ unsigned char* parse_subexpr(unsigned char *p,int limit)
const char *plist[128];
if( str_data[func].type!=C_FUNC ){
- disp_error_message("expect function",tmpp);
+ disp_error_message("expect function",(unsigned char *) tmpp);
exit(0);
}
add_scriptc(C_ARG);
do {
- plist[i]=p;
+ plist[i]=(char *) p;
p=parse_subexpr(p,-1);
p=skip_space(p);
if(*p==',') p++;
@@ -961,7 +1040,7 @@ unsigned char* parse_subexpr(unsigned char *p,int limit)
p=skip_space(p);
i++;
} while(*p && *p!=')' && i<128);
- plist[i]=p;
+ plist[i]=(char *) p;
if(*(p++)!=')'){
disp_error_message("func request '(' ')'",p);
exit(1);
@@ -972,7 +1051,7 @@ unsigned char* parse_subexpr(unsigned char *p,int limit)
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",plist[(i<j)?i:j]);
+ disp_error_message("illegal number of parameters",(unsigned char *) (plist[(i<j)?i:j]));
}
}
} else {
@@ -1029,19 +1108,19 @@ unsigned char* parse_line(unsigned char *p)
parse_cmd_if=0; // warn_cmd_no_comma‚Ì‚½‚ß‚É•K—v
// ʼn‚ÍŠÖ”–¼
- p2=p;
+ p2=(char *) p;
p=parse_simpleexpr(p);
p=skip_space(p);
cmd=parse_cmd;
if( str_data[cmd].type!=C_FUNC ){
- disp_error_message("expect command",p2);
+ disp_error_message("expect command",(unsigned char *) p2);
// exit(0);
}
add_scriptc(C_ARG);
while(p && *p && *p!=';' && i<128){
- plist[i]=p;
+ plist[i]=(char *) p;
p=parse_expr(p);
p=skip_space(p);
@@ -1053,7 +1132,7 @@ unsigned char* parse_line(unsigned char *p)
p=skip_space(p);
i++;
}
- plist[i]=p;
+ plist[i]=(char *) p;
if(!p || *(p++)!=';'){
disp_error_message("need ';'",p);
exit(1);
@@ -1065,7 +1144,7 @@ unsigned char* parse_line(unsigned char *p)
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",plist[(i<j)?i:j]);
+ disp_error_message("illegal number of parameters",(unsigned char *) (plist[(i<j)?i:j]));
}
}
@@ -1081,7 +1160,7 @@ static void add_buildin_func(void)
{
int i,n;
for(i=0;buildin_func[i].func;i++){
- n=add_str(buildin_func[i].name);
+ 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;
@@ -1111,7 +1190,7 @@ static void read_constdb(void)
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(name);
+ n=add_str((const unsigned char *) name);
if(type==0)
str_data[n].type=C_INT;
else
@@ -1126,7 +1205,7 @@ static void read_constdb(void)
* ƒXƒNƒŠƒvƒg‚̉ðÍ
*------------------------------------------
*/
-unsigned char* parse_script(unsigned char *src,int line)
+char* parse_script(unsigned char *src,int line)
{
unsigned char *p,*tmpp;
int i;
@@ -1137,7 +1216,7 @@ unsigned char* parse_script(unsigned char *src,int line)
read_constdb();
}
first=0;
- script_buf=(unsigned char *)aCalloc(SCRIPT_BLOCK_SIZE,sizeof(unsigned char));
+ 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;
@@ -1202,7 +1281,7 @@ unsigned char* parse_script(unsigned char *src,int line)
add_scriptc(C_NOP);
script_size = script_pos;
- script_buf=(char *)aRealloc(script_buf,script_pos + 1);
+ script_buf=(unsigned char *)aRealloc(script_buf,script_pos + 1);
// –¢‰ðŒˆ‚̃‰ƒxƒ‹‚ð‰ðŒˆ
for(i=LABEL_START;i<str_num;i++){
@@ -1229,7 +1308,7 @@ unsigned char* parse_script(unsigned char *src,int line)
printf("\n");
#endif
- return script_buf;
+ return (char *) script_buf;
}
//
@@ -1364,6 +1443,11 @@ static int set_reg(struct map_session_data *sd,int num,char *name,void *v)
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);
+}
+
/*==========================================
* •¶Žš—ñ‚Ö‚Ì•ÏŠ·
*------------------------------------------
@@ -1373,7 +1457,7 @@ char* conv_str(struct script_state *st,struct script_data *data)
get_val(st,data);
if(data->type==C_INT){
char *buf;
- buf=(char *)aCalloc(16,sizeof(char));
+ buf=(char *)aCallocA(16,sizeof(char));
sprintf(buf,"%d",data->u.num);
data->type=C_STR;
data->u.str=buf;
@@ -1399,7 +1483,7 @@ int conv_num(struct script_state *st,struct script_data *data)
p=data->u.str;
data->u.num = atoi(p);
if(data->type==C_STR)
- free(p);
+ aFree(p);
data->type=C_INT;
}
return data->u.num;
@@ -1441,7 +1525,7 @@ void push_str(struct script_stack *stack,int type,unsigned char *str)
// 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=str;
+ stack->stack_data[stack->sp].u.str=(char *) str;
stack->sp++;
}
@@ -1453,10 +1537,10 @@ void push_copy(struct script_stack *stack,int pos)
{
switch(stack->stack_data[pos].type){
case C_CONSTSTR:
- push_str(stack,C_CONSTSTR,stack->stack_data[pos].u.str);
+ push_str(stack,C_CONSTSTR,(unsigned char *) stack->stack_data[pos].u.str);
break;
case C_STR:
- push_str(stack,C_STR,strdup(stack->stack_data[pos].u.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);
@@ -1473,7 +1557,7 @@ 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){
- free(stack->stack_data[i].u.str);
+ aFree(stack->stack_data[i].u.str);
}
}
if(stack->sp>end){
@@ -1505,7 +1589,7 @@ int buildin_goto(struct script_state *st)
int pos;
if( st->stack->stack_data[st->start+2].type!=C_POS ){
- printf("script: goto: not label !\n");
+ printf("script: goto: not label!\n");
st->state=END;
return 0;
}
@@ -1525,7 +1609,7 @@ int buildin_callfunc(struct script_state *st)
char *scr;
char *str=conv_str(st,& (st->stack->stack_data[st->start+2]));
- if( (scr=strdb_search(script_get_userfunc_db(),str)) ){
+ if( (scr=(char *) strdb_search(script_get_userfunc_db(),str)) ){
int i,j;
for(i=st->start+3,j=0;i<st->end;i++,j++)
push_copy(st->stack,i);
@@ -1641,7 +1725,7 @@ 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){
@@ -1651,21 +1735,21 @@ int buildin_menu(struct script_state *st)
conv_str(st,& (st->stack->stack_data[i]));
len+=strlen(st->stack->stack_data[i].u.str)+1;
}
- buf=(char *)aCalloc(len,sizeof(char));
+ 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);
- free(buf);
+ aFree(buf);
} else if(sd->npc_menu==0xff){ // cansel
sd->state.menu_or_input=0;
st->state=END;
} else { // goto“®ì
// ragemuŒÝŠ·‚Ì‚½‚ß
- pc_setreg(sd,add_str("l15"),sd->npc_menu);
- pc_setreg(sd,add_str("@menu"),sd->npc_menu);
+ 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;
if(sd->npc_menu>0 && sd->npc_menu<(st->end-st->start)/2){
int pos;
@@ -1688,21 +1772,23 @@ int buildin_menu(struct script_state *st)
*/
int buildin_rand(struct script_state *st)
{
- int range,min,max;
+ int range;
- if(st->end>st->start+3){
- 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){
- int tmp;
- tmp=min;
- min=max;
- max=tmp;
+ 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){
+ int tmp = min;
+ min = max;
+ max = tmp;
}
- range=max-min+1;
+ 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]));
+ 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;
@@ -1846,7 +1932,7 @@ 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=(st->end>st->start+2)?str_buf+str_data[num&0x00ffffff].str:"";
+ char *name=(char *) ((st->end>st->start+2)?str_buf+str_data[num&0x00ffffff].str:"");
// char prefix=*name;
char postfix=name[strlen(name)-1];
@@ -1877,7 +1963,7 @@ int buildin_input(struct script_state *st)
set_reg(sd,num,name,(void*)sd->npc_amount);
} else {
// ragemuŒÝŠ·‚Ì‚½‚ß
- pc_setreg(sd,add_str("l14"),sd->npc_amount);
+ pc_setreg(sd,add_str((unsigned char *) "l14"),sd->npc_amount);
}
}
} else {
@@ -2102,7 +2188,7 @@ int buildin_deletearray(struct script_state *st)
}
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, "");
+ if( postfix=='$' ) set_reg(sd,num+(i<<24),name, (void *) "");
}
return 0;
}
@@ -2274,7 +2360,7 @@ int buildin_checkweight(struct script_state *st)
*/
int buildin_getitem(struct script_state *st)
{
- int nameid,amount,flag = 0;
+ int nameid,nameidsrc,amount,flag = 0;
struct item item_tmp;
struct map_session_data *sd;
struct script_data *data;
@@ -2296,12 +2382,12 @@ int buildin_getitem(struct script_state *st)
return 0; //return if amount <=0, skip the useles iteration
}
//Violet Box, Blue Box, etc - random item pick
- if(nameid<0) { // ƒ‰ƒ“ƒ_ƒ€
+ if((nameidsrc = nameid)<0) { // Save real ID of the source Box [Lupus]
nameid=itemdb_searchrandomid(-nameid);
- #ifndef TXT_ONLY
+
if(log_config.present > 0)
- log_present(sd, -nameid, nameid);
- #endif //USE_SQL
+ log_present(sd, -nameidsrc, nameid); //fixed missing ID by Lupus
+
flag = 1;
}
@@ -2318,7 +2404,8 @@ int buildin_getitem(struct script_state *st)
return 0;
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);
+ if(!pc_candrop(sd,nameid))
+ map_addflooritem(&item_tmp,amount,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
}
}
@@ -2499,7 +2586,7 @@ int buildin_delitem(struct script_state *st)
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(*((long *)(&sd->status.inventory[i].card[1])));
//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;
+ 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
@@ -2528,7 +2615,7 @@ int buildin_delitem(struct script_state *st)
continue;
if(sd->status.inventory[i].amount>=amount){
- pc_delitem(sd,i,amount,0);
+ pc_delitem(sd,i,amount,0);
return 0; //we deleted exact amount of items. now exit
} else {
amount-=sd->status.inventory[i].amount;
@@ -2604,7 +2691,7 @@ char *buildin_getpartyname_sub(int party_id)
if(p!=NULL){
char *buf;
- buf=(char *)aCalloc(24,sizeof(char));
+ buf=(char *)aCallocA(24,sizeof(char));
strcpy(buf,p->name);
return buf;
}
@@ -2619,9 +2706,9 @@ int buildin_getpartyname(struct script_state *st)
party_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
name=buildin_getpartyname_sub(party_id);
if(name!=0)
- push_str(st->stack,C_STR,name);
+ push_str(st->stack,C_STR,(unsigned char *)name);
else
- push_str(st->stack,C_CONSTSTR,"null");
+ push_str(st->stack,C_CONSTSTR, (unsigned char *) "null");
return 0;
}
@@ -2641,12 +2728,12 @@ int buildin_getpartymember(struct script_state *st)
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("$@partymembername$")+(i<<24),p->member[i].name);
+ mapreg_setregstr(add_str((unsigned char *) "$@partymembername$")+(i<<24),p->member[i].name);
j++;
}
}
}
- mapreg_setreg(add_str("$@partymembercount"),j);
+ mapreg_setreg(add_str((unsigned char *) "$@partymembercount"),j);
return 0;
}
@@ -2661,7 +2748,7 @@ char *buildin_getguildname_sub(int guild_id)
if(g!=NULL){
char *buf;
- buf=(char *)aCalloc(24,sizeof(char));
+ buf=(char *)aCallocA(24,sizeof(char));
strcpy(buf,g->name);
return buf;
}
@@ -2673,9 +2760,9 @@ int buildin_getguildname(struct script_state *st)
int guild_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
name=buildin_getguildname_sub(guild_id);
if(name!=0)
- push_str(st->stack,C_STR,name);
+ push_str(st->stack,C_STR,(unsigned char *) name);
else
- push_str(st->stack,C_CONSTSTR,"null");
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "null");
return 0;
}
@@ -2690,7 +2777,7 @@ char *buildin_getguildmaster_sub(int guild_id)
if(g!=NULL){
char *buf;
- buf=(char *)aCalloc(24,sizeof(char));
+ buf=(char *)aCallocA(24,sizeof(char));
strncpy(buf,g->master, 23);
return buf;
}
@@ -2703,9 +2790,9 @@ int buildin_getguildmaster(struct script_state *st)
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,master);
+ push_str(st->stack,C_STR,(unsigned char *) master);
else
- push_str(st->stack,C_CONSTSTR,"null");
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "null");
return 0;
}
@@ -2740,25 +2827,25 @@ int buildin_strcharinfo(struct script_state *st)
num=conv_num(st,& (st->stack->stack_data[st->start+2]));
if(num==0){
char *buf;
- buf=(char *)aCalloc(24,sizeof(char));
+ buf=(char *)aCallocA(24,sizeof(char));
strncpy(buf,sd->status.name, 23);
- push_str(st->stack,C_STR,buf);
+ 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,buf);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
else
- push_str(st->stack,C_CONSTSTR,"");
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "");
}
if(num==2){
char *buf;
buf=buildin_getguildname_sub(sd->status.guild_id);
if(buf!=0)
- push_str(st->stack,C_STR,buf);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
else
- push_str(st->stack,C_CONSTSTR,"");
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "");
}
return 0;
@@ -2807,7 +2894,7 @@ int buildin_getequipname(struct script_state *st)
struct item_data* item;
char *buf;
- buf=(char *)aCalloc(64,sizeof(char));
+ 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]);
@@ -2820,7 +2907,7 @@ int buildin_getequipname(struct script_state *st)
}else{
sprintf(buf,"%s-[%s]",pos[num-1],pos[10]);
}
- push_str(st->stack,C_STR,buf);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
return 0;
}
@@ -2833,9 +2920,9 @@ 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){
@@ -2846,7 +2933,7 @@ int buildin_getbrokenid(struct script_state *st)
}
}
}
-
+
push_val(st->stack,C_INT,id);
return 0;
@@ -2864,7 +2951,7 @@ int buildin_repair(struct script_state *st)
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){
@@ -2916,10 +3003,13 @@ int buildin_getequipisenableref(struct script_state *st)
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] && (num!=1
+ if(i >= 0 && num<7 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_refine)
+ // replaced by Celest
+ /*(num!=1
|| sd->inventory_data[i]->def > 1
|| (sd->inventory_data[i]->def==1 && sd->inventory_data[i]->equip_script==NULL)
- || (sd->inventory_data[i]->def<=0 && sd->inventory_data[i]->equip_script!=NULL)))
+ || (sd->inventory_data[i]->def<=0 && sd->inventory_data[i]->equip_script!=NULL)))*/
+
{
push_val(st->stack,C_INT,1);
} else {
@@ -3002,7 +3092,7 @@ int buildin_getequippercentrefinery(struct script_state *st)
sd=script_rid2sd(st);
i=pc_checkequip(sd,equip[num-1]);
if(i >= 0)
- push_val(st->stack,C_INT,pc_percentrefinery(sd,&sd->status.inventory[i]));
+ push_val(st->stack,C_INT,status_percentrefinery(sd,&sd->status.inventory[i]));
else
push_val(st->stack,C_INT,0);
@@ -3024,13 +3114,11 @@ int buildin_successrefitem(struct script_state *st)
if(i >= 0) {
ep=sd->status.inventory[i].equip;
- #ifndef TXT_ONLY
if(log_config.refine > 0)
log_refine(sd, i, 1);
- #endif //USE_SQL
sd->status.inventory[i].refine++;
- pc_unequipitem(sd,i,0, BF_NORMAL);
+ pc_unequipitem(sd,i,2);
clif_refine(sd->fd,sd,0,i,sd->status.inventory[i].refine);
clif_delitem(sd,i,1);
clif_additem(sd,i,1,0);
@@ -3054,13 +3142,11 @@ int buildin_failedrefitem(struct script_state *st)
sd=script_rid2sd(st);
i=pc_checkequip(sd,equip[num-1]);
if(i >= 0) {
- #ifndef TXT_ONLY
if(log_config.refine > 0)
log_refine(sd, i, 0);
- #endif //USE_SQL
sd->status.inventory[i].refine = 0;
- pc_unequipitem(sd,i,0, BF_NORMAL);
+ 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);
@@ -3153,6 +3239,22 @@ int buildin_bonus3(struct script_state *st)
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ƒ‹Š“¾
*------------------------------------------
@@ -3219,15 +3321,15 @@ int buildin_getskilllv(struct script_state *st)
return 0;
}
/*==========================================
- * getgdskilllv(Guild_ID, Skill_ID);
- * skill_id = 10000 : GD_APPROVAL
- * 10001 : GD_KAFRACONTACT
- * 10002 : GD_GUARDIANRESEARCH
- * 10003 : GD_GUARDUP
- * 10004 : GD_EXTENSION
+ * getgdskilllv(Guild_ID, Skill_ID);
+ * skill_id = 10000 : GD_APPROVAL
+ * 10001 : GD_KAFRACONTACT
+ * 10002 : GD_GUARDIANRESEARCH
+ * 10003 : GD_GUARDUP
+ * 10004 : GD_EXTENSION
*------------------------------------------
*/
-int buildin_getgdskilllv(struct script_state *st)
+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]));
@@ -3299,6 +3401,46 @@ int buildin_checkoption(struct script_state *st)
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;
+}
/*==========================================
*
@@ -3524,11 +3666,11 @@ int buildin_gettimestr(struct script_state *st)
fmtstr=conv_str(st,& (st->stack->stack_data[st->start+2]));
maxlen=conv_num(st,& (st->stack->stack_data[st->start+3]));
- tmpstr=(char *)aCalloc(maxlen+1,sizeof(char));
+ tmpstr=(char *)aCallocA(maxlen+1,sizeof(char));
strftime(tmpstr,maxlen,fmtstr,localtime(&now));
tmpstr[maxlen]='\0';
- push_str(st->stack,C_STR,tmpstr);
+ push_str(st->stack,C_STR,(unsigned char *) tmpstr);
return 0;
}
@@ -3608,11 +3750,11 @@ int buildin_makepet(struct script_state *st)
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;
+ sd->catch_target_class = pet_db[pet_id].class_;
intif_create_pet(
sd->status.account_id, sd->status.char_id,
- pet_db[pet_id].class, mob_db[pet_db[pet_id].class].lv,
- pet_db[pet_id].EggID, 0, pet_db[pet_id].intimate,
+ (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);
}
@@ -3638,24 +3780,42 @@ int buildin_getexp(struct script_state *st)
}
/*==========================================
+ * 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;
+}
+
+/*==========================================
* ƒ‚ƒ“ƒXƒ^[”­¶
*------------------------------------------
*/
int buildin_monster(struct script_state *st)
{
- int class,amount,x,y;
+ 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]));
+ 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]));
- mob_once_spawn(map_id2sd(st->rid),map,x,y,str,class,amount,event);
+ mob_once_spawn(map_id2sd(st->rid),map,x,y,str,class_,amount,event);
return 0;
}
/*==========================================
@@ -3664,7 +3824,7 @@ int buildin_monster(struct script_state *st)
*/
int buildin_areamonster(struct script_state *st)
{
- int class,amount,x0,y0,x1,y1;
+ int class_,amount,x0,y0,x1,y1;
char *str,*map,*event="";
map =conv_str(st,& (st->stack->stack_data[st->start+2]));
@@ -3673,12 +3833,12 @@ int buildin_areamonster(struct script_state *st)
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]));
+ 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);
+ mob_once_spawn_area(map_id2sd(st->rid),map,x0,y0,x1,y1,str,class_,amount,event);
return 0;
}
/*==========================================
@@ -3808,7 +3968,7 @@ int buildin_initnpctimer(struct script_state *st)
nd=(struct npc_data *)map_id2bl(st->oid);
npc_settimerevent_tick(nd,0);
- npc_timerevent_start(nd);
+ npc_timerevent_start(nd, st->rid);
return 0;
}
/*==========================================
@@ -3823,7 +3983,7 @@ int buildin_startnpctimer(struct script_state *st)
else
nd=(struct npc_data *)map_id2bl(st->oid);
- npc_timerevent_start(nd);
+ npc_timerevent_start(nd, st->rid);
return 0;
}
/*==========================================
@@ -3882,6 +4042,46 @@ int buildin_setnpctimer(struct script_state *st)
}
/*==========================================
+ * 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;
+}
+
+/*==========================================
* “V‚̺ƒAƒiƒEƒ“ƒX
*------------------------------------------
*/
@@ -3971,6 +4171,25 @@ int buildin_getusers(struct script_state *st)
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;
+ int i=0,disp_num=1;
+
+ 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( !(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[”Š“¾
*------------------------------------------
*/
@@ -4146,9 +4365,12 @@ int buildin_sc_start(struct script_state *st)
bl = map_id2bl(conv_num(st,& (st->stack->stack_data[st->start+5])));
else
bl = map_id2bl(st->rid);
- if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag)
- bl = map_id2bl(((struct map_session_data *)bl)->skilltarget);
- skill_status_change_start(bl,type,val1,0,0,0,tick,0);
+
+ if (bl != 0) {
+ if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag)
+ bl = map_id2bl(((struct map_session_data *)bl)->skilltarget);
+ status_change_start(bl,type,val1,0,0,0,tick,0);
+ }
return 0;
}
@@ -4171,7 +4393,7 @@ int buildin_sc_start2(struct script_state *st)
if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag)
bl = map_id2bl(((struct map_session_data *)bl)->skilltarget);
if(rand()%10000 < per)
- skill_status_change_start(bl,type,val1,0,0,0,tick,0);
+ status_change_start(bl,type,val1,0,0,0,tick,0);
return 0;
}
@@ -4187,7 +4409,7 @@ int buildin_sc_end(struct script_state *st)
bl = map_id2bl(st->rid);
if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag)
bl = map_id2bl(((struct map_session_data *)bl)->skilltarget);
- skill_status_change_end(bl,type,-1);
+ status_change_end(bl,type,-1);
// if(battle_config.etc_log)
// printf("sc_end : %d %d\n",st->rid,type);
return 0;
@@ -4199,8 +4421,7 @@ int buildin_sc_end(struct script_state *st)
int buildin_getscrate(struct script_state *st)
{
struct block_list *bl;
- int sc_def=100,sc_def_mdef2,sc_def_vit2,sc_def_int2,sc_def_luk2;
- int type,rate,luk;
+ 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]));
@@ -4209,22 +4430,9 @@ int buildin_getscrate(struct script_state *st)
else
bl = map_id2bl(st->rid);
- luk = battle_get_luk(bl);
- sc_def_mdef2=100 - (3 + battle_get_mdef(bl) + luk/3);
- sc_def_vit2=100 - (3 + battle_get_vit(bl) + luk/3);
- sc_def_int2=100 - (3 + battle_get_int(bl) + luk/3);
- sc_def_luk2=100 - (3 + luk);
-
- if(type==SC_STONE || type==SC_FREEZE)
- sc_def=sc_def_mdef2;
- else if(type==SC_STAN || type==SC_POISON || type==SC_SILENCE)
- sc_def=sc_def_vit2;
- else if(type==SC_SLEEP || type==SC_CONFUSION || type==SC_BLIND)
- sc_def=sc_def_int2;
- else if(type==SC_CURSE)
- sc_def=sc_def_luk2;
-
- rate=rate*sc_def/100;
+ sc_def = status_get_sc_def(bl,type);
+
+ rate = rate * sc_def / 100;
push_val(st->stack,C_INT,rate);
return 0;
@@ -4347,13 +4555,13 @@ int buildin_changesex(struct script_state *st) {
if (sd->status.sex == 0) {
sd->status.sex = 1;
sd->sex = 1;
- if (sd->status.class == 20 || sd->status.class == 4021)
- sd->status.class -= 1;
+ if (sd->status.class_ == 20 || sd->status.class_ == 4021)
+ sd->status.class_ -= 1;
} else if (sd->status.sex == 1) {
sd->status.sex = 0;
sd->sex = 0;
- if(sd->status.class == 19 || sd->status.class == 4020)
- sd->status.class += 1;
+ if(sd->status.class_ == 19 || sd->status.class_ == 4020)
+ 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);
@@ -4395,6 +4603,29 @@ int buildin_waitingroom(struct script_state *st)
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íœ
*------------------------------------------
*/
@@ -4496,13 +4727,13 @@ int buildin_getwaitingroomstate(struct script_state *st)
case 33: val=(cd->users >= cd->trigger); break;
case 4:
- push_str(st->stack,C_CONSTSTR,cd->title);
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) cd->title);
return 0;
case 5:
- push_str(st->stack,C_CONSTSTR,cd->pass);
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) cd->pass);
return 0;
case 16:
- push_str(st->stack,C_CONSTSTR,cd->npc_event);
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) cd->npc_event);
return 0;
}
push_val(st->stack,C_INT,val);
@@ -4534,7 +4765,7 @@ int buildin_warpwaitingpc(struct script_state *st)
for(i=0;i<n;i++){
struct map_session_data *sd=cd->usersd[0]; // ƒŠƒXƒg擪‚ÌPC‚ðŽŸX‚ÉB
- mapreg_setreg(add_str("$@warpwaitingpc")+(i<<24),sd->bl.id);
+ mapreg_setreg(add_str((unsigned char *) "$@warpwaitingpc")+(i<<24),sd->bl.id);
if(strcmp(str,"Random")==0)
pc_randomwarp(sd,3);
@@ -4547,7 +4778,7 @@ int buildin_warpwaitingpc(struct script_state *st)
}else
pc_setpos(sd,str,x,y,0);
}
- mapreg_setreg(add_str("$@warpwaitingpcnum"),n);
+ mapreg_setreg(add_str((unsigned char *) "$@warpwaitingpcnum"),n);
return 0;
}
/*==========================================
@@ -4790,7 +5021,7 @@ int buildin_pvpon(struct script_state *st)
return 0;
for(i=0;i<fd_max;i++){ //l”•ªƒ‹[ƒv
- if(session[i] && (pl_sd=session[i]->session_data) && pl_sd->state.auth){
+ if(session[i] && (pl_sd=(struct map_session_data *) session[i]->session_data) && pl_sd->state.auth){
if(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;
@@ -4820,7 +5051,7 @@ int buildin_pvpoff(struct script_state *st)
return 0;
for(i=0;i<fd_max;i++){ //l”•ªƒ‹[ƒv
- if(session[i] && (pl_sd=session[i]->session_data) && pl_sd->state.auth){
+ if(session[i] && (pl_sd=(struct map_session_data *) session[i]->session_data) && pl_sd->state.auth){
if(m == pl_sd->bl.m) {
clif_pvpset(pl_sd,0,0,2);
if(pl_sd->pvp_timer != -1) {
@@ -4899,7 +5130,7 @@ int buildin_maprespawnguildid_sub(struct block_list *bl,va_list ap)
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->class < 1285 || md->class > 1288)
+ if(md->class_ < 1285 || md->class_ > 1288)
mob_delete(md);
}
return 0;
@@ -4942,15 +5173,15 @@ int buildin_agitcheck(struct script_state *st)
struct map_session_data *sd;
int cond;
- sd=script_rid2sd(st);
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 {
- if (agit_flag==1) pc_setreg(sd,add_str("@agit_flag"),1);
- if (agit_flag==0) pc_setreg(sd,add_str("@agit_flag"),0);
+ 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;
}
@@ -4974,16 +5205,16 @@ int buildin_getcastlename(struct script_state *st)
for(i=0;i<MAX_GUILDCASTLE;i++){
if( (gc=guild_castle_search(i)) != NULL ){
if(strcmp(mapname,gc->map_name)==0){
- buf=(char *)aCalloc(24,sizeof(char));
+ buf=(char *)aCallocA(24,sizeof(char));
strncpy(buf,gc->castle_name,24);
break;
}
}
}
if(buf)
- push_str(st->stack,C_STR,buf);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
else
- push_str(st->stack,C_CONSTSTR,"");
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "");
return 0;
}
@@ -5130,9 +5361,9 @@ int buildin_getequipcardcnt(struct script_state *st)
return 0;
}
do{
- if( (sd->status.inventory[i].card[c-1] > 4000) &&
- (sd->status.inventory[i].card[c-1] < 5000)){
-
+ 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;
}
@@ -5159,8 +5390,9 @@ int buildin_successremovecards(struct script_state *st)
return 0;
}
do{
- if( (sd->status.inventory[i].card[c-1] > 4000) &&
- (sd->status.inventory[i].card[c-1] < 5000)){
+ 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];
@@ -5212,10 +5444,11 @@ int buildin_failedremovecards(struct script_state *st)
return 0;
}
do{
- if(( sd->status.inventory[i].card[c-1] > 4000) &&
- (sd->status.inventory[i].card[c-1] < 5000)){
-
- cardflag = 1;
+ 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];
@@ -5293,9 +5526,9 @@ int buildin_cmdothernpc(struct script_state *st) // Added by RoVeRT
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, map_id2sd(st->rid), 1);
+
+ npc_do_ontimer(st->oid, 1);
return 0;
}
@@ -5303,9 +5536,9 @@ int buildin_inittimer(struct script_state *st) // Added by RoVeRT
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, map_id2sd(st->rid), 0);
+
+ npc_do_ontimer(st->oid, 0);
return 0;
}
@@ -5354,10 +5587,13 @@ int buildin_marriage(struct script_state *st)
int buildin_wedding_effect(struct script_state *st)
{
struct map_session_data *sd=script_rid2sd(st);
+ struct block_list *bl;
- if(sd==NULL)
- return 0;
- clif_wedding_effect(&sd->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)
@@ -5371,6 +5607,56 @@ int buildin_divorce(struct script_state *st)
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_nick2sd(map_charid2nick(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_warppartner(struct script_state *st)
+{
+ int x,y;
+ 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_nick2sd(map_charid2nick(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]));
+
+ pc_setpos(p_sd,str,x,y,0);
+
+ push_val(st->stack,C_INT,1);
+ return 0;
+}
+
/*================================================
* Script for Displaying MOB Information [Valaris]
*------------------------------------------------
@@ -5379,35 +5665,48 @@ 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]));
+ int class_=conv_num(st,& (st->stack->stack_data[st->start+3]));
- if(num<=0 || num>=8 || (class>=0 && class<=1000) || class >2000)
+ if((class_>=0 && class_<=1000) || class_ >2000)
return 0;
- if(num==1) {
- char *buf;
- buf=calloc(24, 1);
- buf=mob_db[class].name;
- push_str(st->stack,C_STR,buf);
- return 0;
- }
- else if(num==2) {
- char *buf;
- buf=calloc(24, 1);
- buf=mob_db[class].jname;
- push_str(st->stack,C_STR,buf);
- return 0;
+ switch (num) {
+ case 1:
+ {
+ char *buf;
+ buf=(char *) aCallocA(24, 1);
+// buf=mob_db[class_].name;
+// for string assignments you would need to go for c++ [Shinomori]
+ strcpy(buf,mob_db[class_].name);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+ break;
+ }
+ case 2:
+ {
+ char *buf;
+ buf=(char *) aCallocA(24, 1);
+// buf=mob_db[class_].jname;
+// for string assignments you would need to go for c++ [Shinomori]
+ strcpy(buf,mob_db[class_].jname);
+ 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;
}
- else if(num==3)
- push_val(st->stack,C_INT,mob_db[class].lv);
- else if(num==4)
- push_val(st->stack,C_INT,mob_db[class].max_hp);
- else if(num==5)
- push_val(st->stack,C_INT,mob_db[class].max_sp);
- else if(num==6)
- push_val(st->stack,C_INT,mob_db[class].base_exp);
- else if(num==7)
- push_val(st->stack,C_INT,mob_db[class].job_exp);
return 0;
}
@@ -5417,20 +5716,20 @@ int buildin_strmobinfo(struct script_state *st)
*/
int buildin_guardian(struct script_state *st)
{
- int class=0,amount=1,x=0,y=0,guardian=0;
+ 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]));
+ 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);
+ mob_spawn_guardian(map_id2sd(st->rid),map,x,y,str,class_,amount,event,guardian);
return 0;
}
@@ -5471,10 +5770,10 @@ int buildin_getitemname(struct script_state *st)
i_data = NULL;
i_data = itemdb_search(item_id);
- item_name=(char *)aCalloc(24,sizeof(char));
+ item_name=(char *)aCallocA(24,sizeof(char));
strncpy(item_name,i_data->jname,23);
- push_str(st->stack,C_STR,item_name);
+ push_str(st->stack,C_STR,(unsigned char *) item_name);
return 0;
}
@@ -5485,12 +5784,12 @@ int buildin_getitemname(struct script_state *st)
int buildin_petskillbonus(struct script_state *st)
{
- int type,val,duration,timer;
+ int type,val,duration,timer;
struct pet_data *pd;
- struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *sd=script_rid2sd(st);
- if(sd==NULL || sd->pd==NULL)
+ if(sd==NULL || sd->pd==NULL)
return 0;
pd=sd->pd;
@@ -5503,10 +5802,17 @@ int buildin_petskillbonus(struct script_state *st)
duration=conv_num(st,& (st->stack->stack_data[st->start+4]));
timer=conv_num(st,& (st->stack->stack_data[st->start+5]));
- pd->skillbonusduration=-1;
- pd->skillbonustimer=-1;
-
- pet_skill_bonus(sd,pd,type,val,duration,timer,0);
+ // initialise bonuses
+ pd->skillbonustype=type;
+ pd->skillbonusval=val;
+ pd->skillduration=duration*1000;
+ pd->skilltimer=timer*1000;
+
+ if (pd->state.skillbonus == -1)
+ pd->state.skillbonus=0; // waiting state
+
+ // wait for timer to start
+ pd->skillbonustimer=add_timer(gettick()+pd->skilltimer,pet_skill_bonus_timer,sd->bl.id,0);
return 0;
}
@@ -5533,7 +5839,7 @@ int buildin_petloot(struct script_state *st)
if(!max)
return 0;
-
+
pd->loot=1;
pd->lootmax=max;
@@ -5550,20 +5856,20 @@ int buildin_getinventorylist(struct script_state *st)
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("@inventorylist_id")+(j<<24),sd->status.inventory[i].nameid);
- pc_setreg(sd,add_str("@inventorylist_amount")+(j<<24),sd->status.inventory[i].amount);
- pc_setreg(sd,add_str("@inventorylist_equip")+(j<<24),sd->status.inventory[i].equip);
- pc_setreg(sd,add_str("@inventorylist_refine")+(j<<24),sd->status.inventory[i].refine);
- pc_setreg(sd,add_str("@inventorylist_identify")+(j<<24),sd->status.inventory[i].identify);
- pc_setreg(sd,add_str("@inventorylist_attribute")+(j<<24),sd->status.inventory[i].attribute);
- pc_setreg(sd,add_str("@inventorylist_card1")+(j<<24),sd->status.inventory[i].card[0]);
- pc_setreg(sd,add_str("@inventorylist_card2")+(j<<24),sd->status.inventory[i].card[1]);
- pc_setreg(sd,add_str("@inventorylist_card3")+(j<<24),sd->status.inventory[i].card[2]);
- pc_setreg(sd,add_str("@inventorylist_card4")+(j<<24),sd->status.inventory[i].card[3]);
+ 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);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_card1")+(j<<24),sd->status.inventory[i].card[0]);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_card2")+(j<<24),sd->status.inventory[i].card[1]);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_card3")+(j<<24),sd->status.inventory[i].card[2]);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_card4")+(j<<24),sd->status.inventory[i].card[3]);
j++;
}
}
- pc_setreg(sd,add_str("@inventorylist_count"),j);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_count"),j);
return 0;
}
@@ -5574,13 +5880,13 @@ int buildin_getskilllist(struct script_state *st)
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("@skilllist_id")+(j<<24),sd->status.skill[i].id);
- pc_setreg(sd,add_str("@skilllist_lv")+(j<<24),sd->status.skill[i].lv);
- pc_setreg(sd,add_str("@skilllist_flag")+(j<<24),sd->status.skill[i].flag);
+ 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("@skilllist_count"),j);
+ pc_setreg(sd,add_str((unsigned char *) "@skilllist_count"),j);
return 0;
}
@@ -5604,14 +5910,14 @@ int buildin_clearitem(struct script_state *st)
*/
int buildin_classchange(struct script_state *st)
{
- int class,type;
+ 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]));
+ _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);
+ clif_class_change(bl,_class,type);
return 0;
}
@@ -5655,6 +5961,24 @@ int buildin_soundeffect(struct script_state *st)
}
return 0;
}
+
+int buildin_soundeffectall(struct script_state *st)
+{
+ 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_soundeffectall(map_id2bl(st->oid),name,type);
+ else
+ clif_soundeffectall(&sd->bl,name,type);
+ }
+ return 0;
+}
/*==========================================
* pet status recovery [Valaris]
*------------------------------------------
@@ -5663,9 +5987,9 @@ int buildin_petrecovery(struct script_state *st)
{
struct pet_data *pd;
- struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *sd=script_rid2sd(st);
- if(sd==NULL || sd->pd==NULL)
+ if(sd==NULL || sd->pd==NULL)
return 0;
pd=sd->pd;
@@ -5689,9 +6013,9 @@ int buildin_petheal(struct script_state *st)
{
struct pet_data *pd;
- struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *sd=script_rid2sd(st);
- if(sd==NULL || sd->pd==NULL)
+ if(sd==NULL || sd->pd==NULL)
return 0;
pd=sd->pd;
@@ -5707,7 +6031,7 @@ int buildin_petheal(struct script_state *st)
return 0;
}
-
+
/*==========================================
* pet magnificat [Valaris]
*------------------------------------------
@@ -5715,9 +6039,9 @@ int buildin_petheal(struct script_state *st)
int buildin_petmag(struct script_state *st)
{
struct pet_data *pd;
- struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *sd=script_rid2sd(st);
- if(sd==NULL || sd->pd==NULL)
+ if(sd==NULL || sd->pd==NULL)
return 0;
pd=sd->pd;
@@ -5742,9 +6066,9 @@ int buildin_petmag(struct script_state *st)
int buildin_petskillattack(struct script_state *st)
{
struct pet_data *pd;
- struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *sd=script_rid2sd(st);
- if(sd==NULL || sd->pd==NULL)
+ if(sd==NULL || sd->pd==NULL)
return 0;
pd=sd->pd;
@@ -5753,7 +6077,7 @@ int buildin_petskillattack(struct script_state *st)
return 0;
pd->skilltype=conv_num(st,& (st->stack->stack_data[st->start+2]));
- pd->skillval=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ pd->skillval=conv_num(st,& (st->stack->stack_data[st->start+3]));
pd->skillduration=conv_num(st,& (st->stack->stack_data[st->start+4]));
pd->skilltimer=conv_num(st,& (st->stack->stack_data[st->start+5]));
@@ -5761,6 +6085,24 @@ int buildin_petskillattack(struct script_state *st)
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]
*------------------------------------------
@@ -5768,9 +6110,9 @@ int buildin_petskillattack(struct script_state *st)
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 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]));
@@ -5814,15 +6156,15 @@ int buildin_specialeffect2(struct script_state *st)
int buildin_nude(struct script_state *st)
{
- struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *sd=script_rid2sd(st);
int i;
if(sd==NULL)
return 0;
-
- for(i=0;i<11;i++)
+
+ for(i=0;i<11;i++)
if(sd->equip_index[i] >= 0)
- pc_unequipitem(sd,sd->equip_index[i],1, BF_NORMAL);
+ pc_unequipitem(sd,sd->equip_index[i],2);
return 0;
}
@@ -5848,6 +6190,221 @@ int buildin_gmcommand(struct script_state *st)
}
/*==========================================
+ * 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,strlen(message));
+ return 0;
+}
+
+/*==========================================
+ * All The Players Full Recovery
+ (HP/SP full restore and resurrect if need)
+ *------------------------------------------
+ */
+int buildin_recovery(struct script_state *st)
+{
+ int i = 0;
+ for (i = 0; i < fd_max; i++) {
+ if (session[i]){
+ struct map_session_data *sd = (struct map_session_data *) session[i]->session_data;
+ if (sd && sd->state.auth) {
+ 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:
+ if(sd->pet.class_)
+ push_val(st->stack,C_INT,sd->pet.class_);
+ else
+ push_val(st->stack,C_INT,0);
+ break;
+ case 2:
+ if(sd->pet.name)
+ push_str(st->stack,C_STR,(unsigned char *) sd->pet.name);
+ else
+ push_val(st->stack,C_INT,0);
+ 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<4;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 ){
+ printf("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+=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]
*------------------------------------------
*/
@@ -5896,7 +6453,7 @@ int buildin_message(struct script_state *st)
* area) [Valaris]
*------------------------------------------
*/
-
+
int buildin_npctalk(struct script_state *st)
{
char *str;
@@ -5926,16 +6483,16 @@ 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) {
push_val(st->stack,C_INT,1);
return 0;
}
}
-
+
push_val(st->stack,C_INT,0);
return 0;
@@ -6040,14 +6597,14 @@ int buildin_getsavepoint(struct script_state *st)
sd=script_rid2sd(st);
type=conv_num(st,& (st->stack->stack_data[st->start+2]));
- mapname=calloc(24, 1);
+ mapname=(char *) aCallocA(24, 1);
x=sd->status.save_point.x;
y=sd->status.save_point.y;
strncpy(mapname,sd->status.save_point.map,24);
switch(type){
case 0:
- push_str(st->stack,C_STR,mapname);
+ push_str(st->stack,C_STR,(unsigned char *) mapname);
break;
case 1:
push_val(st->stack,C_INT,x);
@@ -6109,7 +6666,7 @@ int buildin_getmapxy(struct script_state *st){
//??????????? >>> Possible needly check function parameters on C_STR,C_INT,C_INT <<< ???????????//
type=conv_num(st,& (st->stack->stack_data[st->start+5]));
- mapname=calloc(24, 1);
+ mapname=(char *) aCallocA(24, 1);
switch (type){
case 0: //Get Character Position
@@ -6141,7 +6698,7 @@ int buildin_getmapxy(struct script_state *st){
}
x=nd->bl.x;
- y=nd->bl.y;
+ y=nd->bl.y;
strncpy(mapname,map[nd->bl.m].name,24);
printf(">>>>%s %d %d\n",mapname,x,y);
break;
@@ -6163,7 +6720,7 @@ int buildin_getmapxy(struct script_state *st){
return 0;
}
x=pd->bl.x;
- y=pd->bl.y;
+ y=pd->bl.y;
strncpy(mapname,map[pd->bl.m].name,24);
printf(">>>>%s %d %d\n",mapname,x,y);
@@ -6218,6 +6775,260 @@ int buildin_getmapxy(struct script_state *st){
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->state.special_mob_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;
+}
+
+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]
+ *------------------------------------------------
+ */
+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;
+}
+
+/*================================================
+ * 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 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;
+}
//
// ŽÀs•”main
@@ -6309,14 +7120,14 @@ void op_add(struct script_state* st)
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 *)aCalloc(strlen(st->stack->stack_data[st->stack->sp-1].u.str)+
+ 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)
- free(st->stack->stack_data[st->stack->sp-1].u.str);
+ aFree(st->stack->stack_data[st->stack->sp-1].u.str);
if(st->stack->stack_data[st->stack->sp].type==C_STR)
- free(st->stack->stack_data[st->stack->sp].u.str);
+ aFree(st->stack->stack_data[st->stack->sp].u.str);
st->stack->stack_data[st->stack->sp-1].type=C_STR;
st->stack->stack_data[st->stack->sp-1].u.str=buf;
}
@@ -6358,8 +7169,8 @@ void op_2str(struct script_state *st,int op,int sp1,int sp2)
push_val(st->stack,C_INT,a);
- if(st->stack->stack_data[sp1].type==C_STR) free(s1);
- if(st->stack->stack_data[sp2].type==C_STR) free(s2);
+ if(st->stack->stack_data[sp1].type==C_STR) aFree(s1);
+ if(st->stack->stack_data[sp2].type==C_STR) aFree(s2);
}
/*==========================================
* “ñ€‰‰ŽZŽq(”’l)
@@ -6373,7 +7184,11 @@ void op_2num(struct script_state *st,int op,int i1,int 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
@@ -6572,7 +7387,7 @@ int run_func(struct script_state *st)
* ƒXƒNƒŠƒvƒg‚ÌŽÀsƒƒCƒ“•”•ª
*------------------------------------------
*/
-int run_script_main(unsigned char *script,int pos,int rid,int oid,struct script_state *st,unsigned char *rootscript)
+int run_script_main(char *script,int pos,int rid,int oid,struct script_state *st,char *rootscript)
{
int c,rerun_pos;
int cmdcount=script_config.check_cmdcount;
@@ -6584,7 +7399,7 @@ int run_script_main(unsigned char *script,int pos,int rid,int oid,struct script_
rerun_pos=st->pos;
for(st->state=0;st->state==0;){
- switch(c=get_com(script,&st->pos)){
+ switch(c= get_com((unsigned char *) script,&st->pos)){
case C_EOL:
if(stack->sp!=st->defsp){
if(battle_config.error_log)
@@ -6594,7 +7409,7 @@ int run_script_main(unsigned char *script,int pos,int rid,int oid,struct script_
rerun_pos=st->pos;
break;
case C_INT:
- push_val(stack,C_INT,get_num(script,&st->pos));
+ push_val(stack,C_INT,get_num((unsigned char *) script,&st->pos));
break;
case C_POS:
case C_NAME:
@@ -6605,7 +7420,7 @@ int run_script_main(unsigned char *script,int pos,int rid,int oid,struct script_
push_val(stack,c,0);
break;
case C_STR:
- push_str(stack,C_CONSTSTR,script+st->pos);
+ push_str(stack,C_CONSTSTR,(unsigned char *) (script+st->pos));
while(script[st->pos++]);
break;
case C_FUNC:
@@ -6689,7 +7504,7 @@ int run_script_main(unsigned char *script,int pos,int rid,int oid,struct script_
struct map_session_data *sd=map_id2sd(st->rid);
if(sd/* && sd->npc_stackbuf==NULL*/){
if( sd->npc_stackbuf )
- free( sd->npc_stackbuf );
+ aFree( sd->npc_stackbuf );
sd->npc_stackbuf = (char *)aCalloc(sizeof(stack->stack_data[0])*stack->sp_max,sizeof(char));
memcpy(sd->npc_stackbuf, stack->stack_data, sizeof(stack->stack_data[0]) * stack->sp_max);
sd->npc_stack = stack->sp;
@@ -6706,24 +7521,24 @@ int run_script_main(unsigned char *script,int pos,int rid,int oid,struct script_
* ƒXƒNƒŠƒvƒg‚ÌŽÀs
*------------------------------------------
*/
-int run_script(unsigned char *script,int pos,int rid,int oid)
+int run_script(char *script,int pos,int rid,int oid)
{
struct script_stack stack;
struct script_state st;
struct map_session_data *sd=map_id2sd(rid);
- unsigned char *rootscript=script;
+ char *rootscript=script;
if(script==NULL || pos<0)
return -1;
- if(sd && sd->npc_stackbuf && sd->npc_scriptroot==(char*)rootscript){
+ if(sd && sd->npc_stackbuf && sd->npc_scriptroot==rootscript){
// ‘O‰ñ‚̃Xƒ^ƒbƒN‚𕜋A
script=sd->npc_script;
stack.sp=sd->npc_stack;
stack.sp_max=sd->npc_stackmax;
stack.stack_data=(struct script_data *)aCalloc(stack.sp_max,sizeof(stack.stack_data[0]));
memcpy(stack.stack_data,sd->npc_stackbuf,sizeof(stack.stack_data[0])*stack.sp_max);
- free(sd->npc_stackbuf);
+ aFree(sd->npc_stackbuf);
sd->npc_stackbuf=NULL;
}else{
// ƒXƒ^ƒbƒN‰Šú‰»
@@ -6737,7 +7552,7 @@ int run_script(unsigned char *script,int pos,int rid,int oid)
st.oid=oid;
run_script_main(script,pos,rid,oid,&st,rootscript);
- free(stack.stack_data);
+ aFree(stack.stack_data);
stack.stack_data=NULL;
return st.pos;
}
@@ -6765,15 +7580,15 @@ int mapreg_setregstr(int num,const char *str)
{
char *p;
- if( (p=numdb_search(mapregstr_db,num))!=NULL )
- free(p);
+ if( (p=(char *) numdb_search(mapregstr_db,num))!=NULL )
+ aFree(p);
if( str==NULL || *str==0 ){
numdb_erase(mapregstr_db,num);
mapreg_dirty=1;
return 0;
}
- p=(char *)aCalloc(strlen(str)+1, sizeof(char));
+ p=(char *)aCallocA(strlen(str)+1, sizeof(char));
strcpy(p,str);
numdb_insert(mapregstr_db,num,p);
mapreg_dirty=1;
@@ -6803,16 +7618,16 @@ static int script_load_mapreg()
printf("%s: %s broken data !\n",mapreg_txt,buf1);
continue;
}
- p=(char *)aCalloc(strlen(buf2) + 1,sizeof(char));
+ p=(char *)aCallocA(strlen(buf2) + 1,sizeof(char));
strcpy(p,buf2);
- s=add_str(buf1);
+ s= add_str((unsigned char *) buf1);
numdb_insert(mapregstr_db,(i<<24)|s,p);
}else{
if( sscanf(line+n,"%d",&v)!=1 ){
printf("%s: %s broken data !\n",mapreg_txt,buf1);
continue;
}
- s=add_str(buf1);
+ s= add_str((unsigned char *) buf1);
numdb_insert(mapreg_db,(i<<24)|s,v);
}
}
@@ -6871,7 +7686,7 @@ static int script_autosave_mapreg(int tid,unsigned int tick,int id,int data)
}
/*==========================================
- *
+ *
*------------------------------------------
*/
static int set_posword(char *p)
@@ -6903,8 +7718,16 @@ int script_config_read(char *cfgName)
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=8192;
- script_config.check_gotocount=512;
+ script_config.check_cmdcount=65535;
+ script_config.check_gotocount=2048;
+
+ script_config.die_event_name = (char *)aCallocA(24,sizeof(char));
+ script_config.kill_event_name = (char *)aCallocA(24,sizeof(char));
+ script_config.login_event_name = (char *)aCallocA(24,sizeof(char));
+ script_config.logout_event_name = (char *)aCallocA(24,sizeof(char));
+
+ script_config.event_script_type = 0;
+ script_config.event_requires_trigger = 1;
fp=fopen(cfgName,"r");
if(fp==NULL){
@@ -6920,7 +7743,43 @@ int script_config_read(char *cfgName)
if(strcmpi(w1,"refine_posword")==0) {
set_posword(w2);
}
- if(strcmpi(w1,"import")==0){
+ 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,"die_event_name")==0) {
+ strcpy(script_config.die_event_name, w2);
+ }
+ else if(strcmpi(w1,"kill_event_name")==0) {
+ strcpy(script_config.kill_event_name, w2);
+ }
+ else if(strcmpi(w1,"login_event_name")==0) {
+ strcpy(script_config.login_event_name, w2);
+ }
+ else if(strcmpi(w1,"logout_event_name")==0) {
+ strcpy(script_config.logout_event_name, w2);
+ }
+ else if(strcmpi(w1,"require_set_trigger")==0) {
+ script_config.event_requires_trigger = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"import")==0){
script_config_read(w2);
}
}
@@ -6939,7 +7798,7 @@ static int mapreg_db_final(void *key,void *data,va_list ap)
}
static int mapregstr_db_final(void *key,void *data,va_list ap)
{
- free(data);
+ aFree(data);
return 0;
}
static int scriptlabel_db_final(void *key,void *data,va_list ap)
@@ -6948,16 +7807,16 @@ static int scriptlabel_db_final(void *key,void *data,va_list ap)
}
static int userfunc_db_final(void *key,void *data,va_list ap)
{
- free(key);
- free(data);
+ aFree(key);
+ aFree(data);
return 0;
}
int do_final_script()
{
if(mapreg_dirty>=0)
script_save_mapreg();
- if(script_buf)
- free(script_buf);
+// if(script_buf)
+// aFree(script_buf);
if(mapreg_db)
numdb_final(mapreg_db,mapreg_db_final);
@@ -6968,10 +7827,19 @@ int do_final_script()
if(userfunc_db)
strdb_final(userfunc_db,userfunc_db_final);
- if (str_data)
- free(str_data);
- if (str_buf)
- free(str_buf);
+ if (str_data)
+ aFree(str_data);
+ if (str_buf)
+ aFree(str_buf);
+
+ if (script_config.die_event_name)
+ aFree(script_config.die_event_name);
+ if (script_config.kill_event_name)
+ aFree(script_config.kill_event_name);
+ if (script_config.login_event_name)
+ aFree(script_config.login_event_name);
+ if (script_config.logout_event_name)
+ aFree(script_config.logout_event_name);
return 0;
}
diff --git a/src/map/script.h b/src/map/script.h
index b50c46693..b30201a67 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -2,6 +2,22 @@
#ifndef _SCRIPT_H_
#define _SCRIPT_H_
+extern struct Script_Config {
+ int warn_func_no_comma;
+ int warn_cmd_no_comma;
+ int warn_func_mismatch_paramnum;
+ int warn_cmd_mismatch_paramnum;
+ int check_cmdcount;
+ int check_gotocount;
+
+ int event_script_type;
+ char* die_event_name;
+ char* kill_event_name;
+ char* login_event_name;
+ char* logout_event_name;
+ int event_requires_trigger;
+} script_config;
+
struct script_data {
int type;
union {
@@ -23,8 +39,12 @@ struct script_state {
int defsp,new_pos,new_defsp;
};
-unsigned char * parse_script(unsigned char *,int);
-int run_script(unsigned char *,int,int,int);
+char * parse_script(unsigned char *,int);
+int run_script(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();
struct dbt* script_get_userfunc_db();
diff --git a/src/map/skill.c b/src/map/skill.c
index dc708c906..c53a7a9d6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1,4 +1,4 @@
-// $Id: skill.c,v 1.8 2004/11/26 7:12:23 PM Celestia Exp $
+// $Id: skill.c,v 1.8 2004/02/27 5:34:51 PM Celestia $
/* ƒXƒLƒ‹?ŒW */
#include <stdio.h>
@@ -14,6 +14,7 @@
#include "map.h"
#include "clif.h"
#include "pc.h"
+#include "status.h"
#include "pet.h"
#include "mob.h"
#include "battle.h"
@@ -24,245 +25,16 @@
#include "log.h"
#include "chrif.h"
#include "guild.h"
+#include "showmsg.h"
+#include "grfio.h"
#ifdef MEMWATCH
#include "memwatch.h"
#endif
#define SKILLUNITTIMER_INVERVAL 100
-
#define STATE_BLIND 0x10
-
-/* ƒXƒLƒ‹”Ô?„ƒXƒe?ƒ^ƒXˆÙí”Ô??Š·ƒe?ƒuƒ‹ */
-int SkillStatusChangeTable[]={ /* skill.h‚Ìenum‚ÌSC_***‚Æ‚ ‚킹‚邱‚Æ */
-/* 0- */
- -1,-1,-1,-1,-1,-1,
- SC_PROVOKE, /* ƒvƒƒ{ƒbƒN */
- -1, 1,-1,
-/* 10- */
- SC_SIGHT, /* ƒTƒCƒg */
- -1,-1,-1,-1,
- SC_FREEZE, /* ƒtƒƒXƒgƒ_ƒCƒo? */
- SC_STONE, /* ƒXƒg?ƒ“ƒJ?ƒX */
- -1,-1,-1,
-/* 20- */
- -1,-1,-1,-1,
- SC_RUWACH, /* ƒ‹ƒAƒt */
- -1,-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_DIVINA, /* ƒŒƒ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,-1,-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,
- SC_SELFDESTRUCTION,
- -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,
- SC_KEEPING,
- -1,-1,
- SC_BARRIER,
- -1,-1,
- 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_FLAMELAUNCHER,
- SC_FROSTWEAPON,
- SC_LIGHTNINGLOADER,
- SC_SEISMICWEAPON,
- -1,
- SC_VOLCANO,
- SC_DELUGE,
- SC_VIOLENTGALE,
- SC_LANDPROTECTOR,
- -1,
-/* 290- */
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-/* 300- */
- -1,-1,-1,-1,-1,-1,
- SC_LULLABY,
- SC_RICHMANKIM,
- SC_ETERNALCHAOS,
- SC_DRUMBATTLE,
-/* 310- */
- SC_NIBELUNGEN,
- SC_ROKISWEIL,
- SC_INTOABYSS,
- SC_SIEGFRIED,
- -1,-1,-1,
- SC_DISSONANCE,
- -1,
- SC_WHISTLE,
-/* 320- */
- SC_ASSNCROS,
- SC_POEMBRAGI,
- SC_APPLEIDUN,
- -1,-1,
- SC_UGLYDANCE,
- -1,
- SC_HUMMING,
- SC_DONTFORGETME,
- SC_FORTUNE,
-/* 330- */
- SC_SERVICE4U,
- SC_SELFDESTRUCTION,
- -1,-1,-1,-1,-1,-1,-1,-1,
-/* 340- */
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-/* 350- */
- -1,-1,-1,-1,-1,
- SC_AURABLADE,
- SC_PARRYING,
- SC_CONCENTRATION,
- SC_TENSIONRELAX,
- SC_BERSERK,
-/* 360- */
- SC_BERSERK,
- SC_ASSUMPTIO,
- SC_BASILICA,
- -1,-1,-1,
- SC_MAGICPOWER,
- -1,-1,
- 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,-1,
- SC_MARIONETTE,
- -1,
- SC_HEADCRUSH,
- SC_JOINTBEAT,
-/* 400 */
- -1,-1,
- SC_MINDBREAKER,
- SC_MEMORIZE,
- SC_FOGWALL,
- SC_SPIDERWEB,
- -1,-1,-1,-1,
-/* 410- */
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-};
+#define swap(x,y) { int t; t = x; x = y; y = t; }
const struct skill_name_db skill_names[] = {
{ AC_CHARGEARROW, "CHARGEARROW", "Charge_Arrow" } ,
@@ -398,6 +170,10 @@ const struct skill_name_db skill_names[] = {
{ DC_SERVICEFORYOU, "SERVICEFORYOU", "Prostitute" } ,
{ DC_THROWARROW, "THROWARROW", "Throw_Arrow" } ,
{ DC_UGLYDANCE, "UGLYDANCE", "Ugly_Dance" } ,
+ { GD_BATTLEORDER, "BATTLEORDER", "Battle_Orders" } ,
+ { GD_REGENERATION, "REGENERATION", "Regeneration" } ,
+ { GD_RESTORE, "RESTORE", "Restore" } ,
+ { GD_EMERGENCYCALL, "EMERGENCYCALL", "Emergency_Call" } ,
{ HP_ASSUMPTIO, "ASSUMPTIO", "Assumptio" } ,
{ HP_BASILICA, "BASILICA", "Basilica" } ,
{ HP_MEDITATIO, "MEDITATIO", "Meditation" } ,
@@ -698,9 +474,9 @@ const struct skill_name_db skill_names[] = {
{ TK_SPTIME, "SPTIME", "SP Time" } ,
{ TK_STORMKICK, "STORMKICK", "Storm Kick" } ,
{ TK_TURNKICK, "TURNKICK", "Turn Kick" } ,
- { WE_BABY, "BABY", "Adopt_Baby" } ,
- { WE_CALLBABY, "CALLBABY", "Call_Baby" } ,
- { WE_CALLPARENT, "CALLPARENT", "Call_Parent" } ,
+ { WE_BABY, "BABY", "I Love Mama and Fafa" } ,
+ { WE_CALLBABY, "CALLBABY", "Come With Me, Baby" } ,
+ { WE_CALLPARENT, "CALLPARENT", "I Miss My Parents" } ,
{ WE_CALLPARTNER, "CALLPARTNER", "I Want to See You" } ,
{ WE_FEMALE, "FEMALE", "I Only Look Up to You" } ,
{ WE_MALE, "MALE", "I Will Protect You" } ,
@@ -724,7 +500,7 @@ const struct skill_name_db skill_names[] = {
{ WZ_STORMGUST, "STORMGUST", "Storm_Gust" } ,
{ WZ_VERMILION, "VERMILION", "Lord_of_Vermilion" } ,
{ WZ_WATERBALL, "WATERBALL", "Water_Ball" } ,
- { 0, 0, 0 }
+ { 0, 0, 0 }
};
static const int dirx[8]={0,-1,-1,-1,0,1,1,1};
@@ -744,94 +520,49 @@ 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];
-int skill_get_hit( int id ){
- if (id >= 10000 && id < 10015) id -= 9500;
- return skill_db[id].hit;
-}
-int skill_get_inf( int id ){
- return (id < 500) ? skill_db[id].inf : guild_skill_get_inf(id);
-}
-int skill_get_pl( int id ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return skill_db[id].pl;
-}
-int skill_get_nk( int id ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return skill_db[id].nk;
-}
-int skill_get_max( int id ){
- return (id < 500) ? skill_db[id].max : guild_skill_get_max(id);
-}
-int skill_get_range( int id , int lv ){
- if (lv <= 0) return 0;
- return (id < 500) ? skill_db[id].range[lv-1] : guild_skill_get_range(id);
-}
-int skill_get_hp( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0: skill_db[id].hp[lv-1];
-}
-int skill_get_sp( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- //if (lv <= 0) return 0;
- //return (id < 500) ? skill_db[id].sp[lv-1] : guild_skill_get_sp(id, lv);
- return (lv <= 0) ? 0: skill_db[id].sp[lv-1];
-}
-int skill_get_zeny( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].zeny[lv-1];
-}
-int skill_get_num( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].num[lv-1];
-}
-int skill_get_cast( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].cast[lv-1];
-}
-int skill_get_delay( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].delay[lv-1];
-}
-int skill_get_time( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].upkeep_time[lv-1];
-}
-int skill_get_time2( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].upkeep_time2[lv-1];
-}
-int skill_get_castdef( int id ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return skill_db[id].cast_def_rate;
-}
-int skill_get_weapontype( int id ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return skill_db[id].weapon;
-}
-int skill_get_inf2( int id ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return skill_db[id].inf2;
-}
-int skill_get_castcancel( int id ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return skill_db[id].maxcount;
-}
-int skill_get_maxcount( int id ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return skill_db[id].maxcount;
-}
-int skill_get_blewcount( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].blewcount[lv-1];
-}
-int skill_get_mhp( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].mhp[lv-1];
-}
-int skill_get_castnodex( int id ,int lv ){
- if (id >= 10000 && id < 10015) id-= 9500;
- return (lv <= 0) ? 0:skill_db[id].castnodex[lv-1];
-}
+// 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) ? 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) ? skill_db[id].max : guild_skill_get_max(id); }
+int skill_get_range( int id , int lv ){ skill_chk (id, lv); return (id < 500) ? skill_db[id].range[lv-1] : guild_skill_get_range(id); }
+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_nocast ( int id ){ skill_get (skill_db[id].nocast, 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, id, 1); }
+int skill_get_unit_flag( int id ){ skill_get (skill_db[id].unit_flag, id, 1); }
+
int skill_tree_get_max(int id, int b_class){
struct pc_base_job s_class = pc_calc_base_job(b_class);
int i, skillid;
@@ -845,42 +576,64 @@ int skill_tree_get_max(int id, int b_class){
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 skill_status_change_timer_sub(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_abra_dataset(int skilllv);
int skill_clear_element_field(struct block_list *bl);
int skill_landprotector(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);
+int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int tick);
+int skill_unit_effect(struct block_list *bl,va_list ap);
+
+int enchant_eff[5] = { 10, 14, 17, 19, 20 };
+int deluge_eff[5] = { 5, 9, 12, 14, 15 };
// [MouseJstr] - skill ok to cast? and when?
-int skillnotok(int skillid, struct map_session_data *sd) {
- if (sd == 0)
- return 0;
- if (pc_isGM(sd) >= 20)
- return 0; // gm's can do anything damn thing they want
+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[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.gvg && skill_db[skillid].nocast & 1)
+ if(!map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.gvg && skill_get_nocast (skillid) & 1)
return 1;
- if(map[sd->bl.m].flag.pvp && skill_db[skillid].nocast & 2)
+ if(map[sd->bl.m].flag.pvp && skill_get_nocast (skillid) & 2)
return 1;
- if(map[sd->bl.m].flag.gvg && skill_db[skillid].nocast & 4)
+ if(map[sd->bl.m].flag.gvg && skill_get_nocast (skillid) & 4)
return 1;
- if (agit_flag && skill_db[skillid].nocast & 8)
+ if (agit_flag && skill_get_nocast (skillid) & 8)
return 1;
- if (battle_config.pk_mode && !map[sd->bl.m].flag.nopvp && skill_db[skillid].nocast & 16)
+ 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);
- }
+
+ 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);
+ }
}
@@ -888,105 +641,58 @@ static int distance(int x0,int y0,int x1,int y1)
{
int dx,dy;
- dx=abs(x0-x1);
- dy=abs(y0-y1);
- return dx>dy ? dx : dy;
+ dx = abs(x0 - x1);
+ dy = abs(y0 - y1);
+ return dx > dy ? dx : dy;
}
-/* ƒXƒLƒ‹ƒ†ƒjƒbƒgID‚ð•Ô‚·i‚±‚ê‚àƒf?ƒ^ƒx?ƒX‚É“ü‚ꂽ‚¢‚Èj */
-int skill_get_unit_id(int id,int flag)
-{
+/* ƒ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;
- switch(id){
- case MG_SAFETYWALL: return 0x7e; /* ƒZƒCƒtƒeƒBƒEƒH?ƒ‹ */
- case MG_FIREWALL: return 0x7f; /* ƒtƒ@ƒCƒA?ƒEƒH?ƒ‹ */
- case AL_WARP: return (flag==0)?0x81:0x80; /* ƒ?ƒvƒ|?ƒ^ƒ‹ */
- case PR_BENEDICTIO: return 0x82; /* ¹?~•Ÿ */
- case PR_SANCTUARY: return 0x83; /* ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ */
- case PR_MAGNUS: return 0x84; /* ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€ */
- case AL_PNEUMA: return 0x85; /* ƒjƒ…?ƒ} */
- case MG_THUNDERSTORM: return 0x86; /* ƒTƒ“ƒ_?ƒXƒg?ƒ€ */
- case WZ_HEAVENDRIVE: return 0x86; /* ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu */
- case WZ_SIGHTRASHER: return 0x86; /* ƒTƒCƒgƒ‰ƒbƒVƒƒ? */
- case WZ_METEOR: return 0x86; /* ƒƒeƒIƒXƒg?ƒ€ */
- case WZ_VERMILION: return 0x86; /* ƒ?ƒhƒIƒuƒ”ƒ@?ƒ~ƒŠƒIƒ“ */
- case WZ_FROSTNOVA: return 0x86; /* ƒtƒƒXƒgƒmƒ”ƒ@ */
- case WZ_STORMGUST: return 0x86; /* ƒXƒg?ƒ€ƒKƒXƒg(‚Æ‚è‚ ‚¦‚¸LoV‚Æ“¯‚¶‚Å?—) */
- case CR_GRANDCROSS: return 0x86; /* ƒOƒ‰ƒ“ƒhƒNƒƒX */
- case WZ_FIREPILLAR: return (flag==0)?0x87:0x88; /* ƒtƒ@ƒCƒA?ƒsƒ‰? */
- case HT_TALKIEBOX: return 0x99; /* ƒg?ƒL?ƒ{ƒbƒNƒX */
- case WZ_ICEWALL: return 0x8d; /* ƒAƒCƒXƒEƒH?ƒ‹ */
- case WZ_QUAGMIRE: return 0x8e; /* ƒNƒ@ƒOƒ}ƒCƒA */
- case HT_BLASTMINE: return 0x8f; /* ƒuƒ‰ƒXƒgƒ}ƒCƒ“ */
- case HT_SKIDTRAP: return 0x90; /* ƒXƒLƒbƒhƒgƒ‰ƒbƒv */
- case HT_ANKLESNARE: return 0x91; /* ƒAƒ“ƒNƒ‹ƒXƒlƒA */
- case AS_VENOMDUST: return 0x92; /* ƒxƒmƒ€ƒ_ƒXƒg */
- case HT_LANDMINE: return 0x93; /* ƒ‰ƒ“ƒhƒ}ƒCƒ“ */
- case HT_SHOCKWAVE: return 0x94; /* ƒVƒ‡ƒbƒNƒEƒF?ƒuƒgƒ‰ƒbƒv */
- case HT_SANDMAN: return 0x95; /* ƒTƒ“ƒhƒ}ƒ“ */
- case HT_FLASHER: return 0x96; /* ƒtƒ‰ƒbƒVƒƒ? */
- case HT_FREEZINGTRAP: return 0x97; /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
- case HT_CLAYMORETRAP: return 0x98; /* ƒNƒŒƒCƒ‚ƒA?ƒgƒ‰ƒbƒv */
- case SA_VOLCANO: return 0x9a; /* ƒ{ƒ‹ƒP?ƒm */
- case SA_DELUGE: return 0x9b; /* ƒfƒŠƒ…?ƒW */
- case SA_VIOLENTGALE: return 0x9c; /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
- case SA_LANDPROTECTOR: return 0x9d; /* ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^? */
- case BD_LULLABY: return 0x9e; /* ŽqŽç‰Ì */
- case BD_RICHMANKIM: return 0x9f; /* ƒjƒˆƒ‹ƒh‚̉ƒ */
- case BD_ETERNALCHAOS: return 0xa0; /* ‰i‰“‚̬“× */
- case BD_DRUMBATTLEFIELD:return 0xa1; /* ?‘¾ŒÛ‚Ì‹¿‚« */
- case BD_RINGNIBELUNGEN: return 0xa2; /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
- case BD_ROKISWEIL: return 0xa3; /* ƒƒL‚Ì‹©‚Ñ */
- case BD_INTOABYSS: return 0xa4; /* [•£‚Ì’†‚É */
- case BD_SIEGFRIED: return 0xa5; /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
- case BA_DISSONANCE: return 0xa6; /* •s‹¦˜a‰¹ */
- case BA_WHISTLE: return 0xa7; /* Œû“J */
- case BA_ASSASSINCROSS: return 0xa8; /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
- case BA_POEMBRAGI: return 0xa9; /* ƒuƒ‰ƒM‚ÌŽ */
- case BA_APPLEIDUN: return 0xaa; /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
- case DC_UGLYDANCE: return 0xab; /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
- case DC_HUMMING: return 0xac; /* ƒnƒ~ƒ“ƒO */
- case DC_DONTFORGETME: return 0xad; /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
- case DC_FORTUNEKISS: return 0xae; /* K‰^‚̃LƒX */
- case DC_SERVICEFORYOU: return 0xaf; /* ƒT?ƒrƒXƒtƒH?ƒ†? */
- case RG_GRAFFITI: return 0xb0; /* ƒOƒ‰ƒtƒBƒeƒB */
- case AM_DEMONSTRATION: return 0xb1; /* ƒfƒ‚ƒ“ƒXƒgƒŒ?ƒVƒ‡ƒ“ */
- case WE_CALLPARTNER: return 0xb2; /* ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢ */
- case PA_GOSPEL: return 0xb3; /* ƒSƒXƒyƒ‹ */
- case HP_BASILICA: return 0xb4; /* ƒoƒWƒŠƒJ */
- case CG_MOONLIT: return 0xb5;
- case PF_FOGWALL: return 0xb6; /* ƒtƒHƒOƒEƒH?ƒ‹ */
- case PF_SPIDERWEB: return 0xb7; /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
- // temporary unit ID's [Celest]
- case GD_LEADERSHIP: return 0xc1;
- case GD_GLORYWOUNDS: return 0xc2;
- case GD_SOULCOLD: return 0xc3;
- case GD_HAWKEYES: return 0xc4;
- }
- return 0;
- /*
- 0x89,0x8a,0x8b •\Ž¦–³‚µ
- 0x9a ‰Š?«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
- 0x9b …?«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
- 0x9c •—?«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
- 0x9d ”’‚¢¬‚³‚ȃGƒtƒFƒNƒg
- 0xb1 Alchemist Demonstration
- 0xb2 = Pink Warp Portal
- 0xb3 = Gospel For Paladin
- 0xb4 = Basilica
- 0xb5 = Empty
- 0xb6 = Fog Wall for Professor
- 0xb7 = Spider Web for Professor
- 0xb8 = Empty
- 0xb9 =
- */
+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];
+
+ printf("Unknown unit layout for skill %d, %d\n",skillid,skilllv);
+ return &skill_unit_layout[0];
}
+// 0x89,0x8a,0x8b •\Ž¦–³‚µ
+// 0x9a ‰Š?«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
+// 0x9b …?«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
+// 0x9c •—?«‚̉r¥‚Ý‚½‚¢‚ȃGƒtƒFƒNƒg
+// 0x9d ”’‚¢¬‚³‚ȃGƒtƒFƒNƒg
+// 0xb1 Alchemist Demonstration
+// 0xb2 = Pink Warp Portal
+// 0xb3 = Gospel For Paladin
+// 0xb4 = Basilica
+// 0xb5 = Empty
+// 0xb6 = Fog Wall for Professor
+// 0xb7 = Spider Web for Professor
+// 0xb8 = Empty
+// 0xb9 =
+
/*==========================================
* ƒ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)
+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[]={
@@ -1006,7 +712,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
struct pet_data *pd=NULL;
int skill,skill2;
- int rate,luk;
+ int rate;
int sc_def_mdef,sc_def_vit,sc_def_int,sc_def_luk;
int sc_def_mdef2,sc_def_vit2,sc_def_int2,sc_def_luk2;
@@ -1014,102 +720,83 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
nullpo_retr(0, src);
nullpo_retr(0, bl);
- //if(skilllv <= 0) return 0;
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ printf("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
- if(src->type==BL_PC){
- nullpo_retr(0, sd=(struct map_session_data *)src);
- }else if(src->type==BL_MOB){
- nullpo_retr(0, md=(struct mob_data *)src); //–¢Žg—pH
- }else if(src->type==BL_PET){
- nullpo_retr(0, pd=(struct pet_data *)src); // [Valaris]
+ if (src->type == BL_PC){
+ nullpo_retr(0, sd = (struct map_session_data *)src);
+ } else if (src->type == BL_MOB){
+ nullpo_retr(0, md = (struct mob_data *)src); //–¢Žg—pH
+ } else if (src->type == BL_PET){
+ nullpo_retr(0, pd = (struct pet_data *)src); // [Valaris]
+ }
+
+ if(bl->type == BL_PC) {
+ nullpo_retr(0, dstsd=(struct map_session_data *)bl);
+ } else if(bl->type == BL_MOB) {
+ nullpo_retr(0, dstmd=(struct mob_data *)bl); //–¢Žg—pH
}
//?Û‚Ì‘Ï«
- luk = battle_get_luk(bl);
- sc_def_mdef=100 - (3 + battle_get_mdef(bl) + luk/3);
- sc_def_vit=100 - (3 + battle_get_vit(bl) + luk/3);
- sc_def_int=100 - (3 + battle_get_int(bl) + luk/3);
- sc_def_luk=100 - (3 + luk);
+ 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);
+
//Ž©•ª‚Ì‘Ï«
- luk = battle_get_luk(src);
- sc_def_mdef2=100 - (3 + battle_get_mdef(src) + luk/3);
- sc_def_vit2=100 - (3 + battle_get_vit(src) + luk/3);
- sc_def_int2=100 - (3 + battle_get_int(src) + luk/3);
- sc_def_luk2=100 - (3 + luk);
- if(bl->type==BL_PC)
- dstsd=(struct map_session_data *)bl;
- else if(bl->type==BL_MOB){
- dstmd=(struct mob_data *)bl; //–¢Žg—pH
- if(sc_def_mdef<50)
- sc_def_mdef=50;
- if(sc_def_vit<50)
- sc_def_vit=50;
- if(sc_def_int<50)
- sc_def_int=50;
- if(sc_def_luk<50)
- sc_def_luk=50;
- }
- if(sc_def_mdef<0)
- sc_def_mdef=0;
- if(sc_def_vit<0)
- sc_def_vit=0;
- if(sc_def_int<0)
- sc_def_int=0;
+ sc_def_mdef2 = status_get_sc_def_mdef(src);
+ sc_def_vit2 = status_get_sc_def_vit(src);
+ sc_def_int2 = status_get_sc_def_int(src);
+ sc_def_luk2 = status_get_sc_def_luk(src);
switch(skillid){
case 0: /* ’ÊíU? */
/* Ž©“®‘é */
- if( sd && 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);
- }
- // ƒXƒiƒbƒ`ƒƒ?
- if(sd && sd->status.weapon != 11 && (skill=pc_checkskill(sd,RG_SNATCHER)) > 0)
- if((skill*15 + 55) + (skill2 = pc_checkskill(sd,TF_STEAL))*10 > rand()%1000) {
+ if(sd) {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ 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);
+ }
+ // ƒXƒiƒbƒ`ƒƒ?
+ if(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); // it's annoying! =p [Celest]
- }
- // ƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒgƒŠ?ƒ|ƒCƒYƒ“(–Ò“Å?‰Ê)
- if (sd && sd->sc_data[SC_EDP].timer != -1 && rand() % 10000 < sd->sc_data[SC_EDP].val2 * sc_def_vit) {
- int mhp = battle_get_max_hp(bl);
- int hp = battle_get_hp(bl);
- int lvl = sd->sc_data[SC_EDP].val1;
- int diff;
- // MHP‚Ì1/4ˆÈ‰º‚É‚Í‚È‚ç‚È‚¢
- if(hp > mhp>>2) {
- if(bl->type == BL_PC) {
- diff = mhp*10/100;
- if (hp - diff < mhp>>2)
- diff = hp - (mhp>>2);
- pc_heal((struct map_session_data *)bl, -hp, 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;
- }
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ // enchant poison has a chance of poisoning enemy
+ if (sd->sc_data[SC_ENCPOISON].timer != -1 && sc_data && sc_data[SC_POISON].timer == -1 &&
+ rand() % 100 < sd->sc_data[SC_ENCPOISON].val1 * sc_def_vit / 100) {
+ status_change_start(bl,SC_POISON,sd->sc_data[SC_ENCPOISON].val1,
+ 0,0,0,skill_get_time2(AS_ENCHANTPOISON,sd->sc_data[SC_ENCPOISON].val1),0);
}
- skill_status_change_start(bl,SC_DPOISON,lvl,0,0,0,skill_get_time2(ASC_EDP,lvl),0);
+ // ƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒgƒŠ?ƒ|ƒCƒYƒ“(–Ò“Å?‰Ê)
+ if (sd->sc_data[SC_EDP].timer != -1 && sc_data && sc_data[SC_DPOISON].timer == -1 &&
+ rand() % 100 < sd->sc_data[SC_EDP].val2 * sc_def_vit / 100)
+ status_change_start(bl,SC_DPOISON,sd->sc_data[SC_EDP].val1,
+ 0,0,0,skill_get_time2(ASC_EDP,sd->sc_data[SC_EDP].val1),0);
}
break;
case SM_BASH: /* ƒoƒbƒVƒ…i‹}ŠU?j */
if( sd && (skill=pc_checkskill(sd,SM_FATALBLOW))>0 ){
if( rand()%100 < 6*(skilllv-5)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(SM_FATALBLOW,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(SM_FATALBLOW,skilllv),0);
}
break;
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 )
- skill_status_change_start(bl,SC_POISON,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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);
@@ -1118,122 +805,140 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
case AS_SONICBLOW: /* ƒ\ƒjƒbƒNƒuƒ? */
if( rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case AS_GRIMTOOTH:
+ if (bl->type == BL_MOB) {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
+ status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
+ }
break;
case HT_FREEZINGTRAP: /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
rate=skilllv*3+35;
if(rand()%100 < rate*sc_def_mdef/100)
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_FREEZE,skilllv,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ƒ”ƒ@ */
- rate=(skilllv*3+35)*sc_def_mdef/100-(battle_get_int(bl)+battle_get_luk(bl))/15;
- rate=rate<=5?5:rate;
- if(rand()%100 < rate)
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
- else if(sd && skillid==MG_FROSTDIVER)
- clif_skill_fail(sd,skillid,0,0);
+ {
+ 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);
+ else if (sd && skillid == MG_FROSTDIVER)
+ clif_skill_fail(sd,skillid,0,0);
+ }
break;
case WZ_STORMGUST: /* ƒXƒg?ƒ€ƒKƒXƒg */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ 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)
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_FREEZE,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 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case HT_SHOCKWAVE: /* ƒVƒ‡ƒbƒNƒEƒF?ƒuƒgƒ‰ƒbƒv */
if(map[bl->m].flag.pvp && dstsd){
dstsd->status.sp -= dstsd->status.sp*(5+15*skilllv)/100;
- pc_calcstatus(dstsd,0);
+ status_calc_pc(dstsd,0);
}
break;
case HT_SANDMAN: /* ƒTƒ“ƒhƒ}ƒ“ */
if( rand()%100 < (5*skilllv+30)*sc_def_int/100 )
- skill_status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case TF_THROWSTONE: /* ΓŠ‚° */
if( rand()%100 < 7*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case CR_HOLYCROSS: /* ƒz?ƒŠ?ƒNƒƒX */
if( rand()%100 < 3*skilllv*sc_def_int/100 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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_DARKGRANDCROSS: /*ˆÅƒOƒ‰ƒ“ƒhƒNƒƒX*/
{
- int race = battle_get_race(bl);
- if( (battle_check_undead(race,battle_get_elem_type(bl)) || race == 6) && rand()%100 < 100000*sc_def_int/100) //?§•t?‚¾‚ªŠ®‘S‘Ï«‚É‚Í–³?
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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);
+ break;
+
case CR_SHIELDCHARGE: /* ƒV?ƒ‹ƒhƒ`ƒƒ?ƒW */
if( rand()%100 < (15 + skilllv*5)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case RG_RAID: /* ƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒN */
if( rand()%100 < (10+3*skilllv)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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)
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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 )
- skill_status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
/* MOB‚̒ljÁ?‰Ê•t‚«ƒXƒLƒ‹ */
case NPC_PETRIFYATTACK:
if(rand()%100 < sc_def_mdef)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
if(src->type==BL_PET)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skilllv*1000,0);
+ 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)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case NPC_MENTALBREAKER:
if(dstsd) {
@@ -1247,126 +952,164 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
//
case WZ_METEOR:
if(rand()%100 < sc_def_vit)
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case WZ_VERMILION:
if(rand()%100 < sc_def_int)
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
// -- moonsoul (stun ability of new champion skill tigerfist)
//
case CH_TIGERFIST:
- if( rand()%100 < (10 + skilllv*10)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case ST_REJECTSWORD: /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
if( rand()%100 < (skilllv*15) )
- skill_status_change_start(bl,SC_AUTOCOUNTER,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_AUTOCOUNTER,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case PF_FOGWALL: /* ƒz?ƒŠ?ƒNƒƒX */
- if( rand()%100 < 3*skilllv*sc_def_int/100 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ if (src != bl) {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (sc_data && sc_data[SC_DELUGE].timer == -1)
+ 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=battle_get_race(bl);
- if( !(battle_check_undead(race,battle_get_elem_type(bl)) || race == 6) && rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_HEADCRUSH,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ int race=status_get_race(bl);
+ if( !(battle_check_undead(race,status_get_elem_type(bl)) || race == 6) && rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
}
break;
case LK_JOINTBEAT: /* ƒWƒ‡ƒCƒ“ƒgƒr?ƒg */
//?Œ‚ª—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚Å“K?‚É
- if( rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_JOINTBEAT,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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 */
{
- if(bl->type == BL_MOB)
- {
- int sec=skill_get_time2(skillid,skilllv);
- if(map[src->m].flag.pvp) //PvP‚Å‚ÍS‘©ŽžŠÔ”¼Œ¸H
- sec = sec/2;
- battle_stopwalking(bl,1);
- skill_status_change_start(bl,SC_SPIDERWEB,skilllv,0,0,0,sec,0);
- }
+ 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,SC_SPIDERWEB,skilllv,0,0,0,sec,0);
}
break;
case ASC_METEORASSAULT: /* ƒƒeƒIƒAƒTƒ‹ƒg */
if( rand()%100 < (15 + skilllv*5)*sc_def_vit/100 ) //?‘ÔˆÙí‚ÍÚׂª•ª‚©‚ç‚È‚¢‚Ì‚Å“K?‚É
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ 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 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case MO_EXTREMITYFIST: /* ˆ¢C—…”e™€Œ */
//ˆ¢C—…‚ðŽg‚¤‚Æ5•ªŠÔŽ©‘R‰ñ•œ‚µ‚È‚¢‚悤‚É‚È‚é
- skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0 );
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0 );
break;
case HW_NAPALMVULCAN: /* ƒiƒp?ƒ€ƒoƒ‹ƒJƒ“ */
// skilllv*5%‚ÌŠm—¦‚ÅŽô‚¢
if (rand()%10000 < 5*skilllv*sc_def_luk)
- skill_status_change_start(bl,SC_CURSE,7,0,0,0,skill_get_time2(NPC_CURSEATTACK,7),0);
+ status_change_start(bl,SC_CURSE,7,0,0,0,skill_get_time2(NPC_CURSEATTACK,7),0);
break;
}
- if(sd && skillid != MC_CARTREVOLUTION && attack_type&BF_WEAPON){ /* ƒJ?ƒh‚É‚æ‚é’ljÁ?‰Ê */
- int i;
+ if((sd||dstsd) && skillid != MC_CARTREVOLUTION && attack_type&BF_WEAPON){ /* ƒJ?ƒh‚É‚æ‚é’ljÁ?‰Ê */
+ int i, type;
int sc_def_card=100;
for(i=SC_STONE;i<=SC_BLIND;i++){
+ type=i-SC_STONE;
//?Û‚É?‘ÔˆÙí
- if(i==SC_STONE || i==SC_FREEZE)
- sc_def_card=sc_def_mdef;
- else if(i==SC_STAN || i==SC_POISON || i==SC_SILENCE)
- sc_def_card=sc_def_vit;
- else if(i==SC_SLEEP || i==SC_CONFUSION || i==SC_BLIND)
- sc_def_card=sc_def_int;
- else if(i==SC_CURSE)
- sc_def_card=sc_def_luk;
-
- if(!sd->state.arrow_atk) {
- if(rand()%10000 < (sd->addeff[i-SC_STONE])*sc_def_card/100 ){
- if(battle_config.battle_log)
- printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",sd->bl.id,i,sd->addeff[i-SC_STONE]);
- skill_status_change_start(bl,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
- }
+ switch (i) {
+ case SC_STONE:
+ case SC_FREEZE:
+ sc_def_card=sc_def_mdef;
+ break;
+ case SC_STAN:
+ case SC_POISON:
+ case SC_SILENCE:
+ 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;
}
- else {
- if(rand()%10000 < (sd->addeff[i-SC_STONE]+sd->arrow_addeff[i-SC_STONE])*sc_def_card/100 ){
- if(battle_config.battle_log)
- printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",sd->bl.id,i,sd->addeff[i-SC_STONE]);
- skill_status_change_start(bl,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
+
+ if (sd) {
+ if(!sd->state.arrow_atk) {
+ if(rand()%10000 < (sd->addeff[type])*sc_def_card/100 ){
+ if(battle_config.battle_log)
+ printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",sd->bl.id,i,sd->addeff[type]);
+ status_change_start(bl,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[type],7),0);
+ }
+ }
+ else {
+ if(rand()%10000 < (sd->addeff[type]+sd->arrow_addeff[type])*sc_def_card/100 ){
+ if(battle_config.battle_log)
+ printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",sd->bl.id,i,sd->addeff[type]);
+ status_change_start(bl,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[type],7),0);
+ }
}
}
//Ž©•ª‚É?‘ÔˆÙí
- if(i==SC_STONE || i==SC_FREEZE)
- sc_def_card=sc_def_mdef2;
- else if(i==SC_STAN || i==SC_POISON || i==SC_SILENCE)
- sc_def_card=sc_def_vit2;
- else if(i==SC_SLEEP || i==SC_CONFUSION || i==SC_BLIND)
- sc_def_card=sc_def_int2;
- else if(i==SC_CURSE)
- sc_def_card=sc_def_luk2;
-
- if(!sd->state.arrow_atk) {
- if(rand()%10000 < (sd->addeff2[i-SC_STONE])*sc_def_card/100 ){
- if(battle_config.battle_log)
- printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",src->id,i,sd->addeff2[i-SC_STONE]);
- skill_status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
- }
+ switch (i) {
+ case SC_STONE:
+ case SC_FREEZE:
+ sc_def_card=sc_def_mdef2;
+ break;
+ case SC_STAN:
+ case SC_POISON:
+ case SC_SILENCE:
+ sc_def_card=sc_def_vit2;
+ break;
+ case SC_SLEEP:
+ case SC_CONFUSION:
+ case SC_BLIND:
+ sc_def_card=sc_def_int2;
+ break;
+ case SC_CURSE:
+ sc_def_card=sc_def_luk2;
}
- else {
- if(rand()%10000 < (sd->addeff2[i-SC_STONE]+sd->arrow_addeff2[i-SC_STONE])*sc_def_card/100 ){
- if(battle_config.battle_log)
- printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",src->id,i,sd->addeff2[i-SC_STONE]);
- skill_status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
+
+ if (sd) {
+ if(!sd->state.arrow_atk) {
+ if(rand()%10000 < (sd->addeff2[type])*sc_def_card/100 ){
+ if(battle_config.battle_log)
+ printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",src->id,i,sd->addeff2[type]);
+ status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[type],7),0);
+ }
+ }
+ else {
+ if(rand()%10000 < (sd->addeff2[type]+sd->arrow_addeff2[type])*sc_def_card/100 ){
+ if(battle_config.battle_log)
+ printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",src->id,i,sd->addeff2[type]);
+ status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[type],7),0);
+ }
}
}
+ if (dstsd && rand()%10000 < dstsd->addeff3[type]*sc_def_card/100){
+ if (dstsd->addeff3_type[type] != 1 && ((sd && !sd->state.arrow_atk) || (status_get_range(src)<=2)))
+ continue;
+ if(battle_config.battle_log)
+ printf("PC %d skill_addeff: card‚É‚æ‚éˆÙí?“® %d %d\n",src->id,i,dstsd->addeff3[type]);
+ status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[type],7),0);
+ }
}
}
return 0;
@@ -1379,7 +1122,7 @@ 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 ret,prev_state=MS_IDLE;
+ int dir,ret,prev_state=MS_IDLE;
int moveblock;
struct map_session_data *sd=NULL;
struct mob_data *md=NULL;
@@ -1390,25 +1133,24 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
nullpo_retr(0, target);
if(target->type==BL_PC){
- nullpo_retr(0, sd=(struct map_session_data *)target);
+ sd=(struct map_session_data *)target;
}else if(target->type==BL_MOB){
- nullpo_retr(0, md=(struct mob_data *)target);
+ md=(struct mob_data *)target;
}else if(target->type==BL_PET){
- nullpo_retr(0, pd=(struct pet_data *)target);
+ pd=(struct pet_data *)target;
}else if(target->type==BL_SKILL){
- nullpo_retr(0, su=(struct skill_unit *)target);
+ su=(struct skill_unit *)target;
}else return 0;
- if(!(count&0x10000 && (sd||md||pd||su))){ /* Žw’è‚È‚µ‚È‚çˆÊ’u?ŒW‚©‚ç•ûŒü‚ð‹‚ß‚é */
- dx=target->x-src->x; dx=(dx>0)?1:((dx<0)?-1: 0);
- dy=target->y-src->y; dy=(dy>0)?1:((dy<0)?-1: 0);
- }
- if(dx==0 && dy==0){
- int dir=battle_get_dir(target);
- if(dir>=0 && dir<8){
- dx=-dirx[dir];
- dy=-diry[dir];
- }
+ 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);
@@ -1456,18 +1198,13 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
if(su){
skill_unit_move_unit_group(su->group,target->m,dx,dy);
}else{
-// struct status_change *sc_data=battle_get_sc_data(target);
- if(moveblock) map_delblock(target);
- target->x=nx;
- target->y=ny;
- if(moveblock) map_addblock(target);
-/*ƒ_ƒ“ƒX’†‚ɃGƒtƒFƒNƒg‚͈ړ®‚µ‚È‚¢‚炵‚¢
- if(sc_data && sc_data[SC_DANCING].timer!=-1){ //?Û‚ªƒ_ƒ“ƒX’†‚Ȃ̂ŃGƒtƒFƒNƒg‚àˆÚ“®
- struct skill_unit_group *sg=(struct skill_unit_group *)sc_data[SC_DANCING].val2;
- if(sg)
- skill_unit_move_unit_group(sg,target->m,dx,dy);
- }
-*/
+ int tick = gettick();
+ skill_unit_move(target,tick,0);
+ if(moveblock) map_delblock(target);
+ target->x=nx;
+ target->y=ny;
+ if(moveblock) map_addblock(target);
+ skill_unit_move(target,tick,1);
}
if(sd) { /* ?–Ê?‚É“ü‚Á‚Ä‚«‚½‚Ì‚Å•\Ž¦ */
@@ -1486,8 +1223,6 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
pd->state.state = prev_state;
}
- skill_unit_move(target,gettick(),(count&0xffff)+7); /* ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì”»’è */
-
return 0;
}
@@ -1510,15 +1245,16 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
struct Damage dmg;
struct status_change *sc_data;
int type,lv,damage;
+ static int tmpdmg = 0;
- if(skilllv <= 0) return 0;
+ if(skillid > 0 && skilllv <= 0) return 0;
rdamage = 0;
nullpo_retr(0, src);
nullpo_retr(0, dsrc);
nullpo_retr(0, bl);
- sc_data = battle_get_sc_data(bl);
+ sc_data = status_get_sc_data(bl);
//‰½‚à‚µ‚È‚¢”»’肱‚±‚©‚ç
if(dsrc->m != bl->m) //?Û‚ª“¯‚¶ƒ}ƒbƒv‚É‚¢‚È‚¯‚ê‚Ή½‚à‚µ‚È‚¢
@@ -1527,11 +1263,11 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
return 0;
if(src->type == BL_PC && pc_isdead((struct map_session_data *)src)) //pŽÒH‚ªPC‚Å‚·‚Å‚ÉŽ€‚ñ‚Å‚¢‚½‚牽‚à‚µ‚È‚¢
return 0;
- if(dsrc->type == BL_PC && pc_isdead((struct map_session_data *)dsrc)) //pŽÒH‚ªPC‚Å‚·‚Å‚ÉŽ€‚ñ‚Å‚¢‚½‚牽‚à‚µ‚È‚¢
+ if(src != dsrc && dsrc->type == BL_PC && pc_isdead((struct map_session_data *)dsrc)) //pŽÒH‚ªPC‚Å‚·‚Å‚ÉŽ€‚ñ‚Å‚¢‚½‚牽‚à‚µ‚È‚¢
return 0;
if(bl->type == BL_PC && pc_isdead((struct map_session_data *)bl)) //?Û‚ªPC‚Å‚·‚Å‚ÉŽ€‚ñ‚Å‚¢‚½‚牽‚à‚µ‚È‚¢
return 0;
- if(bl->type == BL_PC && skillnotok(skillid, (struct map_session_data *) bl))
+ if(bl->type == BL_PC && skillnotok(skillid, (struct map_session_data *)bl))
return 0; // [MouseJstr]
if(sc_data && sc_data[SC_HIDING].timer != -1) { //ƒnƒCƒfƒBƒ“ƒO?‘Ô‚Å
if(skill_get_pl(skillid) != 2) //ƒXƒLƒ‹‚Ì?«‚ª’n?«‚Å‚È‚¯‚ê‚Ή½‚à‚µ‚È‚¢
@@ -1562,27 +1298,30 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
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
if(bl->type == BL_PC) { //?Û‚ªPC‚Ìê‡
- 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(((struct map_session_data *)bl)->status.sp + sp > ((struct map_session_data *)bl)->status.max_sp) { //‰ñ•œSP+Œ»Ý‚ÌSP‚ªMSP‚æ‚è‘å‚«‚¢ê‡
- sp = ((struct map_session_data *)bl)->status.max_sp - ((struct map_session_data *)bl)->status.sp; //SP‚ðMSP-Œ»ÝSP‚É‚·‚é
- ((struct map_session_data *)bl)->status.sp = ((struct map_session_data *)bl)->status.max_sp; //Œ»Ý‚ÌSP‚ÉMSP‚ð‘ã“ü
- }
- else //‰ñ•œSP+Œ»Ý‚ÌSP‚ªMSP‚æ‚謂³‚¢ê‡‚͉ñ•œSP‚ð‰ÁŽZ
- ((struct map_session_data *)bl)->status.sp += sp;
- clif_heal(((struct map_session_data *)bl)->fd,SP_SP,sp); //SP‰ñ•œƒGƒtƒFƒNƒg‚Ì•\Ž¦
- ((struct map_session_data *)bl)->canact_tick = tick + skill_delayfix(bl, skill_get_delay(SA_MAGICROD,sc_data[SC_MAGICROD].val1)); //
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ if (sd) {
+ 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(sd->status.sp + sp > sd->status.max_sp) { //‰ñ•œSP+Œ»Ý‚ÌSP‚ªMSP‚æ‚è‘å‚«‚¢ê‡
+ sp = sd->status.max_sp - sd->status.sp; //SP‚ðMSP-Œ»ÝSP‚É‚·‚é
+ sd->status.sp = sd->status.max_sp; //Œ»Ý‚ÌSP‚ÉMSP‚ð‘ã“ü
+ }
+ else //‰ñ•œSP+Œ»Ý‚ÌSP‚ªMSP‚æ‚謂³‚¢ê‡‚͉ñ•œSP‚ð‰ÁŽZ
+ sd->status.sp += sp;
+ clif_heal(sd->fd,SP_SP,sp); //SP‰ñ•œƒGƒtƒFƒNƒg‚Ì•\Ž¦
+ sd->canact_tick = tick + skill_delayfix(bl, skill_get_delay(SA_MAGICROD,sc_data[SC_MAGICROD].val1)); //
+ }
}
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?—‚±‚±‚Ü‚Å
if(src->type==BL_PET) { // [Valaris]
- dmg.damage=battle_attr_fix(skilllv, skill_get_pl(skillid), battle_get_element(bl) );
+ dmg.damage=battle_attr_fix(skilllv, skill_get_pl(skillid), status_get_element(bl) );
dmg.damage2=0;
}
@@ -1597,7 +1336,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
if(damage <= 0 || damage < dmg.div_) //‚«”ò‚΂µ”»’èH¦
dmg.blewcount = 0;
- if(skillid == CR_GRANDCROSS) {//ƒOƒ‰ƒ“ƒhƒNƒƒX
+ if(skillid == CR_GRANDCROSS||skillid == NPC_DARKGRANDCROSS) {//ƒOƒ‰ƒ“ƒhƒNƒƒX
if(battle_config.gx_disptype) dsrc = src; // “Gƒ_ƒ?ƒW”’•¶Žš•\Ž¦
if( src == bl) type = 4; // ”½“®‚̓_ƒ?ƒWƒ‚?ƒVƒ‡ƒ“‚È‚µ
}
@@ -1608,12 +1347,12 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
nullpo_retr(0, sd);
//˜A‘Ŷ(MO_CHAINCOMBO)‚±‚±‚©‚ç
if(skillid == MO_CHAINCOMBO) {
- int delay = 1000 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src); //Šî–{ƒfƒBƒŒƒC‚ÌŒvŽZ
- if(damage < battle_get_hp(bl)) { //ƒ_ƒ?ƒW‚ª?Û‚ÌHP‚æ‚謂³‚¢ê‡
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src); //Šî–{ƒfƒBƒŒƒC‚ÌŒvŽZ
+ if(damage < status_get_hp(bl)) { //ƒ_ƒ?ƒW‚ª?Û‚ÌHP‚æ‚謂³‚¢ê‡
if(pc_checkskill(sd, MO_COMBOFINISH) > 0 && sd->spiritball > 0) //–Ò—´Œ(MO_COMBOFINISH)Žæ“¾•?‹…•ÛŽŽž‚Í+300ms
delay += 300 * battle_config.combo_delay_rate /100; //’ljÁƒfƒBƒŒƒC‚ðconf‚É‚æ‚è’²®
- skill_status_change_start(src,SC_COMBO,MO_CHAINCOMBO,skilllv,0,0,delay,0); //ƒRƒ“ƒ{?‘Ô‚É
+ status_change_start(src,SC_COMBO,MO_CHAINCOMBO,skilllv,0,0,delay,0); //ƒRƒ“ƒ{?‘Ô‚É
}
sd->attackabletime = sd->canmove_tick = tick + delay;
clif_combo_delay(src,delay); //ƒRƒ“ƒ{ƒfƒBƒŒƒCƒpƒPƒbƒg‚Ì‘—M
@@ -1621,8 +1360,8 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//˜A‘Ŷ(MO_CHAINCOMBO)‚±‚±‚Ü‚Å
//–Ò—´Œ(MO_COMBOFINISH)‚±‚±‚©‚ç
else if(skillid == MO_COMBOFINISH) {
- int delay = 700 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src);
- if(damage < battle_get_hp(bl)) {
+ int delay = 700 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl)) {
//ˆ¢C—…”e™€Œ(MO_EXTREMITYFIST)Žæ“¾•?‹…4ŒÂ•ÛŽ•”š—ô”g“®(MO_EXPLOSIONSPIRITS)?‘ÔŽž‚Í+300ms
//•šŒÕŒ(CH_TIGERFIST)Žæ“¾Žž‚à+300ms
if((pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball >= 4 && sd->sc_data[SC_EXPLOSIONSPIRITS].timer != -1) ||
@@ -1630,7 +1369,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
(pc_checkskill(sd, CH_CHAINCRUSH) > 0 && sd->spiritball > 1))
delay += 300 * battle_config.combo_delay_rate /100; //’ljÁƒfƒBƒŒƒC‚ðconf‚É‚æ‚è’²®
- skill_status_change_start(src,SC_COMBO,MO_COMBOFINISH,skilllv,0,0,delay,0); //ƒRƒ“ƒ{?‘Ô‚É
+ status_change_start(src,SC_COMBO,MO_COMBOFINISH,skilllv,0,0,delay,0); //ƒRƒ“ƒ{?‘Ô‚É
}
sd->attackabletime = sd->canmove_tick = tick + delay;
clif_combo_delay(src,delay); //ƒRƒ“ƒ{ƒfƒBƒŒƒCƒpƒPƒbƒg‚Ì‘—M
@@ -1638,12 +1377,12 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//–Ò—´Œ(MO_COMBOFINISH)‚±‚±‚Ü‚Å
//•šŒÕŒ(CH_TIGERFIST)‚±‚±‚©‚ç
else if(skillid == CH_TIGERFIST) {
- int delay = 1000 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src);
- if(damage < battle_get_hp(bl)) {
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl)) {
if(pc_checkskill(sd, CH_CHAINCRUSH) > 0) //˜A’Œ•ö?(CH_CHAINCRUSH)Žæ“¾Žž‚Í+300ms
delay += 300 * battle_config.combo_delay_rate /100; //’ljÁƒfƒBƒŒƒC‚ðconf‚É‚æ‚è’²®
- skill_status_change_start(src,SC_COMBO,CH_TIGERFIST,skilllv,0,0,delay,0); //ƒRƒ“ƒ{?‘Ô‚É
+ status_change_start(src,SC_COMBO,CH_TIGERFIST,skilllv,0,0,delay,0); //ƒRƒ“ƒ{?‘Ô‚É
}
sd->attackabletime = sd->canmove_tick = tick + delay;
clif_combo_delay(src,delay); //ƒRƒ“ƒ{ƒfƒBƒŒƒCƒpƒPƒbƒg‚Ì‘—M
@@ -1651,13 +1390,13 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//•šŒÕŒ(CH_TIGERFIST)‚±‚±‚Ü‚Å
//˜A’Œ•ö?(CH_CHAINCRUSH)‚±‚±‚©‚ç
else if(skillid == CH_CHAINCRUSH) {
- int delay = 1000 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src);
- if(damage < battle_get_hp(bl)) {
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl)) {
//ˆ¢C—…”e™€Œ(MO_EXTREMITYFIST)Žæ“¾•?‹…4ŒÂ•ÛŽ•”š—ô”g“®(MO_EXPLOSIONSPIRITS)?‘ÔŽž‚Í+300ms
if(pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball >= 4 && sd->sc_data[SC_EXPLOSIONSPIRITS].timer != -1)
delay += 300 * battle_config.combo_delay_rate /100; //’ljÁƒfƒBƒŒƒC‚ðconf‚É‚æ‚è’²®
- skill_status_change_start(src,SC_COMBO,CH_CHAINCRUSH,skilllv,0,0,delay,0); //ƒRƒ“ƒ{?‘Ô‚É
+ status_change_start(src,SC_COMBO,CH_CHAINCRUSH,skilllv,0,0,delay,0); //ƒRƒ“ƒ{?‘Ô‚É
}
sd->attackabletime = sd->canmove_tick = tick + delay;
clif_combo_delay(src,delay); //ƒRƒ“ƒ{ƒfƒBƒŒƒCƒpƒPƒbƒg‚Ì‘—M
@@ -1708,23 +1447,32 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//•ŠíƒXƒLƒ‹H‚±‚±‚Ü‚Å
switch(skillid){
- case WZ_SIGHTRASHER:
- clif_skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, (lv!=0)?lv:skilllv, 5);
- break;
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_MAGIC) { // only display damage for the 2nd attack
+ if (damage + tmpdmg != 0) // if both attacks missed, do not display a 2nd 'miss'
+ clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, damage+tmpdmg, dmg.div_, skillid, skilllv, type);
+ tmpdmg = 0; // clear the temporary damage
+ } else {
+ if (damage == 0) // if weapon attack missed, display the 'miss'
+ clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, 0, dmg.div_, skillid, skilllv, type);
+ tmpdmg = damage; // store the temporary weapon damage
+ }
+ break;
case NPC_SELFDESTRUCTION:
case NPC_SELFDESTRUCTION2:
break;
+ case SN_SHARPSHOOTING:
+ clif_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,0,0,0);
+ break;
default:
clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, (lv!=0)?lv:skilllv, (skillid==0)? 5:type );
}
- if(dmg.blewcount > 0 && !map[src->m].flag.gvg) { /* ‚«”ò‚΂µ?—‚Æ‚»‚̃pƒPƒbƒg */
- if(skillid == WZ_SIGHTRASHER)
- skill_blown(src,bl,dmg.blewcount);
- else
- skill_blown(dsrc,bl,dmg.blewcount);
+ /* ‚«”ò‚΂µˆ—‚Æ‚»‚̃pƒPƒbƒg */
+ if (dmg.blewcount > 0 && bl->type!=BL_SKILL && !map[src->m].flag.gvg) {
+ skill_blown(dsrc,bl,dmg.blewcount);
if(bl->type == BL_MOB)
clif_fixmobpos((struct mob_data *)bl);
else if(bl->type == BL_PET)
@@ -1735,28 +1483,31 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
map_freeblock_lock();
/* ?ۂɃ_ƒ?ƒW?—‚ðs‚¤ */
- if(skillid != KN_BOWLINGBASH || flag)
- battle_damage(src,bl,damage,0);
- if(skillid == RG_INTIMIDATE && damage > 0 && !(battle_get_mode(bl)&0x20) && !map[src->m].flag.gvg ) {
- int s_lv = battle_get_lv(src),t_lv = battle_get_lv(bl);
+ if (skillid || flag) {
+ if (attack_type&BF_WEAPON)
+ battle_delay_damage(tick+dmg.amotion,src,bl,damage,0);
+ else
+ battle_damage(src,bl,damage,0);
+ }
+ if(skillid == RG_INTIMIDATE && damage > 0 && !(status_get_mode(bl)&0x20) && !map[src->m].flag.gvg ) {
+ 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(damage > 0 && dmg.flag&BF_SKILL && bl->type==BL_PC && pc_checkskill((struct map_session_data *)bl,RG_PLAGIARISM) && sc_data[SC_PRESERVE].timer != -1){
+ if(damage > 0 && dmg.flag&BF_SKILL && bl->type==BL_PC && pc_checkskill((struct map_session_data *)bl,RG_PLAGIARISM) && sc_data[SC_PRESERVE].timer == -1){
struct map_session_data *tsd = (struct map_session_data *)bl;
nullpo_retr(0, tsd);
- if(!tsd->status.skill[skillid].id && !tsd->status.skill[skillid].id
- && !(skillid > NPC_PIERCINGATT && skillid < NPC_SUMMONMONSTER) ){
+ if(!tsd->status.skill[skillid].id && !tsd->status.skill[skillid].lv
+ && !(skillid > NPC_PIERCINGATT && skillid < NPC_SUMMONMONSTER)
+ && !(skillid > NPC_SELFDESTRUCTION2 && skillid < NPC_UNDEADATTACK)){
//?‚É?‚ñ‚Å‚¢‚éƒXƒLƒ‹‚ª‚ ‚ê‚ΊY?ƒXƒLƒ‹‚ðÁ‚·
- if (tsd->cloneskill_id && tsd->cloneskill_lv && tsd->status.skill[tsd->cloneskill_id].flag==13){
+ 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->cloneskill_lv=skilllv;
tsd->status.skill[skillid].id=skillid;
tsd->status.skill[skillid].lv=(pc_checkskill(tsd,RG_PLAGIARISM) > skill_get_max(skillid))?
skill_get_max(skillid):pc_checkskill(tsd,RG_PLAGIARISM);
@@ -1766,13 +1517,11 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
}
/* ƒ_ƒ?ƒW‚ª‚ ‚é‚È‚ç’ljÁ?‰Ê”»’è */
if(bl->prev != NULL){
- struct map_session_data *sd = (struct map_session_data *)bl;
- nullpo_retr(0, sd);
- if( bl->type != BL_PC || (sd && !pc_isdead(sd)) ) {
- if(damage > 0)
- skill_additional_effect(src,bl,skillid,skilllv,attack_type,tick);
- if(bl->type==BL_MOB && src!=bl) /* ƒXƒLƒ‹Žg—p?Œ‚ÌMOBƒXƒLƒ‹ */
- {
+ if(!status_isdead(bl)) {
+ if(damage > 0)
+ skill_additional_effect(src,bl,skillid,skilllv,attack_type,tick);
+ if(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);
if(battle_config.mob_changetarget_byskill == 1)
@@ -1814,16 +1563,23 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
if(sd->sp_drain_rate_ > 0 && sp < 1) sp = 1;
else if(sd->sp_drain_rate_ < 0 && sp > -1) sp = -1;
}
- if(hp || sp) pc_heal(sd,hp,sp);
+ 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 != KN_BOWLINGBASH || flag) && rdamage > 0)
- battle_damage(bl,src,rdamage,0);
+ if ((skillid || flag) && rdamage>0) {
+ if (attack_type&BF_WEAPON)
+ battle_delay_damage(tick+dmg.amotion,bl,src,rdamage,0);
+ else
+ battle_damage(bl,src,rdamage,0);
+ }
if(attack_type&BF_WEAPON && sc_data && sc_data[SC_AUTOCOUNTER].timer != -1 && sc_data[SC_AUTOCOUNTER].val4 > 0) {
if(sc_data[SC_AUTOCOUNTER].val3 == dsrc->id)
battle_weapon_attack(bl,dsrc,tick,0x8000|sc_data[SC_AUTOCOUNTER].val1);
- skill_status_change_end(bl,SC_AUTOCOUNTER,-1);
+ status_change_end(bl,SC_AUTOCOUNTER,-1);
}
map_freeblock_unlock();
@@ -1870,9 +1626,8 @@ int skill_area_sub( struct block_list *bl,va_list ap )
static int skill_check_unit_range_sub( struct block_list *bl,va_list ap )
{
struct skill_unit *unit;
- int *c,x,y,range,sx[4],sy[4];
- int t_range,tx[4],ty[4];
- int i,r_flag,skillid;
+ int *c;
+ int skillid,unit_id;
nullpo_retr(0, bl);
nullpo_retr(0, ap);
@@ -1885,57 +1640,46 @@ static int skill_check_unit_range_sub( struct block_list *bl,va_list ap )
if(!unit->alive)
return 0;
- x = va_arg(ap,int);
- y = va_arg(ap,int);
- range = va_arg(ap,int);
skillid = va_arg(ap,int);
+ unit_id = unit->group->unit_id;
- if(skillid == MG_SAFETYWALL || skillid == AL_PNEUMA) {
- if(unit->group->unit_id != 0x7e && unit->group->unit_id != 0x85)
+ if (skillid==MG_SAFETYWALL || skillid==AL_PNEUMA) {
+ if(unit_id != 0x7e && unit_id != 0x85)
return 0;
- }
- else if(skillid == AL_WARP) {
- if((unit->group->unit_id < 0x8f || unit->group->unit_id > 0x99) && unit->group->unit_id != 0x92)
+ } else if (skillid==AL_WARP) {
+ if ((unit_id<0x8f || unit_id>0x99) && unit_id!=0x92)
return 0;
- }
- else if((skillid >= HT_SKIDTRAP && skillid <= HT_CLAYMORETRAP) || skillid == HT_TALKIEBOX) {
- if((unit->group->unit_id < 0x8f || unit->group->unit_id > 0x99) && unit->group->unit_id != 0x92)
+ } else if ((skillid>=HT_SKIDTRAP && skillid<=HT_CLAYMORETRAP) || skillid==HT_TALKIEBOX) {
+ if ((unit_id<0x8f || unit_id>0x99) && unit_id!=0x92)
return 0;
- }
- else if(skillid == WZ_FIREPILLAR) {
- if(unit->group->unit_id != 0x87)
+ } else if (skillid==WZ_FIREPILLAR) {
+ if (unit_id!=0x87)
return 0;
- }
- else return 0;
- t_range=(unit->range!=0)? unit->range:unit->group->range;
- tx[0] = tx[3] = unit->bl.x - t_range;
- tx[1] = tx[2] = unit->bl.x + t_range;
- ty[0] = ty[1] = unit->bl.y - t_range;
- ty[2] = ty[3] = unit->bl.y + t_range;
- sx[0] = sx[3] = x - range;
- sx[1] = sx[2] = x + range;
- sy[0] = sy[1] = y - range;
- sy[2] = sy[3] = y + range;
- for(i=r_flag=0;i<4;i++) {
- if(sx[i] >= tx[0] && sx[i] <= tx[1] && sy[i] >= ty[0] && sy[i] <= ty[2]) {
- r_flag = 1;
- break;
- }
- if(tx[i] >= sx[0] && tx[i] <= sx[1] && ty[i] >= sy[0] && ty[i] <= sy[2]) {
- r_flag = 1;
- break;
- }
- }
- if(r_flag) (*c)++;
+ } else if (skillid==HP_BASILICA) {
+ if ((unit_id<0x8f || unit_id>0x99) && unit_id!=0x92 && unit_id!=0x83)
+ return 0;
+ } else
+ return 0;
+
+ (*c)++;
return 0;
}
-int skill_check_unit_range(int m,int x,int y,int range,int skillid)
+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) {
+ printf("skill_check_unit_range: unsupported layout type %d for skill %d\n",layout_type,skillid);
+ return 0;
+ }
- map_foreachinarea(skill_check_unit_range_sub,m,x-10,y-10,x+10,y+10,BL_SKILL,&c,x,y,range,skillid);
+ // ‚Æ‚è‚ ‚¦‚¸³•ûŒ`‚̃†ƒ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;
}
@@ -1943,6 +1687,8 @@ int skill_check_unit_range(int m,int x,int y,int range,int skillid)
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);
@@ -1954,32 +1700,117 @@ static int skill_check_unit_range2_sub( struct block_list *bl,va_list ap )
if(bl->type == BL_PC && pc_isdead((struct map_session_data *)bl))
return 0;
+ skillid = va_arg(ap,int);
+ if (skillid==HP_BASILICA && bl->type==BL_PC)
+ return 0;
+
(*c)++;
return 0;
}
-int skill_check_unit_range2(int m,int x,int y,int range)
+int skill_check_unit_range2(struct block_list *bl, int m,int x,int y,int skillid, int skilllv)
{
- int c = 0;
+ 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) {
+ printf("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;
+ }
- map_foreachinarea(skill_check_unit_range2_sub,m,x-range,y-range,x+range,y+range,0,&c);
+ // if the caster is a monster/NPC, only check for players
+ // otherwise just check everything
+ if (bl->type == BL_PC)
+ type = 0;
+ 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;
+ struct guild *g;
+ int gid, id;
+ int flag = 0;
+
+ 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;
+
+ g = va_arg(ap,struct guild *);
+ if (guild_checkskill(g, GD_LEADERSHIP)>0) flag |= 1<<0;
+ if (guild_checkskill(g, GD_GLORYWOUNDS)>0) flag |= 1<<1;
+ if (guild_checkskill(g, GD_SOULCOLD)>0) flag |= 1<<2;
+ if (guild_checkskill(g, GD_HAWKEYES)>0) flag |= 1<<3;
+ if (guild_checkskill(g, GD_CHARISMA)>0) flag |= 1<<4;
+
+ if (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‚·‚éBiskill_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(skilllv <= 0) return 0;
if(skill_area_temp[0] < 0xffff)
skill_area_temp[0]++;
return 0;
}
+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;
+}
+
/*==========================================
*
*------------------------------------------
@@ -2017,6 +1848,10 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
nullpo_retr(0, skl);
skl->timer = -1;
+ if (sd) {
+ sd->timerskill_count--;
+ }
+
if(skl->target_id) {
struct block_list tbl;
target = map_id2bl(skl->target_id);
@@ -2045,13 +1880,13 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
break;
case RG_INTIMIDATE:
if(sd && !map[src->m].flag.noteleport) {
- int x,y,i,j,c;
+ 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((c=map_getcell(sd->bl.m,x,y)) != 1 && c != 5)
+ if(map_getcell(sd->bl.m,x,y,CELL_CHKPASS))
break;
}
if(i >= 16) {
@@ -2066,13 +1901,13 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
}
}
else if(md && !map[src->m].flag.monster_noteleport) {
- int x,y,i,j,c;
+ 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((c=map_getcell(md->bl.m,x,y)) != 1 && c != 5)
+ if(map_getcell(md->bl.m,x,y,CELL_CHKPASS))
break;
}
if(i >= 16) {
@@ -2090,11 +1925,26 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
case BA_FROSTJOKE: /* Š¦‚¢ƒWƒ‡?ƒN */
case DC_SCREAM: /* ƒXƒNƒŠ?ƒ€ */
- range=15; //Ž‹ŠE‘S?
+ range=battle_config.area_size; //Ž‹ŠE‘S?
map_foreachinarea(skill_frostjoke_scream,src->m,src->x-range,src->y-range,
src->x+range,src->y+range,0,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;
@@ -2143,6 +1993,7 @@ int skill_addtimerskill(struct block_list *src,unsigned int tick,int target,int
sd->skilltimerskill[i].y = y;
sd->skilltimerskill[i].type = type;
sd->skilltimerskill[i].flag = flag;
+ sd->timerskill_count++;
return 0;
}
@@ -2207,10 +2058,15 @@ int skill_cleartimerskill(struct block_list *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;i++) {
if(sd->skilltimerskill[i].timer != -1) {
delete_timer(sd->skilltimerskill[i].timer, skill_timerskill);
sd->skilltimerskill[i].timer = -1;
+ sd->timerskill_count--;
}
}
}
@@ -2237,27 +2093,37 @@ int skill_cleartimerskill(struct block_list *src)
* iƒXƒpƒQƒbƒeƒB‚ÉŒü‚¯‚Ä‚P?‘OiI(ƒ_ƒƒ|)j
*------------------------------------------
*/
-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_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;
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct map_session_data *sd = NULL, *tsd = NULL;
+ struct status_change *sc_data;
int i;
- if(skilllv <= 0) return 0;
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ printf("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->type==BL_PC)
- sd=(struct map_session_data *)src;
- if(sd && pc_isdead(sd))
+ sc_data = status_get_sc_data(src);
+
+ if (src->type == BL_PC)
+ sd = (struct map_session_data *)src;
+ if (sd && pc_isdead(sd))
return 1;
- if((skillid == WZ_SIGHTRASHER || skillid == CR_GRANDCROSS) && src != bl)
+ if ((skillid == CR_GRANDCROSS || skillid == NPC_DARKGRANDCROSS) && src != bl)
bl = src;
- if(bl->prev == NULL)
+ if (bl->prev == NULL)
return 1;
- if(bl->type == BL_PC && pc_isdead((struct map_session_data *)bl))
+ if (bl->type == BL_PC)
+ tsd = (struct map_session_data *)bl;
+ if (tsd && pc_isdead(tsd))
return 1;
map_freeblock_lock();
@@ -2270,10 +2136,10 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
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 KN_SPEARSTAB: /* ƒXƒsƒAƒXƒ^ƒu */
case RG_RAID: /* ƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒN */
case RG_INTIMIDATE: /* ƒCƒ“ƒeƒBƒ~ƒfƒCƒg */
case BA_MUSICALSTRIKE: /* ƒ~ƒ…?ƒWƒJƒ‹ƒXƒgƒ‰ƒCƒN */
@@ -2282,7 +2148,6 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case CR_HOLYCROSS: /* ƒz?ƒŠ?ƒNƒƒX */
case CR_SHIELDCHARGE:
case CR_SHIELDBOOMERANG:
-
/* ˆÈ‰ºMOB?—p */
/* ??U?ASPŒ¸­U?A‰“‹——£U?A–hŒä–³Ž‹U?A‘½’iU? */
case NPC_PIERCINGATT:
@@ -2311,187 +2176,195 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
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 PA_PRESSURE: /* ƒvƒŒƒbƒVƒƒ? */
- case PA_SACRIFICE: /* ƒTƒNƒŠƒtƒ@ƒCƒX */
- case SN_SHARPSHOOTING: /* ƒVƒƒ?ƒvƒVƒ…?ƒeƒBƒ“ƒO */
case CG_ARROWVULCAN: /* ƒAƒ?ƒoƒ‹ƒJƒ“ */
- case ASC_BREAKER: /* ƒ\ƒEƒ‹ƒuƒŒ?ƒJ? */
case HW_MAGICCRASHER: /* ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ? */
+ case ASC_METEORASSAULT: /* ƒƒeƒIƒAƒTƒ‹ƒg */
+ case ITM_TOMAHAWK:
+ case MO_COMBOFINISH: /* –Ò—´Œ */
+ case CH_CHAINCRUSH: /* ˜A’Œ•ö? */
+ case CH_PALMSTRIKE: /* –ÒŒÕd”hŽR */
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
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 */
+ map_foreachinpath (skill_attack_area,src->m, // function, map
+ src->x,src->y, // source xy
+ bl->x,bl->y, // target xy
+ 2,0, // range, type
+ BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY); // varargs
+ break;
+
+ case PA_PRESSURE: /* ƒvƒŒƒbƒVƒƒ? */
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ if (rand()%100 < 50)
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(PA_PRESSURE,skilllv),0);
+ else
+ status_change_start(bl,SC_BLEEDING,skilllv,0,0,0,skill_get_time2(PA_PRESSURE,skilllv),0);
+ if (tsd) {
+ int sp = tsd->status.max_sp * 10 * skilllv / 100;
+ if (sp > tsd->status.sp) sp = tsd->status.sp;
+ tsd->status.sp -= sp;
+ clif_updatestatus(tsd,SP_SP);
+ }
+ break;
+
case NPC_DARKBREATH:
clif_emotion(src,7);
skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
break;
+
case MO_INVESTIGATE: /* ?™¤ */
{
- struct status_change *sc_data = battle_get_sc_data(src);
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- if(sc_data[SC_BLADESTOP].timer != -1)
- skill_status_change_end(src,SC_BLADESTOP,-1);
+ if (sc_data && sc_data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
}
break;
+
case SN_FALCONASSAULT: /* ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg */
skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
break;
- case KN_BRANDISHSPEAR: /* ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA */
- {
- struct mob_data *md = (struct mob_data *)bl;
- nullpo_retr(1, md);
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- if(md->hp > 0){
- skill_blown(src,bl,skill_get_blewcount(skillid,skilllv));
- if(bl->type == BL_MOB)
- clif_fixmobpos((struct mob_data *)bl);
- else if(bl->type == BL_PET)
- clif_fixpetpos((struct pet_data *)bl);
- else
- clif_fixpos(bl);
- }
- }
- break;
+
case RG_BACKSTAP: /* ƒoƒbƒNƒXƒ^ƒu */
{
- int dir = map_calc_dir(src,bl->x,bl->y),t_dir = battle_get_dir(bl);
- int dist = distance(src->x,src->y,bl->x,bl->y);
- if((dist > 0 && !map_check_dir(dir,t_dir)) || bl->type == BL_SKILL) {
- struct status_change *sc_data = battle_get_sc_data(src);
- if(sc_data && sc_data[SC_HIDING].timer != -1)
- skill_status_change_end(src, SC_HIDING, -1); // ƒnƒCƒfƒBƒ“ƒO‰ðœ
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ int dir = map_calc_dir(src,bl->x,bl->y), t_dir = status_get_dir(bl);
+ int dist = distance(src->x, src->y, bl->x, bl->y);
+ if ((dist > 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 (bl->type == BL_PC)
- ((struct map_session_data *)bl)->dir=dir;
- else if (bl->type == BL_MOB)
- ((struct mob_data *)bl)->dir=dir;
- //skill_blown(src,bl,skill_get_blewcount(skillid,skilllv));
+ if (tsd)
+ tsd->dir = dir;
+ else if (bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
+ if (md) md->dir = dir;
+ }
+ clif_changed_dir(bl);
}
- else if(src->type == BL_PC)
+ else if (sd)
clif_skill_fail(sd,sd->skillid,0,0);
}
break;
case AM_ACIDTERROR: /* ƒAƒVƒbƒhƒeƒ‰? */
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- if(bl->type == BL_PC && rand()%100 < skill_get_time(skillid,skilllv) && battle_config.equipment_breaking)
- pc_breakarmor((struct map_session_data *)bl);
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag);
+ if (tsd && battle_config.equipment_breaking && rand()%100 < skill_get_time(skillid,skilllv)) {
+ pc_breakarmor(tsd);
+ clif_emotion(bl, 23);
+ }
break;
+
case MO_FINGEROFFENSIVE: /* Žw? */
{
- struct status_change *sc_data = battle_get_sc_data(src);
-
- if(!battle_config.finger_offensive_type)
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- else {
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- if(sd) {
- 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;
- }
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ if (battle_config.finger_offensive_type && sd) {
+ 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)
- skill_status_change_end(src,SC_BLADESTOP,-1);
+ if (sc_data && sc_data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
}
break;
+
case MO_CHAINCOMBO: /* ˜A‘Ŷ */
{
- struct status_change *sc_data = battle_get_sc_data(src);
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- if(sc_data && sc_data[SC_BLADESTOP].timer != -1)
- skill_status_change_end(src,SC_BLADESTOP,-1);
+ if (sc_data && sc_data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
}
break;
- case MO_COMBOFINISH: /* –Ò—´Œ */
+
case CH_TIGERFIST: /* •šŒÕŒ */
- case CH_CHAINCRUSH: /* ˜A’Œ•ö? */
- case CH_PALMSTRIKE: /* –ÒŒÕd”hŽR */
+ if (tsd && !(map[bl->m].flag.gvg || map[bl->m].flag.pvp)) {
+ map_freeblock_unlock();
+ return 1;
+ }
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
+
case MO_EXTREMITYFIST: /* ˆ¢C—…”e–PŒ */
{
- struct status_change *sc_data = battle_get_sc_data(src);
+ if(sd) {
+ struct walkpath_data wpd;
+ int dx,dy;
- if(sd) {
- struct walkpath_data wpd;
- int dx,dy;
-
- 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,sd->skillid,0,0);
- break;
+ 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,sd->skillid,0,0);
+ break;
+ }
}
+ sd->to_x = sd->bl.x + dx;
+ sd->to_y = sd->bl.y + dy;
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ 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;
+ pc_movepos(sd,sd->to_x,sd->to_y);
+ status_change_end(&sd->bl,SC_COMBO,-1);
}
- sd->to_x = sd->bl.x + dx;
- sd->to_y = sd->bl.y + dy;
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- 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;
- pc_movepos(sd,sd->to_x,sd->to_y);
- skill_status_change_end(&sd->bl,SC_COMBO,-1);
- }
- else
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- skill_status_change_end(src, SC_EXPLOSIONSPIRITS, -1);
- if(sc_data && sc_data[SC_BLADESTOP].timer != -1)
- skill_status_change_end(src,SC_BLADESTOP,-1);
+ else
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ status_change_end(src, SC_EXPLOSIONSPIRITS, -1);
+ if (sc_data && sc_data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
}
break;
+
/* •ŠíŒn”Í?U?ƒXƒLƒ‹ */
case AC_SHOWER: /* ƒAƒ?ƒVƒƒƒ? */
- case SM_MAGNUM: /* ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN */
case AS_GRIMTOOTH: /* ƒOƒŠƒ€ƒgƒD?ƒX */
case MC_CARTREVOLUTION: /* ƒJ?ƒgƒŒƒ”ƒHƒŠƒ…?ƒVƒ‡ƒ“ */
case NPC_SPLASHATTACK: /* ƒXƒvƒ‰ƒbƒVƒ…ƒAƒ^ƒbƒN */
- case ASC_METEORASSAULT: /* ƒƒeƒIƒAƒTƒ‹ƒg */
case AS_SPLASHER: /* [Valaris] */
if(flag&1){
/* ŒÂ•Ê‚Ƀ_ƒ?ƒW‚ð?‚¦‚é */
if(bl->id!=skill_area_temp[1]){
- int dist=0;
- if(skillid==SM_MAGNUM){ /* ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN‚È‚ç’†S‚©‚ç‚Ì‹——£‚ðŒvŽZ */
- int dx=abs( bl->x - skill_area_temp[2] );
- int dy=abs( bl->y - skill_area_temp[3] );
- dist=((dx>dy)?dx:dy);
- }
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,
- 0x0500|dist );
+ 0x0500);
}
- }else{
- int ar=1;
- int x=bl->x,y=bl->y;
- if( skillid==SM_MAGNUM){
- x=src->x;
- y=src->y;
- }else if(skillid==AC_SHOWER || skillid==ASC_METEORASSAULT) /* ƒAƒ?ƒVƒƒƒ?AƒƒeƒIƒAƒTƒ‹ƒg”Í?5*5 */
- ar=2;
- else if(skillid==AS_SPLASHER) /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ?”Í?3*3 */
- ar=1;
- else if(skillid==NPC_SPLASHATTACK) /* ƒXƒvƒ‰ƒbƒVƒ…ƒAƒ^ƒbƒN‚Í”Í?7*7 */
- ar=3;
-
- // meteor assault cast effect (not sure how else to properly add it =p) [Celest]
- if (skillid == ASC_METEORASSAULT)
- clif_specialeffect(&sd->bl,409, 1);
-
+ } else {
+ int ar = 1;
+ int x = bl->x, y = bl->y;
+ switch (skillid) {
+ case AC_SHOWER:
+ ar=2;
+ break;
+ case NPC_SPLASHATTACK:
+ ar=3;
+ break;
+ }
+
skill_area_temp[1]=bl->id;
skill_area_temp[2]=x;
skill_area_temp[3]=y;
@@ -2502,13 +2375,24 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
bl->m,x-ar,y-ar,x+ar,y+ar,0,
src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
skill_castend_damage_id);
- if (skillid == SM_MAGNUM) // fire element for 10 seconds
- skill_status_change_start(src,SC_FLAMELAUNCHER,0,0,0,0,10000,0);
}
- if (bl->type == BL_MOB && skillid == AS_GRIMTOOTH) {
- struct status_change *sc_data = battle_get_sc_data(bl);
- if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
- skill_status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
+ break;
+
+ case SM_MAGNUM: /* ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN [celest] */
+ if(flag&1 && bl->id != skill_area_temp[1]){
+ int dist = distance (bl->x, bl->y, 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,0,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ status_change_start (src,SC_FLAMELAUNCHER,0,0,0,0,10000,0);
+ clif_skill_nodamage (src,src,skillid,skilllv,1);
}
break;
@@ -2517,13 +2401,11 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
/* ŒÂ•Ê‚Ƀ_ƒ?ƒW‚ð?‚¦‚é */
if(bl->id!=skill_area_temp[1])
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0x0500);
- }
- else {
- int damage;
- map_freeblock_lock();
- damage = skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
- if(damage > 0) {
+ } else {
int i,c; /* ‘¼l‚©‚ç•·‚¢‚½“®‚«‚È‚Ì‚ÅŠÔˆá‚Á‚Ä‚é‰Â”\«‘å•?—¦‚ª?‚¢‚Á‚·„ƒ */
+ /* ‚Ü‚¸ƒ^[ƒQƒbƒg‚ÉUŒ‚‚ð‰Á‚¦‚é */
+ if (!skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0))
+ break;
c = skill_get_blewcount(skillid,skilllv);
if(map[bl->m].flag.gvg) c = 0;
for(i=0;i<c;i++){
@@ -2542,24 +2424,42 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
if(skill_area_temp[0]>1) break;
}
skill_area_temp[1]=bl->id;
- skill_area_temp[2]=bl->x;
- skill_area_temp[3]=bl->y;
/* ‚»‚ÌŒãƒ^?ƒ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,0,
src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
skill_castend_damage_id);
- battle_damage(src,bl,damage,1);
- if(rdamage > 0)
- battle_damage(bl,src,rdamage,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))
+ 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))
+ 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,0,
+ src,skillid,skilllv,tick,flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ x += dirx[dir];
+ y += diry[dir];
}
- map_freeblock_unlock();
}
break;
case ALL_RESURRECTION: /* ƒŠƒUƒŒƒNƒVƒ‡ƒ“ */
case PR_TURNUNDEAD: /* ƒ^?ƒ“ƒAƒ“ƒfƒbƒh */
- if(bl->type != BL_PC && battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)))
+ if(bl->type != BL_PC && battle_check_undead(status_get_race(bl),status_get_elem_type(bl)))
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
else {
map_freeblock_unlock();
@@ -2569,67 +2469,95 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
/* –‚–@ŒnƒXƒLƒ‹ */
case MG_SOULSTRIKE: /* ƒ\ƒEƒ‹ƒXƒgƒ‰ƒCƒN */
- case MG_COLDBOLT: /* ƒR?ƒ‹ƒhƒ{ƒ‹ƒg */
- case MG_FIREBOLT: /* ƒtƒ@ƒCƒA?ƒ{ƒ‹ƒg */
+ case NPC_DARKSOULSTRIKE: /*ˆÅƒ\ƒ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 MG_FROSTDIVER: /* ƒtƒƒXƒgƒ_ƒCƒo? */
- case WZ_JUPITEL: /* ƒ†ƒsƒeƒ‹ƒTƒ“ƒ_? */
+ 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_DARKJUPITEL: /*ˆÅƒ†ƒsƒeƒ‹*/
case NPC_MAGICALATTACK: /* MOB:–‚–@‘Å?U? */
case PR_ASPERSIO: /* ƒAƒXƒyƒ‹ƒVƒI */
-// case HW_NAPALMVULCAN: /* ƒiƒp[ƒ€ƒoƒ‹ƒJƒ“ */
+ case MG_FROSTDIVER: /* ƒtƒƒXƒgƒ_ƒCƒo[ */
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)
- skill_status_change_start(src,SC_WATERBALL,skilllv,bl->id,0,0,0,0);
+ if (skilllv>1) {
+ int cnt,range;
+ range = skilllv>5?2:skilllv/2;
+ if (sd)
+ cnt = skill_count_water(src,range)-1;
+ else
+ cnt = skill_get_num(skillid,skilllv)-1;
+ if (cnt>0)
+ skill_addtimerskill(src,tick+150,bl->id,0,0,
+ skillid,skilllv,cnt,flag);
+ }
break;
case PR_BENEDICTIO: /* ¹?~•Ÿ */
- if(battle_get_race(bl)==1 || battle_get_race(bl)==6)
+ if(status_get_race(bl)==1 || status_get_race(bl)==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ƒ„?ƒ{?ƒ‹ */
- if(flag&1){
+ 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 */
- int dx=abs( bl->x - skill_area_temp[2] );
- int dy=abs( bl->y - skill_area_temp[3] );
- skill_area_temp[0]=((dx>dy)?dx:dy);
+ if (bl->id != skill_area_temp[1]){
+ if(skillid == MG_FIREBALL){ /* ƒtƒ@ƒCƒ„?ƒ{?ƒ‹‚È‚ç’†S‚©‚ç‚Ì‹——£‚ðŒvŽZ */
+ skill_area_temp[0] = distance(bl->x, bl->y, 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=(skillid==MG_NAPALMBEAT)?1:2;
+ } else {
+ int ar;
+ skill_area_temp[0]=0;
skill_area_temp[1]=bl->id;
- if(skillid==MG_NAPALMBEAT){ /* ƒiƒp?ƒ€‚Å‚Íæ‚É?‚¦‚é */
- skill_area_temp[0]=0;
- map_foreachinarea(skill_area_sub,
- bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,0,
- src,skillid,skilllv,tick, flag|BCT_ENEMY ,
- skill_area_sub_count);
- }else{
- skill_area_temp[0]=0;
- skill_area_temp[2]=bl->x;
- skill_area_temp[3]=bl->y;
+ 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,0,
+ 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;
+ /* ƒ^[ƒ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]);
+ break;
+ case WZ_SIGHTRASHER:
+ default:
+ ar = 3;
+ bl = src;
+ status_change_end(src,SC_SIGHT,-1);
+ break;
}
- /* ‚Ü‚¸ƒ^?ƒQƒbƒg‚ÉU?‚ð‰Á‚¦‚é */
- skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,
- skill_area_temp[0] );
- /* ‚»‚ÌŒãƒ^?ƒQƒbƒgˆÈŠO‚Ì”Í??‚Ì“G‘S?‚É?—‚ðs‚¤ */
+ 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,0,
- src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
- skill_castend_damage_id);
+ bl->m,bl->x-ar,bl->y-ar,bl->x+ar,bl->y+ar,0,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
}
break;
@@ -2663,15 +2591,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
case WZ_FROSTNOVA: /* ƒtƒƒXƒgƒmƒ”ƒ@ */
- skill_castend_pos2(src,bl->x,bl->y,skillid,skilllv,tick,0);
- //skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
- map_foreachinarea(skill_attack_area,src->m,src->x-5,bl->y-5,bl->x+5,bl->y+5,0,BF_MAGIC,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
- break;
-
- case WZ_SIGHTRASHER:
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_castend_pos2(src,bl->x,bl->y,skillid,skilllv,tick,0);
- skill_status_change_end(src,SC_SIGHT,-1);
+ map_foreachinarea(skill_attack_area,src->m,src->x-5,bl->y-5,bl->x+5,bl->y+5,0,BF_MAGIC,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
break;
/* ‚»‚Ì‘¼ */
@@ -2697,6 +2617,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
case CR_GRANDCROSS: /* ƒOƒ‰ƒ“ƒhƒNƒƒX */
+ case NPC_DARKGRANDCROSS: /*ˆÅƒ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)
@@ -2710,6 +2631,32 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,0 );
break;
+ // Celest
+ case PF_SOULBURN:
+ {
+ int per = skilllv < 5 ? 20+ skilllv*10 : 60;
+ if (rand()%100 < per) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (skilllv == 5)
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,0 );
+ if (tsd && (map[src->m].flag.pvp || map[src->m].flag.gvg)) {
+ 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: /* Ž©”š */
case NPC_SELFDESTRUCTION2: /* Ž©”š2 */
if(flag&1){
@@ -2726,7 +2673,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
struct mob_data *md;
if((md=(struct mob_data *)src)){
skill_area_temp[1]=bl->id;
- skill_area_temp[2]=battle_get_hp(src);
+ skill_area_temp[2]=status_get_hp(src);
clif_skill_nodamage(src,src,NPC_SELFDESTRUCTION,-1,1);
map_foreachinarea(skill_area_sub,
bl->m,bl->x-5,bl->y-5,bl->x+5,bl->y+5,0,
@@ -2754,6 +2701,14 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
}
}
break;
+
+ // unknown skills [Celest]
+ case NPC_BIND:
+ case NPC_EXPLOSIONSPIRITS:
+ case NPC_INCAGI:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
case 0:
if(sd) {
if(flag&3){
@@ -2772,12 +2727,13 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
default:
+ printf("Unknown skill used:%d\n",skillid);
map_freeblock_unlock();
return 1;
}
if(sc_data) {
if (sc_data[SC_MAGICPOWER].timer != -1 && skillid != HW_MAGICPOWER) //ƒ}ƒWƒbƒNƒpƒ?‚Ì?‰ÊI—¹
- skill_status_change_end(src,SC_MAGICPOWER,-1);
+ status_change_end(src,SC_MAGICPOWER,-1);
}
map_freeblock_unlock();
@@ -2788,107 +2744,96 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
* ƒXƒLƒ‹Žg—pi‰r¥Š®—¹AIDŽw’èŽx‰‡Œnj
*------------------------------------------
*/
-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_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,abra_skillid=0,abra_skilllv;
- int sc_def_vit,sc_def_mdef,strip_fix,strip_time,strip_per;
- int sc_dex,sc_luk;
- //ƒNƒ‰ƒXƒ`ƒFƒ“ƒW—pƒ{ƒXƒ‚ƒ“ƒXƒ^?ID
- int changeclass[]={1038,1039,1046,1059,1086,1087,1112,1115
- ,1157,1159,1190,1272,1312,1373,1492};
- int poringclass[]={1002};
-
- if(skilllv <= 0) return 0;
+ 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
+ printf("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->type==BL_PC)
- sd=(struct map_session_data *)src;
- else if(src->type==BL_MOB)
- md=(struct mob_data *)src;
-
- sc_dex=battle_get_mdef(bl);
- sc_luk=battle_get_luk(bl);
- sc_def_vit = 100 - (3 + battle_get_vit(bl) + battle_get_luk(bl)/3);
- //sc_def_vit = 100 - (3 + battle_get_vit(bl) + battle_get_luk(bl)/3);
- sc_def_mdef = 100 - (3 + battle_get_mdef(bl) + battle_get_luk(bl)/3);
- strip_fix = battle_get_dex(src) - battle_get_dex(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(sc_def_vit>50)
- sc_def_vit=50;
- if(sc_def_mdef>50)
- sc_def_mdef=50;
- }
- if(sc_def_vit < 0)
- sc_def_vit=0;
- if(sc_def_mdef < 0)
- sc_def_mdef=0;
- if(strip_fix < 0)
- strip_fix=0;
-
- if(bl == NULL || bl->prev == NULL)
+ 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_dex = status_get_mdef (bl);
+ sc_luk = status_get_luk (bl);
+ 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)
return 1;
- if(battle_get_class(bl) == 1288)
+ if(status_get_class(bl) == 1288)
return 1;
- if (skillnotok(skillid, (struct map_session_data *)bl)) // [MouseJstr]
+ if (sd && skillnotok(skillid, sd)) // [MouseJstr]
return 0;
-
+
map_freeblock_lock();
switch(skillid)
{
case AL_HEAL: /* ƒq?ƒ‹ */
{
- int heal=skill_calc_heal( src, skilllv );
+ int heal = skill_calc_heal(src, skilllv);
int heal_get_jobexp;
int skill;
- struct pc_base_job s_class;
- if( dstsd && dstsd->special_state.no_magic_damage )
+ if (skilllv > 10)
+ heal = 9999; //9999ƒq[ƒ‹
+ if (dstsd && dstsd->special_state.no_magic_damage)
heal=0; /* ?‹à峃J?ƒhiƒq?ƒ‹—Ê‚Oj */
- if (sd){
- s_class = pc_calc_base_job(sd->status.class);
- 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 && s_class.job == 23 && sd->status.sex == 0) //Ž©•ª‚à?Û‚àPCA?Û‚ªŽ©•ª‚̃p?ƒgƒi?AŽ©•ª‚ªƒXƒpƒmƒrAŽ©•ª‚ªŠ‚È‚ç
+ 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 &&
+ pc_calc_base_job2(sd->status.class_) == 23 && sd->status.sex == 0) //Ž©•ª‚à?Û‚àPCA?Û‚ªŽ©•ª‚̃p?ƒgƒi?AŽ©•ª‚ªƒXƒpƒmƒrAŽ©•ª‚ªŠ‚È‚ç
heal = heal*2; //ƒXƒpƒmƒr‚̉łª’U“߂Ƀq?ƒ‹‚·‚é‚Æ2”{‚É‚È‚é
}
-
- clif_skill_nodamage(src,bl,skillid,heal,1);
+ clif_skill_nodamage (src, bl, skillid, heal, 1);
heal_get_jobexp = battle_heal(NULL,bl,heal,0,0);
// JOB??’lŠl“¾
- if(src->type == BL_PC && bl->type==BL_PC && heal > 0 && src != bl && battle_config.heal_exp > 0){
+ 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)
+ if (heal_get_jobexp <= 0)
heal_get_jobexp = 1;
- pc_gainexp((struct map_session_data *)src,0,heal_get_jobexp);
+ pc_gainexp (sd, 0, heal_get_jobexp);
}
}
break;
case ALL_RESURRECTION: /* ƒŠƒUƒŒƒNƒVƒ‡ƒ“ */
- if(bl->type==BL_PC){
- int per=0;
- struct map_session_data *tsd = (struct map_session_data*)bl;
- nullpo_retr(1, tsd);
- if( (map[bl->m].flag.pvp) && tsd->pvp_point<0 )
+ if(dstsd) {
+ int per = 0;
+ if (map[bl->m].flag.pvp && dstsd->pvp_point < 0)
break; /* PVP‚Å•œŠˆ•s‰Â”\?‘Ô */
- if(pc_isdead(tsd)){ /* Ž€–S”»’è */
+ if (pc_isdead(dstsd)) { /* Ž€–S”»’è */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
switch(skilllv){
case 1: per=10; break;
@@ -2896,139 +2841,153 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case 3: per=50; break;
case 4: per=80; break;
}
- tsd->status.hp=tsd->status.max_hp*per/100;
- if(tsd->status.hp<=0) tsd->status.hp=1;
- if(tsd->special_state.restart_full_recover ){ /* ƒIƒVƒŠƒXƒJ?ƒh */
- tsd->status.hp=tsd->status.max_hp;
- tsd->status.sp=tsd->status.max_sp;
+ 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(tsd);
+ pc_setstand(dstsd);
if(battle_config.pc_invincible_time > 0)
- pc_setinvincibletimer(tsd,battle_config.pc_invincible_time);
- clif_updatestatus(tsd,SP_HP);
- clif_resurrection(&tsd->bl,1);
- if(src != bl && sd && battle_config.resurrection_exp > 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 = tsd->status.base_level - sd->status.base_level, jlv = tsd->status.job_level - sd->status.job_level;
+ 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)tsd->status.base_exp * (double)lv * (double)battle_config.resurrection_exp / 1000000.);
- if(exp < 1) exp = 1;
+ 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)tsd->status.job_exp * (double)lv * (double)battle_config.resurrection_exp / 1000000.);
- if(jexp < 1) jexp = 1;
+ 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);
+ pc_gainexp (sd, exp, jexp);
}
}
}
break;
case AL_DECAGI: /* ‘¬“xŒ¸­ */
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if (dstsd && dstsd->special_state.no_magic_damage)
break;
- if( rand()%100 < (50+skilllv*3+(battle_get_lv(src)+battle_get_int(src)/5)-sc_def_mdef) ) {
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ if (rand() % 100 < (50 + skilllv * 3 + (status_get_lv(src) + status_get_int(src) / 5) - sc_def_mdef)) {
+ 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 AL_CRUCIS:
- if(flag&1) {
- int race = battle_get_race(bl),ele = battle_get_elem_type(bl);
- if(battle_check_target(src,bl,BCT_ENEMY) && (race == 6 || battle_check_undead(race,ele))) {
- int slv=battle_get_lv(src),tlv=battle_get_lv(bl),rate;
- rate = 25 + skilllv*2 + slv - tlv;
- if(rand()%100 < rate)
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,0,0);
+ 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 = 25 + skilllv*2 + slv - tlv;
+ if (rand()%100 < rate)
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,0,0);
}
- }
- else {
- int range = 15;
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ } else {
+ clif_skill_nodamage(src, bl, skillid, skilllv, 1);
map_foreachinarea(skill_area_sub,
- src->m,src->x-range,src->y-range,src->x+range,src->y+range,0,
- src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ src->m, src->x-15, src->y-15, src->x+15, src->y+15, 0,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
skill_castend_nodamage_id);
}
break;
case PR_LEXDIVINA: /* ƒŒƒbƒNƒXƒfƒBƒr?ƒi */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ struct status_change *sc_data = status_get_sc_data(bl);
+ clif_skill_nodamage (src, bl, skillid, skilllv, 1);
+ if (dstsd && dstsd->special_state.no_magic_damage)
break;
- if(sc_data && sc_data[SC_DIVINA].timer != -1)
- skill_status_change_end(bl,SC_DIVINA,-1);
- else if( rand()%100 < sc_def_vit ) {
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ if (sc_data && sc_data[SC_DIVINA].timer != -1)
+ status_change_end(bl,SC_DIVINA, -1);
+ else if (rand() % 100 < sc_def_vit) {
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
}
}
break;
+
case SA_ABRACADABRA:
- //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,sd->skillid,0,0);
- break;
+ {
+ int abra_skillid = 0, abra_skilllv;
+ //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,sd->skillid,0,0);
+ break;
+ }
+ pc_delitem(sd, i, 1, 0);
+ do {
+ abra_skillid = rand() % 331;
+ 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);
+ sd->skillitem = abra_skillid;
+ sd->skillitemlv = abra_skilllv;
+ clif_item_skill (sd, abra_skillid, abra_skilllv, "Abracadabra");
}
- //pc_delitem(sd, pc_search_inventory(sd, 715), 1, 0);
- pc_delitem(sd, i, 1, 0);
- //
- do{
- abra_skillid=skill_abra_dataset(skilllv);
- }while(abra_skillid == 0);
- abra_skilllv=skill_get_max(abra_skillid)>pc_checkskill(sd,SA_ABRACADABRA)?pc_checkskill(sd,SA_ABRACADABRA):skill_get_max(abra_skillid);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- sd->skillitem=abra_skillid;
- sd->skillitemlv=abra_skilllv;
- clif_item_skill(sd,abra_skillid,abra_skilllv,"ƒAƒuƒ‰ƒJƒ_ƒuƒ‰");
break;
+
case SA_COMA:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
- break;
- if(dstsd){
- dstsd->status.hp=1;
- dstsd->status.sp=1;
- clif_updatestatus(dstsd,SP_HP);
- clif_updatestatus(dstsd,SP_SP);
+ if (dstsd) {
+ if (dstsd->special_state.no_magic_damage)
+ break;
+ dstsd->status.hp = 1;
+ dstsd->status.sp = 1;
+ clif_updatestatus(dstsd, SP_HP);
+ clif_updatestatus(dstsd, SP_SP);
}
- if(dstmd) dstmd->hp=1;
+ if(dstmd) dstmd->hp = 1;
break;
case SA_FULLRECOVERY:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
- break;
- if(dstsd) pc_heal(dstsd,dstsd->status.max_hp,dstsd->status.max_sp);
- if(dstmd) dstmd->hp=battle_get_max_hp(&dstmd->bl);
+ if (dstsd) {
+ if (dstsd->special_state.no_magic_damage)
+ break;
+ pc_heal (dstsd, dstsd->status.max_hp, dstsd->status.max_sp);
+ }
+ 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[sd->bl.m].name,sd->bl.x,sd->bl.y,"--ja--",-1,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);
+ 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);
if (sd) pc_damage(NULL,sd,sd->status.max_hp);
break;
-
case SA_QUESTION:
case SA_GRAVITY:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
break;
case SA_CLASSCHANGE:
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(dstmd) mob_class_change(dstmd,changeclass);
+ {
+ //ƒNƒ‰ƒXƒ`ƒFƒ“ƒW—pƒ{ƒXƒ‚ƒ“ƒXƒ^?ID
+ int changeclass[]={1038,1039,1046,1059,1086,1087,1112,1115
+ ,1157,1159,1190,1272,1312,1373,1492};
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstmd) mob_class_change(dstmd,changeclass);
+ }
break;
case SA_MONOCELL:
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(dstmd) mob_class_change(dstmd,poringclass);
+ {
+ int poringclass[]={1002};
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstmd) mob_class_change(dstmd,poringclass);
+ }
break;
case SA_DEATH:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -3041,19 +3000,20 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case SA_FORTUNE:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(sd) pc_getzeny(sd,battle_get_lv(bl)*100);
+ if(sd) pc_getzeny(sd,status_get_lv(bl)*100);
break;
case SA_TAMINGMONSTER:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if (dstmd){
- for(i=0;i<MAX_PET_DB;i++){
- if(dstmd->class == pet_db[i].class){
- pet_catch_process1(sd,dstmd->class);
+ if (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:
@@ -3062,38 +3022,37 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case PR_SUFFRAGIUM: /* ƒTƒtƒ‰ƒMƒEƒ€ */
case PR_BENEDICTIO: /* ¹?~•Ÿ */
case CR_PROVIDENCE: /* ƒvƒƒ”ƒBƒfƒ“ƒX */
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage ){
+ if (dstsd && dstsd->special_state.no_magic_damage)
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- }else{
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),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 CG_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
- if(sd && dstsd){
- struct status_change *sc_data = battle_get_sc_data(src);
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ if (sd && dstsd){
+ 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((dstsd->bl.type!=BL_PC)
- || (sd->bl.id == dstsd->bl.id)
+
+ if ((sd == dstsd)
|| (!sd->status.party_id)
- || (sd->status.party_id != dstsd->status.party_id)) {
+ || (sd->status.party_id != dstsd->status.party_id)) {
clif_skill_fail(sd,skillid,0,0);
map_freeblock_unlock();
return 1;
}
if(sc_data && tsc_data){
- if(sc_data[sc].timer == -1 && tsc_data[sc2].timer == -1) {
- skill_status_change_start (src,sc,skilllv,0,bl->id,0,skill_get_time(skillid,skilllv),0);
- skill_status_change_start (bl,sc2,skilllv,0,src->id,0,skill_get_time(skillid,skilllv),0);
+ 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);
}
else if (sc_data[sc].timer != -1 && tsc_data[sc2].timer != -1 &&
- sc_data[sc].val3 == bl->id && tsc_data[sc2].val3 == src->id) {
- skill_status_change_end(src, sc, -1);
- skill_status_change_end(bl, sc2, -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);
}
else {
clif_skill_fail(sd,skillid,0,0);
@@ -3102,57 +3061,60 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
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(bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage ){
- clif_skill_nodamage(src,bl,skillid,skilllv,0);
- break;
- }
- if(bl->type==BL_PC) {
- struct map_session_data *sd2=(struct map_session_data *)bl;
- if(sd2->status.weapon==0 || sd2->sc_data[SC_FLAMELAUNCHER].timer!=-1 || sd2->sc_data[SC_FROSTWEAPON].timer!=-1 ||
- sd2->sc_data[SC_LIGHTNINGLOADER].timer!=-1 || sd2->sc_data[SC_SEISMICWEAPON].timer!=-1 ||
- sd2->sc_data[SC_ENCPOISON].timer!=-1) {
- clif_skill_fail(sd,skillid,0,0);
+ if (dstsd) {
+ if (dstsd->special_state.no_magic_damage) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ if(dstsd->status.weapon == 0 ||
+ (sd && sd->status.party_id > 0 && sd->status.party_id != dstsd->status.party_id) ||
+ dstsd->sc_data[SC_FLAMELAUNCHER].timer != -1 ||
+ dstsd->sc_data[SC_FROSTWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_LIGHTNINGLOADER].timer != -1 ||
+ dstsd->sc_data[SC_SEISMICWEAPON].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(rand()%100 > (75+skilllv*1) && (skilllv != 5)) {
- clif_skill_fail(sd,skillid,0,0);
+ if(skilllv < 5 && rand()%100 > (60+skilllv*10) ) { //fixed by Lupus (4 -> 5) or else it has 100% success even at lv4
+ if (sd) clif_skill_fail(sd,skillid,0,0);
clif_skill_nodamage(src,bl,skillid,skilllv,0);
- if(bl->type==BL_PC && battle_config.equipment_breaking) {
- struct map_session_data *sd2=(struct map_session_data *)bl;
- if(sd!=sd2) clif_displaymessage(sd->fd,"You broke target's weapon");
- pc_breakweapon(sd2);
+ if(dstsd && battle_config.equipment_breaking) {
+ if(sd && sd != dstsd) clif_displaymessage(sd->fd,"You broke target's weapon");
+ pc_breakweapon(dstsd);
}
break;
- }
- else {
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),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 PR_ASPERSIO: /* ƒAƒXƒyƒ‹ƒVƒI */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if (dstsd && dstsd->special_state.no_magic_damage)
break;
- if(bl->type==BL_MOB)
+ if (dstmd)
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
+
case PR_KYRIE: /* ƒLƒŠƒGƒGƒŒƒCƒ\ƒ“ */
clif_skill_nodamage(bl,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if (dstsd && dstsd->special_state.no_magic_damage)
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
+
case KN_AUTOCOUNTER: /* ƒI?ƒgƒJƒEƒ“ƒ^? */
case KN_TWOHANDQUICKEN: /* ƒc?ƒnƒ“ƒhƒNƒCƒbƒPƒ“ */
case CR_SPEARQUICKEN: /* ƒXƒsƒAƒNƒCƒbƒPƒ“ */
@@ -3176,68 +3138,87 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case ST_REJECTSWORD: /* ƒŠƒWƒFƒNƒgƒ\?ƒh */
case HW_MAGICPOWER: /* –‚–@—Í?• */
case PF_MEMORIZE: /* ƒƒ‚ƒ‰ƒCƒY */
+ case PA_SACRIFICE:
case ASC_EDP: // [Celest]
+ case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
+
case SM_ENDURE: /* ƒCƒ“ƒfƒ…ƒA */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,10000,0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ if (sd)
+ pc_blockskill_start (sd, skillid, 10000);
break;
-
-
+
+ case SM_AUTOBERSERK: // Celest
+ {
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int sc = SkillStatusChangeTable[skillid];
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ 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);
+ }
+ break;
+
case AS_ENCHANTPOISON: // Prevent spamming [Valaris]
- if(bl->type==BL_PC) {
- struct map_session_data *sd2=(struct map_session_data *)bl;
- if(sd2->sc_data[SC_FLAMELAUNCHER].timer!=-1 || sd2->sc_data[SC_FROSTWEAPON].timer!=-1 ||
- sd2->sc_data[SC_LIGHTNINGLOADER].timer!=-1 || sd2->sc_data[SC_SEISMICWEAPON].timer!=-1 ||
- sd2->sc_data[SC_ENCPOISON].timer!=-1) {
- clif_skill_nodamage(src,bl,skillid,skilllv,0);
- clif_skill_fail(sd,skillid,0,0);
- break;
+ if (dstsd) {
+ if(dstsd->sc_data[SC_FLAMELAUNCHER].timer != -1 ||
+ dstsd->sc_data[SC_FROSTWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_LIGHTNINGLOADER].timer != -1 ||
+ dstsd->sc_data[SC_SEISMICWEAPON].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;
}
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
+
case LK_TENSIONRELAX: /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
pc_setsit(sd);
clif_sitting(sd);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case LK_BERSERK: /* ƒo?ƒT?ƒN */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
//sd->status.hp = sd->status.max_hp * 3;
break;
+
case MC_CHANGECART:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
break;
+
case AC_CONCENTRATION: /* W’†—ÍŒüã */
{
int range = 1;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- map_foreachinarea( skill_status_change_timer_sub,
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ map_foreachinarea( status_change_timer_sub,
src->m, src->x-range, src->y-range, src->x+range,src->y+range,0,
src,SkillStatusChangeTable[skillid],tick);
}
break;
+
case SM_PROVOKE: /* ƒvƒƒ{ƒbƒN */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
/* MVPmob‚Æ•sŽ€‚É‚Í?‚©‚È‚¢ */
- if((bl->type==BL_MOB && battle_get_mode(bl)&0x20) || battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl))) //•sŽ€‚É‚Í?‚©‚È‚¢
- {
+ if((dstmd && status_get_mode(bl)&0x20) || battle_check_undead(status_get_race(bl),status_get_elem_type(bl))) { //•sŽ€‚É‚Í?‚©‚È‚¢
map_freeblock_unlock();
return 1;
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
if(dstmd && dstmd->skilltimer!=-1 && dstmd->state.skillcastcancel) // ‰r¥–WŠQ
skill_castcancel(bl,0);
@@ -3247,18 +3228,17 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(sc_data){
if(sc_data[SC_FREEZE].timer!=-1)
- skill_status_change_end(bl,SC_FREEZE,-1);
+ status_change_end(bl,SC_FREEZE,-1);
if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
- skill_status_change_end(bl,SC_STONE,-1);
+ status_change_end(bl,SC_STONE,-1);
if(sc_data[SC_SLEEP].timer!=-1)
- skill_status_change_end(bl,SC_SLEEP,-1);
+ status_change_end(bl,SC_SLEEP,-1);
}
- if(bl->type==BL_MOB) {
+ if(dstmd) {
int range = skill_get_range(skillid,skilllv);
- if(range < 0)
- range = battle_get_range(src) - (range + 1);
- mob_target((struct mob_data *)bl,src,range);
+ dstmd->state.provoke_flag = src->id;
+ mob_target(dstmd,src,range);
}
}
break;
@@ -3266,27 +3246,27 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case CR_DEVOTION: /* ƒfƒBƒ{?ƒVƒ‡ƒ“ */
if(sd && dstsd){
//?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
- struct pc_base_job dst_s_class = pc_calc_base_job(dstsd->status.class);
-
- int lv = sd->status.base_level-dstsd->status.base_level;
- lv = (lv<0)?-lv:lv;
- if((dstsd->bl.type!=BL_PC) // ‘ŠŽè‚ÍPC‚¶‚á‚È‚¢‚Æ‚¾‚ß
- ||(sd->bl.id == dstsd->bl.id) // ‘ŠŽè‚ªŽ©•ª‚Í‚¾‚ß
- ||(lv > 10) // ƒŒƒxƒ‹·}10‚Ü‚Å
- ||(!sd->status.party_id && !sd->status.guild_id) // PT‚É‚àƒMƒ‹ƒh‚É‚àŠ?–³‚µ‚Í‚¾‚ß
- ||((sd->status.party_id != dstsd->status.party_id) // “¯‚¶ƒp?ƒeƒB?‚©A
- &&(sd->status.guild_id != dstsd->status.guild_id)) // “¯‚¶ƒMƒ‹ƒh‚¶‚á‚È‚¢‚Æ‚¾‚ß
- ||(dst_s_class.job==14||dst_s_class.job==21)){ // ƒNƒ‹ƒZ‚¾‚ß
+ int s_class = pc_calc_base_job2 (dstsd->status.class_);
+
+ int lv = sd->status.base_level - dstsd->status.base_level;
+ if (lv < 0) lv = -lv;
+ if ((sd == dstsd) // ‘ŠŽè‚ÍPC‚¶‚á‚È‚¢‚Æ‚¾‚ß
+ || (sd->bl.id == dstsd->bl.id) // ‘ŠŽè‚ªŽ©•ª‚Í‚¾‚ß
+ || (lv > battle_config.devotion_level_difference) // ƒŒƒxƒ‹·}10‚Ü‚Å
+ || (!sd->status.party_id && !sd->status.guild_id) // PT‚É‚àƒMƒ‹ƒh‚É‚àŠ?–³‚µ‚Í‚¾‚ß
+ || ((sd->status.party_id != dstsd->status.party_id) // “¯‚¶ƒp?ƒeƒB?‚©A
+ &&(sd->status.guild_id != dstsd->status.guild_id)) // “¯‚¶ƒMƒ‹ƒh‚¶‚á‚È‚¢‚Æ‚¾‚ß
+ || (s_class == 14 || s_class == 21)) { // ƒNƒ‹ƒZ‚¾‚ß
clif_skill_fail(sd,skillid,0,0);
map_freeblock_unlock();
return 1;
}
- for(i=0;i<skilllv;i++){
- if(!sd->dev.val1[i]){ // ‹ó‚«‚ª‚ ‚Á‚½‚ç“ü‚ê‚é
+ for (i = 0; i < skilllv; i++) {
+ if (!sd->dev.val1[i]) { // ‹ó‚«‚ª‚ ‚Á‚½‚ç“ü‚ê‚é
sd->dev.val1[i] = bl->id;
sd->dev.val2[i] = bl->id;
break;
- }else if(i==skilllv-1){ // ‹ó‚«‚ª‚È‚©‚Á‚½
+ } else if (i == skilllv - 1) { // ‹ó‚«‚ª‚È‚©‚Á‚½
clif_skill_fail(sd,skillid,0,0);
map_freeblock_unlock();
return 1;
@@ -3294,54 +3274,56 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
clif_devotion(sd,bl->id);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],src->id,1,0,0,1000*(15+15*skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],src->id,1,0,0,1000*(15+15*skilllv),0 );
}
- else clif_skill_fail(sd,skillid,0,0);
+ else 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++)
+ for (i = 0; i < 5; i++)
pc_addspiritball(sd,skill_get_time(skillid,skilllv),5);
}
break;
+
case MO_BLADESTOP: // ”’nŽæ‚è
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
+
case MO_ABSORBSPIRITS: // ?’D
i=0;
- if(sd && dstsd) {
- if(sd == dstsd || map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg) {
- if(dstsd->spiritball > 0) {
+ if (dstsd) {
+ if ((sd && sd == dstsd) || map[src->m].flag.pvp || map[src->m].flag.gvg) {
+ if (dstsd->spiritball > 0) {
clif_skill_nodamage(src,bl,skillid,skilllv,1);
i = dstsd->spiritball * 7;
pc_delspiritball(dstsd,dstsd->spiritball,0);
if(i > 0x7FFF)
i = 0x7FFF;
- if(sd->status.sp + i > sd->status.max_sp)
+ if(sd && sd->status.sp + i > sd->status.max_sp)
i = sd->status.max_sp - sd->status.sp;
- }
+ }
}
- }else if(sd && dstmd){ //?Û‚ªƒ‚ƒ“ƒXƒ^?‚Ìê‡
+ } else if (dstmd) { //?Û‚ªƒ‚ƒ“ƒXƒ^?‚Ìê‡
//20%‚ÌŠm—¦‚Å?Û‚ÌLv*2‚ÌSP‚ð‰ñ•œ‚·‚éB¬Œ÷‚µ‚½‚Æ‚«‚̓^?ƒQƒbƒg(ƒÐ?„D?)ƒÐ????!!
- if(rand()%100<20){
- i=2*mob_db[dstmd->class].lv;
+ if(rand() % 100 < 20) {
+ i = 2 * mob_db[dstmd->class_].lv;
mob_target(dstmd,src,0);
}
}
- if(i){
- sd->status.sp += i;
- clif_heal(sd->fd,SP_SP,i);
- }
- else
- clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ if (i && sd){
+ sd->status.sp += i;
+ clif_heal(sd->fd,SP_SP,i);
+ } else clif_skill_nodamage(src,bl,skillid,skilllv,0);
break;
case AC_MAKINGARROW: /* –îì¬ */
@@ -3375,29 +3357,30 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
clif_skill_produce_mix_list(sd,256);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
}
- break;
+ break;
case BS_HAMMERFALL: /* ƒnƒ“ƒ}?ƒtƒH?ƒ‹ */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_weapon_damage )
+ if(dstsd && dstsd->special_state.no_weapon_damage)
break;
- if( rand()%100 < (20+ 10*skilllv)*sc_def_vit/100 ) {
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
- }
+ 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);
break;
case RG_RAID: /* ƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒN */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- {
- int x=bl->x,y=bl->y;
- skill_area_temp[1]=bl->id;
- skill_area_temp[2]=x;
- skill_area_temp[3]=y;
- map_foreachinarea(skill_area_sub,
- bl->m,x-1,y-1,x+1,y+1,0,
- src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
- skill_castend_damage_id);
- }
- skill_status_change_end(src, SC_HIDING, -1); // ƒnƒCƒfƒBƒ“ƒO‰ðœ
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,0,
+ 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,0,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
break;
case KN_BRANDISHSPEAR: /*ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA*/
@@ -3455,30 +3438,29 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
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 (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
/* ŒÂ•Ê‚Ì?— */
clif_skill_nodamage(bl,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if(dstsd && dstsd->special_state.no_magic_damage)
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
- }
- else{
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ } else if (sd) {
/* ƒp?ƒeƒB‘S?‚Ö‚Ì?— */
- party_foreachsamemap(skill_area_sub,
+ 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_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) ){
+ if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
/* ŒÂ•Ê‚Ì?— */
clif_skill_nodamage(bl,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,(src == bl)? 1:0,0,0,skill_get_time(skillid,skilllv),0);
- }
- else{
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,(src == bl)? 1:0,0,0,skill_get_time(skillid,skilllv),0);
+ } else if (sd) {
/* ƒp?ƒeƒB‘S?‚Ö‚Ì?— */
party_foreachsamemap(skill_area_sub,
sd,1,
@@ -3493,66 +3475,54 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case CR_DEFENDER: /* ƒfƒBƒtƒFƒ“ƒ_? */
case CR_AUTOGUARD: /* ƒI?ƒgƒK?ƒh */
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
- int sc=SkillStatusChangeTable[skillid];
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int sc = SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( tsc_data ){
- if( tsc_data[sc].timer==-1 )
- /* •t‰Á‚·‚é */
- skill_status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
- else
- /* ‰ðœ‚·‚é */
- skill_status_change_end(bl, sc, -1);
- }
+ 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);
}
break;
case TF_HIDING: /* ƒnƒCƒfƒBƒ“ƒO */
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
- int sc=SkillStatusChangeTable[skillid];
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int sc = SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,-1,1);
- if( tsc_data ){
- if( tsc_data[sc].timer==-1 )
- /* •t‰Á‚·‚é */
- skill_status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ if (tsc_data && tsc_data[sc].timer != -1)
+ status_change_end(bl, sc, -1);
else
- /* ‰ðœ‚·‚é */
- skill_status_change_end(bl, sc, -1);
- }
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
}
break;
case AS_CLOAKING: /* ƒNƒ?ƒLƒ“ƒO */
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int sc=SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,-1,1);
- if( tsc_data ){
- if( tsc_data[sc].timer==-1 )
- /* •t‰Á‚·‚é */
- skill_status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
- else
+ if(tsc_data && tsc_data[sc].timer!=-1 )
/* ‰ðœ‚·‚é */
- skill_status_change_end(bl, sc, -1);
- }
+ status_change_end(bl, sc, -1);
+ else
+ /* •t‰Á‚·‚é */
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
//skill_check_cloaking(bl);
}
break;
case ST_CHASEWALK: /* ƒnƒCƒfƒBƒ“ƒO */
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int sc=SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,-1,1);
- if( tsc_data ){
- if( tsc_data[sc].timer==-1 )
- /* •t‰Á‚·‚é */
- skill_status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
- else
+ if(tsc_data && tsc_data[sc].timer!=-1 )
/* ‰ðœ‚·‚é */
- skill_status_change_end(bl, sc, -1);
- }
+ status_change_end(bl, sc, -1);
+ else
+ /* •t‰Á‚·‚é */
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
}
break;
@@ -3575,32 +3545,20 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case DC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
case DC_FORTUNEKISS: /* K‰^‚̃LƒX */
case DC_SERVICEFORYOU: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
- case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç */
+// case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç */
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 */
{
- // cancel Basilica if already in effect
- struct status_change *sc_data = battle_get_sc_data(src);
- if(sc_data && sc_data[SC_BASILICA].timer != -1){
- struct skill_unit *su;
- if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) {
- struct skill_unit_group *sg;
- if ((sg = su->group) && sg->src_id == sd->bl.id) {
- skill_status_change_end(src,SC_BASILICA,-1);
- skill_delunitgroup (sg);
- break;
- }
- }
- } else {
- // otherwise allow casting
- skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
- skill_clear_unitgroup(src);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
- }
+ struct skill_unit_group *sg;
+ battle_stopwalking(src,1);
+ skill_clear_unitgroup(src);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,(int)sg,
+ skill_get_time(skillid,skilllv),0);
}
break;
@@ -3608,11 +3566,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
skill_clear_unitgroup(src);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,BCT_SELF,skill_get_time(skillid,skilllv),0);
break;
case BD_ADAPTATION: /* ƒAƒhƒŠƒu */
{
- struct status_change *sc_data = battle_get_sc_data(src);
+ 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,0);
@@ -3636,11 +3595,11 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case RG_STEALCOIN: // ƒXƒeƒB?ƒ‹ƒRƒCƒ“
- if(sd) {
+ if(sd) {
if(pc_steal_coin(sd,bl)) {
int range = skill_get_range(skillid,skilllv);
if(range < 0)
- range = battle_get_range(src) - (range + 1);
+ range = status_get_range(src) - (range + 1);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
mob_target((struct mob_data *)bl,src,range);
}
@@ -3650,17 +3609,41 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case MG_STONECURSE: /* ƒXƒg?ƒ“ƒJ?ƒX */
- if (bl->type==BL_MOB && battle_get_mode(bl)&0x20) {
- clif_skill_fail(sd,sd->skillid,0,0);
- break;
+ {
+ 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 (dstmd && status_get_mode(bl)&0x20) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ break;
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd && dstsd->special_state.no_magic_damage )
+ break;
+ if (sc_data && 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 && !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);
+ 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_range(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,sd->skillid,0,0);
+ break;
+ }
+ pc_delitem(sd, i, skill_db[skillid].amount[0], 0);
+ }
}
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
- break;
- if( rand()%100 < skilllv*4+20 && !battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)))
- skill_status_change_start(bl,SC_STONE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
- else if(sd)
- clif_skill_fail(sd,skillid,0,0);
break;
case NV_FIRSTAID: /* ?‹}Žè? */
@@ -3670,37 +3653,36 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case AL_CURE: /* ƒLƒ…ƒA? */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if(dstsd && dstsd->special_state.no_magic_damage )
break;
- skill_status_change_end(bl, SC_SILENCE , -1 );
- skill_status_change_end(bl, SC_BLIND , -1 );
- skill_status_change_end(bl, SC_CONFUSION, -1 );
- if( battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)) ){//ƒAƒ“ƒfƒbƒh‚È‚çˆÃˆÅ?‰Ê
- skill_status_change_start(bl, SC_CONFUSION,1,0,0,0,6000,0);
+ 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);
}
break;
case TF_DETOXIFY: /* ‰ð“Å */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_end(bl, SC_POISON , -1 );
- skill_status_change_end(bl, SC_DPOISON , -1 );
+ status_change_end(bl, SC_POISON , -1 );
+ status_change_end(bl, SC_DPOISON , -1 );
break;
case PR_STRECOVERY: /* ƒŠƒJƒoƒŠ? */
{
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if(dstsd && dstsd->special_state.no_magic_damage)
break;
- skill_status_change_end(bl, SC_FREEZE , -1 );
- skill_status_change_end(bl, SC_STONE , -1 );
- skill_status_change_end(bl, SC_SLEEP , -1 );
- skill_status_change_end(bl, SC_STAN , -1 );
- if( battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)) ){//ƒAƒ“ƒfƒbƒh‚È‚çˆÃˆÅ?‰Ê
- int blind_time;
- //blind_time=30-battle_get_vit(bl)/10-battle_get_int/15;
- blind_time=30*(100-(battle_get_int(bl)+battle_get_vit(bl))/2)/100;
- if(rand()%100 < (100-(battle_get_int(bl)/2+battle_get_vit(bl)/3+battle_get_luk(bl)/10)))
- skill_status_change_start(bl, SC_BLIND,1,0,0,0,blind_time,0);
+ 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);
+ }
}
if(dstmd){
dstmd->attacked_id=0;
@@ -3713,7 +3695,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case WZ_ESTIMATION: /* ƒ‚ƒ“ƒXƒ^?î•ñ */
- if(src->type==BL_PC){
+ if(sd) {
clif_skill_nodamage(src,bl,skillid,skilllv,1);
clif_skill_estimation((struct map_session_data *)src,bl);
}
@@ -3727,11 +3709,11 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case BS_REPAIRWEAPON: /* •ŠíC— */
if(sd) {
//“®ì‚µ‚È‚¢‚Ì‚Å‚Æ‚è‚ ‚¦‚¸ƒRƒƒ“ƒgƒAƒEƒg
- if (pc_search_inventory(sd, 999) < 0 ) { //fixed by Lupus (item pos can be = 0!)
+ /*if (pc_search_inventory(sd, 999) < 0 ) { //fixed by Lupus (item pos can be = 0!)
clif_skill_fail(sd,sd->skillid,0,0);
map_freeblock_unlock();
return 1;
- }
+ }*/
clif_item_repair_list(sd);
}
break;
@@ -3742,20 +3724,20 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case AL_TELEPORT: /* ƒeƒŒƒ|?ƒg */
- if( sd ){
- if(map[sd->bl.m].flag.noteleport){ /* ƒeƒŒƒ|‹ÖŽ~ */
+ if(sd) {
+ if (map[sd->bl.m].flag.noteleport) { /* ƒeƒŒƒ|‹ÖŽ~ */
clif_skill_teleportmessage(sd,0);
break;
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( sd->skilllv==1 )
+ if(sd->skilllv == 1)
clif_skill_warppoint(sd,sd->skillid,"Random","","","");
- else{
+ else {
clif_skill_warppoint(sd,sd->skillid,"Random",
sd->status.save_point.map,"","");
}
- }else if( bl->type==BL_MOB )
- mob_warp((struct mob_data *)bl,-1,-1,-1,3);
+ } else if(dstmd)
+ mob_warp(dstmd,-1,-1,-1,3);
break;
case AL_HOLYWATER: /* ƒAƒNƒAƒxƒlƒfƒBƒNƒ^ */
@@ -3799,136 +3781,102 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case RG_STRIPWEAPON: /* ƒXƒgƒŠƒbƒvƒEƒFƒ|ƒ“ */
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
-
- if(tsc_data && tsc_data[SC_CP_WEAPON].timer != -1 )
+ 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ƒ‹ƒ€ */
+ {
+ struct status_change *tsc_data;
+ int strip_time, strip_per, strip_fix;
+ int scid, cp_scid = 0, equip;
+
+ tsc_data = status_get_sc_data(bl);
+ scid = SkillStatusChangeTable[skillid];
+ switch (skillid) {
+ case RG_STRIPWEAPON:
+ equip = EQP_WEAPON;
+ cp_scid = SC_CP_WEAPON;
break;
- strip_per = 5+2*skilllv+strip_fix/5;
- strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
- if(rand()%100 < strip_per){
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 );
- if(dstsd){
- for(i=0;i<MAX_INVENTORY;i++){
- if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0002){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
- break;
- }
- }
- }
- }
- }
- break;
-
- case RG_STRIPSHIELD: /* ƒXƒgƒŠƒbƒvƒV?ƒ‹ƒh */
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
-
- if(tsc_data && tsc_data[SC_CP_SHIELD].timer != -1 )
+ case RG_STRIPSHIELD:
+ equip = EQP_SHIELD;
+ cp_scid = SC_CP_SHIELD;
break;
- strip_per = 5+2*skilllv+strip_fix/5;
- strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
- if(rand()%100 < strip_per){
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 );
- if(dstsd){
- for(i=0;i<MAX_INVENTORY;i++){
- if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0020){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
- break;
- }
- }
- }
- }
- }
- break;
-
- case RG_STRIPARMOR: /* ƒXƒgƒŠƒbƒvƒA?ƒ}? */
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
-
- if(tsc_data && tsc_data[SC_CP_ARMOR].timer != -1 )
+ case RG_STRIPARMOR:
+ equip = EQP_ARMOR;
+ cp_scid = SC_CP_ARMOR;
break;
- strip_per = 5+2*skilllv+strip_fix/5;
- strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
- if(rand()%100 < strip_per){
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 );
- if(dstsd){
- for(i=0;i<MAX_INVENTORY;i++){
- if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0010){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
- break;
- }
- }
- }
- }
- }
- break;
-
- case RG_STRIPHELM: /* ƒXƒgƒŠƒbƒvƒwƒ‹ƒ€ */
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
-
- if(tsc_data && tsc_data[SC_CP_HELM].timer != -1 )
+ case RG_STRIPHELM:
+ equip = EQP_HELM;
+ cp_scid = SC_CP_HELM;
break;
- strip_per = 5+2*skilllv+strip_fix/5;
- strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
- if(rand()%100 < strip_per){
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 );
- if(dstsd){
- for(i=0;i<MAX_INVENTORY;i++){
- if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0100){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
- break;
- }
- }
- }
- }
+ default:
+ map_freeblock_unlock();
+ return 1;
}
- break;
- // Full Strip [Celest]
- case ST_FULLSTRIP:
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
- int c=0, i, j;
- int striplist[2][4] = { { 0, 0, 0, 0 },
- { 0x0002, 0x0020, 0x0010, 0x0100 } };
+ if (tsc_data && (tsc_data[scid].timer != -1 || tsc_data[cp_scid].timer != -1))
+ break;
+ if (dstsd && dstsd->unstripable_equip & equip)
+ break;
- strip_per = 5+2*skilllv+strip_fix/5;
- strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
- for (i=0; i<4; i++) {
- if(tsc_data && tsc_data[SC_CP_WEAPON + i].timer != -1)
+ strip_fix = status_get_dex(src) - status_get_dex(bl);
+ if(strip_fix < 0)
+ strip_fix=0;
+ strip_per = 5+5*skilllv+strip_fix/5;
+ if (rand()%100 >= strip_per)
+ break;
+
+ if (dstsd) {
+ for (i=0;i<MAX_INVENTORY;i++) {
+ if (dstsd->status.inventory[i].equip && (dstsd->status.inventory[i].equip & equip)){
+ pc_unequipitem(dstsd,i,3);
break;
- if(rand()%100 < strip_per) {
- striplist[0][i] = 1;
- c++;
}
}
-
- if (c > 0) {
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- for (j=0; j<4 && c > 0; j++) {
- if (striplist[0][j]) {
- skill_status_change_start(bl,SC_STRIPWEAPON + i,skilllv,0,0,0,strip_time,0 );
- if(dstsd){
- for(i=0;i<MAX_INVENTORY;i++){
- if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & striplist[1][j]){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
- --c;
- break;
- }
- }
- }
+ if (i == MAX_INVENTORY)
+ break;
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
+ status_change_start(bl,scid,skilllv,0,0,0,strip_time,0 );
+ break;
+ }
+ case ST_FULLSTRIP: // Celest
+ {
+ struct status_change *tsc_data;
+ int i, j, strip_time, strip_per, strip_fix;
+ int equip[4] = { EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HELM };
+ int scid[4] = { SC_STRIPWEAPON, SC_STRIPSHIELD, SC_STRIPARMOR, SC_STRIPHELM };
+ int cp_scid[4] = { SC_CP_WEAPON, SC_CP_SHIELD, SC_CP_ARMOR, SC_CP_HELM };
+
+ tsc_data = status_get_sc_data(bl);
+ strip_fix = status_get_dex(src) - status_get_dex(bl);
+ if(strip_fix < 0)
+ strip_fix = 0;
+ strip_per = 5+5*skilllv+strip_fix/5;
+ if (rand()%100 >= strip_per)
+ break;
+ strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
+
+ for (i=0; i<4; i++) {
+ if (dstsd) {
+ if (tsc_data && (tsc_data[scid[i]].timer != -1 || tsc_data[cp_scid[i]].timer != -1))
+ continue;
+ if (dstsd->unstripable_equip & equip[i])
+ continue;
+ for (j=0; j<MAX_INVENTORY; j++) {
+ if (dstsd->status.inventory[j].equip && (dstsd->status.inventory[j].equip & equip[i])){
+ pc_unequipitem(dstsd,j,3);
+ break;
}
}
+ if (j == MAX_INVENTORY)
+ continue;
}
+ status_change_start(bl,scid[i],skilllv,0,0,0,strip_time,0 );
}
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
break;
-
+ }
/* PotionPitcher */
case AM_POTIONPITCHER: /* ƒ|?ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ? */
@@ -3936,10 +3884,6 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
struct block_list tbl;
int i,x,hp = 0,sp = 0;
if(sd) {
- if(sd==dstsd) { // cancel use on oneself
- map_freeblock_unlock();
- return 1;
- }
x = skilllv%11 - 1;
i = pc_search_inventory(sd,skill_db[skillid].itemid[x]);
if(i < 0 || skill_db[skillid].itemid[x] <= 0) {
@@ -3959,7 +3903,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
pc_delitem(sd,i,skill_db[skillid].amount[x],0);
sd->state.potionpitcher_flag = 0;
if(sd->potion_per_hp > 0 || sd->potion_per_sp > 0) {
- hp = battle_get_max_hp(bl) * sd->potion_per_hp / 100;
+ hp = status_get_max_hp(bl) * sd->potion_per_hp / 100;
hp = hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
if(dstsd) {
sp = dstsd->status.max_sp * sd->potion_per_sp / 100;
@@ -3969,13 +3913,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
else {
if(sd->potion_hp > 0) {
hp = sd->potion_hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
- hp = hp * (100 + (battle_get_vit(bl)<<1)) / 100;
+ hp = hp * (100 + (status_get_vit(bl)<<1)) / 100;
if(dstsd)
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
}
if(sd->potion_sp > 0) {
sp = sd->potion_sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
- sp = sp * (100 + (battle_get_int(bl)<<1)) / 100;
+ sp = sp * (100 + (status_get_int(bl)<<1)) / 100;
if(dstsd)
sp = sp * (100 + pc_checkskill(dstsd,MG_SRECOVERY)*10) / 100;
}
@@ -3983,7 +3927,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
else {
hp = (1 + rand()%400) * (100 + skilllv*10) / 100;
- hp = hp * (100 + (battle_get_vit(bl)<<1)) / 100;
+ hp = hp * (100 + (status_get_vit(bl)<<1)) / 100;
if(dstsd)
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
}
@@ -4000,39 +3944,16 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
break;
case AM_CP_WEAPON:
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(tsc_data && tsc_data[SC_STRIPWEAPON].timer != -1)
- skill_status_change_end(bl, SC_STRIPWEAPON, -1 );
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- }
- break;
case AM_CP_SHIELD:
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(tsc_data && tsc_data[SC_STRIPSHIELD].timer != -1)
- skill_status_change_end(bl, SC_STRIPSHIELD, -1 );
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- }
- break;
case AM_CP_ARMOR:
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(tsc_data && tsc_data[SC_STRIPARMOR].timer != -1)
- skill_status_change_end(bl, SC_STRIPARMOR, -1 );
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- }
- break;
case AM_CP_HELM:
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ int scid = SC_STRIPWEAPON + (skillid - AM_CP_WEAPON);
+ struct status_change *tsc_data = status_get_sc_data(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(tsc_data && tsc_data[SC_STRIPHELM].timer != -1)
- skill_status_change_end(bl, SC_STRIPHELM, -1 );
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ 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 );
}
break;
@@ -4040,7 +3961,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
{
int i;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if(dstsd && dstsd->special_state.no_magic_damage )
break;
for(i=0;i<136;i++){
if(i==SC_RIDING || i== SC_FALCON || i==SC_HALLUCINATION || i==SC_WEIGHT50
@@ -4048,7 +3969,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
|| i==SC_STRIPHELM || i==SC_CP_WEAPON || i==SC_CP_SHIELD || i==SC_CP_ARMOR
|| i==SC_CP_HELM || i==SC_COMBO)
continue;
- skill_status_change_end(bl,i,-1);
+ status_change_end(bl,i,-1);
}
}
break;
@@ -4056,12 +3977,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case TF_BACKSLIDING: /* ƒoƒbƒNƒXƒeƒbƒv */
battle_stopwalking(src,1);
skill_blown(src,bl,skill_get_blewcount(skillid,skilllv)|0x10000);
- if(src->type == BL_MOB)
- clif_fixmobpos((struct mob_data *)src);
- else if(src->type == BL_PET)
- clif_fixpetpos((struct pet_data *)src);
- else if(src->type == BL_PC)
+ if (sd)
clif_fixpos(src);
+ else if (md)
+ clif_fixmobpos(md);
+ else if (src->type == BL_PET)
+ clif_fixpetpos((struct pet_data *)src);
skill_addtimerskill(src,tick + 200,src->id,0,0,skillid,skilllv,0,flag);
break;
@@ -4077,7 +3998,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case SA_SPELLBREAKER: // ƒXƒyƒ‹ƒuƒŒƒCƒJ?
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
int sp;
if(sc_data && sc_data[SC_MAGICROD].timer != -1) {
if(dstsd) {
@@ -4140,9 +4061,9 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
break;
case SA_MAGICROD:
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if (dstsd && dstsd->special_state.no_magic_damage )
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ 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);
@@ -4173,7 +4094,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
maxlv = 3;
}
if(spellid > 0)
- skill_status_change_start(src,SC_AUTOSPELL,skilllv,spellid,maxlv,0,
+ status_change_start(src,SC_AUTOSPELL,skilllv,spellid,maxlv,0,
skill_get_time(SA_AUTOSPELL,skilllv),0);
}
break;
@@ -4201,14 +4122,14 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case NPC_PROVOCATION:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if(md)
- clif_pet_performance(src,mob_db[md->class].skill[md->skillidx].val[0]);
+ clif_pet_performance(src,mob_db[md->class_].skill[md->skillidx].val[0]);
break;
case NPC_HALLUCINATION:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if(dstsd && dstsd->special_state.no_magic_damage )
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case NPC_KEEPING:
@@ -4216,25 +4137,25 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
{
int skill_time = skill_get_time(skillid,skilllv);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_time,0 );
- if (bl->type == BL_MOB)
- mob_changestate((struct mob_data *)src,MS_DELAY,skill_time);
- else if (bl->type == BL_PC)
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_time,0 );
+ if (md)
+ mob_changestate(md,MS_DELAY,skill_time);
+ else if (sd)
sd->attackabletime = sd->canmove_tick = tick + skill_time;
}
break;
case NPC_DARKBLESSING:
{
- int sc_def = 100 - battle_get_mdef(bl);
+ int sc_def = 100 - status_get_mdef(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ if(dstsd && dstsd->special_state.no_magic_damage )
break;
- if(battle_get_elem_type(bl) == 7 || battle_get_race(bl) == 6)
+ if(status_get_elem_type(bl) == 7 || status_get_race(bl) == 6)
break;
if(rand()%100 < sc_def*(50+skilllv*5)/100) {
if(dstsd) {
- int hp = battle_get_hp(bl)-1;
+ int hp = status_get_hp(bl)-1;
pc_heal(dstsd,-hp,0);
}
else if(dstmd)
@@ -4245,16 +4166,17 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case NPC_SELFDESTRUCTION: /* Ž©”š */
case NPC_SELFDESTRUCTION2: /* Ž©”š2 */
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,0,0,skill_get_time(skillid,skilllv),0);
break;
case NPC_LICK:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_weapon_damage )
- break;
- if(dstsd)
+ if (dstsd) {
+ if (dstsd->special_state.no_weapon_damage )
+ break;
pc_heal(dstsd,0,-100);
+ }
if(rand()%100 < (skilllv*5)*sc_def_vit/100)
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case NPC_SUICIDE: /* Ž©Œˆ */
@@ -4269,26 +4191,106 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case NPC_SUMMONSLAVE: /* Žè‰º¢Š« */
case NPC_SUMMONMONSTER: /* MOB¢Š« */
- if(md && !md->master_id){
- mob_summonslave(md,mob_db[md->class].skill[md->skillidx].val,skilllv,(skillid==NPC_SUMMONSLAVE)?1:0);
+ if(md)
+ mob_summonslave(md,mob_db[md->class_].skill[md->skillidx].val,skilllv,(skillid==NPC_SUMMONSLAVE)?1:0);
+ break;
+
+ case NPC_RECALL: //Žæ‚芪‚«ŒÄ‚Ñ–ß‚µ
+ if(md) {
+ int mobcount;
+ md->recallcount = 0;//‰Šú‰»
+ md->recall_flag = 0;
+ mobcount = mob_countslave(md);
+ if(mobcount > 0) {
+ md->recall_flag = 1; //mob.c‚Ì[Žæ‚芪‚«ƒ‚ƒ“ƒXƒ^[‚̈—]‚Å—˜—p
+ md->recallmob_count = mobcount;
+ }
+ }
+ break;
+
+ case NPC_RUNAWAY: //Œã‘Þ
+ if(md) {
+ int check;
+ int dist = skilllv;//Œã‘Þ‚·‚é‹——£
+ check = md->dir; //Ž©•ª‚ª‚Ç‚Ì•ûŒü‚ÉŒü‚¢‚Ä‚é‚©ƒ`ƒFƒbƒN
+ md->attacked_id = 0;
+ md->target_id = 0;
+ md->state.targettype = NONE_ATTACKABLE;
+ md->state.skillstate = MSS_IDLE;
+ switch (check) {
+ case 0: //Ž©•ª‚ÌŒü‚¢‚Ä‚é•ûŒü‚Æ‹t‚Ɉړ®‚·‚é
+ mob_walktoxy(md,md->bl.x,md->bl.y-dist,0);//‚»‚µ‚ÄAˆÚ“®‚·‚é
+ break;
+ case 1:
+ mob_walktoxy(md,md->bl.x-dist,md->bl.y-dist,0);
+ break;
+ case 2:
+ mob_walktoxy(md,md->bl.x+dist,md->bl.y,0);
+ break;
+ case 3:
+ mob_walktoxy(md,md->bl.x+dist,md->bl.y+dist,0);
+ break;
+ case 4:
+ mob_walktoxy(md,md->bl.x,md->bl.y+dist,0);
+ break;
+ case 5:
+ mob_walktoxy(md,md->bl.x-dist,md->bl.y+dist,0);
+ break;
+ case 6:
+ mob_walktoxy(md,md->bl.x-dist,md->bl.y,0);
+ break;
+ case 7:
+ mob_walktoxy(md,md->bl.x-dist,md->bl.y-dist,0);
+ break;
+ }
}
break;
case NPC_TRANSFORMATION:
case NPC_METAMORPHOSIS:
if(md)
- mob_class_change(md,mob_db[md->class].skill[md->skillidx].val);
+ mob_class_change(md,mob_db[md->class_].skill[md->skillidx].val);
break;
case NPC_EMOTION: /* ƒGƒ‚?ƒVƒ‡ƒ“ */
if(md)
- clif_emotion(&md->bl,mob_db[md->class].skill[md->skillidx].val[0]);
+ clif_emotion(&md->bl,mob_db[md->class_].skill[md->skillidx].val[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.equipment_breaking)
+ pc_breakweapon(dstsd);
+ break;
+
+ case NPC_BREAKARMOR:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd && battle_config.equipment_breaking)
+ pc_breakarmor(dstsd);
+ break;
+
+ case NPC_BREAKHELM:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd && battle_config.equipment_breaking)
+ pc_breakhelm(dstsd);
+ break;
+
+ case NPC_BREAKSHIELD:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd && battle_config.equipment_breaking)
+ pc_breakshield(dstsd);
+ break;
+
+ case NPC_EXPLOSIONSPIRITS: //NPC”š—ô”g“®
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ status_change_start(bl,SC_EXPLOSIONSPIRITS,skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ break;
+
case WE_MALE: /* ŒN‚¾‚¯‚ÍŒì‚é‚æ */
if(sd && dstsd){
int hp_rate=(skilllv <= 0)? 0:skill_db[skillid].hp_rate[skilllv-1];
@@ -4310,27 +4312,85 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(sd && dstsd){
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);
}
break;
+// parent-baby skills
+ case WE_BABY:
+ if(sd && dstsd){
+ 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 && dstsd){
+ 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 || map[dstsd->bl.m].flag.nowarp){
+ clif_skill_teleportmessage(sd,1);
+ map_freeblock_unlock();
+ return 0;
+ }
+ if (f_sd) pc_setpos(f_sd,map[sd->bl.m].name,sd->bl.x,sd->bl.y,3);
+ if (m_sd) pc_setpos(f_sd,map[sd->bl.m].name,sd->bl.x,sd->bl.y,3);
+ }
+ break;
+
+ case WE_CALLBABY:
+ if(sd && dstsd){
+ if((dstsd = pc_get_child(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;
+ }
+ pc_setpos(dstsd,map[sd->bl.m].name,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 conv_hp=0,conv_sp=0;
- conv_hp=sd->status.hp/10; //Šî–{‚ÍHP‚Ì10%
- sd->status.hp -= conv_hp; //HP‚ðŒ¸‚ç‚·
- conv_sp=conv_hp*10*skilllv/100;
- conv_sp=(sd->status.sp+conv_sp>sd->status.max_sp)?sd->status.max_sp-sd->status.sp:conv_sp;
- sd->status.sp += conv_sp; //SP‚ð?‚â‚·
- pc_heal(sd,-conv_hp,conv_sp);
- clif_heal(sd->fd,SP_SP,conv_sp);
+ 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 */
@@ -4346,13 +4406,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
(su->group->unit_id != 0x92)){ //?‚ðŽæ‚è•Ô‚·
if(sd){
if(battle_config.skill_removetrap_type == 1){
- 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);
+ 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);
}
}
@@ -4366,12 +4426,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
}
}
-
+
}
if(su->group->unit_id == 0x91 && su->group->val2){
struct block_list *target=map_id2bl(su->group->val2);
if(target && (target->type == BL_PC || target->type == BL_MOB))
- skill_status_change_end(target,SC_ANKLE,-1);
+ status_change_end(target,SC_ANKLE,-1);
}
skill_delunit(su);
}
@@ -4383,6 +4443,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
struct skill_unit *su=NULL;
if((bl->type==BL_SKILL) && (su=(struct skill_unit *)bl) && (su->group) ){
switch(su->group->unit_id){
+ case 0x91: // 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 0x8f: /* ƒuƒ‰ƒXƒgƒ}ƒCƒ“ */
case 0x90: /* ƒXƒLƒbƒhƒgƒ‰ƒbƒv */
case 0x93: /* ƒ‰ƒ“ƒhƒ}ƒCƒ“ */
@@ -4407,25 +4473,27 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case AS_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
- if((double)battle_get_max_hp(bl)*2/3 < battle_get_hp(bl)) //HP‚ª2/3ˆÈã?‚Á‚Ä‚¢‚½‚玸”s
+ if((double)status_get_max_hp(bl)*2/3 < status_get_hp(bl)) { //HP‚ª2/3ˆÈã?‚Á‚Ä‚¢‚½‚玸”s
+ map_freeblock_unlock();
return 1;
+ }
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,src->id,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000,0 );
break;
case PF_MINDBREAKER: /* ƒvƒƒ{ƒbƒN */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
/* MVPmob‚Æ•sŽ€‚É‚Í?‚©‚È‚¢ */
- if((bl->type==BL_MOB && battle_get_mode(bl)&0x20) || battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl))) //•sŽ€‚É‚Í?‚©‚È‚¢
+ if((dstmd && status_get_mode(bl)&0x20) || battle_check_undead(status_get_race(bl),status_get_elem_type(bl))) //•sŽ€‚É‚Í?‚©‚È‚¢
{
map_freeblock_unlock();
return 1;
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
if(dstmd && dstmd->skilltimer!=-1 && dstmd->state.skillcastcancel) // ‰r¥–WŠQ
skill_castcancel(bl,0);
@@ -4435,22 +4503,55 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(sc_data){
if(sc_data[SC_FREEZE].timer!=-1)
- skill_status_change_end(bl,SC_FREEZE,-1);
+ status_change_end(bl,SC_FREEZE,-1);
if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
- skill_status_change_end(bl,SC_STONE,-1);
+ status_change_end(bl,SC_STONE,-1);
if(sc_data[SC_SLEEP].timer!=-1)
- skill_status_change_end(bl,SC_SLEEP,-1);
+ status_change_end(bl,SC_SLEEP,-1);
}
- if(bl->type==BL_MOB) {
- int range = skill_get_range(skillid,skilllv);
- if(range < 0)
- range = battle_get_range(src) - (range + 1);
- mob_target((struct mob_data *)bl,src,range);
+ if(dstmd)
+ mob_target(dstmd,src,skill_get_range(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;
+ case PF_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_unitsetting(src,skillid,skilllv,bl->x,bl->y,0);
+ break;
+
// Weapon Refining [Celest]
case WS_WEAPONREFINE:
if(sd)
@@ -4461,12 +4562,18 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case CR_SLIMPITCHER:
{
if (sd && flag&1) {
- int hp = sd->potion_hp * (100 + pc_checkskill(sd,CR_SLIMPITCHER)*5 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
- hp = hp * (100 + (battle_get_vit(bl)<<1))/100;
- if (dstsd)
+ struct block_list tbl;
+ int hp = sd->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;
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- battle_heal(src,bl,hp,0,0);
+ }
+ 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;
@@ -4474,13 +4581,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case CR_FULLPROTECTION:
{
int i, skilltime;
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skilltime = skill_get_time(skillid,skilllv);
for (i=0; i<4; i++) {
if(tsc_data && tsc_data[SC_STRIPWEAPON + i].timer != -1)
- skill_status_change_end(bl, SC_STRIPWEAPON + i, -1 );
- skill_status_change_start(bl,SC_CP_WEAPON + i,skilllv,0,0,0,skilltime,0 );
+ status_change_end(bl, SC_STRIPWEAPON + i, -1 );
+ status_change_start(bl,SC_CP_WEAPON + i,skilllv,0,0,0,skilltime,0 );
}
}
break;
@@ -4498,6 +4605,15 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
}
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;
// New guild skills [Celest]
case GD_BATTLEORDER:
@@ -4511,7 +4627,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
if(flag&1) {
if (dstsd && dstsd->status.guild_id == sd->status.guild_id) {
- skill_status_change_start(&dstsd->bl,SC_BATTLEORDERS,skilllv,0,0,0,0,0 );
+ 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)) &&
@@ -4521,6 +4637,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
src->m,src->x-15,src->y-15,src->x+15,src->y+15,0,
src,skillid,skilllv,tick, flag|BCT_ALL|1,
skill_castend_nodamage_id);
+ pc_blockskill_start (sd, skillid, 300000);
}
}
break;
@@ -4535,7 +4652,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
if(flag&1) {
if (dstsd && dstsd->status.guild_id == sd->status.guild_id) {
- skill_status_change_start(&dstsd->bl,SC_REGENERATION,skilllv,0,0,0,0,0 );
+ 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)) &&
@@ -4545,10 +4662,11 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
src->m,src->x-15,src->y-15,src->x+15,src->y+15,0,
src,skillid,skilllv,tick, flag|BCT_ALL|1,
skill_castend_nodamage_id);
+ pc_blockskill_start (sd, skillid, 300000);
}
}
break;
- case GD_RESTORE:
+ case GD_RESTORE:
{
struct guild *g = NULL;
// Only usable during WoE
@@ -4560,8 +4678,8 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(flag&1) {
if (dstsd && dstsd->status.guild_id == sd->status.guild_id) {
int hp, sp;
- hp = dstsd->status.max_hp*0.9;
- sp = dstsd->status.max_sp*0.9;
+ 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);
@@ -4574,6 +4692,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
src->m,src->x-15,src->y-15,src->x+15,src->y+15,0,
src,skillid,skilllv,tick, flag|BCT_ALL|1,
skill_castend_nodamage_id);
+ pc_blockskill_start (sd, skillid, 300000);
}
}
break;
@@ -4581,10 +4700,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
{
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 c, j = 0;
+ int j = 0;
struct guild *g = NULL;
// Only usable during WoE
- if (!agit_flag) {
+ if (!agit_flag ||
+ (sd && map[sd->bl.m].flag.nowarpto && // if not allowed to warp to the map
+ guild_mapname2gc(sd->mapname) == NULL)) { // and it's not a castle...
clif_skill_fail(sd,skillid,0,0);
map_freeblock_unlock();
return 0;
@@ -4594,17 +4715,21 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
strcmp(sd->status.name,g->master)==0) {
for(i = 0; i < g->max_member; i++, j++) {
if (j>8) j=0;
- if ((dstsd = g->member[i].sd) != NULL && sd != dstsd &&
- !map[sd->bl.m].flag.nowarpto && !map[dstsd->bl.m].flag.nowarp) {
+ if ((dstsd = g->member[i].sd) != NULL && sd != dstsd) {
+ if (map[dstsd->bl.m].flag.nowarp &&
+ guild_mapname2gc(sd->mapname) == NULL)
+ continue;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if ((c=read_gat(sd->bl.m,sd->bl.x+dx[j],sd->bl.y+dy[j]))==1 || c==5)
+ 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->mapname, sd->bl.x+dx[j], sd->bl.y+dy[j], 2);
}
}
+ pc_blockskill_start (sd, skillid, 300000);
}
}
break;
+
default:
printf("Unknown skill used:%d\n",skillid);
map_freeblock_unlock();
@@ -4653,7 +4778,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
}
if(sd->skillid == PR_LEXAETERNA) {
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
if(sc_data && (sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0))) {
clif_skill_fail(sd,sd->skillid,0,0);
sd->canact_tick = tick;
@@ -4663,7 +4788,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
}
}
else if(sd->skillid == RG_BACKSTAP) {
- int dir = map_calc_dir(&sd->bl,bl->x,bl->y),t_dir = battle_get_dir(bl);
+ int dir = map_calc_dir(&sd->bl,bl->x,bl->y),t_dir = status_get_dir(bl);
int dist = distance(sd->bl.x,sd->bl.y,bl->x,bl->y);
if(bl->type != BL_SKILL && (dist == 0 || map_check_dir(dir,t_dir))) {
clif_skill_fail(sd,sd->skillid,0,0);
@@ -4686,7 +4811,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
int fail_flag = 1;
if(inf2 & 0x400 && battle_check_target(&sd->bl,bl, BCT_PARTY) > 0)
fail_flag = 0;
- if(inf2 & 0x800 && sd->status.guild_id > 0 && sd->status.guild_id == battle_get_guild_id(bl))
+ if(inf2 & 0x800 && sd->status.guild_id > 0 && sd->status.guild_id == status_get_guild_id(bl))
fail_flag = 0;
if(fail_flag) {
clif_skill_fail(sd,sd->skillid,0,0);
@@ -4699,7 +4824,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
range = skill_get_range(sd->skillid,sd->skilllv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
range += battle_config.pc_skill_add_range;
if((sd->skillid == MO_EXTREMITYFIST && sd->sc_data[SC_COMBO].timer != -1 && sd->sc_data[SC_COMBO].val1 == MO_COMBOFINISH) ||
(sd->skillid == CH_TIGERFIST && sd->sc_data[SC_COMBO].timer != -1 && sd->sc_data[SC_COMBO].val1 == MO_COMBOFINISH) ||
@@ -4742,7 +4867,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
skill_castend_damage_id(&sd->bl,bl,sd->skillid,sd->skilllv,tick,0);
break;
case 1:/* Žx‰‡Œn */
- if( (sd->skillid==AL_HEAL || (sd->skillid==ALL_RESURRECTION && bl->type != BL_PC) || sd->skillid==PR_ASPERSIO) && battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)))
+ if( (sd->skillid==AL_HEAL || (sd->skillid==ALL_RESURRECTION && bl->type != BL_PC) || sd->skillid==PR_ASPERSIO) && battle_check_undead(status_get_race(bl),status_get_elem_type(bl)))
skill_castend_damage_id(&sd->bl,bl,sd->skillid,sd->skilllv,tick,0);
else
skill_castend_nodamage_id(&sd->bl,bl,sd->skillid,sd->skilllv,tick,0);
@@ -4761,21 +4886,21 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
struct map_session_data *sd=NULL;
int i,tmpx = 0,tmpy = 0, x1 = 0, y1 = 0;
- if(skilllv <= 0) return 0;
+ //if(skilllv <= 0) return 0;
+ if(skillid > 0 && skilllv <= 0) return 0; // celest
nullpo_retr(0, src);
if(src->type==BL_PC){
nullpo_retr(0, sd=(struct map_session_data *)src);
}
- if( skillid != WZ_METEOR &&
- skillid != WZ_SIGHTRASHER &&
+ if( skillid != WZ_METEOR &&
skillid != AM_CANNIBALIZE &&
skillid != AM_SPHEREMINE)
clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
- if (skillnotok(skillid, sd)) // [MouseJstr]
- return 0;
+ if (sd && skillnotok(skillid, sd)) // [MouseJstr]
+ return 0;
switch(skillid)
{
@@ -4792,20 +4917,31 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
break;
case BS_HAMMERFALL: /* ƒnƒ“ƒ}?ƒtƒH?ƒ‹ */
- skill_area_temp[1]=src->id;
- skill_area_temp[2]=x;
- skill_area_temp[3]=y;
- map_foreachinarea(skill_area_sub,
- src->m,x-2,y-2,x+2,y+2,0,
- src,skillid,skilllv,tick, flag|BCT_ENEMY|2,
- skill_castend_nodamage_id);
+ {
+ 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, 0,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|2,
+ skill_castend_nodamage_id);
+ }
break;
case HT_DETECTING: /* ƒfƒBƒeƒNƒeƒBƒ“ƒO */
{
- const int range=7;
- map_foreachinarea( skill_status_change_timer_sub,
- src->m, src->x-range, src->y-range, src->x+range,src->y+range,0,
+ int range=skilllv*2+1;
+ if(src->x!=x)
+ x+=(src->x-x>0)?-range:range;
+ if(src->y!=y)
+ y+=(src->y-y>0)?-range:range;
+ map_foreachinarea( status_change_timer_sub,
+ src->m, x-range, y-range, x+range,y+range,0,
src,SC_SIGHT,tick);
}
break;
@@ -4816,15 +4952,15 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
case AL_PNEUMA: /* ƒjƒ…?ƒ} */
case WZ_ICEWALL: /* ƒAƒCƒXƒEƒH?ƒ‹ */
case WZ_FIREPILLAR: /* ƒtƒ@ƒCƒAƒsƒ‰? */
- case WZ_SIGHTRASHER:
case WZ_QUAGMIRE: /* ƒNƒ@ƒOƒ}ƒCƒA */
case WZ_VERMILION: /* ƒ?ƒhƒIƒuƒ”ƒ@?ƒ~ƒŠƒIƒ“ */
- case WZ_FROSTNOVA: /* ƒtƒƒXƒgƒmƒ”ƒ@ */
+ //case WZ_FROSTNOVA: /* ƒtƒƒXƒgƒmƒ”ƒ@ */
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_DARKGRANDCROSS: /*ˆÅƒ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 */
@@ -4836,12 +4972,11 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
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_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
case PF_FOGWALL: /* ƒtƒHƒOƒEƒH?ƒ‹ */
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);
@@ -4859,7 +4994,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
{
int flag=0;
for(i=0;i<2+(skilllv>>1);i++) {
- int j=0, c;
+ int j=0;
do {
tmpx = x + (rand()%7 - 3);
tmpy = y + (rand()%7 - 3);
@@ -4872,7 +5007,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
else if(tmpy >= map[src->m].ys)
tmpy = map[src->m].ys - 1;
j++;
- } while(((c=map_getcell(src->m,tmpx,tmpy))==1 || c==5) && j<100);
+ } while((map_getcell(src->m,tmpx,tmpy,CELL_CHKNOPASS)) && j<100);
if(j >= 100)
continue;
if(flag==0){
@@ -4903,37 +5038,43 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
pc_movepos(sd,x,y);
}else if( src->type==BL_MOB )
mob_warp((struct mob_data *)src,-1,x,y,0);
+ if (sd)
+ pc_blockskill_start (sd, MO_EXTREMITYFIST, 2000);
break;
case AM_CANNIBALIZE: // ƒoƒCƒIƒvƒ‰ƒ“ƒg
- if(sd){
- int mx,my,id=0;
+ if(sd) {
+ int id;
+ int summons[5] = { 1020, 1068, 1118, 1500, 1368 };
struct mob_data *md;
- mx = x;// + (rand()%10 - 5);
- my = y;// + (rand()%10 - 5);
- id=mob_once_spawn(sd,"this",mx,my,"--ja--",1118,1,"");
+ // Correct info, don't change any of this! [celest]
+ id = mob_once_spawn (sd, "this", x, y, "--ja--", summons[skilllv-1] ,1,"");
+
if( (md=(struct mob_data *)map_id2bl(id)) !=NULL ){
- md->master_id=sd->bl.id;
- md->hp=2210+skilllv*200;
- md->state.special_mob_ai=1;
- md->deletetimer=add_timer(gettick()+skill_get_time(skillid,skilllv),mob_timer_delete,id,0);
- }
+ 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->state.special_mob_ai = 1;
+ //”ñˆÚ“®‚ŃAƒNƒeƒBƒu‚Å”½Œ‚‚·‚é[0x0:”ñˆÚ“® 0x1:ˆÚ“® 0x4:ACT 0x8:”ñACT 0x40:”½Œ‚–³ 0x80:”½Œ‚—L]
+ md->mode = 0x0 + 0x4 + 0x80;
+ 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 mx,my,id=0;
+ int id;
struct mob_data *md;
- mx = x;// + (rand()%10 - 5);
- my = y;// + (rand()%10 - 5);
- id=mob_once_spawn(sd,"this",mx,my,"--ja--",1142,1,"");
+ id = mob_once_spawn(sd, "this", x, y, "--ja--", 1142, 1, "");
if( (md=(struct mob_data *)map_id2bl(id)) !=NULL ){
- md->master_id=sd->bl.id;
- md->hp=1000+skilllv*200;
- md->state.special_mob_ai=2;
- md->deletetimer=add_timer(gettick()+skill_get_time(skillid,skilllv),mob_timer_delete,id,0);
+ md->master_id = sd->bl.id;
+ md->hp = 2000 + skilllv * 400;
+ md->state.special_mob_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);
}
@@ -4943,24 +5084,24 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
case CR_SLIMPITCHER:
{
if (sd) {
- int x = skilllv%11 - 1;
- int i = pc_search_inventory(sd,skill_db[skillid].itemid[x]);
- if(i < 0 || skill_db[skillid].itemid[x] <= 0 || sd->inventory_data[i] == NULL ||
- sd->status.inventory[i].amount < skill_db[skillid].amount[x]) {
+ 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);
- map_freeblock_unlock();
return 1;
}
sd->state.potionpitcher_flag = 1;
sd->potion_hp = 0;
- run_script(sd->inventory_data[i]->use_script,0,sd->bl.id,0);
- pc_delitem(sd,i,skill_db[skillid].amount[x],0);
+ run_script(sd->inventory_data[j]->use_script,0,sd->bl.id,0);
+ pc_delitem(sd,j,skill_db[skillid].amount[i],0);
sd->state.potionpitcher_flag = 0;
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
if(sd->potion_hp > 0) {
map_foreachinarea(skill_area_sub,
src->m,x-3,y-3,x+3,y+3,0,
- src,skillid,skilllv,tick,flag|BCT_ALL|1,
- skill_castend_nodamage_id);
+ src,skillid,skilllv,tick,flag|BCT_PARTY|1,
+ skill_castend_nodamage_id);
}
}
}
@@ -4982,13 +5123,13 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma
if( sd->bl.prev == NULL || pc_isdead(sd) )
return 0;
- if(skillnotok(skill_num, sd))
- return 0;
+ if(skillnotok(skill_num, sd))
+ return 0;
if( sd->opt1>0 || sd->status.option&2 )
return 0;
//ƒXƒLƒ‹‚ªŽg‚¦‚È‚¢?‘ÔˆÙí’†
- if(sd->sc_data){
+ if(sd->sc_count){
if( sd->sc_data[SC_DIVINA].timer!=-1 ||
sd->sc_data[SC_ROKISWEIL].timer!=-1 ||
sd->sc_data[SC_AUTOCOUNTER].timer != -1 ||
@@ -4997,10 +5138,6 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma
sd->sc_data[SC_BERSERK].timer != -1 ||
sd->sc_data[SC_MARIONETTE].timer != -1)
return 0;
-
- if (sd->sc_data[SC_BLOCKSKILL].timer!=-1)
- if (skill_num == sd->sc_data[SC_BLOCKSKILL].val3)
- return 0;
}
if( skill_num != sd->skillid) /* •s³ƒpƒPƒbƒg‚炵‚¢ */
@@ -5026,13 +5163,14 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma
case AL_WARP: /* ƒ?ƒvƒ|?ƒ^ƒ‹ */
{
- const struct point *p[]={
- &sd->status.save_point,&sd->status.memo_point[0],
- &sd->status.memo_point[1],&sd->status.memo_point[2],
- };
+ const struct point *p[4];
struct skill_unit_group *group;
int i;
int maxcount=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(sd->skillid)) > 0) {
int c;
@@ -5064,7 +5202,7 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma
return 0;
if((group=skill_unitsetting(&sd->bl,sd->skillid,sd->skilllv,sd->skillx,sd->skilly,0))==NULL)
return 0;
- group->valstr=(char *)aCalloc(24,sizeof(char));
+ group->valstr=(char *)aCallocA(24,sizeof(char));
memcpy(group->valstr,map,24);
group->val2=(x<<16)|y;
}
@@ -5081,561 +5219,176 @@ int skill_castend_map( struct map_session_data *sd,int skill_num, const char *ma
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,count=1,limit=10000,val1=0,val2=0;
- int target=BCT_ENEMY,interval=1000,range=0;
- int dir=0,aoe_diameter=0; // -- aoe_diameter (moonsoul) added for sage Area Of Effect skills
- struct status_change *sc_data = battle_get_sc_data(src); // for firewall and fogwall - celest
+ 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);
+
+ if (unit_flag&UF_DEFNOTENEMY && battle_config.defnotenemy)
+ target = BCT_NOENEMY;
+
+ sc_data = status_get_sc_data(src); // for firewall and fogwall - celest
+
switch(skillid){ /* Ý’è */
case MG_SAFETYWALL: /* ƒZƒCƒtƒeƒBƒEƒH?ƒ‹ */
- limit=skill_get_time(skillid,skilllv);
val2=skilllv+1;
- interval = -1;
- target=(battle_config.defnotenemy)?BCT_NOENEMY:BCT_ALL;
break;
-
case MG_FIREWALL: /* ƒtƒ@ƒCƒ„?ƒEƒH?ƒ‹ */
- if(src->x == x && src->y == y)
- dir = 2;
- else
- dir=map_calc_dir(src,x,y);
- if(dir&1) count=5;
- else count=3;
- limit=skill_get_time(skillid,skilllv);
- if(sc_data) {
- if (sc_data[SC_VIOLENTGALE].timer!=-1) limit *= 1.5;
- }
- // check for sc_data first - Celest
- // if (((struct map_session_data *)src)->sc_data[SC_VIOLENTGALE].timer!=-1)
- // limit *= 1.5;
+ if(sc_data && sc_data[SC_VIOLENTGALE].timer!=-1)
+ limit = limit*3/2;
val2=4+skilllv;
- interval=1;
- break;
-
- case AL_PNEUMA: /* ƒjƒ…?ƒ} */
- limit=skill_get_time(skillid,skilllv);
- interval = -1;
- target=(battle_config.defnotenemy)?BCT_NOENEMY:BCT_ALL;
- count = 9;
break;
case AL_WARP: /* ƒ?ƒvƒ|?ƒ^ƒ‹ */
- target=BCT_ALL;
val1=skilllv+6;
if(flag==0)
limit=2000;
- else
- limit=skill_get_time(skillid,skilllv);
+ active_flag=0;
break;
case PR_SANCTUARY: /* ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ */
- count=21;
- limit=skill_get_time(skillid,skilllv);
- val1=skilllv+3;
+ val1=(skilllv+3)*2;
val2=(skilllv>6)?777:skilllv*100;
- target=BCT_ALL;
- range=1;
- break;
-
- case PR_MAGNUS: /* ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€ */
- count=33;
- limit=skill_get_time(skillid,skilllv);
- interval=3000;
+ interval += 500;
break;
case WZ_FIREPILLAR: /* ƒtƒ@ƒCƒA?ƒsƒ‰? */
- if(flag==0)
- limit=skill_get_time(skillid,skilllv);
- else
+ if(flag!=0)
limit=1000;
- interval=2000;
val1=skilllv+2;
- if(skilllv < 6)
- range=1;
- else
- range=2;
- break;
-
- case MG_THUNDERSTORM: /* ƒTƒ“ƒ_?ƒXƒg?ƒ€ */
- limit=500;
- range=1;
- break;
-
- case WZ_FROSTNOVA: /* ƒtƒƒXƒgƒmƒ”ƒ@ */
- limit=500;
- range=5;
- break;
-
- case WZ_HEAVENDRIVE: /* ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu */
- limit=500;
- range=2;
- break;
-
- case WZ_METEOR: /* ƒƒeƒIƒXƒg?ƒ€ */
- limit=500;
- range=3;
- break;
-
- case WZ_SIGHTRASHER:
- limit=500;
- count=41;
- break;
-
- case WZ_VERMILION: /* ƒ?ƒhƒIƒuƒ”ƒ@?ƒ~ƒŠƒIƒ“ */
- limit=4100;
- interval=1000;
- range=6;
- break;
-
- case WZ_ICEWALL: /* ƒAƒCƒXƒEƒH?ƒ‹ */
- limit=skill_get_time(skillid,skilllv);
- count=5;
+ if(skilllv >= 6)
+ range=2;
break;
-
- case WZ_STORMGUST: /* ƒXƒg?ƒ€ƒKƒXƒg */
- limit=4600;
- interval=450;
- range=5;
+ case WZ_METEOR:
+ if (skilllv > 10) //L”͈̓ƒeƒI
+ range = 10;
break;
-
- case WZ_QUAGMIRE: /* ƒNƒ@ƒOƒ}ƒCƒA */
- limit=skill_get_time(skillid,skilllv);
- interval=200;
- count=25;
+ case WZ_VERMILION:
+ if (skilllv > 10) //L”͈ÍLOV
+ range = 25;
break;
case HT_SANDMAN: /* ƒTƒ“ƒhƒ}ƒ“ */
case HT_CLAYMORETRAP: /* ƒNƒŒƒCƒ‚ƒA?ƒgƒ‰ƒbƒv */
- limit=skill_get_time(skillid,skilllv);
- range=2;
- break;
case HT_SKIDTRAP: /* ƒXƒLƒbƒhƒgƒ‰ƒbƒv */
case HT_LANDMINE: /* ƒ‰ƒ“ƒhƒ}ƒCƒ“ */
case HT_ANKLESNARE: /* ƒAƒ“ƒNƒ‹ƒXƒlƒA */
- case PF_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
case HT_FLASHER: /* ƒtƒ‰ƒbƒVƒƒ? */
case HT_FREEZINGTRAP: /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
case HT_BLASTMINE: /* ƒuƒ‰ƒXƒgƒ}ƒCƒ“ */
- limit=skill_get_time(skillid,skilllv);
- range=1;
+ // longer trap times in WOE [celest]
+ if (map[src->m].flag.gvg) limit *= 4;
break;
-
- case HT_TALKIEBOX: /* ƒg?ƒL?ƒ{ƒbƒNƒX */
- limit=skill_get_time(skillid,skilllv);
- range=1;
- target=BCT_ALL;
- break;
-
case HT_SHOCKWAVE: /* ƒVƒ‡ƒbƒNƒEƒF?ƒuƒgƒ‰ƒbƒv */
- limit=skill_get_time(skillid,skilllv);
- range=1;
val1=skilllv*15+10;
break;
- case AS_VENOMDUST: /* ƒxƒmƒ€ƒ_ƒXƒg */
- limit=skill_get_time(skillid,skilllv);
- interval=1000;
- count=5;
- break;
-
- case CR_GRANDCROSS: /* ƒOƒ‰ƒ“ƒhƒNƒƒX */
- count=29;
- limit=1000;
- interval=300;
- break;
-
- case SA_VOLCANO: /* ƒ{ƒ‹ƒP?ƒm */
- case SA_DELUGE: /* ƒfƒŠƒ…?ƒW */
- case SA_VIOLENTGALE: /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
- limit=skill_get_time(skillid,skilllv);
- count=skilllv<=2?25:(skilllv<=4?49:81);
- target=BCT_ALL;
- break;
-
case SA_LANDPROTECTOR: /* ƒOƒ‰ƒ“ƒhƒNƒƒX */
- limit=skill_get_time(skillid,skilllv); // changed to get duration from cast_db (moonsoul)
- val1=skilllv*15+10;
- aoe_diameter=skilllv+skilllv%2+5;
- target=BCT_ALL;
- count=aoe_diameter*aoe_diameter; // -- this will not function if changed to ^2 (moonsoul)
- break;
-
- case BD_LULLABY: /* ŽqŽç‰S */
- case BD_ETERNALCHAOS: /* ƒGƒ^?ƒiƒ‹ƒJƒIƒX */
- case BD_ROKISWEIL: /* ƒƒL‚Ì‹©‚Ñ */
- count=81;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_ALL;
- break;
- case BD_RICHMANKIM:
- case BD_DRUMBATTLEFIELD: /* ?‘¾ŒÛ‚Ì‹¿‚« */
- case BD_RINGNIBELUNGEN: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
- case BD_INTOABYSS: /* [•£‚Ì’†‚É */
- case BD_SIEGFRIED: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
- count=81;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_PARTY;
+ {
+ 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)
+ }
break;
case BA_WHISTLE: /* Œû“J */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)+1)>>1;
- val2 = ((battle_get_agi(src)/10)&0xffff)<<16;
- val2 |= (battle_get_luk(src)/10)&0xffff;
+ val2 = ((status_get_agi(src)/10)&0xffff)<<16;
+ val2 |= (status_get_luk(src)/10)&0xffff;
break;
case DC_HUMMING: /* ƒnƒ~ƒ“ƒO */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
- val2 = battle_get_dex(src)/10;
- break;
-
- case BA_DISSONANCE: /* •s‹¦˜a‰¹ */
- case DC_UGLYDANCE: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_ENEMY;
+ val2 = status_get_dex(src)/10;
break;
-
case DC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_ENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
- val2 = ((battle_get_str(src)/20)&0xffff)<<16;
- val2 |= (battle_get_agi(src)/10)&0xffff;
+ val2 = ((status_get_dex(src)/20)&0xffff)<<16;
+ val2 |= (status_get_agi(src)/10)&0xffff;
break;
case BA_POEMBRAGI: /* ƒuƒ‰ƒM‚ÌŽ */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
- val2 = ((battle_get_dex(src)/10)&0xffff)<<16;
- val2 |= (battle_get_int(src)/5)&0xffff;
+ val2 = ((status_get_dex(src)/10)&0xffff)<<16;
+ val2 |= (status_get_int(src)/5)&0xffff;
break;
case BA_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
- val1 = ((pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON))&0xffff)<<16;
- else
- val1 = 0;
- val1 |= (battle_get_vit(src))&0xffff;
- val2 = 0;//‰ñ•œ—pƒ^ƒCƒ€ƒJƒEƒ“ƒ^(6•b?‚É1?‰Á)
+ val1 = pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)&0xffff;
+ val2 |= (status_get_vit(src))&0xffff;
+ val3 = 0;//‰ñ•œ—pƒ^ƒCƒ€ƒJƒEƒ“ƒ^(6•b?‚É1?‰Á)
break;
case DC_SERVICEFORYOU: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_PARTY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
- val2 = battle_get_int(src)/10;
+ val2 = status_get_int(src)/10;
break;
case BA_ASSASSINCROSS: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)+1)>>1;
- val2 = battle_get_agi(src)/20;
+ val2 = status_get_agi(src)/20;
break;
case DC_FORTUNEKISS: /* K‰^‚̃LƒX */
- count=49;
- limit=skill_get_time(skillid,skilllv);
- range=5;
- target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
- val2 = battle_get_luk(src)/10;
- break;
-
- case AM_DEMONSTRATION: /* ƒfƒ‚ƒ“ƒXƒgƒŒ?ƒVƒ‡ƒ“ */
- limit=skill_get_time(skillid,skilllv);
- interval=1000;
- range=1;
- target=BCT_ENEMY;
- break;
-
- case WE_CALLPARTNER: /* ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢ */
- limit=skill_get_time(skillid,skilllv);
- range=-1;
- break;
-
- case HP_BASILICA: /* ƒoƒWƒŠƒJ */
- limit=skill_get_time(skillid,skilllv);
- target=BCT_ALL;
- range=3;
- //Fix to prevent the priest from walking while Basilica is up.
- battle_stopwalking(src,1);
- //skill_status_change_start(src,SC_ANKLE,skilllv,0,0,0,limit,0);
- //sd->canmove_tick = gettick() + limit; // added later [celest]
- break;
-
- case PA_GOSPEL: /* ƒSƒXƒyƒ‹ */
- count=49;
- target=BCT_PARTY;
- limit=skill_get_time(skillid,skilllv);
- break;
-
- case CG_MOONLIT:
- range=1;
- target=BCT_ALL;
- limit=skill_get_time(skillid,skilllv);
+ val2 = status_get_luk(src)/10;
break;
case PF_FOGWALL: /* ƒtƒHƒOƒEƒH?ƒ‹ */
- count=15;
- limit=skill_get_time(skillid,skilllv);
- if(sc_data) {
- if (sc_data[SC_DELUGE].timer!=-1) limit *= 2;
- }
+ if(sc_data && sc_data[SC_DELUGE].timer!=-1) limit *= 2;
break;
case RG_GRAFFITI: /* Graffiti */
count=1; // Leave this at 1 [Valaris]
- limit=600000; // Time length [Valaris]
- break;
-
- case GD_LEADERSHIP:
- case GD_GLORYWOUNDS:
- case GD_SOULCOLD:
- case GD_HAWKEYES:
- range=2;
- target=BCT_NOENEMY;
- limit=600000;
break;
}
- nullpo_retr(NULL, group=skill_initunitgroup(src,count,skillid,skilllv,skill_get_unit_id(skillid,flag&1)));
+ 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->interval=interval;
- group->range=range;
if(skillid==HT_TALKIEBOX ||
skillid==RG_GRAFFITI){
- group->valstr=calloc(80, 1);
+ group->valstr=(char *) aCallocA(80, 1);
if(group->valstr==NULL){
printf("skill_castend_map: out of memory !\n");
exit(1);
}
memcpy(group->valstr,talkie_mes,80);
}
- for(i=0;i<count;i++){
+ for(i=0;i<layout->count;i++){
struct skill_unit *unit;
- int ux=x,uy=y,val1=skilllv,val2=0,limit=group->limit,alive=1;
- int range=group->range;
- switch(skillid){ /* Ý’è */
- case AL_PNEUMA: /* ƒjƒ…?ƒ} */
- {
- static const int dx[9]={-1, 0, 1,-1, 0, 1,-1, 0, 1};
- static const int dy[9]={-1,-1,-1, 0, 0, 0, 1, 1, 1};
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
+ int ux,uy,val1=skilllv,val2=0,limit=group->limit,alive=1;
+ ux = x + layout->dx[i];
+ uy = y + layout->dy[i];
+ switch (skillid) {
case MG_FIREWALL: /* ƒtƒ@ƒCƒ„?ƒEƒH?ƒ‹ */
- {
- if(dir&1){ /* ŽÎ‚ß”z’u */
- static const int dx[][5]={
- { 1,1,0,0,-1 }, { -1,-1,0,0,1 },
- },dy[][5]={
- { 1,0,0,-1,-1 }, { 1,0,0,-1,-1 },
- };
- ux+=dx[(dir>>1)&1][i];
- uy+=dy[(dir>>1)&1][i];
- }else{ /* ㉺”z’u */
- if(dir%4==0) /* ㉺ */
- ux+=i-1;
- else /* ¶‰E */
- uy+=i-1;
- }
- val2=group->val2;
- }
- break;
-
- case PR_SANCTUARY: /* ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ */
- {
- 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, };
- ux+=dx[i];
- uy+=dy[i];
- }
+ val2=group->val2;
break;
-
- case PR_MAGNUS: /* ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€ */
- {
- 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 };
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
-
- case WZ_SIGHTRASHER:
- {
- static const int dx[]={
- -5, 0, 5, -4, 0, 4, -3, 0, 3, -2, 0, 2, -1, 0, 1, -5,-4,-3,-2,-1, 0, 1, 2, 3, 4, 5, -1, 0, 1, -2, 0, 2, -3, 0, 3, -4, 0, 4, -5, 0, 5 };
- static const int dy[]={
- -5,-5,-5, -4,-4,-4, -3,-3,-3, -2,-2,-2, -1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
-
case WZ_ICEWALL: /* ƒAƒCƒXƒEƒH?ƒ‹ */
- {
- 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};
if(skilllv <= 1)
val1 = 500;
else
val1 = 200 + 200*skilllv;
- if(src->x == x && src->y == y)
- dir = 2;
- else
- dir=map_calc_dir(src,x,y);
- ux+=(2-i)*diry[dir];
- uy+=(i-2)*dirx[dir];
- }
- break;
-
- case WZ_QUAGMIRE: /* ƒNƒ@ƒOƒ}ƒCƒA */
- ux+=(i%5-2);
- uy+=(i/5-2);
- if(i==12)
- range=2;
- else
- range=-1;
-
- break;
-
- case AS_VENOMDUST: /* ƒxƒmƒ€ƒ_ƒXƒg */
- {
- static const int dx[]={-1,0,0,0,1};
- static const int dy[]={0,-1,0,1,0};
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
-
- case CR_GRANDCROSS: /* ƒOƒ‰ƒ“ƒhƒNƒƒX */
- {
- 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, };
- ux+=dx[i];
- uy+=dy[i];
- }
- break;
- case SA_VOLCANO: /* ƒ{ƒ‹ƒP?ƒm */
- case SA_DELUGE: /* ƒfƒŠƒ…?ƒW */
- case SA_VIOLENTGALE: /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
- {
- int u_range=0,central=0;
- if(skilllv<=2){
- u_range=2;
- central=12;
- }else if(skilllv<=4){
- u_range=3;
- central=24;
- }else if(skilllv>=5){
- u_range=4;
- central=40;
- }
- ux+=(i%(u_range*2+1)-u_range);
- uy+=(i/(u_range*2+1)-u_range);
-
- if(i==central)
- range=u_range;//’†‰›‚̃†ƒjƒbƒg‚Ì?‰Ê”Í?‚Í‘S”Í?
- else
- range=-1;//’†‰›ˆÈŠO‚̃†ƒjƒbƒg‚Íü‚è
- }
- break;
- case SA_LANDPROTECTOR: /* ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^? */
- {
- int u_range=0;
-
- if(skilllv<=2) u_range=3;
- else if(skilllv<=4) u_range=4;
- else if(skilllv>=5) u_range=5;
-
- ux+=(i%(u_range*2+1)-u_range);
- uy+=(i/(u_range*2+1)-u_range);
-
- range=0;
- }
- break;
-
- /* ƒ_ƒ“ƒX‚È‚Ç */
- 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 */
- ux+=(i%9-4);
- uy+=(i/9-4);
- if(i==40)
- range=4; /* ’†S‚Ìꇂ͔Í?‚ð4‚ɃI?ƒo?ƒ‰ƒCƒh */
- else
- range=-1; /* ’†S‚¶‚á‚È‚¢ê‡‚Í”Í?‚ð-1‚ɃI?ƒo?ƒ‰ƒCƒh */
- break;
- case BA_DISSONANCE: /* •s‹¦˜a‰¹ */
- case BA_WHISTLE: /* Œû“J */
- case BA_ASSASSINCROSS: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
- case BA_POEMBRAGI: /* ƒuƒ‰ƒM‚ÌŽ */
- 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?ƒ†? */
- case CG_MOONLIT:
- ux+=(i%7-3);
- uy+=(i/7-3);
- if(i==40)
- range=4; /* ’†S‚Ìꇂ͔Í?‚ð4‚ɃI?ƒo?ƒ‰ƒCƒh */
- else
- range=-1; /* ’†S‚¶‚á‚È‚¢ê‡‚Í”Í?‚ð-1‚ɃI?ƒo?ƒ‰ƒCƒh */
- break;
- case PA_GOSPEL: /* ƒSƒXƒyƒ‹ */
- ux+=(i%7-3);
- uy+=(i/7-3);
- break;
- case PF_FOGWALL: /* ƒtƒHƒOƒEƒH?ƒ‹ */
- ux+=(i%5-2);
- uy+=(i/5-1);
break;
case RG_GRAFFITI: /* Graffiti [Valaris] */
ux+=(i%5-2);
@@ -5647,7 +5400,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
map_foreachinarea(skill_landprotector,src->m,ux,uy,ux,uy,BL_SKILL,skillid,&alive);
if(skillid==WZ_ICEWALL && alive){
- val2=map_getcell(src->m,ux,uy);
+ val2=map_getcell(src->m,ux,uy,CELL_GETTYPE);
if(val2==5 || val2==1)
alive=0;
else {
@@ -5663,30 +5416,13 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
unit->limit=limit;
unit->range=range;
- // [celest]
- if (sc_data) {
- // attach the unit's id to the caster
- switch (skillid) {
- case HP_BASILICA:
- if (sc_data[SC_BASILICA].timer!=-1)
- sc_data[SC_BASILICA].val4 = (int)unit;
- break;
- case GD_LEADERSHIP:
- sc_data[SC_LEADERSHIP].val4 = (int)unit;
- break;
- case GD_GLORYWOUNDS:
- sc_data[SC_GLORYWOUNDS].val4 = (int)unit;
- break;
- case GD_SOULCOLD:
- sc_data[SC_SOULCOLD].val4 = (int)unit;
- break;
- case GD_HAWKEYES:
- sc_data[SC_HAWKEYES].val4 = (int)unit;
- break;
- }
- }
+ if (range==0 && active_flag)
+ map_foreachinarea(skill_unit_effect,unit->bl.m
+ ,unit->bl.x,unit->bl.y,unit->bl.x,unit->bl.y
+ ,0,&unit->bl,gettick(),1);
}
}
+
return group;
}
@@ -5698,126 +5434,245 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
{
struct skill_unit_group *sg;
struct block_list *ss;
- struct skill_unit_group_tickset *ts;
- struct map_session_data *srcsd=NULL;
- int diff,goflag,splash_count=0;
+ struct skill_unit *unit2;
+ struct status_change *sc_data;
+ int type;
nullpo_retr(0, src);
nullpo_retr(0, bl);
-
- if( bl->prev==NULL || !src->alive || (bl->type == BL_PC && pc_isdead((struct map_session_data *)bl) ) )
+
+ if(bl->prev==NULL || !src->alive ||
+ (bl->type == BL_PC && pc_isdead((struct map_session_data *)bl)))
return 0;
nullpo_retr(0, sg=src->group);
nullpo_retr(0, ss=map_id2bl(sg->src_id));
+
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[sg->skill_id];
- if(ss->type == BL_PC)
- nullpo_retr(0, srcsd=(struct map_session_data *)ss);
- if(srcsd && srcsd->chatID)
+ if (battle_check_target(&src->bl,bl,sg->target_flag)<=0)
return 0;
- if( bl->type!=BL_PC && bl->type!=BL_MOB )
+ // ‘ÎÛ‚ªLPã‚É‹‚éꇂ͖³Œø
+ if (map_find_skill_unit_oncell(bl,bl->x,bl->y,SA_LANDPROTECTOR,NULL))
return 0;
- nullpo_retr(0, ts=skill_unitgrouptickset_search( bl, sg->group_id));
- diff=DIFF_TICK(tick,ts->tick);
- goflag=(diff>sg->interval || diff<0);
- if (sg->skill_id == CR_GRANDCROSS && !battle_config.gx_allhit) // d‚È‚Á‚Ä‚¢‚½‚ç3HIT‚µ‚È‚¢
- goflag = (diff>sg->interval*map_count_oncell(bl->m,bl->x,bl->y) || diff<0);
- //?Û‚ªLPã‚É‹‚éꇂ͖³?
- map_foreachinarea(skill_landprotector,bl->m,bl->x,bl->y,bl->x,bl->y,BL_SKILL,0,&goflag);
+ switch (sg->unit_id) {
+ case 0x85: /* ƒjƒ…[ƒ} */
+ case 0x7e: /* ƒZƒCƒtƒeƒBƒEƒH[ƒ‹ */
+ if (sc_data && sc_data[type].timer == -1)
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
+ break;
- if(!goflag)
- return 0;
- ts->tick=tick;
- ts->group_id=sg->group_id;
+ case 0x80: /* ƒ[ƒvƒ|[ƒ^ƒ‹(”­“®Œã) */
+ if(bl->type==BL_PC){
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ if(sd && src->bl.m == bl->m && src->bl.x == bl->x && src->bl.y == bl->y &&
+ src->bl.x == sd->to_x && src->bl.y == sd->to_y) {
+ if( battle_config.chat_warpportal || !sd->chatID ){
+ pc_setpos(sd,sg->valstr,sg->val2>>16,sg->val2&0xffff,3);
+ if(sg->src_id == bl->id || (strcmp(map[src->bl.m].name,sg->valstr) == 0 &&
+ src->bl.x == (sg->val2>>16) && src->bl.y == (sg->val2&0xffff) ))
+ skill_delunitgroup(sg);
+ if (--sg->val1<=0)
+ skill_delunitgroup(sg);
+ }
+ }
+ } else if(bl->type==BL_MOB && battle_config.mob_warpportal){
+ int m = map_mapname2mapid(sg->valstr);
+ mob_warp((struct mob_data *)bl,m,sg->val2>>16,sg->val2&0xffff,3);
+ }
+ break;
- switch(sg->unit_id){
- case 0x83: /* ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ */
- {
- int race=battle_get_race(bl);
- int damage_flag = (battle_check_undead(race,battle_get_elem_type(bl)) || race == 6)? 1:0;
+ case 0x8e: /* ƒNƒ@ƒOƒ}ƒCƒA */
+ if(bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
+ break;
+ if(sc_data && sc_data[type].timer==-1)
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,
+ skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ break;
- if( battle_get_hp(bl)>=battle_get_max_hp(bl) && !damage_flag)
+ case 0x9a: /* ƒ{ƒ‹ƒP?ƒm */
+ case 0x9b: /* ƒfƒŠƒ…?ƒW */
+ case 0x9c: /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
+ if (sc_data && sc_data[type].timer!=-1) {
+ unit2 = (struct skill_unit *)sc_data[type].val4;
+ if (unit2 && unit2->group &&
+ (unit2==src || DIFF_TICK(sg->tick,unit2->group->tick)<=0))
break;
+ }
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,
+ skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ break;
- if((sg->val1--)<=0){
- skill_delunitgroup(sg);
- return 0;
- }
- if(!damage_flag) {
- int heal=sg->val2;
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage)
- heal=0; /* ?‹à峃J?ƒhiƒq?ƒ‹—Ê‚Oj */
- clif_skill_nodamage(&src->bl,bl,AL_HEAL,heal,1);
- battle_heal(NULL,bl,heal,0,0);
- }
- else
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ case 0x9e: /* ŽqŽç‰S */
+ case 0x9f: /* ƒjƒˆƒ‹ƒh‚̉ƒ */
+ case 0xa0: /* ‰i‰“‚̬“× */
+ case 0xa1: /* ?‘¾ŒÛ‚Ì‹¿‚« */
+ case 0xa2: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
+ case 0xa3: /* ƒƒL‚Ì‹©‚Ñ */
+ case 0xa4: /* [•£‚Ì’†‚É */
+ case 0xa5: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
+ case 0xa6: /* •s‹¦˜a‰¹ */
+ case 0xa7: /* Œû“J */
+ case 0xa8: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
+ case 0xa9: /* ƒuƒ‰ƒM‚ÌŽ */
+ case 0xaa: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
+ case 0xab: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
+ case 0xac: /* ƒnƒ~ƒ“ƒO */
+ case 0xad: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
+ case 0xae: /* K‰^‚̃LƒX */
+ case 0xaf: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
+ if (sg->src_id==bl->id)
+ break;
+ if (sc_data && sc_data[type].timer!=-1) {
+ unit2 = (struct skill_unit *)sc_data[type].val4;
+ if (unit2 && unit2->group &&
+ (unit2 == src || DIFF_TICK(sg->tick,unit2->group->tick)<=0))
+ break;
}
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+ (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
break;
- case 0x84: /* ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€ */
- {
- int race=battle_get_race(bl);
- int damage_flag = (battle_check_undead(race,battle_get_elem_type(bl)) || race == 6)? 1:0;
+ case 0xb4: // Basilica
+ if (battle_check_target(&src->bl,bl,BCT_NOENEMY)>0) {
+ if (sc_data && sc_data[type].timer!=-1) {
+ struct skill_unit_group *sg2 = (struct skill_unit_group *)sc_data[type].val4;
+ if (sg2 && (sg2 == src->group || DIFF_TICK(sg->tick,sg2->tick)<=0))
+ break;
+ } else
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,
+ skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ } else if (!status_get_mode(bl)&0x20)
+ skill_blown(&src->bl,bl,1);
+ break;
- if(!damage_flag)
- return 0;
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ case 0xb6: /* ƒtƒHƒOƒEƒH?ƒ‹ */
+ if (sc_data && sc_data[type].timer!=-1) {
+ struct skill_unit_group *sg2 = (struct skill_unit_group *)sc_data[type].val4;
+ if (sg2 && (sg2 == src->group || DIFF_TICK(sg->tick,sg2->tick)<=0))
+ break;
}
+ status_change_start (bl, type, sg->skill_lv, sg->val1, sg->val2, (int)sg,
+ skill_get_time2(sg->skill_id, sg->skill_lv), 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 0xb2: /* ‚ ‚È‚½‚ð_?‚¢‚½‚¢‚Å‚· */
+ case 0xb3: /* ƒSƒXƒyƒ‹ */
+ //‚Æ‚è‚ ‚¦‚¸‰½‚à‚µ‚È‚¢
break;
+ /* default:
+ if(battle_config.error_log)
+ printf("skill_unit_onplace: Unknown skill unit id=%d block=%d\n",sg->unit_id,bl->id);
+ break;*/
+ }
- case 0x85: /* ƒjƒ…?ƒ} */
+ return 0;
+}
+
+/*==========================================
+ * ƒ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;
+ int splash_count=0;
+ struct status_change *sc_data;
+ struct skill_unit_group_tickset *ts;
+ int type;
+ int diff=0;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+
+ if (bl->type!=BL_PC && bl->type!=BL_MOB)
+ return 0;
+
+ if (bl->prev==NULL || !src->alive ||
+ (bl->type==BL_PC && pc_isdead((struct map_session_data *)bl)))
+ return 0;
+
+ nullpo_retr(0, sg=src->group);
+ nullpo_retr(0, ss=map_id2bl(sg->src_id));
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[sg->skill_id];
+
+ // ‘ÎÛ‚ªLPã‚É‹‚éꇂ͖³Œø
+ if (map_find_skill_unit_oncell(bl,bl->x,bl->y,SA_LANDPROTECTOR,NULL))
+ return 0;
+
+ // ‘O‚ɉe‹¿‚ðŽó‚¯‚Ä‚©‚çinterval‚̊Ԃ͉e‹¿‚ðŽó‚¯‚È‚¢
+ nullpo_retr(0,ts = skill_unitgrouptickset_search(bl,sg,tick));
+ diff = DIFF_TICK(tick,ts->tick);
+ if (sg->skill_id == PR_SANCTUARY)
+ diff += 500; // V‹K‚ɉñ•œ‚µ‚½ƒ†ƒjƒbƒg‚¾‚¯ƒJƒEƒ“ƒg‚·‚邽‚ß‚ÌŽdŠ|‚¯
+ if (diff < 0)
+ return 0;
+ ts->tick = tick+sg->interval;
+ // GX‚Íd‚È‚Á‚Ä‚¢‚½‚ç3HIT‚µ‚È‚¢
+ if (sg->skill_id==CR_GRANDCROSS && !battle_config.gx_allhit)
+ ts->tick += sg->interval*(map_count_oncell(bl->m,bl->x,bl->y)-1);
+
+ switch (sg->unit_id) {
+ case 0x83: /* ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ */
{
- struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
- int type=SC_PNEUMA;
- if(sc_data && sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
- else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
- if(DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
- ts->tick-=sg->interval;
- }
+ 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;
+ //sg->val1--; // ƒ`ƒƒƒbƒgƒLƒƒƒ“ƒZƒ‹‚ɑΉž
+ }
+ } else {
+ int heal = sg->val2;
+ if (status_get_hp(bl) >= status_get_max_hp(bl))
+ break;
+ if (bl->type == BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage)
+ heal = 0; /* ‰©‹à峃J[ƒhiƒq[ƒ‹—Ê‚Oj */
+ 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;
}
- break;
- case 0x7e: /* ƒZƒCƒtƒeƒBƒEƒH?ƒ‹ */
+
+ case 0x84: /* ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€ */
{
- struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
- int type=SC_SAFETYWALL;
- if(sc_data && sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
- else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
- if(sg->val1 < unit2->group->val1 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
- ts->tick-=sg->interval;
- }
+ int race = status_get_race(bl);
+ if (!battle_check_undead(race,status_get_elem_type(bl)) && race!=6)
+ return 0;
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ src->val2++;
+ break;
}
- break;
- case 0x86: /* ƒ?ƒhƒIƒuƒ”ƒ@?ƒ~ƒŠƒIƒ“(•ƒXƒg?ƒ€ƒKƒXƒg •ƒOƒ‰ƒ“ƒhƒNƒƒX) */
+ case 0x7f: /* ƒtƒ@ƒCƒ„[ƒEƒH[ƒ‹ */
skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
- break;
-
- case 0x7f: /* ƒtƒ@ƒCƒ„?ƒEƒH?ƒ‹ */
- if( (src->val2--)>0)
- skill_attack(BF_MAGIC,ss,&src->bl,bl,
- sg->skill_id,sg->skill_lv,tick,0);
- if( src->val2<=0 )
+ if (--src->val2<=0)
skill_delunit(src);
break;
-
- case 0x87: /* ƒtƒ@ƒCƒA?ƒsƒ‰?(?“®‘O) */
+ case 0x86: /* ƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“(TS,MS,FN,SG,HD,GX,ˆÅGX) */
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ break;
+ case 0x87: /* ƒtƒ@ƒCƒA[ƒsƒ‰[(”­“®‘O) */
skill_delunit(src);
skill_unitsetting(ss,sg->skill_id,sg->skill_lv,src->bl.x,src->bl.y,1);
break;
- case 0x88: /* ƒtƒ@ƒCƒA?ƒsƒ‰?(?“®Œã) */
- if(DIFF_TICK(tick,sg->tick) < 150)
- //skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
- map_foreachinarea(skill_attack_area,bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,0,BF_MAGIC,ss,&src->bl,sg->skill_id,sg->skill_lv,tick,0,BCT_ENEMY); // area damage [Celest]
+ case 0x88: /* ƒtƒ@ƒCƒA[ƒsƒ‰[(”­“®Œã) */
+ map_foreachinarea(skill_attack_area,bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,0,
+ BF_MAGIC,ss,&src->bl,sg->skill_id,sg->skill_lv,tick,0,BCT_ENEMY); // area damage [Celest]
+ //skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
case 0x90: /* ƒXƒLƒbƒhƒgƒ‰ƒbƒv */
@@ -5830,7 +5685,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
clif_changelook(&src->bl,LOOK_BASE,sg->unit_id);
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
}
- break;
+ break;
case 0x93: /* ƒ‰ƒ“ƒhƒ}ƒCƒ“ */
skill_attack(BF_MISC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
@@ -5859,20 +5714,22 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
break;
case 0x91: /* ƒAƒ“ƒNƒ‹ƒXƒlƒA */
- {
- struct status_change *sc_data=battle_get_sc_data(bl);
- if(sg->val2==0 && sc_data && sc_data[SC_ANKLE].timer==-1){
+ if(sg->val2==0 && sc_data && sc_data[SC_ANKLE].timer==-1){
int moveblock = ( bl->x/BLOCK_SIZE != src->bl.x/BLOCK_SIZE || bl->y/BLOCK_SIZE != src->bl.y/BLOCK_SIZE);
- int sec=skill_get_time2(sg->skill_id,sg->skill_lv) - (double)battle_get_agi(bl)*0.1;
- if(battle_get_mode(bl)&0x20)
- sec = sec/5;
- battle_stopwalking(bl,1);
- skill_status_change_start(bl,SC_ANKLE,sg->skill_lv,0,0,0,sec,0);
-
+ int sec = skill_get_time2(sg->skill_id,sg->skill_lv) - status_get_agi(bl)*100;
+ if(status_get_mode(bl)&0x20)
+ sec = sec/5;
+ if (sec < 3000) // minimum time of 3 seconds [celest]
+ sec = 3000;
+ battle_stopwalking(bl,1);
+ status_change_start(bl,SC_ANKLE,sg->skill_lv,0,0,0,sec,0);
+
+ skill_unit_move(bl,tick,0);
if(moveblock) map_delblock(bl);
bl->x = src->bl.x;
bl->y = src->bl.y;
if(moveblock) map_addblock(bl);
+ skill_unit_move(bl,tick,1);
if(bl->type == BL_MOB)
clif_fixmobpos((struct mob_data *)bl);
else if(bl->type == BL_PET)
@@ -5880,129 +5737,26 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
else
clif_fixpos(bl);
clif_01ac(&src->bl);
- sg->limit=DIFF_TICK(tick,sg->tick) + sec;
+ sg->limit=DIFF_TICK(tick,sg->tick) + sec;
sg->val2=bl->id;
- }
+ sg->interval = -1;
+ src->range = 0;
}
break;
- case 0x80: /* ƒ?ƒvƒ|?ƒ^ƒ‹(?“®Œã) */
- if(bl->type==BL_PC){
- struct map_session_data *sd = (struct map_session_data *)bl;
- if(sd && src->bl.m == bl->m && src->bl.x == bl->x && src->bl.y == bl->y && src->bl.x == sd->to_x && src->bl.y == sd->to_y) {
- if( battle_config.chat_warpportal || !sd->chatID ){
- if((sg->val1--)>0){
- pc_setpos(sd,sg->valstr,sg->val2>>16,sg->val2&0xffff,3);
- if(sg->src_id == bl->id ||( strcmp(map[src->bl.m].name,sg->valstr) == 0 && src->bl.x == (sg->val2>>16) && src->bl.y == (sg->val2&0xffff) ))
- skill_delunitgroup(sg);
- }else
- skill_delunitgroup(sg);
- }
- }
- }else if(bl->type==BL_MOB && battle_config.mob_warpportal){
- int m=map_mapname2mapid(sg->valstr);
- struct mob_data *md;
- md=(struct mob_data *)bl;
- mob_warp((struct mob_data *)bl,m,sg->val2>>16,sg->val2&0xffff,3);
- }
- break;
-
- case 0x8e: /* ƒNƒ@ƒOƒ}ƒCƒA */
- {
- int type=SkillStatusChangeTable[sg->skill_id];
- if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
- break;
- if( battle_get_sc_data(bl)[type].timer==-1 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- }
- break;
case 0x92: /* ƒxƒmƒ€ƒ_ƒXƒg */
- {
- struct status_change *sc_data=battle_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if( sc_data && sc_data[type].timer==-1 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- }
+ if(sc_data && sc_data[type].timer==-1 )
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
break;
- case 0x9a: /* ƒ{ƒ‹ƒP?ƒm */
- case 0x9b: /* ƒfƒŠƒ…?ƒW */
- case 0x9c: /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
- {
- struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if(sc_data && sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
- if( DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- ts->tick-=sg->interval;
- }
- } break;
-
- case 0x9e: /* ŽqŽç‰S */
- case 0x9f: /* ƒjƒˆƒ‹ƒh‚̉ƒ */
- case 0xa0: /* ‰i‰“‚̬“× */
- case 0xa1: /* ?‘¾ŒÛ‚Ì‹¿‚« */
- case 0xa2: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
- case 0xa3: /* ƒƒL‚Ì‹©‚Ñ */
- case 0xa4: /* [•£‚Ì’†‚É */
- case 0xa5: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
- case 0xa6: /* •s‹¦˜a‰¹ */
- case 0xa7: /* Œû“J */
- case 0xa8: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
- case 0xa9: /* ƒuƒ‰ƒM‚ÌŽ */
- case 0xab: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
- case 0xac: /* ƒnƒ~ƒ“ƒO */
- case 0xad: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
- case 0xae: /* K‰^‚̃LƒX */
- case 0xaf: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
- case 0xb4:
- case 0xb6: /* ƒtƒHƒOƒEƒH?ƒ‹ */
- {
- struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if(sg->src_id == bl->id)
- break;
- if(sc_data) {
- if (sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- else if( (unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
- if( unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- ts->tick-=sg->interval;
- }
- }
- } break;
-
- case 0xaa: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
- {
- struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
- int type=SkillStatusChangeTable[sg->skill_id];
- if(sg->src_id == bl->id)
- break;
- if( sc_data && sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- else if((unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
- if( DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- skill_status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
- (int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
- ts->tick-=sg->interval;
- }
- } break;
case 0xb1: /* ƒfƒ‚ƒ“ƒXƒgƒŒ?ƒVƒ‡ƒ“ */
skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
if(bl->type == BL_PC && rand()%100 < sg->skill_lv && battle_config.equipment_breaking)
pc_breakweapon((struct map_session_data *)bl);
break;
- case 0x99: /* ƒg?ƒL?ƒ{ƒbƒNƒX */
- if(sg->src_id == bl->id) //Ž©•ª‚ª“¥‚ñ‚Å‚à?“®‚µ‚È‚¢
+
+ case 0x99: /* ƒg[ƒL[ƒ{ƒbƒNƒX */
+ if(sg->src_id == bl->id) //Ž©•ª‚ª“¥‚ñ‚Å‚à”­“®‚µ‚È‚¢
break;
if(sg->val2==0){
clif_talkiebox(&src->bl,sg->valstr);
@@ -6011,68 +5765,40 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
sg->limit=DIFF_TICK(tick,sg->tick)+5000;
sg->val2=-1; //“¥‚ñ‚¾
}
- break;
- case 0xb2: /* ‚ ‚È‚½‚ð_?‚¢‚½‚¢‚Å‚· */
- case 0xb3: /* ƒSƒXƒyƒ‹ */
- //case 0xb6: /* ƒtƒHƒOƒEƒH?ƒ‹ */ - moved [celest]
- //‚Æ‚è‚ ‚¦‚¸‰½‚à‚µ‚È‚¢
+ break;
+
+ // Basilica
+ case 0xb4: /* ƒoƒWƒŠƒJ */
+ if (battle_check_target(&src->bl,bl,BCT_ENEMY)>0 &&
+ !(status_get_mode(bl)&0x20))
+ skill_blown(&src->bl,bl,1);
+ if (sg->src_id==bl->id)
+ break;
+ if (battle_check_target(&src->bl,bl,BCT_NOENEMY)>0 && sc_data && sc_data[type].timer == -1)
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,
+ skill_get_time2(sg->skill_id,sg->skill_lv),0);
break;
case 0xb7: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
if(sg->val2==0){
int moveblock = ( bl->x/BLOCK_SIZE != src->bl.x/BLOCK_SIZE || bl->y/BLOCK_SIZE != src->bl.y/BLOCK_SIZE);
skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
+ skill_unit_move(bl,tick,0);
if(moveblock) map_delblock(bl);
- bl->x = (&src->bl)->x;
- bl->y = (&src->bl)->y;
+ bl->x = src->bl.x;
+ bl->y = src->bl.y;
if(moveblock) map_addblock(bl);
- if(bl->type == BL_MOB)
- clif_fixmobpos((struct mob_data *)bl);
- else if(bl->type == BL_PET)
- clif_fixpetpos((struct pet_data *)bl);
- else
- clif_fixpos(bl);
- clif_01ac(&src->bl);
- sg->limit=DIFF_TICK(tick,sg->tick) + skill_get_time2(sg->skill_id,sg->skill_lv);
+ skill_unit_move(bl,tick,1);
+ if(bl->type == BL_MOB)
+ clif_fixmobpos((struct mob_data *)bl);
+ else if(bl->type == BL_PET)
+ clif_fixpetpos((struct pet_data *)bl);
+ else
+ clif_fixpos(bl);
+ sg->limit = DIFF_TICK(tick,sg->tick)+skill_get_time2(sg->skill_id,sg->skill_lv);
sg->val2=bl->id;
- }
- break;
-
- // New guild skills [Celest]
- case 0xc1: // GD_LEADERSHIP
- {
- struct map_session_data *sd;
- if (srcsd && bl->type == BL_PC && (sd=(struct map_session_data *)bl) &&
- sd->status.guild_id == srcsd->status.guild_id &&
- sd->sc_data[SC_LEADERSHIP].timer == -1 && !sd->sc_data[SC_LEADERSHIP].val4)
- skill_status_change_start(bl,SC_LEADERSHIP,1,0,0,0,0,0 );
- }
- break;
- case 0xc2: // GD_GLORYWOUNDS
- {
- struct map_session_data *sd;
- if (srcsd && bl->type == BL_PC && (sd=(struct map_session_data *)bl) &&
- sd->status.guild_id == srcsd->status.guild_id &&
- sd->sc_data[SC_GLORYWOUNDS].timer == -1 && !sd->sc_data[SC_GLORYWOUNDS].val4)
- skill_status_change_start(bl,SC_GLORYWOUNDS,1,0,0,0,0,0 );
- }
- break;
- case 0xc3: // GD_SOULCOLD
- {
- struct map_session_data *sd;
- if (srcsd && bl->type == BL_PC && (sd=(struct map_session_data *)bl) &&
- sd->status.guild_id == srcsd->status.guild_id &&
- sd->sc_data[SC_SOULCOLD].timer == -1 && !sd->sc_data[SC_SOULCOLD].val4)
- skill_status_change_start(bl,SC_SOULCOLD,1,0,0,0,0,0 );
- }
- break;
- case 0xc4: // GD_HAWKEYES
- {
- struct map_session_data *sd;
- if (srcsd && bl->type == BL_PC && (sd=(struct map_session_data *)bl) &&
- sd->status.guild_id == srcsd->status.guild_id &&
- sd->sc_data[SC_HAWKEYES].timer == -1 && !sd->sc_data[SC_HAWKEYES].val4)
- skill_status_change_start(bl,SC_HAWKEYES,1,0,0,0,0,0 );
+ sg->interval = -1;
+ src->range = 0;
}
break;
@@ -6081,6 +5807,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
printf("skill_unit_onplace: Unknown skill unit id=%d block=%d\n",sg->unit_id,bl->id);
break;*/
}
+
if(bl->type==BL_MOB && ss!=bl) /* ƒXƒLƒ‹Žg—p?Œ‚ÌMOBƒXƒLƒ‹ */
{
if(battle_config.mob_changetarget_byskill == 1)
@@ -6104,85 +5831,55 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
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 )
- return 0;
-
- if( bl->type!=BL_PC && bl->type!=BL_MOB )
+ if (bl->prev==NULL || !src->alive ||
+ (bl->type == BL_PC && pc_isdead((struct map_session_data *)bl)))
return 0;
switch(sg->unit_id){
- case 0x7e: /* ƒZƒCƒtƒeƒBƒEƒH?ƒ‹ */
- case 0x85: /* ƒjƒ…?ƒ} */
+ case 0x7e: /* ƒZƒCƒtƒeƒBƒEƒH[ƒ‹ */
+ case 0x85: /* ƒjƒ…[ƒ} */
case 0x8e: /* ƒNƒ@ƒOƒ}ƒCƒA */
- {
- struct status_change *sc_data=battle_get_sc_data(bl);
- int type=
- (sg->unit_id==0x85)?SC_PNEUMA:
- ((sg->unit_id==0x7e)?SC_SAFETYWALL:
- SC_QUAGMIRE);
- if((type != SC_QUAGMIRE || bl->type != BL_MOB) &&
- sc_data && sc_data[type].timer!=-1 && ((struct skill_unit *)sc_data[type].val2)==src){
- skill_status_change_end(bl,type,-1);
- }
- } break;
-
- case 0x91: /* ƒAƒ“ƒNƒ‹ƒXƒlƒA */
- {
- struct block_list *target=map_id2bl(sg->val2);
- if( target && target==bl ){
- skill_status_change_end(bl,SC_ANKLE,-1);
- sg->limit=DIFF_TICK(tick,sg->tick)+1000;
- }
- }
- break;
- case 0xb5:
- case 0xb8:
- {
- struct block_list *target=map_id2bl(sg->val2);
- if( target==bl )
- skill_status_change_end(bl,SC_SPIDERWEB,-1);
- sg->limit=DIFF_TICK(tick,sg->tick)+1000;
+ case 0x9a: /* ƒ{ƒ‹ƒP[ƒm */
+ case 0x9b: /* ƒfƒŠƒ…[ƒW */
+ case 0x9c: /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
+ if (type==SC_QUAGMIRE && bl->type==BL_MOB)
+ break;
+ if (sc_data && sc_data[type].timer!=-1 && sc_data[type].val2==(int)src) {
+ status_change_end(bl,type,-1);
}
break;
- case 0xb6:
- {
- struct block_list *target=map_id2bl(sg->val2);
- struct status_change *sc_data=battle_get_sc_data(bl);
- if( target==bl ) {
- skill_status_change_end(bl,SC_FOGWALL,-1);
- if (sc_data && sc_data[SC_BLIND].timer!=-1)
- sc_data[SC_BLIND].timer = add_timer(
- gettick() + 30000, skill_status_change_timer, bl->id, 0);
- }
+ case 0x91: /* ƒAƒ“ƒNƒ‹ƒXƒlƒA */
+ {
+ 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;
}
break;
- case 0x9a: /* ƒ{ƒ‹ƒP?ƒm */
- case 0x9b: /* ƒfƒŠƒ…?ƒW */
- case 0x9c: /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
- {
- struct status_change *sc_data=battle_get_sc_data(bl);
- struct skill_unit *su;
- int type=SkillStatusChangeTable[sg->skill_id];
- if( sc_data && sc_data[type].timer!=-1 && (su=((struct skill_unit *)sc_data[type].val2)) && su == src ){
- skill_status_change_end(bl,type,-1);
- }
- }
- break;
-
+ }
case 0x9e: /* ŽqŽç‰S */
case 0x9f: /* ƒjƒˆƒ‹ƒh‚̉ƒ */
case 0xa0: /* ‰i‰“‚̬“× */
- case 0xa1: /* ?‘¾ŒÛ‚Ì‹¿‚« */
- case 0xa2: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
+ case 0xa1: /* 푾ŒÛ‚Ì‹¿‚« */
+ case 0xa2: /* ƒj[ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
case 0xa3: /* ƒƒL‚Ì‹©‚Ñ */
case 0xa4: /* [•£‚Ì’†‚É */
- case 0xa5: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
+ case 0xa5: /* •sŽ€g‚̃W[ƒNƒtƒŠ[ƒh */
+ case 0xad: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
+ if (sc_data[type].timer!=-1 && sc_data[type].val4==(int)src) {
+ status_change_end(bl,type,-1);
+ }
+ break;
+
case 0xa6: /* •s‹¦˜a‰¹ */
case 0xa7: /* Œû“J */
case 0xa8: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
@@ -6190,123 +5887,94 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
case 0xaa: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
case 0xab: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
case 0xac: /* ƒnƒ~ƒ“ƒO */
- case 0xad: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
case 0xae: /* K‰^‚̃LƒX */
case 0xaf: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
- case 0xb4:
- {
- struct status_change *sc_data=battle_get_sc_data(bl);
- struct skill_unit *su;
- int type=SkillStatusChangeTable[sg->skill_id];
- if( sc_data && sc_data[type].timer!=-1 && (su=((struct skill_unit *)sc_data[type].val4)) && su == src ){
- skill_status_change_end(bl,type,-1);
- }
- }
- break;
- case 0xb7: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
- {
- struct block_list *target=map_id2bl(sg->val2);
- if( target && target==bl )
- skill_status_change_end(bl,SC_SPIDERWEB,-1);
- sg->limit=DIFF_TICK(tick,sg->tick)+1000;
+ if (sg->src_id==bl->id) {
+ status_change_end(bl,type,-1);
+ break;
}
- break;
- // New guild skills [Celest]
- case 0xc1: // GD_LEADERSHIP
- {
- struct status_change *sc_data=battle_get_sc_data(bl);
- if (sc_data && sc_data[SC_LEADERSHIP].timer != -1)
- skill_status_change_end(bl,SC_LEADERSHIP,-1);
+ if (sc_data[type].timer!=-1 && sc_data[type].val4==(int)src) {
+ sc_data[type].timer = add_timer(20000+tick, status_change_timer, bl->id, type);
}
- break;
- case 0xc2: // GD_GLORYWOUNDS
- {
- struct status_change *sc_data=battle_get_sc_data(bl);
- if (sc_data && sc_data[SC_GLORYWOUNDS].timer != -1)
- skill_status_change_end(bl,SC_GLORYWOUNDS,-1);
+ break;
+
+ case 0xb4: // Basilica
+ if (sc_data[type].timer!=-1 && sc_data[type].val4==(int)sg) {
+ status_change_end(bl,type,-1);
}
break;
- case 0xc3: // GD_SOULCOLD
+
+ case 0xb6:
{
- struct status_change *sc_data=battle_get_sc_data(bl);
- if (sc_data && sc_data[SC_SOULCOLD].timer != -1)
- skill_status_change_end(bl,SC_SOULCOLD,-1);
+ if (sc_data[type].timer!=-1 && sc_data[type].val4==(int)sg) {
+ status_change_end(bl,SC_FOGWALL,-1);
+ if (sc_data && sc_data[SC_BLIND].timer!=-1)
+ sc_data[SC_BLIND].timer = add_timer(
+ gettick() + 30000, status_change_timer, bl->id, 0);
+ }
+ break;
}
- break;
- case 0xc4: // GD_HAWKEYES
+
+ case 0xb7: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
{
- struct status_change *sc_data=battle_get_sc_data(bl);
- if (sc_data && sc_data[SC_HAWKEYES].timer != -1)
- skill_status_change_end(bl,SC_HAWKEYES,-1);
+ 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;
}
- break;
/* default:
if(battle_config.error_log)
printf("skill_unit_onout: Unknown skill unit id=%d block=%d\n",sg->unit_id,bl->id);
break;*/
}
- skill_unitgrouptickset_delete(bl,sg->group_id);
+
return 0;
}
+
/*==========================================
- * ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì휃Cƒxƒ“ƒg
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgŒø‰Ê”­“®/—£’Eˆ—(foreachinarea)
+ * bl: ƒ†ƒjƒbƒg(BL_PC/BL_MOB)
*------------------------------------------
*/
-int skill_unit_ondelete(struct skill_unit *src,struct block_list *bl,unsigned int tick)
+int skill_unit_effect(struct block_list *bl,va_list ap)
{
- struct skill_unit_group *sg;
+ struct skill_unit *unit;
+ struct skill_unit_group *group;
+ int flag;
+ unsigned int tick;
+ static int called = 0;
- nullpo_retr(0, src);
nullpo_retr(0, bl);
- nullpo_retr(0, sg = src->group);
+ 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( bl->prev==NULL || !src->alive )
+ if (bl->type!=BL_PC && bl->type!=BL_MOB)
return 0;
- if( bl->type!=BL_PC && bl->type!=BL_MOB )
+ if (!unit->alive || bl->prev==NULL)
return 0;
- switch(sg->unit_id){
- case 0x85: /* ƒjƒ…?ƒ} */
- case 0x7e: /* ƒZƒCƒtƒeƒBƒEƒH?ƒ‹ */
- case 0x8e: /* ƒNƒ@ƒOƒ}ƒCƒ„ */
- case 0x9a: /* ƒ{ƒ‹ƒP?ƒm */
- case 0x9b: /* ƒfƒŠƒ…?ƒW */
- case 0x9c: /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
- case 0x9e: /* ŽqŽç‰S */
- case 0x9f: /* ƒjƒˆƒ‹ƒh‚̉ƒ */
- case 0xa0: /* ‰i‰“‚̬“× */
- case 0xa1: /* ?‘¾ŒÛ‚Ì‹¿‚« */
- case 0xa2: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
- case 0xa3: /* ƒƒL‚Ì‹©‚Ñ */
- case 0xa4: /* [•£‚Ì’†‚É */
- case 0xa5: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
- case 0xa6: /* •s‹¦˜a‰¹ */
- case 0xa7: /* Œû“J */
- case 0xa8: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
- case 0xa9: /* ƒuƒ‰ƒM‚ÌŽ */
- case 0xaa: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
- case 0xab: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
- case 0xac: /* ƒnƒ~ƒ“ƒO */
- case 0xad: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
- case 0xae: /* K‰^‚̃LƒX */
- case 0xaf: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
- case 0xb4:
- case 0xc1:
- case 0xc2:
- case 0xc3:
- case 0xc4:
- return skill_unit_onout(src,bl,tick);
+ nullpo_retr(0, group=unit->group);
-/* default:
- if(battle_config.error_log)
- printf("skill_unit_ondelete: Unknown skill unit id=%d block=%d\n",sg->unit_id,bl->id);
- break;*/
+ if (flag)
+ skill_unit_onplace(unit,bl,tick);
+ else {
+ skill_unit_onout(unit,bl,tick);
+ unit = map_find_skill_unit_oncell(bl,bl->x,bl->y,group->skill_id,unit);
+ if (unit && called == 0) {
+ called = 1;
+ skill_unit_onplace(unit,bl,tick);
+ called = 0;
+ }
}
- skill_unitgrouptickset_delete(bl,sg->group_id);
+
return 0;
}
+
/*==========================================
* ƒXƒLƒ‹ƒ†ƒjƒbƒg‚ÌŒÀŠEƒCƒxƒ“ƒg
*------------------------------------------
@@ -6314,7 +5982,6 @@ int skill_unit_ondelete(struct skill_unit *src,struct block_list *bl,unsigned in
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);
@@ -6326,7 +5993,7 @@ int skill_unit_onlimit(struct skill_unit *src,unsigned int tick)
src->bl.x,src->bl.y,1);
if(group == NULL)
return 0;
- group->valstr=calloc(24, 1);
+ group->valstr=(char *) aCallocA(24, 1);
if(group->valstr==NULL){
printf("skill_unit_onlimit: out of memory !\n");
exit(1);
@@ -6344,7 +6011,7 @@ int skill_unit_onlimit(struct skill_unit *src,unsigned int tick)
{
struct map_session_data *sd = NULL;
struct map_session_data *p_sd = NULL;
- if((sd = (struct map_session_data *)(map_id2bl(sg->src_id))) == NULL)
+ if((sd = map_id2sd(sg->src_id)) == NULL)
return 0;
if((p_sd = pc_get_partner(sd)) == NULL)
return 0;
@@ -6352,38 +6019,6 @@ int skill_unit_onlimit(struct skill_unit *src,unsigned int tick)
pc_setpos(p_sd,map[src->bl.m].name,src->bl.x,src->bl.y,3);
}
break;
- case 0xc1: // GD_LEADERSHIP
- {
- struct map_session_data *sd;
- if ((sd = (struct map_session_data *)(map_id2bl(sg->src_id)))!= NULL) {
- sd->sc_data[SC_LEADERSHIP].val4 = 0;
- }
- }
- break;
- case 0xc2: // GD_GLORYWOUNDS
- {
- struct map_session_data *sd;
- if ((sd = (struct map_session_data *)(map_id2bl(sg->src_id)))!= NULL) {
- sd->sc_data[SC_GLORYWOUNDS].val4 = 0;
- }
- }
- break;
- case 0xc3: // GD_SOULCOLD
- {
- struct map_session_data *sd;
- if ((sd = (struct map_session_data *)(map_id2bl(sg->src_id)))!= NULL) {
- sd->sc_data[SC_SOULCOLD].val4 = 0;
- }
- }
- break;
- case 0xc4: // GD_HAWKEYES
- {
- struct map_session_data *sd;
- if ((sd = (struct map_session_data *)(map_id2bl(sg->src_id)))!= NULL) {
- sd->sc_data[SC_HAWKEYES].val4 = 0;
- }
- }
- break;
}
return 0;
}
@@ -6444,10 +6079,7 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
return 0;
}
- if(battle_config.pc_skill_reiteration == 0) {
- range = -1;
- switch(sd->skillid) {
- case MG_SAFETYWALL:
+ /*case MG_SAFETYWALL:
case WZ_FIREPILLAR:
case HT_SKIDTRAP:
case HT_LANDMINE:
@@ -6460,28 +6092,23 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
case HT_CLAYMORETRAP:
case HT_TALKIEBOX:
case AL_WARP:
- case PF_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
- case RG_GRAFFITI: /* ƒOƒ‰ƒtƒBƒeƒB */
+ case PF_SPIDERWEB:
+ case RG_GRAFFITI:
range = 0;
break;
case AL_PNEUMA:
range = 1;
- break;
- }
- if(range >= 0) {
- if(skill_check_unit_range(sd->bl.m,sd->skillx,sd->skilly,range,sd->skillid) > 0) {
- clif_skill_fail(sd,sd->skillid,0,0);
- sd->canact_tick = tick;
- sd->canmove_tick = tick;
- sd->skillitem = sd->skillitemlv = -1;
- return 0;
- }
- }
+ break;*/
+ 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);
+ sd->canact_tick = tick;
+ sd->canmove_tick = tick;
+ sd->skillitem = sd->skillitemlv = -1;
+ return 0;
}
- if(battle_config.pc_skill_nofootset) {
- range = -1;
- switch(sd->skillid) {
- case WZ_FIREPILLAR:
+ /*case WZ_FIREPILLAR:
case HT_SKIDTRAP:
case HT_LANDMINE:
case HT_ANKLESNARE:
@@ -6492,25 +6119,22 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
case HT_BLASTMINE:
case HT_CLAYMORETRAP:
case HT_TALKIEBOX:
- case PF_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+ case PF_SPIDERWEB:
case WZ_ICEWALL:
- range = 1;
+ range = 2;
break;
case AL_WARP:
range = 0;
- break;
- }
- if(range >= 0) {
- if(skill_check_unit_range2(sd->bl.m,sd->skillx,sd->skilly,range) > 0) {
- clif_skill_fail(sd,sd->skillid,0,0);
- sd->canact_tick = tick;
- sd->canmove_tick = tick;
- sd->skillitem = sd->skillitemlv = -1;
- return 0;
- }
- }
+ break;*/
+ 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);
+ sd->canact_tick = tick;
+ sd->canmove_tick = tick;
+ sd->skillitem = sd->skillitemlv = -1;
+ return 0;
}
-
if(battle_config.pc_land_skill_limit) {
maxcount = skill_get_maxcount(sd->skillid);
if(maxcount > 0) {
@@ -6532,7 +6156,7 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
if(sd->skilllv <= 0) return 0;
range = skill_get_range(sd->skillid,sd->skilllv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
range += battle_config.pc_skill_add_range;
if(battle_config.skill_out_range_consume) { // changed to allow casting when target walks out of range [Valaris]
if(range < distance(sd->bl.x,sd->bl.y,sd->skillx,sd->skilly)) {
@@ -6589,14 +6213,14 @@ static int skill_check_condition_char_sub(struct block_list *bl,va_list ap)
nullpo_retr(0, c=va_arg(ap,int *));
nullpo_retr(0, ssd=(struct map_session_data*)src);
- s_class = pc_calc_base_job(sd->status.class);
+ s_class = pc_calc_base_job(sd->status.class_);
//ƒ`ƒFƒbƒN‚µ‚È‚¢Ý’è‚È‚çc‚É‚ ‚肦‚È‚¢‘å‚«‚È?Žš‚ð•Ô‚µ‚ÄI—¹
if(!battle_config.player_skill_partner_check){ //–{?‚Íforeach‚Ì‘O‚É‚â‚肽‚¢‚¯‚ÇÝ’è“K—p‰ÓŠ‚ð‚܂Ƃ߂邽‚ß‚É‚±‚±‚Ö
(*c)=99;
return 0;
}
- ss_class = pc_calc_base_job(ssd->status.class);
+ ss_class = pc_calc_base_job(ssd->status.class_);
switch(ssd->skillid){
case PR_BENEDICTIO: /* ¹?~•Ÿ */
@@ -6650,24 +6274,25 @@ static int skill_check_condition_use_sub(struct block_list *bl,va_list ap)
nullpo_retr(0, c=va_arg(ap,int *));
nullpo_retr(0, ssd=(struct map_session_data*)src);
- s_class = pc_calc_base_job(sd->status.class);
-
+ s_class = pc_calc_base_job(sd->status.class_);
+
//ƒ`ƒFƒbƒN‚µ‚È‚¢Ý’è‚È‚çc‚É‚ ‚肦‚È‚¢‘å‚«‚È?Žš‚ð•Ô‚µ‚ÄI—¹
if(!battle_config.player_skill_partner_check){ //–{?‚Íforeach‚Ì‘O‚É‚â‚肽‚¢‚¯‚ÇÝ’è“K—p‰ÓŠ‚ð‚܂Ƃ߂邽‚ß‚É‚±‚±‚Ö
(*c)=99;
return 0;
}
- ss_class = pc_calc_base_job(ssd->status.class);
+ ss_class = pc_calc_base_job(ssd->status.class_);
skillid=ssd->skillid;
skilllv=ssd->skilllv;
- if(skilllv <= 0) return 0;
+ //if(skilllv <= 0) return 0;
+ if(skillid > 0 && skilllv <= 0) return 0; // celest
switch(skillid){
case PR_BENEDICTIO: /* ¹?~•Ÿ */
if(sd != ssd && (s_class.job == 4 || s_class.job == 8 || s_class.job == 15) &&
(sd->bl.x == ssd->bl.x - 1 || sd->bl.x == ssd->bl.x + 1) && sd->status.sp >= 10){
sd->status.sp -= 10;
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
(*c)++;
}
break;
@@ -6692,7 +6317,7 @@ static int skill_check_condition_use_sub(struct block_list *bl,va_list ap)
){
ssd->sc_data[SC_DANCING].val4=bl->id;
clif_skill_nodamage(bl,src,skillid,skilllv,1);
- skill_status_change_start(bl,SC_DANCING,skillid,ssd->sc_data[SC_DANCING].val2,0,src->id,skill_get_time(skillid,skilllv)+1000,0);
+ status_change_start(bl,SC_DANCING,skillid,ssd->sc_data[SC_DANCING].val2,0,src->id,skill_get_time(skillid,skilllv)+1000,0);
sd->skillid_dance=sd->skillid=skillid;
sd->skilllv_dance=sd->skilllv=skilllv;
(*c)++;
@@ -6718,7 +6343,7 @@ static int skill_check_condition_mob_master_sub(struct block_list *bl,va_list ap
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)
+ if(md->class_==mob_class && md->master_id==src_id)
(*c)++;
return 0;
}
@@ -6731,6 +6356,7 @@ 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;
nullpo_retr(0, sd);
@@ -6769,7 +6395,7 @@ int skill_check_condition(struct map_session_data *sd,int type)
clif_skill_fail(sd,sd->skillid,0,0);
return 0;
}
- if(sd->sc_data){
+ if(sd->sc_count){
if( sd->sc_data[SC_DIVINA].timer!=-1 ||
sd->sc_data[SC_ROKISWEIL].timer!=-1 ||
(sd->sc_data[SC_AUTOCOUNTER].timer != -1 && sd->skillid != KN_AUTOCOUNTER) ||
@@ -6778,11 +6404,13 @@ int skill_check_condition(struct map_session_data *sd,int type)
(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)
@@ -6854,6 +6482,10 @@ int skill_check_condition(struct map_session_data *sd,int type)
}
else sd->spiritball_old = lv;
break;
+ case MO_BODYRELOCATION:
+ if (sd->sc_count && 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)
@@ -6865,7 +6497,7 @@ int skill_check_condition(struct map_session_data *sd,int type)
return 0;
break;
case CH_TIGERFIST: //•šŒÕŒ
- if(sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != MO_COMBOFINISH)
+ if((sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != MO_COMBOFINISH) && !sd->state.skill_flag)
return 0;
break;
case CH_CHAINCRUSH: //˜A’Œ•ö?
@@ -6916,8 +6548,9 @@ int skill_check_condition(struct map_session_data *sd,int type)
case AM_SPHEREMINE: /* ƒXƒtƒBƒA?ƒ}ƒCƒ“ */
if(type&1){
int c=0;
- int maxcount=skill_get_maxcount(skill);
- int mob_class=(skill==AM_CANNIBALIZE)?1118:1142;
+ 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_foreachinarea(skill_check_condition_mob_master_sub ,sd->bl.m, 0, 0, map[sd->bl.m].xs, map[sd->bl.m].ys, BL_MOB, sd->bl.id, mob_class,&c );
if(c >= maxcount){
@@ -6929,7 +6562,7 @@ int skill_check_condition(struct map_session_data *sd,int type)
break;
case MG_FIREWALL: /* ƒtƒ@ƒCƒA?ƒEƒH?ƒ‹ */
case WZ_QUAGMIRE:
- case WZ_FIREPILLAR: // celest
+ case WZ_FIREPILLAR: // celest
case PF_FOGWALL:
/* ?§ŒÀ */
if(battle_config.pc_land_skill_limit) {
@@ -6947,6 +6580,29 @@ int skill_check_condition(struct map_session_data *sd,int type)
}
}
break;
+ // skills require arrows as of 12/07 [celest]
+ case AC_DOUBLE:
+ case AC_SHOWER:
+ case AC_CHARGEARROW:
+ case BA_MUSICALSTRIKE:
+ case DC_THROWARROW:
+ case SN_SHARPSHOOTING:
+ case CG_ARROWVULCAN:
+ if(sd->equip_index[10] < 0) {
+ clif_arrow_fail(sd,0);
+ return 0;
+ }
+ arrow_flag = 1;
+ 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;
}
if(!(type&2)){
@@ -7022,6 +6678,9 @@ int skill_check_condition(struct map_session_data *sd,int type)
}
break;
case ST_EXPLOSIONSPIRITS:
+ if (skill == MO_EXTREMITYFIST && ((sd->sc_data[SC_COMBO].timer != -1 && (sd->sc_data[SC_COMBO].val1 == MO_COMBOFINISH || sd->sc_data[SC_COMBO].val1 == CH_CHAINCRUSH)) || sd->sc_data[SC_BLADESTOP].timer!=-1)) {
+ break;
+ }
if(sd->sc_data[SC_EXPLOSIONSPIRITS].timer == -1) {
clif_skill_fail(sd,skill,0,0);
return 0;
@@ -7043,7 +6702,7 @@ int skill_check_condition(struct map_session_data *sd,int type)
}
break;
case ST_WATER:
- if(map_getcell(sd->bl.m,sd->bl.x,sd->bl.y) != 3 && (sd->sc_data[SC_DELUGE].timer==-1)){ //…ê”»’è
+ if((!map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER))&& (sd->sc_data[SC_DELUGE].timer==-1)){ //…ê”»’è
clif_skill_fail(sd,skill,0,0);
return 0;
}
@@ -7060,8 +6719,9 @@ int skill_check_condition(struct map_session_data *sd,int type)
if(((itemid[i] >= 715 && itemid[i] <= 717) || itemid[i] == 1065) && sd->sc_data[SC_INTOABYSS].timer != -1)
continue;
if(skill == WZ_FIREPILLAR && lv<=5)
- continue; // no gemstones for 1-5 [Celest]
- if(skill == AM_POTIONPITCHER && i != x)
+ continue; // no gemstones for 1-5 [Celest]
+ if((skill == AM_POTIONPITCHER ||
+ skill == CR_SLIMPITCHER) && i != x)
continue;
index[i] = pc_search_inventory(sd,itemid[i]);
@@ -7077,13 +6737,17 @@ int skill_check_condition(struct map_session_data *sd,int type)
if(!(type&1))
return 1;
- if(skill != AM_POTIONPITCHER) {
+ if(skill != AM_POTIONPITCHER &&
+ skill != CR_SLIMPITCHER &&
+ skill != MG_STONECURSE) {
if(skill == AL_WARP && !(type&2))
return 1;
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)
@@ -7112,56 +6776,50 @@ int skill_check_condition(struct map_session_data *sd,int type)
*/
int skill_castfix( struct block_list *bl, int time )
{
- struct map_session_data *sd;
+ struct map_session_data *sd = NULL;
struct mob_data *md; // [Valaris]
struct status_change *sc_data;
- int dex;
int castrate=100;
- int skill,lv,castnodex;
+ int skill,lv;
nullpo_retr(0, bl);
if(bl->type==BL_MOB){ // Crash fix [Valaris]
- md=(struct mob_data*)bl;
+ nullpo_retr(0, md=(struct mob_data*)bl);
skill = md->skillid;
lv = md->skilllv;
- }
-
- else {
- sd=(struct map_session_data*)bl;
+ } else {
+ nullpo_retr(0, sd=(struct map_session_data*)bl);
skill = sd->skillid;
lv = sd->skilllv;
}
if(lv <= 0) return 0;
- sc_data = battle_get_sc_data(bl);
- dex=battle_get_dex(bl);
+ sc_data = status_get_sc_data(bl);
if (skill > MAX_SKILL_DB || skill < 0)
return 0;
- castnodex=skill_get_castnodex(skill, lv);
+ /* ƒTƒtƒ‰ƒMƒEƒ€ */
+ if(sc_data && sc_data[SC_SUFFRAGIUM].timer!=-1 )
+ time=time*(100-sc_data[SC_SUFFRAGIUM].val1*15)/100;
+ status_change_end( bl, SC_SUFFRAGIUM, -1);
if(time==0)
return 0;
- if(castnodex > 0 && bl->type==BL_PC)
- castrate=((struct map_session_data *)bl)->castrate;
- else if (castnodex <= 0 && bl->type==BL_PC) {
- castrate=((struct map_session_data *)bl)->castrate;
- time=time*castrate*(battle_config.castrate_dex_scale - dex)/(battle_config.castrate_dex_scale * 100);
- time=time*battle_config.cast_rate/100;
+ if (sd) {
+ if(!skill_get_castnodex(skill, lv) > 0) {
+ castrate=((struct map_session_data *)bl)->castrate;
+ time=time*castrate*(battle_config.castrate_dex_scale - status_get_dex(bl))/(battle_config.castrate_dex_scale * 100);
+ time=time*battle_config.cast_rate/100;
+ }
}
- /* ƒTƒtƒ‰ƒMƒEƒ€ */
- if(sc_data && sc_data[SC_SUFFRAGIUM].timer!=-1 ){
- time=time*(100-sc_data[SC_SUFFRAGIUM].val1*15)/100;
- skill_status_change_end( bl, SC_SUFFRAGIUM, -1);
- }
/* ƒuƒ‰ƒM‚ÌŽ */
- if(sc_data && sc_data[SC_POEMBRAGI].timer!=-1 )
+ if(sc_data && sc_data[SC_POEMBRAGI].timer!=-1)
time=time*(100-(sc_data[SC_POEMBRAGI].val1*3+sc_data[SC_POEMBRAGI].val2
- +(sc_data[SC_POEMBRAGI].val3>>16)))/100;
+ +(sc_data[SC_POEMBRAGI].val3>>16)))/100;
return (time>0)?time:0;
}
@@ -7172,23 +6830,48 @@ int skill_castfix( struct block_list *bl, int time )
int skill_delayfix( struct block_list *bl, int time )
{
struct status_change *sc_data;
+ struct map_session_data *sd = NULL;
+ int skill = 0,lv = 0;
+ int delayrate = 100;
nullpo_retr(0, bl);
- sc_data = battle_get_sc_data(bl);
- if(time<=0)
- return 0;
+ if(bl->type == BL_PC){
+ nullpo_retr(0, sd = (struct map_session_data*)bl);
+ skill = sd->skillid;
+ lv = sd->skilllv;
+ }
- if(bl->type == BL_PC) {
- if( battle_config.delay_dependon_dex ) /* dex‚̉e‹¿‚ðŒvŽZ‚·‚é */
- time=time*(battle_config.castrate_dex_scale - battle_get_dex(bl))/battle_config.castrate_dex_scale;
- time=time*battle_config.delay_rate/100;
+ if(lv <= 0) return 0;
+
+ sc_data = status_get_sc_data(bl);
+
+ if(sd) {
+ delayrate = sd->delayrate;
+
+ // instant cast attack skills depend on aspd as delay [celest]
+ if (time == 0) {
+ if (skill_db[skill].skill_type == BF_WEAPON)
+ time = status_get_adelay (bl)/2;
+ else
+ time = 300; // default delay, according to official servers
+ } else if (time < 0)
+ time = abs(time) + status_get_adelay (bl)/2; // if set to <0, the aspd delay will be added
+
+ if(battle_config.delay_dependon_dex && /* dex‚̉e‹¿‚ðŒvŽZ‚·‚é */
+ !skill_get_delaynodex(skill, lv)) // if skill casttime is allowed to be reduced by dex
+ time = time * (battle_config.castrate_dex_scale - status_get_dex(bl)) / (battle_config.castrate_dex_scale);
+
+ time = time * delayrate * battle_config.delay_rate / 10000;
+
+ if (time < battle_config.min_skill_delay_limit) // check minimum skill delay
+ time = battle_config.min_skill_delay_limit;
}
/* ƒuƒ‰ƒM‚ÌŽ */
- if(sc_data && sc_data[SC_POEMBRAGI].timer!=-1 )
- time=time*(100-(sc_data[SC_POEMBRAGI].val1*3+sc_data[SC_POEMBRAGI].val2
- +(sc_data[SC_POEMBRAGI].val3&0xffff)))/100;
+ if(sc_data && sc_data[SC_POEMBRAGI].timer != -1 )
+ time = time * (100 - (sc_data[SC_POEMBRAGI].val1 * 3 + sc_data[SC_POEMBRAGI].val2
+ + (sc_data[SC_POEMBRAGI].val3 & 0xffff))) / 100;
return (time>0)?time:0;
}
@@ -7197,128 +6880,97 @@ int skill_delayfix( struct block_list *bl, int time )
* ƒXƒLƒ‹Žg—piIDŽw’èj
*------------------------------------------
*/
-int skill_use_id( struct map_session_data *sd, int target_id,
- int skill_num, int skill_lv)
+int skill_use_id (struct map_session_data *sd, int target_id, int skill_num, int skill_lv)
{
- unsigned int tick;
- int casttime=0,delay=0,skill,range;
- struct map_session_data* target_sd=NULL;
- int forcecast=0;
- struct block_list *bl;
+ int casttime = 0, delay = 0, skill, range;
+ struct map_session_data* tsd = NULL;
+ struct block_list *bl = NULL;
struct status_change *sc_data;
- tick=gettick();
+ int forcecast = 0;
+ unsigned int tick = gettick();
nullpo_retr(0, sd);
- if( (bl=map_id2bl(target_id)) == NULL ){
-/* if(battle_config.error_log)
- printf("skill target not found %d\n",target_id); */
+ if ((bl = map_id2bl(target_id)) == NULL)
return 0;
+ if (bl->type == BL_PC) {
+ nullpo_retr(0, tsd = (struct map_session_data*)bl);
}
if(sd->bl.m != bl->m || pc_isdead(sd))
return 0;
-
if(skillnotok(skill_num, sd)) // [MouseJstr]
return 0;
-
- sc_data=sd->sc_data;
+ if (tsd && skill_num == ALL_RESURRECTION && !pc_isdead(tsd))
+ return 0;
+
+ sc_data = sd->sc_data;
/* ’¾?‚âˆÙíi‚½‚¾‚µAƒOƒŠƒ€‚È‚Ç‚Ì”»’è‚ð‚·‚éj */
- if( sd->opt1>0 )
+ if (sd->opt1 > 0)
return 0;
- if(sd->sc_data){
- if(sc_data[SC_CHASEWALK].timer != -1) return 0;
- if(sc_data[SC_VOLCANO].timer != -1){
- if(skill_num==WZ_ICEWALL) return 0;
- }
- if(sc_data[SC_ROKISWEIL].timer!=-1){
- if(skill_num==BD_ADAPTATION) return 0;
- }
- if( sd->sc_data[SC_DIVINA].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)){
+ if (sc_data) {
+ // allow to use only Chasewalk [celest]
+ if (sc_data[SC_CHASEWALK].timer != -1 && skill_num != ST_CHASEWALK)
+ return 0;
+ if (sc_data[SC_VOLCANO].timer != -1 && skill_num == WZ_ICEWALL)
+ return 0;
+ if (sc_data[SC_ROKISWEIL].timer != -1 && skill_num == BD_ADAPTATION)
+ return 0;
+ if (sc_data[SC_DIVINA].timer != -1 ||
+ sc_data[SC_ROKISWEIL].timer != -1 ||
+ (sc_data[SC_AUTOCOUNTER].timer != -1 && sd->skillid != KN_AUTOCOUNTER) ||
+ sc_data[SC_STEELBODY].timer != -1 ||
+ sc_data[SC_BERSERK].timer != -1 ||
+ (sc_data[SC_MARIONETTE].timer != -1 && sd->skillid != CG_MARIONETTE))
return 0; /* ?‘ÔˆÙí‚â’¾?‚È‚Ç */
+ if (sc_data[SC_BLADESTOP].timer != -1) {
+ if (sc_data[SC_BLADESTOP].val2 == 1) return 0;//”’‰H‚³‚ꂽ‘¤‚Ȃ̂Ń_ƒ
+ switch (sc_data[SC_BLADESTOP].val1) {
+ case 1: return 0;
+ case 2: if (skill_num != MO_FINGEROFFENSIVE) return 0; else break;
+ case 3: if (skill_num != MO_FINGEROFFENSIVE && skill_num != MO_INVESTIGATE) return 0; else break;
+ case 4: if (skill_num != MO_FINGEROFFENSIVE && skill_num != MO_INVESTIGATE && skill_num != MO_CHAINCOMBO) return 0; else break;
+ case 5: if (skill_num != MO_FINGEROFFENSIVE && skill_num != MO_INVESTIGATE && skill_num != MO_CHAINCOMBO && skill_num!=MO_EXTREMITYFIST) return 0; else break;
+ }
}
-
- if(sc_data[SC_BLADESTOP].timer != -1){
- int lv = sc_data[SC_BLADESTOP].val1;
- if(sc_data[SC_BLADESTOP].val2==1) return 0;//”’‰H‚³‚ꂽ‘¤‚Ȃ̂Ń_ƒ
- if(lv==1) return 0;
- if(lv==2 && skill_num!=MO_FINGEROFFENSIVE) return 0;
- if(lv==3 && skill_num!=MO_FINGEROFFENSIVE && skill_num!=MO_INVESTIGATE) return 0;
- if(lv==4 && skill_num!=MO_FINGEROFFENSIVE && skill_num!=MO_INVESTIGATE && skill_num!=MO_CHAINCOMBO) return 0;
- if(lv==5 && skill_num!=MO_FINGEROFFENSIVE && skill_num!=MO_INVESTIGATE && skill_num!=MO_CHAINCOMBO && skill_num!=MO_EXTREMITYFIST) return 0;
- }
-
- if (sd->sc_data[SC_BLOCKSKILL].timer!=-1)
- if (skill_num == sd->sc_data[SC_BLOCKSKILL].val3)
- return 0;
-
if (sc_data[SC_BASILICA].timer != -1) { // Disallow all other skills in Basilica [celest]
- struct skill_unit *su;
- if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) {
- struct skill_unit_group *sg;
- // if caster is the owner of basilica
- if ((sg = su->group) && sg->src_id == sd->bl.id) {
- // skill_status_change_end(&sd->bl,SC_BASILICA,-1);
- // skill_delunitgroup (sg);
- if (skill_num != HP_BASILICA) return 0;
- } // otherwise...
- else
- return 0;
- }
- }
+ struct skill_unit_group *sg = (struct skill_unit_group *)sc_data[SC_BASILICA].val4;
+ // if caster is the owner of basilica
+ if (sg && sg->src_id == sd->bl.id &&
+ skill_num == HP_BASILICA) ; // do nothing
+ // otherwise...
+ else return 0;
+ }
+ /* ‰‰‘t/ƒ_ƒ“ƒX’† */
+ if (sc_data[SC_DANCING].timer != -1) {
+ if (sc_data[SC_DANCING].val4 && skill_num != BD_ADAPTATION) //‡‘t’†‚̓AƒhƒŠƒuˆÈŠO•s‰Â
+ return 0;
+ if (skill_num != BD_ADAPTATION && skill_num != BA_MUSICALSTRIKE && skill_num != DC_THROWARROW)
+ return 0;
+ }
}
- if(sd->status.option&4 && skill_num==TF_HIDING)
+ if (sd->status.option & 4 && skill_num == TF_HIDING)
return 0;
- if(sd->status.option&2 && skill_num!=TF_HIDING && skill_num!=AS_GRIMTOOTH && skill_num!=RG_BACKSTAP && skill_num!=RG_RAID )
+ if (sd->status.option & 2 && skill_num != TF_HIDING && skill_num != AS_GRIMTOOTH && skill_num != RG_BACKSTAP && skill_num != RG_RAID)
return 0;
-
- /*if(map[sd->bl.m].flag.gvg){ //GvG‚ÅŽg—p‚Å‚«‚È‚¢ƒXƒLƒ‹
- switch(skill_num){
- case SM_ENDURE:
- case AL_TELEPORT:
- case AL_WARP:
- case WZ_ICEWALL:
- case TF_BACKSLIDING:
- //case LK_BERSERK: // now usable in WoE - celest
- case HP_BASILICA:
- case HP_ASSUMPTIO:
- case ST_CHASEWALK:
+ if(skill_get_inf2(skill_num) & 0x200 && sd->bl.id == target_id)
return 0;
- }
- }*/
- /* ‰‰‘t/ƒ_ƒ“ƒX’† */
- if( sc_data && sc_data[SC_DANCING].timer!=-1 ){
-// if(battle_config.pc_skill_log)
-// printf("dancing! %d\n",skill_num);
- if( sc_data[SC_DANCING].val4 && skill_num!=BD_ADAPTATION ) //‡‘t’†‚̓AƒhƒŠƒuˆÈŠO•s‰Â
- return 0;
- if(skill_num!=BD_ADAPTATION && skill_num!=BA_MUSICALSTRIKE && skill_num!=DC_THROWARROW){
- return 0;
- }
- }
-
- if(skill_get_inf2(skill_num)&0x200 && sd->bl.id == target_id)
- return 0;
//’¼‘O‚̃XƒLƒ‹‚ª‰½‚©?‚¦‚é•K—v‚Ì‚ ‚éƒXƒLƒ‹
- switch(skill_num){
+ switch (skill_num) {
case SA_CASTCANCEL:
- if(sd->skillid != skill_num){ //ƒLƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹Ž©?‚Í?‚¦‚È‚¢
+ 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‚肪‚È‚¢‚Æ‚¾‚ß
+ if (!sd->skillid_dance) { //‘O‰ñŽg—p‚µ‚½—x‚肪‚È‚¢‚Æ‚¾‚ß
clif_skill_fail(sd,skill_num,0,0);
return 0;
- }else{
+ } else {
sd->skillid_old = skill_num;
}
break;
@@ -7331,19 +6983,15 @@ int skill_use_id( struct map_session_data *sd, int target_id,
struct guild *g;
if (!sd->status.guild_id)
return 0;
- if (!(g = guild_search(sd->status.guild_id)))
+ if ((g = guild_search(sd->status.guild_id)) == NULL)
return 0;
if (strcmp(sd->status.name,g->master))
return 0;
- if (skill_lv <= 0) skill_lv = 1;
+ skill_lv = guild_checkskill(g, skill_num);
+ if (skill_lv <= 0) return 0;
}
break;
- }
-
- sd->skillid = skill_num;
- sd->skilllv = skill_lv;
- switch(skill_num){ //Ž–‘O‚ɃŒƒxƒ‹‚ª?‚í‚Á‚½‚è‚·‚éƒXƒLƒ‹
case BD_LULLABY: /* ŽqŽç‰Ì */
case BD_RICHMANKIM: /* ƒjƒˆƒ‹ƒh‚̉ƒ */
case BD_ETERNALCHAOS: /* ‰i‰“‚̬“× */
@@ -7355,120 +7003,179 @@ int skill_use_id( struct map_session_data *sd, int target_id,
case BD_RAGNAROK: /* _?‚Ì?¨ */
case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç */
{
- int range=1;
- int c=0;
- 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);
- if(c<1){
+ int range = 1;
+ int c = 0;
+ 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);
+ if (c < 1) {
clif_skill_fail(sd,skill_num,0,0);
return 0;
- }else if(c==99){ //‘Š•û•s—vݒ肾‚Á‚½
+ } else if (c == 99) { //‘Š•û•s—vݒ肾‚Á‚½
;
- }else{
- sd->skilllv=(c + skill_lv)/2;
+ } else {
+ sd->skilllv = (c + skill_lv)/2;
}
}
break;
}
- if(!skill_check_condition(sd,0)) return 0;
-
- /* ŽË’ö‚ÆáŠQ•¨ƒ`ƒFƒbƒN */
- range = skill_get_range(skill_num,skill_lv);
- if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
- if(!battle_check_range(&sd->bl,bl,range) )
- return 0;
+ sd->skillid = skill_num;
+ sd->skilllv = skill_lv;
+ if (!skill_check_condition(sd,0)) return 0;
- if(bl->type==BL_PC) {
- target_sd=(struct map_session_data*)bl;
- if(target_sd && skill_num == ALL_RESURRECTION && !pc_isdead(target_sd))
- return 0;
+ {
+ int check_range_flag = 0;
+
+ /* ŽË’ö‚ÆáŠQ•¨ƒ`ƒFƒbƒN */
+ 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 && 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;
+ }
}
- if((skill_num != MO_CHAINCOMBO &&
- skill_num != MO_COMBOFINISH &&
- skill_num != MO_EXTREMITYFIST &&
- skill_num != CH_TIGERFIST &&
- skill_num != CH_CHAINCRUSH) ||
+
+ if ((skill_num != MO_CHAINCOMBO &&
+ skill_num != MO_COMBOFINISH &&
+ skill_num != MO_EXTREMITYFIST &&
+ skill_num != CH_TIGERFIST &&
+ skill_num != CH_CHAINCRUSH) ||
+ (skill_num == CH_CHAINCRUSH && sd->state.skill_flag) ||
(skill_num == MO_EXTREMITYFIST && sd->state.skill_flag) )
pc_stopattack(sd);
- casttime=skill_castfix(&sd->bl, skill_get_cast( skill_num,skill_lv) );
- if(skill_num != SA_MAGICROD)
- delay=skill_delayfix(&sd->bl, skill_get_delay( skill_num,skill_lv) );
- //sd->state.skillcastcancel = skill_db[skill_num].castcancel;
+ casttime = skill_castfix(&sd->bl, skill_get_cast(skill_num, skill_lv));
+ if (skill_num != SA_MAGICROD)
+ delay = skill_delayfix(&sd->bl, skill_get_delay(skill_num, skill_lv));
sd->state.skillcastcancel = skill_get_castcancel(skill_num);
- switch(skill_num){ /* ‰½‚©“ÁŽê‚È?—‚ª•K—v */
-// case AL_HEAL: /* ƒq?ƒ‹ */
-// if(battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)))
-// forcecast=1; /* ƒq?ƒ‹ƒAƒ^ƒbƒN‚È‚ç‰r¥ƒGƒtƒFƒNƒg—L‚è */
-// break;
+ switch (skill_num) { /* ‰½‚©“ÁŽê‚È?—‚ª•K—v */
case ALL_RESURRECTION: /* ƒŠƒUƒŒƒNƒVƒ‡ƒ“ */
- if(bl->type != BL_PC && battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl))){ /* “G‚ªƒAƒ“ƒfƒbƒh‚È‚ç */
- forcecast=1; /* ƒ^?ƒ“ƒAƒ“ƒfƒbƒg‚Æ“¯‚¶‰r¥ŽžŠÔ */
- casttime=skill_castfix(&sd->bl, skill_get_cast(PR_TURNUNDEAD,skill_lv) );
+ if (!tsd && 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, skill_get_cast(PR_TURNUNDEAD, skill_lv));
}
break;
+
case MO_FINGEROFFENSIVE: /* Žw? */
- casttime += casttime * ((skill_lv > sd->spiritball)? sd->spiritball:skill_lv);
+ casttime += casttime * ((skill_lv > sd->spiritball) ? sd->spiritball : skill_lv);
break;
+
case MO_CHAINCOMBO: /*˜A‘Ŷ*/
target_id = sd->attacktarget;
- if( sc_data && sc_data[SC_BLADESTOP].timer!=-1 ){
+ if (sc_data && sc_data[SC_BLADESTOP].timer != -1){
struct block_list *tbl;
- if((tbl=(struct block_list *)sc_data[SC_BLADESTOP].val4) == NULL) //ƒ^?ƒQƒbƒg‚ª‚¢‚È‚¢H
+ if ((tbl=(struct block_list *)sc_data[SC_BLADESTOP].val4) == NULL) //ƒ^?ƒQƒbƒg‚ª‚¢‚È‚¢H
return 0;
target_id = tbl->id;
}
break;
- case MO_COMBOFINISH: /*–Ò—´Œ*/
- case CH_TIGERFIST: /* •šŒÕŒ */
+ case MO_COMBOFINISH: /*–Ò—´Œ*/
case CH_CHAINCRUSH: /* ˜A’Œ•ö? */
target_id = sd->attacktarget;
break;
+ case CH_TIGERFIST: /* •šŒÕŒ */
+ if (sc_data && sc_data[SC_COMBO].timer != -1 && sc_data[SC_COMBO].val1 == MO_COMBOFINISH)
+ target_id = sd->attacktarget;
+ 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_CHAINCRUSH)) {
+ if (sc_data && sc_data[SC_COMBO].timer != -1 && (sc_data[SC_COMBO].val1 == MO_COMBOFINISH || sc_data[SC_COMBO].val1 == CH_CHAINCRUSH)) {
casttime = 0;
target_id = sd->attacktarget;
}
- forcecast=1;
+ forcecast = 1;
break;
+
case SA_MAGICROD:
case SA_SPELLBREAKER:
- forcecast=1;
+ forcecast = 1;
break;
+
case WE_MALE:
case WE_FEMALE:
{
- struct map_session_data *p_sd = NULL;
- if((p_sd = pc_get_partner(sd)) == NULL)
+ struct map_session_data *p_sd = pc_get_partner(sd);
+ if (p_sd == NULL)
+ return 0;
+ if (skill_num == WE_MALE && sd->status.hp <= ((15*sd->status.max_hp)/100)) // Requires more than 15% of Max HP for WE_MALE
+ return 0;
+ else if (skill_num == WE_FEMALE && sd->status.sp <= ((15*sd->status.max_sp)/100)) // Requires more than 15% of Max SP for WE_FEMALE
return 0;
target_id = p_sd->bl.id;
//range‚ð‚à‚¤1‰ñ?¸
- range = skill_get_range(skill_num,skill_lv);
- if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
- if(!battle_check_range(&sd->bl,&p_sd->bl,range))
+ if (!battle_check_range(&sd->bl, &p_sd->bl, skill_get_range(skill_num,skill_lv)))
return 0;
}
break;
- case AS_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
+
+ // 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
+
+ // skip range check
+ //range‚ð‚à‚¤1‰ñ?¸
+ //range = skill_get_range(skill_num,skill_lv);
+ //if(!battle_check_range(&sd->bl,&p_sd->bl,range))
+ // return 0;
+ }
+ break;
+
+ case WE_CALLBABY:
{
- struct status_change *t_sc_data = battle_get_sc_data(bl);
- if(t_sc_data && t_sc_data[SC_POISON].timer==-1){
- clif_skill_fail(sd,skill_num,0,10);
+ struct map_session_data *p_sd = pc_get_child(sd);
+ if (p_sd == NULL)
+ return 0;
+ target_id = p_sd->bl.id;
+ //range‚ð‚à‚¤1‰ñ?¸
+ if(!battle_check_range(&sd->bl, &p_sd->bl, skill_get_range(skill_num,skill_lv)))
return 0;
- }
}
break;
- case PF_MEMORIZE: /* ƒƒ‚ƒ‰ƒCƒY */
- casttime = 12000;
+
+ case HP_BASILICA: /* ƒoƒWƒŠƒJ */
+ {
+ if (skill_check_unit_range(sd->bl.m,sd->bl.x,sd->bl.y,sd->skillid,sd->skilllv)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return 0;
+ }
+ if (skill_check_unit_range2(&sd->bl,sd->bl.m,sd->bl.x,sd->bl.y,sd->skillid,sd->skilllv)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return 0;
+ }
+ // cancel Basilica if already in effect
+ if (sc_data && sc_data[SC_BASILICA].timer != -1) {
+ struct skill_unit_group *sg = (struct skill_unit_group *)sd->sc_data[SC_BASILICA].val4;
+ if (sg && sg->src_id == sd->bl.id) {
+ status_change_end(&sd->bl,SC_BASILICA,-1);
+ skill_delunitgroup (sg);
+ return 0;
+ }
+ }
+ }
break;
+
case GD_BATTLEORDER:
case GD_REGENERATION:
case GD_RESTORE:
@@ -7478,62 +7185,52 @@ int skill_use_id( struct map_session_data *sd, int target_id,
}
//ƒƒ‚ƒ‰ƒCƒY?‘Ô‚È‚çƒLƒƒƒXƒgƒ^ƒCƒ€‚ª1/3
- if(sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0){
+ if (sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0) {
casttime = casttime/2;
- if((--sc_data[SC_MEMORIZE].val2)<=0)
- skill_status_change_end(&sd->bl, SC_MEMORIZE, -1);
+ if ((--sc_data[SC_MEMORIZE].val2) <= 0)
+ status_change_end(&sd->bl, SC_MEMORIZE, -1);
}
- if(battle_config.pc_skill_log)
- printf("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 (battle_config.pc_skill_log)
+ printf ("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(sd->skillitem == skill_num)
-// casttime = delay = 0;
-
- if( casttime>0 || forcecast ){ /* ‰r¥‚ª•K—v */
+ if (casttime > 0 || forcecast) { /* ‰r¥‚ª•K—v */
struct mob_data *md;
- clif_skillcasting( &sd->bl, sd->bl.id, target_id, 0,0, skill_num,casttime);
+ clif_skillcasting(&sd->bl, sd->bl.id, target_id, 0,0, skill_num,casttime);
/* ‰r¥”½?ƒ‚ƒ“ƒXƒ^? */
- if( bl->type==BL_MOB && (md=(struct mob_data *)bl) && mob_db[md->class].mode&0x10 &&
- md->state.state!=MS_ATTACK && sd->invincible_timer == -1){
- md->target_id=sd->bl.id;
+ if (bl->type == BL_MOB && (md = (struct mob_data *)bl) && mob_db[md->class_].mode & 0x10 &&
+ md->state.state != MS_ATTACK && sd->invincible_timer == -1){
+ md->target_id = sd->bl.id;
md->state.targettype = ATTACKABLE;
- md->min_chase=13;
+ md->min_chase = 13;
}
}
- if( casttime<=0 ) /* ‰r¥‚Ì–³‚¢‚à‚̂̓Lƒƒƒ“ƒZƒ‹‚³‚ê‚È‚¢ */
- sd->state.skillcastcancel=0;
-
- sd->skilltarget = target_id;
-/* sd->cast_target_bl = bl; */
- sd->skillx = 0;
- sd->skilly = 0;
+ sd->skilltarget = target_id;
+ sd->skillx = 0;
+ sd->skilly = 0;
sd->canact_tick = tick + casttime + delay;
sd->canmove_tick = tick;
- if(!(battle_config.pc_cloak_check_type&2) && sc_data && sc_data[SC_CLOAKING].timer != -1 && sd->skillid != AS_CLOAKING)
- skill_status_change_end(&sd->bl,SC_CLOAKING,-1);
- if(casttime > 0) {
- sd->skilltimer = add_timer( tick+casttime, skill_castend_id, sd->bl.id, 0 );
- if((skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
+
+ 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);
+ if (casttime > 0) {
+ sd->skilltimer = add_timer (tick + casttime, skill_castend_id, sd->bl.id, 0);
+ if ((skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
sd->prev_speed = sd->speed;
- sd->speed = sd->speed*(175 - skill*5)/100;
- clif_updatestatus(sd,SP_SPEED);
+ status_calc_speed (sd);
}
else
pc_stop_walking(sd,0);
- }
- else {
- if(skill_num != SA_CASTCANCEL)
+ } 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);
}
- //ƒ}ƒWƒbƒNƒpƒ?‚Ì?‰ÊI—¹
- //if(sc_data && sc_data[SC_MAGICPOWER].timer != -1 && skill_num != HW_MAGICPOWER)
- // skill_status_change_end(&sd->bl,SC_MAGICPOWER,-1); // moved
-
return 0;
}
@@ -7541,137 +7238,127 @@ int skill_use_id( struct map_session_data *sd, int target_id,
* ƒXƒLƒ‹Žg—piꊎw’èj
*------------------------------------------
*/
-int skill_use_pos( struct map_session_data *sd,
- int skill_x, int skill_y, 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)
{
struct block_list bl;
struct status_change *sc_data;
- unsigned int tick;
- int casttime=0,delay=0,skill,range;
+ int casttime = 0, delay = 0, skill, range;
+ unsigned int tick = gettick();
nullpo_retr(0, sd);
- if(pc_isdead(sd))
+ if (pc_isdead(sd))
return 0;
-
if (skillnotok(skill_num, sd)) // [MoueJstr]
return 0;
-
- if(skill_num==WZ_ICEWALL && map[sd->bl.m].flag.noicewall && !map[sd->bl.m].flag.pvp) { // noicewall flag [Valaris]
+ if (skill_num == WZ_ICEWALL && map[sd->bl.m].flag.noicewall && !map[sd->bl.m].flag.pvp) { // noicewall flag [Valaris]
clif_skill_fail(sd,sd->skillid,0,0);
return 0;
}
- sc_data=sd->sc_data;
+ sc_data = sd->sc_data;
- if( sd->opt1>0 )
+ if (sd->opt1 > 0)
return 0;
- if(sc_data){
- if( sc_data[SC_DIVINA].timer!=-1 ||
- sc_data[SC_ROKISWEIL].timer!=-1 ||
+ if (sc_data){
+ if (sc_data[SC_DIVINA].timer != -1 ||
+ sc_data[SC_ROKISWEIL].timer != -1 ||
sc_data[SC_AUTOCOUNTER].timer != -1 ||
sc_data[SC_STEELBODY].timer != -1 ||
sc_data[SC_DANCING].timer!=-1 ||
sc_data[SC_BERSERK].timer != -1 ||
- sd->sc_data[SC_MARIONETTE].timer != -1)
+ sc_data[SC_MARIONETTE].timer != -1)
return 0; /* ?‘ÔˆÙí‚â’¾?‚È‚Ç */
- if (sd->sc_data[SC_BLOCKSKILL].timer!=-1)
- if (skill_num == sd->sc_data[SC_BLOCKSKILL].val3)
- return 0;
-
- if (sc_data[SC_BASILICA].timer != -1) { // Basilica cancels if caster moves [celest]
- struct skill_unit *su;
- if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) {
- struct skill_unit_group *sg;
- // if caster is the owner of basilica
- if ((sg = su->group) && sg->src_id == sd->bl.id) {
- // skill_status_change_end(&sd->bl,SC_BASILICA,-1);
- // skill_delunitgroup (sg);
- if (skill_num != HP_BASILICA) return 0;
- } // otherwise...
- else
- return 0;
- }
+ if (sc_data[SC_BASILICA].timer != -1) {
+ struct skill_unit_group *sg = (struct skill_unit_group *)sc_data[SC_BASILICA].val4;
+ // if caster is the owner of basilica
+ if (sg && sg->src_id == sd->bl.id &&
+ skill_num == HP_BASILICA) ; // do nothing
+ // otherwise...
+ else return 0;
}
}
- if(sd->status.option&2)
+ if(sd->status.option & 2)
return 0;
-/* if(map[sd->bl.m].flag.gvg &&
- (skill_num == SM_ENDURE || skill_num == AL_TELEPORT ||
- skill_num == AL_WARP || skill_num == WZ_ICEWALL ||
- skill_num == TF_BACKSLIDING))
- return 0;*/
-
sd->skillid = skill_num;
sd->skilllv = skill_lv;
- if(skill_lv <= 0) return 0;
+ if (skill_lv <= 0) return 0;
sd->skillx = skill_x;
sd->skilly = skill_y;
- if(!skill_check_condition(sd,0)) return 0;
+ 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;
- range = skill_get_range(skill_num,skill_lv);
- if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
- if(!battle_check_range(&sd->bl,&bl,range) )
- return 0;
+
+ {
+ int check_range_flag = 0;
+
+ /* ŽË’ö‚ÆáŠQ•¨ƒ`ƒFƒbƒN */
+ 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 && 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_get_cast( skill_num,skill_lv) );
- delay=skill_delayfix(&sd->bl, skill_get_delay( skill_num,skill_lv) );
+ casttime = skill_castfix(&sd->bl, skill_get_cast( skill_num,skill_lv) );
+ delay = skill_delayfix(&sd->bl, skill_get_delay( skill_num,skill_lv) );
sd->state.skillcastcancel = skill_db[skill_num].castcancel;
- if(battle_config.pc_skill_log)
- printf("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);
+ if (battle_config.pc_skill_log)
+ printf("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);
-// if(sd->skillitem == skill_num)
-// casttime = delay = 0;
//ƒƒ‚ƒ‰ƒCƒY?‘Ô‚È‚çƒLƒƒƒXƒgƒ^ƒCƒ€‚ª1/3
- if(sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0){
+ if (sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0){
casttime = casttime/3;
- if((--sc_data[SC_MEMORIZE].val2)<=0)
- skill_status_change_end(&sd->bl, SC_MEMORIZE, -1);
+ if ((--sc_data[SC_MEMORIZE].val2)<=0)
+ status_change_end(&sd->bl, SC_MEMORIZE, -1);
}
- if( casttime>0 ) /* ‰r¥‚ª•K—v */
- clif_skillcasting( &sd->bl,
- sd->bl.id, 0, skill_x,skill_y, skill_num,casttime);
-
- if( casttime<=0 ) /* ‰r¥‚Ì–³‚¢‚à‚̂̓Lƒƒƒ“ƒZƒ‹‚³‚ê‚È‚¢ */
- sd->state.skillcastcancel=0;
-
+ if (casttime > 0) /* ‰r¥‚ª•K—v */
+ clif_skillcasting(&sd->bl, sd->bl.id, 0, skill_x, skill_y, skill_num, casttime);
+
sd->skilltarget = 0;
-/* sd->cast_target_bl = NULL; */
- tick=gettick();
sd->canact_tick = tick + casttime + delay;
sd->canmove_tick = tick;
- if(!(battle_config.pc_cloak_check_type&2) && sc_data && sc_data[SC_CLOAKING].timer != -1)
- skill_status_change_end(&sd->bl,SC_CLOAKING,-1);
- if(casttime > 0) {
- sd->skilltimer = add_timer( tick+casttime, skill_castend_pos, sd->bl.id, 0 );
- if((skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
+ if (!(battle_config.pc_cloak_check_type&2) && sc_data && sc_data[SC_CLOAKING].timer != -1)
+ status_change_end(&sd->bl,SC_CLOAKING,-1);
+ if (casttime > 0) {
+ sd->skilltimer = add_timer(tick + casttime, skill_castend_pos, sd->bl.id, 0);
+ if ((skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
sd->prev_speed = sd->speed;
- sd->speed = sd->speed*(175 - skill*5)/100;
- clif_updatestatus(sd,SP_SPEED);
+ status_calc_speed (sd);
}
else
pc_stop_walking(sd,0);
- }
- else {
+ } else {
+ sd->state.skillcastcancel = 0; /* ‰r¥‚Ì–³‚¢‚à‚̂̓Lƒƒƒ“ƒZƒ‹‚³‚ê‚È‚¢ */
sd->skilltimer = -1;
skill_castend_pos(sd->skilltimer,tick,sd->bl.id,0);
}
//ƒ}ƒWƒbƒNƒpƒ?‚Ì?‰ÊI—¹
- if(sc_data && sc_data[SC_MAGICPOWER].timer != -1 && skill_num != HW_MAGICPOWER)
- skill_status_change_end(&sd->bl,SC_MAGICPOWER,-1);
+ if (skill_get_unit_id(skill_num, 0) != 0x86 &&
+ sc_data && sc_data[SC_MAGICPOWER].timer != -1)
+ status_change_end(&sd->bl,SC_MAGICPOWER,-1);
return 0;
}
@@ -7680,60 +7367,59 @@ int skill_use_pos( struct map_session_data *sd,
* ƒXƒLƒ‹‰r¥ƒLƒƒƒ“ƒZƒ‹
*------------------------------------------
*/
-int skill_castcancel(struct block_list *bl,int type)
+int skill_castcancel (struct block_list *bl, int type)
{
int inf;
- int ret=0;
+ 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();
+ 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->canact_tick = tick;
sd->canmove_tick = tick;
- if( sd->skilltimer!=-1){
- if(pc_checkskill(sd,SA_FREECAST) > 0) {
+ if (sd->skilltimer != -1) {
+ if (pc_checkskill(sd,SA_FREECAST) > 0) {
sd->speed = sd->prev_speed;
clif_updatestatus(sd,SP_SPEED);
}
- if(!type) {
- if((inf = skill_get_inf( sd->skillid )) == 2 || inf == 32)
- ret=delete_timer( sd->skilltimer, skill_castend_pos );
+ if (!type) {
+ if ((inf = skill_get_inf( sd->skillid )) == 2 || inf == 32)
+ ret = delete_timer( sd->skilltimer, skill_castend_pos );
else
ret=delete_timer( sd->skilltimer, skill_castend_id );
- if(ret<0)
- printf("delete timer error : skillid : %d\n",sd->skillid);
- }
- else {
- if((inf = skill_get_inf( sd->skillid_old )) == 2 || inf == 32)
- ret=delete_timer( sd->skilltimer, skill_castend_pos );
+ if (ret < 0)
+ printf("delete timer error : skillid : %d\n", sd->skillid);
+ } else {
+ if ((inf = skill_get_inf( sd->skillid_old )) == 2 || inf == 32)
+ ret = delete_timer( sd->skilltimer, skill_castend_pos );
else
- ret=delete_timer( sd->skilltimer, skill_castend_id );
- if(ret<0)
- printf("delete timer error : skillid : %d\n",sd->skillid_old);
+ ret = delete_timer( sd->skilltimer, skill_castend_id );
+ if (ret < 0)
+ printf("delete timer error : skillid : %d\n", sd->skillid_old);
}
- sd->skilltimer=-1;
+ sd->skilltimer = -1;
clif_skillcastcancel(bl);
}
-
return 0;
- }else if(bl->type==BL_MOB){
- struct mob_data *md=(struct mob_data *)bl;
+ } else if (bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
nullpo_retr(0, md);
- if( md->skilltimer!=-1 ){
- if((inf = skill_get_inf( md->skillid )) == 2 || inf == 32)
- ret=delete_timer( md->skilltimer, mobskill_castend_pos );
+ if (md->skilltimer != -1) {
+ if ((inf = skill_get_inf( md->skillid )) == 2 || inf == 32)
+ ret = delete_timer( md->skilltimer, mobskill_castend_pos );
else
- ret=delete_timer( md->skilltimer, mobskill_castend_id );
- md->skilltimer=-1;
+ ret = delete_timer( md->skilltimer, mobskill_castend_id );
+ md->skilltimer = -1;
clif_skillcastcancel(bl);
}
- if(ret<0)
- printf("delete timer error : skillid : %d\n",md->skillid);
+ if (ret < 0)
+ printf("delete timer error : skillid : %d\n", md->skillid);
return 0;
}
+
return 1;
}
/*=========================================
@@ -7912,13 +7598,14 @@ int skill_devotion3(struct block_list *bl,int target)
int n,r=0;
nullpo_retr(1, bl);
+ md = (struct map_session_data *)bl;
- if( (md = (struct map_session_data *)bl) == NULL || (sd = map_id2sd(target)) == NULL )
+ if ((sd = map_id2sd(target))==NULL)
return 1;
else
r = distance(bl->x,bl->y,sd->bl.x,sd->bl.y);
- if(pc_checkskill(sd,CR_DEVOTION)+6 < r){ // ‹–—e”Í?‚ð’´‚¦‚Ä‚½
+ if(pc_checkskill(md,CR_DEVOTION)+6 < r){ // ‹–—e”Í?‚ð’´‚¦‚Ä‚½
for(n=0;n<5;n++)
if(md->dev.val1[n]==target)
md->dev.val2[n]=0; // —£‚ꂽŽž‚ÍA?‚ð؂邾‚¯
@@ -7936,7 +7623,7 @@ void skill_devotion_end(struct map_session_data *md,struct map_session_data *sd,
md->dev.val1[target]=md->dev.val2[target]=0;
if(sd && sd->sc_data){
- // skill_status_change_end(sd->bl,SC_DEVOTION,-1);
+ // status_change_end(sd->bl,SC_DEVOTION,-1);
sd->sc_data[SC_DEVOTION].val1=0;
sd->sc_data[SC_DEVOTION].val2=0;
clif_status_change(&sd->bl,SC_DEVOTION,0);
@@ -7978,7 +7665,7 @@ int skill_autospell(struct map_session_data *sd,int skillid)
if(maxlv > (lv=pc_checkskill(sd,skillid)))
maxlv = lv;
- skill_status_change_start(&sd->bl,SC_AUTOSPELL,skilllv,skillid,maxlv,0, // val1:ƒXƒLƒ‹ID val2:Žg—pÅ‘å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;
}
@@ -8087,34 +7774,64 @@ int skill_frostjoke_scream(struct block_list *bl,va_list ap)
if(src == bl)//Ž©•ª‚É‚Í?‚©‚È‚¢
return 0;
- if(battle_check_target(src,bl,BCT_ENEMY) > 0)
+ if (map[src->m].flag.gvg || map[src->m].flag.pvp)
skill_additional_effect(src,bl,skillnum,skilllv,BF_MISC,tick);
- else if(battle_check_target(src,bl,BCT_PARTY) > 0) {
- if(rand()%100 < 10)//PTƒƒ“ƒo‚É‚à’áŠm—¦‚Å‚©‚©‚é(‚Æ‚è‚ ‚¦‚¸10%)
+ // we freeze everybody except of ourselfes on pvp/gvg [veider]
+ else {
+ 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);
}
+ // so on non-pvp/gvg we are just freezing as freezed before
return 0;
}
/*==========================================
- *ƒAƒuƒ‰ƒJƒ_ƒuƒ‰‚ÌŽg—pƒXƒLƒ‹Œˆ’è(Œˆ’èƒXƒLƒ‹‚ªƒ_ƒ‚È‚ç0‚ð•Ô‚·)
+ * Moonlit creates a 'safe zone' [celest]
*------------------------------------------
*/
-int skill_abra_dataset(int skilllv)
+static int skill_moonlit_count(struct block_list *bl,va_list ap)
{
- int skill = rand()%331;
+ int *c, id;
+ struct map_session_data *sd;
- if(skilllv <= 0) return 0;
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, (sd=(struct map_session_data *)bl));
- //db‚ÉŠî‚­ƒŒƒxƒ‹?Šm—¦”»’è
- if(skill_abra_db[skill].req_lv > skilllv || rand()%10000 >= skill_abra_db[skill].per) return 0;
- //NPCƒXƒLƒ‹‚̓_ƒ
- if(skill >= NPC_PIERCINGATT && skill <= NPC_SUMMONMONSTER) return 0;
- //‰‰‘tƒXƒLƒ‹‚̓_ƒ
- if(skill_is_danceskill(skill)) return 0;
+ id=va_arg(ap,int);
+ c=va_arg(ap,int *);
- return skill;
+ if (sd->bl.id != id && sd->sc_count && sd->sc_data[SC_MOONLIT].timer != -1 && c)
+ (*c)++;
+ return 0;
+}
+
+int skill_check_moonlit (struct block_list *bl, int dx, int dy)
+{
+ int c=0;
+ nullpo_retr(0, bl);
+ map_foreachinarea(skill_moonlit_count,bl->m,
+ dx-1,dy-1,dx+1,dy+1,BL_PC,bl->id,&c);
+ return (c>0);
+}
+
+/*==========================================
+ * ƒoƒWƒŠƒJ‚̃Zƒ‹‚ðÝ’è‚·‚é
+ *------------------------------------------
+ */
+void skill_basilica_cell(struct skill_unit *unit,int flag)
+{
+ int i,x,y,range = skill_get_unit_range(HP_BASILICA);
+ int size = range*2+1;
+
+ for (i=0;i<size*size;i++) {
+ x = unit->bl.x+(i%size-range);
+ y = unit->bl.y+(i/size-range);
+ map_setcell(unit->bl.m,x,y,flag);
+ }
}
/*==========================================
@@ -8137,7 +7854,8 @@ int skill_attack_area(struct block_list *bl,va_list ap)
return 0;
skillid=va_arg(ap,int);
skilllv=va_arg(ap,int);
- if(skilllv <= 0) return 0;
+ //if(skilllv <= 0) return 0;
+ if(skillid > 0 && skilllv <= 0) return 0; // celest
tick=va_arg(ap,unsigned int);
flag=va_arg(ap,int);
type=va_arg(ap,int);
@@ -8155,16 +7873,20 @@ int skill_clear_element_field(struct block_list *bl)
{
struct mob_data *md=NULL;
struct map_session_data *sd=NULL;
- int i,skillid;
+ int i,max,skillid;
nullpo_retr(0, bl);
- if(bl->type==BL_MOB)
- md=(struct mob_data *)bl;
- if(bl->type==BL_PC)
- sd=(struct map_session_data *)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_MOBSKILLUNITGROUP;i++){
+ 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)
@@ -8190,43 +7912,43 @@ int skill_landprotector(struct block_list *bl, va_list ap )
nullpo_retr(0, bl);
nullpo_retr(0, ap);
- skillid=va_arg(ap,int);
- alive=va_arg(ap,int *);
- if((unit=(struct skill_unit *)bl) == NULL)
+ skillid = va_arg(ap,int);
+ alive = va_arg(ap,int *);
+
+ if ((unit = (struct skill_unit *)bl) == NULL)
return 0;
- if(skillid==SA_LANDPROTECTOR){
+ if (skillid == SA_LANDPROTECTOR)
skill_delunit(unit);
- }else{
- if(alive && unit->group->skill_id==SA_LANDPROTECTOR)
- (*alive)=0;
- }
+ else if (alive && unit->group && unit->group->skill_id == SA_LANDPROTECTOR)
+ (*alive) = 0;
+
return 0;
}
/*==========================================
* ƒCƒhƒDƒ“‚Ì—ÑŒç‚̉ñ•œ?—(foreachinarea)
*------------------------------------------
*/
-int skill_idun_heal(struct block_list *bl, va_list ap )
+int skill_idun_heal (struct block_list *bl, va_list ap)
{
struct skill_unit *unit;
struct skill_unit_group *sg;
int heal;
nullpo_retr(0, bl);
+ if (bl->type != BL_PC && bl->type != BL_MOB)
+ return 0;
+
nullpo_retr(0, ap);
nullpo_retr(0, unit = va_arg(ap,struct skill_unit *));
nullpo_retr(0, sg = unit->group);
-
- heal=30+sg->skill_lv*5+((sg->val1)>>16)*5+((sg->val1)&0xfff)/2;
-
- if(bl->type == BL_SKILL || bl->id == sg->src_id)
+ if (bl->id == sg->src_id)
return 0;
- if(bl->type == BL_PC || bl->type == BL_MOB){
- clif_skill_nodamage(&unit->bl,bl,AL_HEAL,heal,1);
- battle_heal(NULL,bl,heal,0,0);
- }
+ heal = 30 + sg->skill_lv * 5 + ((sg->val1) >> 16) * 5 + ((sg->val1) & 0xfff) / 2;
+ clif_skill_nodamage(&unit->bl, bl, AL_HEAL, heal, 1);
+ battle_heal(NULL, bl, heal, 0, 0);
+
return 0;
}
@@ -8234,18 +7956,19 @@ int skill_idun_heal(struct block_list *bl, va_list ap )
* Žw’è”Í??‚Åsrc‚É?‚µ‚Ä—L?‚ȃ^?ƒQƒbƒg‚Ìbl‚Ì?‚ð?‚¦‚é(foreachinarea)
*------------------------------------------
*/
-int skill_count_target(struct block_list *bl, va_list ap ){
+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)
+ if ((src = va_arg(ap,struct block_list *)) == NULL)
return 0;
- if((c = va_arg(ap,int *)) == NULL)
+ if ((c = va_arg(ap,int *)) == NULL)
return 0;
- if(battle_check_target(src,bl,BCT_ENEMY) > 0)
+ if (battle_check_target(src,bl,BCT_ENEMY) > 0)
(*c)++;
return 0;
}
@@ -8253,7 +7976,7 @@ int skill_count_target(struct block_list *bl, va_list ap ){
* ƒgƒ‰ƒbƒv”Í??—(foreachinarea)
*------------------------------------------
*/
-int skill_trap_splash(struct block_list *bl, va_list ap )
+int skill_trap_splash (struct block_list *bl, va_list ap)
{
struct block_list *src;
int tick;
@@ -8285,6 +8008,7 @@ int skill_trap_splash(struct block_list *bl, va_list ap )
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 0x97: /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
skill_attack(BF_WEAPON, ss,src,bl,sg->skill_id,sg->skill_lv,tick,(sg->val2)?0x0500:0);
break;
@@ -8295,1720 +8019,74 @@ int skill_trap_splash(struct block_list *bl, va_list ap )
return 0;
}
-/*----------------------------------------------------------------------------
- * ƒXƒe?ƒ^ƒXˆÙí
- *----------------------------------------------------------------------------
- */
-
-/*==========================================
- * ƒXƒe?ƒ^ƒXˆÙíƒ^ƒCƒ}?”Í??—
- *------------------------------------------
- */
-int skill_status_change_timer_sub(struct block_list *bl, va_list ap )
-{
- struct block_list *src;
- int type;
- unsigned int tick;
-
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
- nullpo_retr(0, src=va_arg(ap,struct block_list*));
- type=va_arg(ap,int);
- tick=va_arg(ap,unsigned int);
-
- if(bl->type!=BL_PC && bl->type!=BL_MOB)
- return 0;
-
- switch( type ){
- case SC_SIGHT: /* ƒTƒCƒg */
- case SC_CONCENTRATE:
- if( (*battle_get_option(bl))&6 ){
- skill_status_change_end( bl, SC_HIDING, -1);
- skill_status_change_end( bl, SC_CLOAKING, -1);
- }
- break;
- case SC_RUWACH: /* ƒ‹ƒAƒt */
- if( (*battle_get_option(bl))&6 ){
- skill_status_change_end( bl, SC_HIDING, -1);
- skill_status_change_end( bl, SC_CLOAKING, -1);
- if(battle_check_target( src,bl, BCT_ENEMY ) > 0) {
- struct status_change *sc_data = battle_get_sc_data(bl);
- skill_attack(BF_MAGIC,src,src,bl,AL_RUWACH,sc_data[type].val1,tick,0);
- }
- }
- break;
- }
- return 0;
-}
-
-/*==========================================
- * ƒXƒe?ƒ^ƒXˆÙíI—¹
- *------------------------------------------
- */
-int skill_status_change_end(struct block_list* bl, int type, int tid)
-{
- 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)
- printf("skill_status_change_end: neither MOB nor PC !\n");
- return 0;
- }
- nullpo_retr(0, sc_data = battle_get_sc_data(bl));
- nullpo_retr(0, sc_count = battle_get_sc_count(bl));
- nullpo_retr(0, option = battle_get_option(bl));
- nullpo_retr(0, opt1 = battle_get_opt1(bl));
- nullpo_retr(0, opt2 = battle_get_opt2(bl));
- nullpo_retr(0, opt3 = battle_get_opt3(bl));
-
- if ((*sc_count) > 0 && sc_data[type].timer != -1 && (sc_data[type].timer == tid || tid == -1)) {
-
- if (tid == -1) // ƒ^ƒCƒ}‚©‚çŒÄ‚΂ê‚Ä‚¢‚È‚¢‚È‚çƒ^ƒCƒ}íœ‚ð‚·‚é
- delete_timer(sc_data[type].timer,skill_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_TWOHANDQUICKEN: /* 2HQ */
- 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_DEFENDER:
- case SC_SPEEDPOTION0: /* ?‘¬ƒ|?ƒVƒ‡ƒ“ */
- case SC_SPEEDPOTION1:
- case SC_SPEEDPOTION2:
- case SC_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
- case SC_RIDING:
- case SC_BLADESTOP_WAIT:
- case SC_AURABLADE: /* ƒI?ƒ‰ƒuƒŒ?ƒh */
- case SC_PARRYING: /* ƒpƒŠƒCƒ“ƒO */
- case SC_CONCENTRATION: /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
- case SC_TENSIONRELAX: /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
- 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_ATKPOT: /* attack potion [Valaris] */
- case SC_MATKPOT: /* magic attack potion [Valaris] */
- case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
- case SC_MELTDOWN: /* ƒƒ‹ƒgƒ_ƒEƒ“ */
- // Celest
- case SC_EDP:
- case SC_MARIONETTE:
- case SC_MARIONETTE2:
- case SC_SLOWDOWN:
- case SC_LEADERSHIP:
- case SC_GLORYWOUNDS:
- case SC_SOULCOLD:
- case SC_HAWKEYES:
- case SC_BATTLEORDERS:
- case SC_REGENERATION:
- calc_flag = 1;
- break;
- case SC_BERSERK: /* ƒo?ƒT?ƒN */
- calc_flag = 1;
- clif_status_change(bl,SC_INCREASEAGI,0); /* ƒAƒCƒRƒ“Á‹Ž */
- break;
- case SC_DEVOTION: /* ƒfƒBƒ{?ƒVƒ‡ƒ“ */
- {
- struct map_session_data *md = map_id2sd(sc_data[type].val1);
- sc_data[type].val1=sc_data[type].val2=0;
- skill_devotion(md,bl->id);
- calc_flag = 1;
- }
- break;
- case SC_BLADESTOP:
- {
- struct status_change *t_sc_data = battle_get_sc_data((struct block_list *)sc_data[type].val4);
- //•Ð•û‚ªØ‚ꂽ‚Ì‚Å‘ŠŽè‚Ì”’n?‘Ô‚ªØ‚ê‚Ä‚È‚¢‚Ì‚È‚ç‰ðœ
- if(t_sc_data && t_sc_data[SC_BLADESTOP].timer!=-1)
- skill_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].val4 && (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].val4=0;
- }
- }
- calc_flag = 1;
- break;
- case SC_GRAFFITI:
- {
- struct skill_unit_group *sg=(struct skill_unit_group *)sc_data[type].val4; //val4‚ªƒOƒ‰ƒtƒBƒeƒB‚Ìgroup_id
- if(sg)
- skill_delunitgroup(sg);
- }
- break;
- case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
- {
- struct map_session_data *sd=NULL;
- if(bl->type == BL_PC && (sd=(struct map_session_data *)bl)){
- 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_SELFDESTRUCTION: /* Ž©”š */
- {
- //Ž©•ª‚̃_ƒ?ƒW‚Í0‚É‚µ‚Ä
- struct mob_data *md=NULL;
- if(bl->type == BL_MOB && (md=(struct mob_data*)bl))
- skill_castend_damage_id(bl, bl,sc_data[type].val2,sc_data[type].val1,gettick(),0 );
- }
- 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;
- }
-
- if(bl->type==BL_PC && type<SC_SENDMAX)
- clif_status_change(bl,type,0); /* ƒAƒCƒRƒ“Á‹Ž */
-
- 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:
- if (sc_data[SC_DPOISON].timer != -1) //
- break; // DPOISON—p‚̃IƒvƒVƒ‡ƒ“
- *opt2 &= ~1; // ‚ª?—p‚É—pˆÓ‚³‚ꂽꇂɂÍ
- opt_flag = 1; // ‚±‚±‚Í휂·‚é
- break; //
- case SC_CURSE:
- case SC_SILENCE:
- case SC_BLIND:
- *opt2 &= ~(1<<(type-SC_POISON));
- opt_flag = 1;
- break;
- case SC_DPOISON:
- if (sc_data[SC_POISON].timer != -1) // DPOISON—p‚̃IƒvƒVƒ‡ƒ“‚ª
- break; // —pˆÓ‚³‚ꂽ‚çíœ
- *opt2 &= ~1; // “Å?‘Ô‰ðœ
- opt_flag = 1;
- break;
- case SC_SIGNUMCRUCIS:
- *opt2 &= ~0x40;
- opt_flag = 1;
- break;
-
- case SC_HIDING:
- case SC_CLOAKING:
- *option &= ~((type == SC_HIDING) ? 2 : 4);
- calc_flag = 1; // orn
- opt_flag = 1 ;
- break;
-
- case SC_CHASEWALK:
- *option &= ~16388;
- opt_flag = 1 ;
- break;
-
- case SC_SIGHT:
- *option &= ~1;
- opt_flag = 1;
- break;
- case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
- *option &= ~4096;
- opt_flag = 1;
- break;
- case SC_RUWACH:
- *option &= ~8192;
- opt_flag = 1;
- break;
-
- //opt3
- case SC_TWOHANDQUICKEN: /* 2HQ */
- 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: // ‹à„
- *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;
- }
-
- if (night_flag == 1 && (*opt2 & STATE_BLIND) == 0 && bl->type == BL_PC && // by [Yor]
- !map[bl->m].flag.indoors && battle_config.night_darkness_level <= 0) { // [celest]
- *opt2 |= STATE_BLIND;
- opt_flag = 1;
- }
-
- if(opt_flag) /* option‚Ì?X‚ð?‚¦‚é */
- clif_changeoption(bl);
-
- if (bl->type == BL_PC && calc_flag)
- pc_calcstatus((struct map_session_data *)bl,0); /* ƒXƒe?ƒ^ƒXÄŒvŽZ */
- }
-
- return 0;
-}
-/*==========================================
- * ƒXƒe?ƒ^ƒXˆÙíI—¹ƒ^ƒCƒ}?
- *------------------------------------------
- */
-int skill_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
-
- if( (bl=map_id2bl(id)) == NULL )
- return 0; //ŠY?ID‚ª‚·‚Å‚ÉÁ–Å‚µ‚Ä‚¢‚é‚Æ‚¢‚¤‚Ì‚Í‚¢‚©‚É‚à‚ ‚è‚»‚¤‚Ȃ̂ŃXƒ‹?‚µ‚Ä‚Ý‚é
- nullpo_retr(0, sc_data=battle_get_sc_data(bl));
-
- if(bl->type==BL_PC)
- sd=(struct map_session_data *)bl;
-
- //sc_count=battle_get_sc_count(bl); //Žg‚Á‚Ä‚È‚¢H
-
- if(sc_data[type].timer != tid) {
- if(battle_config.error_log)
- printf("skill_status_change_timer %d != %d\n",tid,sc_data[type].timer);
- }
-
- switch(type){ /* “ÁŽê‚È?—‚É‚È‚éê‡ */
- case SC_MAXIMIZEPOWER: /* ƒ}ƒLƒVƒ}ƒCƒYƒpƒ? */
- case SC_CLOAKING:
- if(sd){
- if( sd->status.sp > 0 ){ /* SPØ‚ê‚é‚Ü‚ÅŽ? */
- sd->status.sp--;
- clif_updatestatus(sd,SP_SP);
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
- sc_data[type].val2+tick, skill_status_change_timer, bl->id, data);
- return 0;
- }
- }
- break;
-
- case SC_CHASEWALK:
- if(sd){
- if( sd->status.sp > 19+sc_data[SC_CHASEWALK].val1*3){
- sd->status.sp-=(19+(sc_data[SC_CHASEWALK].val1*3)); // update sp cost [Celest]
- clif_updatestatus(sd,SP_SP);
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
- sc_data[type].val2+tick, skill_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, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
-
- case SC_SIGHT: /* ƒTƒCƒg */
- {
- const int range=7;
- map_foreachinarea( skill_status_change_timer_sub,
- bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,0,
- bl,type,tick);
-
- if( (--sc_data[type].val2)>0 ){
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
- 250+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
- case SC_RUWACH: /* ƒ‹ƒAƒt */
- {
- const int range=5;
- map_foreachinarea( skill_status_change_timer_sub,
- bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,0,
- bl,type,tick);
-
- if( (--sc_data[type].val2)>0 ){
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
- 250+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
-
- case SC_SIGNUMCRUCIS: /* ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX */
- {
- int race = battle_get_race(bl);
- if(race == 6 || battle_check_undead(race,battle_get_elem_type(bl))) {
- sc_data[type].timer=add_timer(1000*600+tick,skill_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,skill_status_change_timer, bl->id, data );
- return 0;
- }
- break;
-
- case SC_WATERBALL: /* ƒEƒH?ƒ^?ƒ{?ƒ‹ */
- {
- struct block_list *target=map_id2bl(sc_data[type].val2);
- if(target==NULL || target->prev==NULL)
- break;
- skill_attack(BF_MAGIC,bl,bl,target,WZ_WATERBALL,sc_data[type].val1,tick,0);
- if((--sc_data[type].val3)>0) {
- sc_data[type].timer=add_timer( 150+tick,skill_status_change_timer, bl->id, data );
- return 0;
- }
- }
- break;
-
- case SC_ENDURE: /* ƒCƒ“ƒfƒ…ƒA */
- if(sd && sd->special_state.infinite_endure) {
- sc_data[type].timer=add_timer( 1000*60+tick,skill_status_change_timer, bl->id, data );
- //sc_data[type].val2=1;
- return 0;
- }
- break;
-
- case SC_DISSONANCE: /* •s‹¦˜a‰¹ */
- if( (--sc_data[type].val2)>0){
- struct skill_unit *unit=
- (struct skill_unit *)sc_data[type].val4;
- struct block_list *src;
-
- if(!unit || !unit->group)
- break;
- src=map_id2bl(unit->group->src_id);
- if(!src)
- break;
- skill_attack(BF_MISC,src,&unit->bl,bl,unit->group->skill_id,sc_data[type].val1,tick,0);
- sc_data[type].timer=add_timer(skill_get_time2(unit->group->skill_id,unit->group->skill_lv)+tick,
- skill_status_change_timer, bl->id, data );
- return 0;
- }
- break;
-
- case SC_LULLABY: /* ŽqŽç‰S */
- if( (--sc_data[type].val2)>0){
- struct skill_unit *unit=
- (struct skill_unit *)sc_data[type].val4;
- if(!unit || !unit->group || unit->group->src_id==bl->id)
- break;
- skill_additional_effect(bl,bl,unit->group->skill_id,sc_data[type].val1,BF_LONG|BF_SKILL|BF_MISC,tick);
- sc_data[type].timer=add_timer(skill_get_time(unit->group->skill_id,unit->group->skill_lv)/10+tick,
- skill_status_change_timer, bl->id, data );
- return 0;
- }
- break;
-
- case SC_STONE:
- if(sc_data[type].val2 != 0) {
- short *opt1 = battle_get_opt1(bl);
- sc_data[type].val2 = 0;
- sc_data[type].val4 = 0;
- battle_stopwalking(bl,1);
- if(opt1) {
- *opt1 = 1;
- clif_changeoption(bl);
- }
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- return 0;
- }
- else if( (--sc_data[type].val3) > 0) {
- int hp = battle_get_max_hp(bl);
- if((++sc_data[type].val4)%5 == 0 && battle_get_hp(bl) > hp>>2) {
- hp = hp/100;
- if(hp < 1) hp = 1;
- if(bl->type == BL_PC)
- pc_heal((struct map_session_data *)bl,-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,skill_status_change_timer, bl->id, data );
- return 0;
- }
- break;
- case SC_POISON:
- if(sc_data[SC_SLOWPOISON].timer == -1) {
- if( (--sc_data[type].val3) > 0) {
- int hp = battle_get_max_hp(bl);
- if(battle_get_hp(bl) > hp>>2) {
- if(bl->type == BL_PC) {
- hp = 3 + hp*3/200;
- pc_heal((struct map_session_data *)bl,-hp,0);
- }
- else if(bl->type == BL_MOB) {
- struct mob_data *md;
- if((md=((struct mob_data *)bl)) == NULL)
- break;
- hp = 3 + hp/200;
- md->hp -= hp;
- }
- }
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- }
- }
- else
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- break;
- case SC_DPOISON:
- if (sc_data[SC_SLOWPOISON].timer == -1 && (--sc_data[type].val3) > 0) {
- int hp = battle_get_max_hp(bl);
- if (battle_get_hp(bl) > hp>>2) {
- if(bl->type == BL_PC) {
- hp = 3 + hp/50;
- pc_heal((struct map_session_data *)bl, -hp, 0);
- } else if (bl->type == BL_MOB) {
- struct mob_data *md;
- if ((md=((struct mob_data *)bl)) == NULL)
- break;
- hp = 3 + hp/100;
- md->hp -= hp;
- }
- }
- }
- if (sc_data[type].val3 > 0)
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- 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 ){
-/* if(sc_data[type].val2 % (sc_data[type].val1+3) ==0 ){
- sd->status.sp -= 12;
- clif_updatestatus(sd,SP_SP);
- } */
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
- 10000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- if(sd->status.max_hp <= sd->status.hp)
- skill_status_change_end(&sd->bl,SC_TENSIONRELAX,-1);
- }
- break;
- case SC_HEADCRUSH: // temporary damage [celest]
-// case SC_BLEEDING:
- if((--sc_data[type].val3) > 0) {
- int hp = battle_get_max_hp(bl);
- if(bl->type == BL_PC) {
- hp = 3 + hp*3/200;
- pc_heal((struct map_session_data *)bl,-hp,0);
- }
- else if(bl->type == BL_MOB) {
- struct mob_data *md;
- if((md=((struct mob_data *)bl)) == NULL)
- break;
- hp = 3 + hp/200;
- md->hp -= hp;
- }
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- }
- break;
-
- /* ŽžŠÔØ‚ê–³‚µHH */
- case SC_AETERNA:
- case SC_TRICKDEAD:
- case SC_RIDING:
- case SC_FALCON:
- case SC_WEIGHT50:
- case SC_WEIGHT90:
- case SC_MAGICPOWER: /* –‚–@—Í?• */
- case SC_REJECTSWORD: /* ƒŠƒWƒFƒNƒgƒ\?ƒh */
- case SC_MEMORIZE: /* ƒƒ‚ƒ‰ƒCƒY */
- case SC_BROKNWEAPON:
- case SC_BROKNARMOR:
- if(sc_data[type].timer==tid)
- sc_data[type].timer=add_timer( 1000*600+tick,skill_status_change_timer, bl->id, data );
- return 0;
-
- case SC_DANCING: //ƒ_ƒ“ƒXƒXƒLƒ‹‚ÌŽžŠÔSPÁ”ï
- {
- int s=0;
- if(sd){
- if(sd->status.sp > 0 && (--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 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 DC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc 10•b‚ÅSP1 */
- case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç 10•b‚ÅSP1H */
- s=10;
- break;
- }
- if(s && ((sc_data[type].val3 % s) == 0)){
- sd->status.sp--;
- clif_updatestatus(sd,SP_SP);
- }
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
- 1000+tick, skill_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, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
- case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
- if(sd){
- time_t timer;
- if(time(&timer) < ((sc_data[type].val2) + 3600)){ //1ŽžŠÔ‚½‚Á‚Ä‚¢‚È‚¢‚Ì‚Å??
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
- 10000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
- case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
- if(sd && battle_config.muting_players){
- time_t timer;
- if((++sd->status.manner) && time(&timer) < ((sc_data[type].val2) + 60*(0-sd->status.manner))){ //ŠJŽn‚©‚çstatus.manner•ª?‚Á‚Ä‚È‚¢‚Ì‚Å??
- clif_updatestatus(sd,SP_MANNER);
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è(60•b) */
- 60000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
- case SC_SELFDESTRUCTION: /* Ž©”š */
- if(--sc_data[type].val3>0){
- struct mob_data *md;
- if(bl->type==BL_MOB && (md=(struct mob_data *)bl) && md->speed > 250){
- md->speed -= 250;
- md->next_walktime=tick;
- }
- sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
- 1000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- break;
- case SC_LEADERSHIP:
- case SC_GLORYWOUNDS:
- case SC_SOULCOLD:
- case SC_HAWKEYES:
- if (sd) {
- sc_data[type].timer = add_timer(
- 1000+tick, skill_status_change_timer,
- bl->id, data);
- }
- break;
- }
-
-
-
- return skill_status_change_end( bl,type,tid );
-}
/*==========================================
* ƒXƒe?ƒ^ƒXˆÙíI—¹
*------------------------------------------
*/
-int skill_encchant_eremental_end(struct block_list *bl,int type)
+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=battle_get_sc_data(bl));
-
- if( type!=SC_ENCPOISON && sc_data[SC_ENCPOISON].timer!=-1 ) /* ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“‰ðœ */
- skill_status_change_end(bl,SC_ENCPOISON,-1);
- if( type!=SC_ASPERSIO && sc_data[SC_ASPERSIO].timer!=-1 ) /* ƒAƒXƒyƒ‹ƒVƒI‰ðœ */
- skill_status_change_end(bl,SC_ASPERSIO,-1);
- if( type!=SC_FLAMELAUNCHER && sc_data[SC_FLAMELAUNCHER].timer!=-1 ) /* ƒtƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ‰ðœ */
- skill_status_change_end(bl,SC_FLAMELAUNCHER,-1);
- if( type!=SC_FROSTWEAPON && sc_data[SC_FROSTWEAPON].timer!=-1 ) /* ƒtƒƒXƒgƒEƒFƒ|ƒ“‰ðœ */
- skill_status_change_end(bl,SC_FROSTWEAPON,-1);
- if( type!=SC_LIGHTNINGLOADER && sc_data[SC_LIGHTNINGLOADER].timer!=-1 ) /* ƒ‰ƒCƒgƒjƒ“ƒOƒ?ƒ_?‰ðœ */
- skill_status_change_end(bl,SC_LIGHTNINGLOADER,-1);
- if( type!=SC_SEISMICWEAPON && sc_data[SC_SEISMICWEAPON].timer!=-1 ) /* ƒTƒCƒXƒ~ƒbƒNƒEƒFƒ|ƒ“‰ðœ */
- skill_status_change_end(bl,SC_SEISMICWEAPON,-1);
+ 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_FLAMELAUNCHER && sc_data[SC_FLAMELAUNCHER].timer != -1) /* ƒtƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ‰ðœ */
+ status_change_end(bl, SC_FLAMELAUNCHER, -1);
+ if (type != SC_FROSTWEAPON && sc_data[SC_FROSTWEAPON].timer != -1) /* ƒtƒƒXƒgƒEƒFƒ|ƒ“‰ðœ */
+ status_change_end(bl, SC_FROSTWEAPON, -1);
+ if (type != SC_LIGHTNINGLOADER && sc_data[SC_LIGHTNINGLOADER].timer != -1) /* ƒ‰ƒCƒgƒjƒ“ƒOƒ?ƒ_?‰ðœ */
+ status_change_end(bl, SC_LIGHTNINGLOADER, -1);
+ if (type != SC_SEISMICWEAPON && sc_data[SC_SEISMICWEAPON].timer != -1) /* ƒTƒCƒXƒ~ƒbƒNƒEƒFƒ|ƒ“‰ðœ */
+ status_change_end(bl, SC_SEISMICWEAPON, -1);
return 0;
}
-/*==========================================
- * ƒXƒe?ƒ^ƒXˆÙíŠJŽn
- *------------------------------------------
- */
-int skill_status_change_start(struct block_list *bl, int type, int val1, int val2, int val3, int val4, int tick, int flag)
+
+/* ƒNƒ?ƒLƒ“ƒO?¸iŽü‚è‚Ɉړ®•s‰Â”\’n?‚ª‚ ‚é‚©j */
+int skill_check_cloaking(struct block_list *bl)
{
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);
- if(bl->type == BL_SKILL)
- return 0;
- nullpo_retr(0, sc_data=battle_get_sc_data(bl));
- nullpo_retr(0, sc_count=battle_get_sc_count(bl));
- nullpo_retr(0, option=battle_get_option(bl));
- nullpo_retr(0, opt1=battle_get_opt1(bl));
- nullpo_retr(0, opt2=battle_get_opt2(bl));
- nullpo_retr(0, opt3=battle_get_opt3(bl));
-
-
- race=battle_get_race(bl);
- mode=battle_get_mode(bl);
- elem=battle_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;
-
- switch(type){
- case SC_STONE:
- case SC_FREEZE:
- scdef=3+battle_get_mdef(bl)+battle_get_luk(bl)/3;
- break;
- case SC_STAN:
- case SC_SILENCE:
- case SC_POISON:
- case SC_DPOISON:
- scdef=3+battle_get_vit(bl)+battle_get_luk(bl)/3;
- break;
- case SC_SLEEP:
- case SC_BLIND:
- scdef=3+battle_get_int(bl)+battle_get_luk(bl)/3;
- break;
- case SC_CURSE:
- scdef=3+battle_get_luk(bl);
- break;
-
-// case SC_CONFUSION:
- default:
- scdef=0;
- }
- if(scdef>=100)
- return 0;
- if(bl->type==BL_PC){
- sd=(struct map_session_data *)bl;
- if( sd && type == SC_ADRENALINE && !(skill_get_weapontype(BS_ADRENALINE)&(1<<sd->status.weapon)))
- return 0;
-
- if(SC_STONE<=type && type<=SC_BLIND){ /* ƒJ?ƒh‚É‚æ‚é‘Ï« */
- if( sd && sd->reseff[type-SC_STONE] > 0 && rand()%10000<sd->reseff[type-SC_STONE]){
- if(battle_config.battle_log)
- printf("PC %d skill_sc_start: card‚É‚æ‚éˆÙí‘Ï«?“®\n",sd->bl.id);
- return 0;
- }
- }
- }
- else if(bl->type == BL_MOB) {
- }
- else {
- if(battle_config.error_log)
- printf("skill_status_change_start: neither MOB nor PC !\n");
- return 0;
- }
-
- if(type==SC_FREEZE && undead_flag && !(flag&1))
- return 0;
-
- if((type == SC_ADRENALINE || type == SC_WEAPONPERFECTION || type == SC_OVERTHRUST) &&
- sc_data[type].timer != -1 && sc_data[type].val2 && !val2)
- return 0;
-
- if(mode & 0x20 && (type==SC_STONE || type==SC_FREEZE ||
- type==SC_STAN || type==SC_SLEEP || type==SC_SILENCE || type==SC_QUAGMIRE || type == SC_DECREASEAGI || type == SC_SIGNUMCRUCIS || type == SC_PROVOKE ||
- (type == SC_BLESSING && (undead_flag || race == 6))) && !(flag&1)){
- /* ƒ{ƒX‚É‚Í?‚©‚È‚¢(‚½‚¾‚µƒJ?ƒh‚É‚æ‚é?‰Ê‚Í“K—p‚³‚ê‚é) */
- return 0;
- }
- if(type==SC_FREEZE || type==SC_STAN || type==SC_SLEEP)
- battle_stopwalking(bl,1);
+ 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;
- if(sc_data[type].timer != -1){ /* ‚·‚Å‚É“¯‚¶ˆÙí‚É‚È‚Á‚Ä‚¢‚éꇃ^ƒCƒ}‰ðœ */
- if(sc_data[type].val1 > val1 && type != SC_COMBO && type != SC_DANCING && type != SC_DEVOTION &&
- type != SC_SPEEDPOTION0 && type != SC_SPEEDPOTION1 && type != SC_SPEEDPOTION2
- && type != SC_ATKPOT && type != SC_MATKPOT) // added atk and matk potions [Valaris]
- return 0;
- if(type >=SC_STAN && type <= SC_BLIND)
- return 0;/* ?‚¬‘«‚µ‚ª‚Å‚«‚È‚¢?‘ÔˆÙí‚Å‚ ‚鎞‚Í?‘ÔˆÙí‚ðs‚í‚È‚¢ */
- if(type == SC_GRAFFITI){ //ˆÙí’†‚É‚à‚¤ˆê“x?‘ÔˆÙí‚É‚È‚Á‚½Žž‚ɉ𜂵‚Ä‚©‚çÄ“x‚©‚©‚é
- skill_status_change_end(bl,type,-1);
- } else {
- (*sc_count)--;
- delete_timer(sc_data[type].timer, skill_status_change_timer);
- sc_data[type].timer = -1;
- }
- }
-
- 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_CONCENTRATE: /* W’†—ÍŒüã */
- calc_flag = 1;
- break;
- case SC_BLESSING: /* ƒuƒŒƒbƒVƒ“ƒO */
- {
- if(bl->type == BL_PC || (!undead_flag && race != 6)) {
- if(sc_data[SC_CURSE].timer!=-1 )
- skill_status_change_end(bl,SC_CURSE,-1);
- if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2 == 0)
- skill_status_change_end(bl,SC_STONE,-1);
- }
- calc_flag = 1;
- }
- break;
- case SC_ANGELUS: /* ƒAƒ“ƒ[ƒ‹ƒX */
- calc_flag = 1;
- break;
- case SC_INCREASEAGI: /* ‘¬“x㸠*/
- calc_flag = 1;
- if(sc_data[SC_DECREASEAGI].timer!=-1 )
- skill_status_change_end(bl,SC_DECREASEAGI,-1);
- if(sc_data[SC_WINDWALK].timer!=-1 ) /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
- skill_status_change_end(bl,SC_WINDWALK,-1);
- break;
- case SC_DECREASEAGI: /* ‘¬“xŒ¸­ */
- if (bl->type == BL_PC) // Celest
- tick>>=1;
- calc_flag = 1;
- if(sc_data[SC_INCREASEAGI].timer!=-1 )
- skill_status_change_end(bl,SC_INCREASEAGI,-1);
- if(sc_data[SC_ADRENALINE].timer!=-1 )
- skill_status_change_end(bl,SC_ADRENALINE,-1);
- if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_SPEARSQUICKEN,-1);
- if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_TWOHANDQUICKEN,-1);
- break;
- case SC_SIGNUMCRUCIS: /* ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX */
- calc_flag = 1;
-// val2 = 14 + val1;
- val2 = 10 + val1*2;
- tick = 600*1000;
- clif_emotion(bl,4);
- break;
- case SC_SLOWPOISON:
- if (sc_data[SC_POISON].timer == -1 && sc_data[SC_DPOISON].timer == -1)
- return 0;
- break;
- case SC_TWOHANDQUICKEN: /* 2HQ */
- if(sc_data[SC_DECREASEAGI].timer!=-1)
- return 0;
- *opt3 |= 1;
- calc_flag = 1;
- break;
- case SC_ADRENALINE: /* ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ… */
- if(sc_data[SC_DECREASEAGI].timer!=-1)
- return 0;
- calc_flag = 1;
- break;
- case SC_WEAPONPERFECTION: /* ƒEƒFƒ|ƒ“ƒp?ƒtƒFƒNƒVƒ‡ƒ“ */
- if(battle_config.party_skill_penaly && !val2) tick /= 5;
- break;
- case SC_OVERTHRUST: /* ƒI?ƒo?ƒXƒ‰ƒXƒg */
- *opt3 |= 2;
- if(battle_config.party_skill_penaly && !val2) tick /= 10;
- break;
- case SC_MAXIMIZEPOWER: /* ƒ}ƒLƒVƒ}ƒCƒYƒpƒ?(SP‚ª1Œ¸‚鎞ŠÔ,val2‚É‚à) */
- if(bl->type == BL_PC)
- val2 = tick;
- else
- tick = 5000*val1;
- break;
- case SC_ENCPOISON: /* ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“ */
- calc_flag = 1;
- val2=(((val1 - 1) / 2) + 3)*100; /* “Å•t?Šm—¦ */
- skill_encchant_eremental_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 */
- val2=val1/2 + val1%2; // [Celest]
- break;
- case SC_IMPOSITIO: /* ƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒX */
- calc_flag = 1;
- break;
- case SC_ASPERSIO: /* ƒAƒXƒyƒ‹ƒVƒI */
- skill_encchant_eremental_end(bl,SC_ASPERSIO);
- break;
- case SC_SUFFRAGIUM: /* ƒTƒtƒ‰ƒMƒ€ */
- case SC_BENEDICTIO: /* ¹? */
- case SC_MAGNIFICAT: /* ƒ}ƒOƒjƒtƒBƒJ?ƒg */
- case SC_AETERNA: /* ƒG?ƒeƒ‹ƒi */
- 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ƒ\ƒ“ */
- val2 = battle_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 )
- skill_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_GLORIA: /* ƒOƒƒŠƒA */
- calc_flag = 1;
- break;
- case SC_LOUD: /* ƒ‰ƒEƒhƒ{ƒCƒX */
- calc_flag = 1;
- break;
- case SC_TRICKDEAD: /* Ž€‚ñ‚¾‚Ó‚è */
- break;
- case SC_QUAGMIRE: /* ƒNƒ@ƒOƒ}ƒCƒA */
- calc_flag = 1;
- if(sc_data[SC_CONCENTRATE].timer!=-1 ) /* W’†—ÍŒüã‰ðœ */
- skill_status_change_end(bl,SC_CONCENTRATE,-1);
- if(sc_data[SC_INCREASEAGI].timer!=-1 ) /* ‘¬“x㸉ðœ */
- skill_status_change_end(bl,SC_INCREASEAGI,-1);
- if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_TWOHANDQUICKEN,-1);
- if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_SPEARSQUICKEN,-1);
- if(sc_data[SC_ADRENALINE].timer!=-1 )
- skill_status_change_end(bl,SC_ADRENALINE,-1);
- if(sc_data[SC_LOUD].timer!=-1 )
- skill_status_change_end(bl,SC_LOUD,-1);
- if(sc_data[SC_TRUESIGHT].timer!=-1 ) /* ƒgƒDƒ‹?ƒTƒCƒg */
- skill_status_change_end(bl,SC_TRUESIGHT,-1);
- if(sc_data[SC_WINDWALK].timer!=-1 ) /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
- skill_status_change_end(bl,SC_WINDWALK,-1);
- if(sc_data[SC_CARTBOOST].timer!=-1 ) /* ƒJ?ƒgƒu?ƒXƒg */
- skill_status_change_end(bl,SC_CARTBOOST,-1);
- break;
- case SC_FLAMELAUNCHER: /* ƒtƒŒ?ƒ€ƒ‰ƒ“ƒ`ƒƒ? */
- skill_encchant_eremental_end(bl,SC_FLAMELAUNCHER);
- break;
- case SC_FROSTWEAPON: /* ƒtƒƒXƒgƒEƒFƒ|ƒ“ */
- skill_encchant_eremental_end(bl,SC_FROSTWEAPON);
- break;
- case SC_LIGHTNINGLOADER: /* ƒ‰ƒCƒgƒjƒ“ƒOƒ?ƒ_? */
- skill_encchant_eremental_end(bl,SC_LIGHTNINGLOADER);
- break;
- case SC_SEISMICWEAPON: /* ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“ */
- skill_encchant_eremental_end(bl,SC_SEISMICWEAPON);
- break;
- case SC_DEVOTION: /* ƒfƒBƒ{?ƒVƒ‡ƒ“ */
- calc_flag = 1;
- 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:
- case SC_STRIPSHIELD:
- case SC_STRIPARMOR:
- case SC_STRIPHELM:
- case SC_CP_WEAPON:
- case SC_CP_SHIELD:
- case SC_CP_ARMOR:
- case SC_CP_HELM:
- break;
-
- case SC_AUTOSPELL: /* ƒI?ƒgƒXƒyƒ‹ */
- val4 = 5 + val1*2;
- break;
-
- case SC_VOLCANO:
- calc_flag = 1;
- val3 = val1*10;
- val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
- break;
- case SC_DELUGE:
- calc_flag = 1;
- val3 = val1>=5?15: (val1==4?14: (val1==3?12: ( val1==2?9:5 ) ) );
- val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
- break;
- case SC_VIOLENTGALE:
- calc_flag = 1;
- val3 = val1*3;
- val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
- break;
-
- case SC_SPEARSQUICKEN: /* ƒXƒsƒAƒNƒCƒbƒPƒ“ */
- calc_flag = 1;
- val2 = 20+val1;
- *opt3 |= 1;
- break;
- case SC_COMBO:
- break;
- case SC_BLADESTOP_WAIT: /* ”’nŽæ‚è(‘Ò‚¿) */
- 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 */
- val2 = 11;
- break;
- case SC_RICHMANKIM:
- break;
- case SC_ETERNALCHAOS: /* ƒGƒ^?ƒiƒ‹ƒJƒIƒX */
- calc_flag = 1;
- break;
- case SC_DRUMBATTLE: /* ?‘¾ŒÛ‚Ì‹¿‚« */
- calc_flag = 1;
- val2 = (val1+1)*25;
- val3 = (val1+1)*2;
- break;
- case SC_NIBELUNGEN: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
- calc_flag = 1;
- val2 = (val1+2)*50;
- val3 = (val1+2)*25;
- break;
- case SC_ROKISWEIL: /* ƒƒL‚Ì‹©‚Ñ */
- break;
- case SC_INTOABYSS: /* [•£‚Ì’†‚É */
- break;
- case SC_SIEGFRIED: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
- calc_flag = 1;
- val2 = 40 + val1*5;
- val3 = val1*10;
- break;
- case SC_DISSONANCE: /* •s‹¦˜a‰¹ */
- val2 = 10;
- break;
- case SC_WHISTLE: /* Œû“J */
- calc_flag = 1;
- break;
- case SC_ASSNCROS: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
- calc_flag = 1;
- break;
- case SC_POEMBRAGI: /* ƒuƒ‰ƒM‚ÌŽ */
- break;
- case SC_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
- calc_flag = 1;
- break;
- case SC_UGLYDANCE: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
- val2 = 10;
- break;
- case SC_HUMMING: /* ƒnƒ~ƒ“ƒO */
- calc_flag = 1;
- break;
- case SC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Å */
- calc_flag = 1;
- if(sc_data[SC_INCREASEAGI].timer!=-1 ) /* ‘¬“x㸉ðœ */
- skill_status_change_end(bl,SC_INCREASEAGI,-1);
- if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_TWOHANDQUICKEN,-1);
- if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_SPEARSQUICKEN,-1);
- if(sc_data[SC_ADRENALINE].timer!=-1 )
- skill_status_change_end(bl,SC_ADRENALINE,-1);
- if(sc_data[SC_ASSNCROS].timer!=-1 )
- skill_status_change_end(bl,SC_ASSNCROS,-1);
- if(sc_data[SC_TRUESIGHT].timer!=-1 ) /* ƒgƒDƒ‹?ƒTƒCƒg */
- skill_status_change_end(bl,SC_TRUESIGHT,-1);
- if(sc_data[SC_WINDWALK].timer!=-1 ) /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
- skill_status_change_end(bl,SC_WINDWALK,-1);
- if(sc_data[SC_CARTBOOST].timer!=-1 ) /* ƒJ?ƒgƒu?ƒXƒg */
- skill_status_change_end(bl,SC_CARTBOOST,-1);
- break;
- case SC_FORTUNE: /* K‰^‚̃LƒX */
- calc_flag = 1;
- break;
- case SC_SERVICE4U: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
- calc_flag = 1;
- break;
- case SC_DANCING: /* ƒ_ƒ“ƒX/‰‰‘t’† */
- calc_flag = 1;
- val3= tick / 1000;
- tick = 1000;
- break;
-
- case SC_EXPLOSIONSPIRITS: // ”š—ô”g“®
- calc_flag = 1;
- val2 = 75 + 25*val1;
- *opt3 |= 8;
- break;
- case SC_STEELBODY: // ‹à„
- calc_flag = 1;
- *opt3 |= 16;
- break;
- case SC_EXTREMITYFIST: /* ˆ¢C—…”e™€Œ */
- break;
- case SC_AUTOCOUNTER:
- val3 = val4 = 0;
- break;
-
- case SC_SPEEDPOTION0: /* ?‘¬ƒ|?ƒVƒ‡ƒ“ */
- case SC_SPEEDPOTION1:
- case SC_SPEEDPOTION2:
- calc_flag = 1;
- tick = 1000 * tick;
- val2 = 5*(2+type-SC_SPEEDPOTION0);
- break;
-
- /* atk & matk potions [Valaris] */
- case SC_ATKPOT:
- case SC_MATKPOT:
- calc_flag = 1;
- tick = 1000 * tick;
- break;
- case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
- {
- time_t timer;
-
- calc_flag = 1;
- tick = 10000;
- if(!val2)
- val2 = time(&timer);
- }
- break;
- case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
- {
- time_t timer;
-
- if(!battle_config.muting_players)
- break;
-
- tick = 60000;
- if(!val2)
- val2 = time(&timer);
- updateflag = SP_MANNER;
- save_flag = 1; // celest
- }
- break;
- case SC_SELFDESTRUCTION: //Ž©”š
- clif_skillcasting(bl,bl->id, bl->id,0,0,331,skill_get_time(val2,val1));
- val3 = tick / 1000;
- tick = 1000;
- break;
-
- /* option1 */
- case SC_STONE: /* Ή» */
- if(!(flag&2)) {
- int sc_def = battle_get_mdef(bl)*200;
- tick = tick - sc_def;
- }
- val3 = tick/1000;
- if(val3 < 1) val3 = 1;
- tick = 5000;
- val2 = 1;
- break;
- case SC_SLEEP: /* ‡–° */
- if(!(flag&2)) {
-// int sc_def = 100 - (battle_get_int(bl) + battle_get_luk(bl)/3);
-// tick = tick * sc_def / 100;
-// if(tick < 1000) tick = 1000;
- tick = 30000;//‡–°‚̓Xƒe?ƒ^ƒX‘Ï«‚É?‚í‚炸30•b
- }
- break;
- case SC_FREEZE: /* “€Œ‹ */
- if(!(flag&2)) {
- int sc_def = 100 - battle_get_mdef(bl);
- tick = tick * sc_def / 100;
- }
- break;
- case SC_STAN: /* ƒXƒ^ƒ“ival2‚Ƀ~ƒŠ•bƒZƒbƒgj */
- if(!(flag&2)) {
- int sc_def = 100 - (battle_get_vit(bl) + battle_get_luk(bl)/3);
- tick = tick * sc_def / 100;
- }
- break;
-
- /* option2 */
- case SC_POISON: /* “Å */
- case SC_DPOISON: /* –Ò“Å */
- calc_flag = 1;
- if(!(flag&2)) {
- int sc_def = 100 - (battle_get_vit(bl) + battle_get_luk(bl)/5);
- tick = tick * sc_def / 100;
- }
- val3 = tick/1000;
- if(val3 < 1) val3 = 1;
- tick = 1000;
- break;
- case SC_SILENCE: /* ’¾?iƒŒƒbƒNƒXƒfƒr?ƒij */
- if(!(flag&2)) {
- int sc_def = 100 - battle_get_vit(bl);
- tick = tick * sc_def / 100;
- }
- break;
- case SC_BLIND: /* ˆÃ? */
- calc_flag = 1;
- if(!(flag&2)) {
- int sc_def = battle_get_lv(bl)/10 + battle_get_int(bl)/15;
- tick = 30000 - sc_def;
- }
- break;
- case SC_CURSE:
- calc_flag = 1;
- if(!(flag&2)) {
- int sc_def = 100 - battle_get_vit(bl);
- tick = tick * sc_def / 100;
- }
- break;
-
- /* option */
- case SC_HIDING: /* ƒnƒCƒfƒBƒ“ƒO */
- calc_flag = 1;
- if(bl->type == BL_PC) {
- val2 = tick / 1000; /* Ž?ŽžŠÔ */
- tick = 1000;
- }
- break;
- case SC_CHASEWALK:
- case SC_CLOAKING: /* ƒNƒ?ƒLƒ“ƒO */
- if(bl->type == BL_PC) {
- calc_flag = 1; // [Celest]
- val2 = tick;
- val3 = type==SC_CLOAKING ? 130-val1*3 : 135-val1*5;
- }
- else
- tick = 5000*val1;
- break;
- case SC_SIGHT: /* ƒTƒCƒg/ƒ‹ƒAƒt */
- case SC_RUWACH:
- val2 = tick/250;
- tick = 10;
- break;
-
- /* ƒZ?ƒtƒeƒBƒEƒH?ƒ‹Aƒjƒ…?ƒ} */
- case SC_SAFETYWALL: case SC_PNEUMA:
- tick=((struct skill_unit *)val2)->group->limit;
- break;
-
- /* ƒAƒ“ƒNƒ‹ */
- case SC_ANKLE:
- break;
-
- /* ƒEƒH?ƒ^?ƒ{?ƒ‹ */
- case SC_WATERBALL:
- tick=150;
- if(val1>5) //ƒŒƒxƒ‹‚ª5ˆÈã‚ÌꇂÍ25?‚ɧŒÀ(1?–Ú‚Í‚·‚Å‚É‘Å‚Á‚Ä‚é‚Ì‚Å-1)
- val3=5*5-1;
- else
- val3= (val1|1)*(val1|1)-1;
- break;
-
- /* ƒXƒLƒ‹‚¶‚á‚È‚¢/ŽžŠÔ‚É?ŒW‚µ‚È‚¢ */
- case SC_RIDING:
- calc_flag = 1;
- tick = 600*1000;
- break;
- case SC_FALCON:
- case SC_WEIGHT50:
- case SC_WEIGHT90:
- case SC_BROKNWEAPON:
- case SC_BROKNARMOR:
- tick=600*1000;
- break;
-
- case SC_AUTOGUARD:
- {
- int i,t;
- for(i=val2=0;i<val1;i++) {
- t = 5-(i>>1);
- val2 += (t < 0)? 1:t;
- }
- }
- break;
-
- case SC_DEFENDER:
- calc_flag = 1;
- val2 = 5 + val1*15;
- break;
-
- case SC_KEEPING:
- case SC_BARRIER:
- calc_flag = 1;
-
- case SC_HALLUCINATION:
- break;
-
- case SC_CONCENTRATION: /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
- *opt3 |= 1;
- calc_flag = 1;
- break;
-
- case SC_TENSIONRELAX: /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
- calc_flag = 1;
- if(bl->type == BL_PC) {
- tick = 10000;
- }
- break;
-
- case SC_AURABLADE: /* ƒI?ƒ‰ƒuƒŒ?ƒh */
- case SC_PARRYING: /* ƒpƒŠƒCƒ“ƒO */
-// case SC_ASSUMPTIO: /* */
- case SC_HEADCRUSH: /* ƒwƒbƒhƒNƒ‰ƒbƒVƒ… */
- case SC_JOINTBEAT: /* ƒWƒ‡ƒCƒ“ƒgƒr?ƒg */
-// case SC_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
-
- //‚Æ‚è‚ ‚¦‚¸Žè?‚«
- break;
-
-// -- moonsoul (for new upper class related skill status effects)
-/*
- case SC_AURABLADE:
- val2 = val1*10;
- break;
- case SC_PARRYING:
- val2=val1*3;
- break;
- case SC_CONCENTRATION:
- calc_flag=1;
- val2=val1*10;
- val3=val1*5;
- break;
- case SC_TENSIONRELAX:
-// val2 = 10;
-// val3 = 15;
- break;
- case SC_BERSERK:
- calc_flag=1;
- break;
- case SC_ASSUMPTIO:
- if(sc_data[SC_KYRIE].timer!=-1 )
- skill_status_change_end(bl,SC_KYRIE,-1);
- break;
-*/
- case SC_WINDWALK: /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
- calc_flag = 1;
- val2 = (val1 / 2); //Flee㸗¦
- break;
-
- case SC_BERSERK: /* ƒo?ƒT?ƒN */
- if(sd){
- sd->status.hp = sd->status.max_hp * 3;
- sd->status.sp = 0;
- clif_updatestatus(sd,SP_HP);
- clif_updatestatus(sd,SP_SP);
- clif_status_change(bl,SC_INCREASEAGI,1); /* ƒAƒCƒRƒ“•\Ž¦ */
- }
- *opt3 |= 128;
- tick = 10000;
- calc_flag = 1;
- break;
-
- case SC_ASSUMPTIO: /* ƒAƒXƒ€ƒvƒeƒBƒI */
- *opt3 |= 2048;
- break;
-
- case SC_BASILICA: // [celest]
- break;
-
- case SC_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
- case SC_MARIONETTE2:
- calc_flag = 1;
- *opt3 |= 1024;
- break;
-
- case SC_MELTDOWN: /* ƒƒ‹ƒgƒ_ƒEƒ“ */
- case SC_CARTBOOST: /* ƒJ?ƒgƒu?ƒXƒg */
- case SC_TRUESIGHT: /* ƒgƒDƒ‹?ƒTƒCƒg */
- case SC_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
- case SC_MAGICPOWER: /* –‚–@—Í?• */
- calc_flag = 1;
- break;
-
- case SC_REJECTSWORD: /* ƒŠƒWƒFƒNƒgƒ\?ƒh */
- val2 = 3; //3‰ñU?‚𒵂˕Ԃ·
- break;
-
- case SC_MEMORIZE: /* ƒƒ‚ƒ‰ƒCƒY */
- val2 = 3; //3‰ñ‰r¥‚ð1/3‚É‚·‚é
- break;
-
- case SC_GRAFFITI: /* ƒOƒ‰ƒtƒBƒeƒB */
- {
- struct skill_unit_group *sg = skill_unitsetting(bl,RG_GRAFFITI,val1,val2,val3,0);
- if(sg)
- val4 = (int)sg;
- }
- break;
-
- case SC_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
- break;
-
- case SC_FOGWALL:
- val2 = 75;
- // calc_flag = 1; // not sure of effects yet [celest]
- break;
-
- case SC_BLOCKSKILL:
- if (!tick) tick = 60000;
- if (!val3) val3 = -1;
- break;
-
- case SC_SLOWDOWN:
- calc_flag = 1;
- break;
-
- case SC_LEADERSHIP:
- case SC_GLORYWOUNDS:
- case SC_SOULCOLD:
- case SC_HAWKEYES:
- tick = 1000;
- calc_flag = 1;
- //val4 = 1;
- break;
-
- case SC_REGENERATION:
- val1 = 2;
- case SC_BATTLEORDERS:
- tick = 60000; // 1 minute
- calc_flag = 1;
- break;
+ nullpo_retr(1, bl);
- default:
- if(battle_config.error_log)
- printf("UnknownStatusChange [%d]\n", type);
+ if (bl->type == BL_PC) {
+ nullpo_retr(1, sd = (struct map_session_data *)bl);
+ if (!battle_config.pc_cloak_check_type) // If it's No it shouldn't be checked
return 0;
- }
-
- if(bl->type==BL_PC && type<SC_SENDMAX)
- clif_status_change(bl,type,1); /* ƒAƒCƒRƒ“•\Ž¦ */
-
- /* option‚Ì?X */
- switch(type){
- case SC_STONE:
- case SC_FREEZE:
- case SC_STAN:
- case SC_SLEEP:
- battle_stopattack(bl); /* U?’âŽ~ */
- skill_stop_dancing(bl,0); /* ‰‰‘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, skill_status_change_timer);
- sc_data[i].timer = -1;
- }
- }
- }
- if(type == SC_STONE)
- *opt1 = 6;
- else
- *opt1 = type - SC_STONE + 1;
- 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 |= 1;
- opt_flag = 1;
- break;
- case SC_SIGNUMCRUCIS:
- *opt2 |= 0x40;
- opt_flag = 1;
- break;
- case SC_HIDING:
- case SC_CLOAKING:
- battle_stopattack(bl); /* U?’âŽ~ */
- *option |= ((type==SC_HIDING)?2:4);
- opt_flag =1 ;
- break;
- case SC_CHASEWALK:
- battle_stopattack(bl); /* U?’âŽ~ */
- *option |= 16388;
- opt_flag =1 ;
- break;
- case SC_SIGHT:
- *option |= 1;
- opt_flag = 1;
- break;
- case SC_RUWACH:
- *option |= 8192;
- opt_flag = 1;
- break;
- case SC_WEDDING:
- *option |= 4096;
- opt_flag = 1;
- }
-
- 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, skill_status_change_timer, bl->id, type);
-
- if(bl->type==BL_PC && calc_flag)
- pc_calcstatus(sd,0); /* ƒXƒe?ƒ^ƒXÄŒvŽZ */
-
- if(bl->type==BL_PC && save_flag)
- chrif_save(sd); // save the player status
-
- if(bl->type==BL_PC && updateflag)
- clif_updatestatus(sd,updateflag); /* ƒXƒe?ƒ^ƒX‚ðƒNƒ‰ƒCƒAƒ“ƒg‚É‘—‚é */
-
- return 0;
-}
-/*==========================================
- * ƒXƒe?ƒ^ƒXˆÙí‘S‰ðœ
- *------------------------------------------
- */
-int skill_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 = battle_get_sc_data(bl));
- nullpo_retr(0, sc_count = battle_get_sc_count(bl));
- nullpo_retr(0, option = battle_get_option(bl));
- nullpo_retr(0, opt1 = battle_get_opt1(bl));
- nullpo_retr(0, opt2 = battle_get_opt2(bl));
- nullpo_retr(0, opt3 = battle_get_opt3(bl));
-
- if (*sc_count == 0)
+ } else if (bl->type == BL_MOB && !battle_config.monster_cloak_check_type)
return 0;
- for(i = 0; i < MAX_STATUSCHANGE; i++){
- if(sc_data[i].timer != -1){ /* ˆÙ킪‚ ‚é‚È‚çƒ^ƒCƒ}?‚ð휂·‚é */
-/*
- delete_timer(sc_data[i].timer, skill_status_change_timer);
- sc_data[i].timer = -1;
-
- if (!type && i < SC_SENDMAX)
- clif_status_change(bl, i, 0);
-*/
-
- skill_status_change_end(bl, i, -1);
- }
- }
- *sc_count = 0;
- *opt1 = 0;
- *opt2 = 0;
- *opt3 = 0;
- *option &= OPTION_MASK;
-
- if (night_flag == 1 && type == BL_PC && !map[bl->m].flag.indoors && // by [Yor]
- !map[bl->m].flag.indoors && battle_config.night_darkness_level <= 0) // [celest]
- *opt2 |= STATE_BLIND;
- if(!type || type&2)
- clif_changeoption(bl);
-
- return 0;
-}
-
-/* ƒNƒ?ƒLƒ“ƒO?¸iŽü‚è‚Ɉړ®•s‰Â”\’n?‚ª‚ ‚é‚©j */
-int skill_check_cloaking(struct block_list *bl)
-{
- 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;
-
- //missing sd [Found by Celest, commited by Aria]
- struct map_session_data *sd=(struct map_session_data *)bl;
-
- nullpo_retr(0, bl);
-
- if(bl->type == BL_PC && !battle_config.pc_cloak_check_type) // If it's No it shouldn't be checked
- return 0;
- else if(bl->type == BL_MOB && !battle_config.monster_cloak_check_type)
- return 0;
- for(i=0;i<sizeof(dx)/sizeof(dx[0]);i++){
- int c=map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i]);
- if(c==1 || c==5) {
- end=0;
+ for (i = 0; i < 8; i++) {
+ if (map_getcell(bl->m, bl->x+dx[i], bl->y+dy[i], CELL_CHKNOPASS)) {
+ end = 0;
break;
}
}
if(end){
- if ((bl->type == BL_PC && pc_checkskill(sd,AS_CLOAKING)<3) || bl->type == BL_MOB) {
- skill_status_change_end(bl, SC_CLOAKING, -1);
- *battle_get_option(bl)&=~4; /* ”O‚Ì‚½‚ß‚Ì?— */
+ if ((sd && pc_checkskill(sd,AS_CLOAKING)<3) || bl->type == BL_MOB) {
+ status_change_end(bl, SC_CLOAKING, -1);
}
- else if (bl->type == BL_PC && sd->sc_data[SC_CLOAKING].val3 != 130) {
+ else if (sd && sd->sc_data[SC_CLOAKING].val3 != 130) {
sd->sc_data[SC_CLOAKING].val3 = 130;
- pc_calcspeed (sd);
+ status_calc_speed (sd);
}
}
else {
- if (bl->type == BL_PC && sd->sc_data[SC_CLOAKING].val3 != 103) {
+ if (sd && sd->sc_data[SC_CLOAKING].val3 != 103) {
sd->sc_data[SC_CLOAKING].val3 = 103;
- pc_calcspeed (sd);
+ status_calc_speed (sd);
}
}
- return end;
-}
-int skill_type_cloaking(struct block_list *bl)
-{
- 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 i;
-
- nullpo_retr(0, bl);
- if(bl->type == BL_PC && battle_config.pc_cloak_check_type&1)
- return 0;
- else if(bl->type == BL_MOB && battle_config.monster_cloak_check_type&1)
- return 0;
- for(i=0; i<sizeof(dx)/sizeof(dx[0]); i++)
- {
- int c=map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i]);
- if(c==1 || c==5)
- return 0;
- }
- return 1;
+ return end;
}
/*
@@ -10018,48 +8096,6 @@ int skill_type_cloaking(struct block_list *bl)
*/
/*==========================================
- * ‰‰‘t/ƒ_ƒ“ƒXƒXƒLƒ‹‚©‚Ç‚¤‚©”»’è
- * ˆø? ƒXƒLƒ‹ID
- * ?‚è ƒ_ƒ“ƒX‚¶‚á‚È‚¢=0 ‡‘t=2 ‚»‚êˆÈŠO‚̃_ƒ“ƒX=1
- *------------------------------------------
- */
-int skill_is_danceskill(int id)
-{
- int i;
- switch(id){
- 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 BD_RAGNAROK: /* _?‚Ì?¨ */
- case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç */
- i=2;
- break;
- case BA_DISSONANCE: /* •s‹¦˜a‰¹ */
- case BA_FROSTJOKE: /* Š¦‚¢ƒWƒ‡?ƒN */
- case BA_WHISTLE: /* Œû“J */
- case BA_ASSASSINCROSS: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
- case BA_POEMBRAGI: /* ƒuƒ‰ƒM‚ÌŽ */
- case BA_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
- case DC_UGLYDANCE: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
- case DC_SCREAM: /* ƒXƒNƒŠ?ƒ€ */
- case DC_HUMMING: /* ƒnƒ~ƒ“ƒO */
- case DC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc */
- case DC_FORTUNEKISS: /* K‰^‚̃LƒX */
- case DC_SERVICEFORYOU: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
- i=1;
- break;
- default:
- i=0;
- }
- return i;
-}
-
-/*==========================================
* ‰‰‘t/ƒ_ƒ“ƒX‚ð‚â‚ß‚é
* flag 1‚Ň‘t’†‚È‚ç‘Š•û‚Ƀ†ƒjƒbƒg‚ð”C‚¹‚é
*
@@ -10069,47 +8105,47 @@ void skill_stop_dancing(struct block_list *src, int flag)
{
struct status_change* sc_data;
struct skill_unit_group* group;
+ short* sc_count;
nullpo_retv(src);
-
- sc_data=battle_get_sc_data(src);
- if(sc_data && sc_data[SC_DANCING].timer != -1) {
- group=(struct skill_unit_group *)sc_data[SC_DANCING].val2; //ƒ_ƒ“ƒX‚̃XƒLƒ‹ƒ†ƒjƒbƒgID‚Íval2‚É“ü‚Á‚Ä‚é
- if(group && src->type==BL_PC && sc_data && sc_data[SC_DANCING].val4){ //‡‘t’†?
- struct map_session_data* dsd=map_id2sd(sc_data[SC_DANCING].val4); //‘Š•û‚ÌsdŽæ“¾
- if(flag){ //ƒƒOƒAƒEƒg‚ȂǕЕû‚ª—Ž‚¿‚Ä‚à‰‰‘t‚ª??‚³‚ê‚é
- if(dsd && src->id == group->src_id){ //ƒOƒ‹?ƒv‚ðŽ‚Á‚Ä‚éPC‚ª—Ž‚¿‚é
- group->src_id=sc_data[SC_DANCING].val4; //‘Š•û‚ɃOƒ‹?ƒv‚ð”C‚¹‚é
- if(flag&1) //ƒƒOƒAƒEƒg
- dsd->sc_data[SC_DANCING].val4=0; //‘Š•û‚Ì‘Š•û‚ð0‚É‚µ‚ć‘tI—¹¨’Êí‚̃_ƒ“ƒX?‘Ô
- if(flag&2) //ƒnƒG”ò‚Ñ‚È‚Ç
- return; //‡‘t‚àƒ_ƒ“ƒX?‘Ô‚àI—¹‚³‚¹‚È‚¢•ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Í’u‚¢‚Ä‚¯‚Ú‚è
- }else if(dsd && dsd->bl.id == group->src_id){ //‘Š•û‚ªƒOƒ‹?ƒv‚ðŽ‚Á‚Ä‚¢‚éPC‚ª—Ž‚¿‚é(Ž©•ª‚̓Oƒ‹?ƒv‚ðŽ‚Á‚Ä‚¢‚È‚¢)
- if(flag&1) //ƒƒOƒAƒEƒg
- dsd->sc_data[SC_DANCING].val4=0; //‘Š•û‚Ì‘Š•û‚ð0‚É‚µ‚ć‘tI—¹¨’Êí‚̃_ƒ“ƒX?‘Ô
- if(flag&2) //ƒnƒG”ò‚Ñ‚È‚Ç
- return; //‡‘t‚àƒ_ƒ“ƒX?‘Ô‚àI—¹‚³‚¹‚È‚¢•ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Í’u‚¢‚Ä‚¯‚Ú‚è
+ nullpo_retv(sc_data = status_get_sc_data(src));
+ nullpo_retv(sc_count = status_get_sc_count(src));
+
+ if((*sc_count) > 0 && sc_data[SC_DANCING].timer != -1) {
+ group = (struct skill_unit_group *)sc_data[SC_DANCING].val2; //ƒ_ƒ“ƒX‚̃XƒLƒ‹ƒ†ƒjƒbƒgID‚Íval2‚É“ü‚Á‚Ä‚é
+ if (src->type == BL_PC) {
+ if (group && sc_data[SC_DANCING].val4){ //‡‘t’†?
+ struct map_session_data* dsd = map_id2sd(sc_data[SC_DANCING].val4); //‘Š•û‚ÌsdŽæ“¾
+ if (flag && dsd) { //ƒƒOƒAƒEƒg‚ȂǕЕû‚ª—Ž‚¿‚Ä‚à‰‰‘t‚ª??‚³‚ê‚é
+ if (src->id == group->src_id) { //ƒOƒ‹?ƒv‚ðŽ‚Á‚Ä‚éPC‚ª—Ž‚¿‚é
+ group->src_id = sc_data[SC_DANCING].val4; //‘Š•û‚ɃOƒ‹?ƒv‚ð”C‚¹‚é
+ if (flag & 1) //ƒƒOƒAƒEƒg
+ dsd->sc_data[SC_DANCING].val4 = 0; //‘Š•û‚Ì‘Š•û‚ð0‚É‚µ‚ć‘tI—¹¨’Êí‚̃_ƒ“ƒX?‘Ô
+ if(flag & 2) //ƒnƒG”ò‚Ñ‚È‚Ç
+ return; //‡‘t‚àƒ_ƒ“ƒX?‘Ô‚àI—¹‚³‚¹‚È‚¢•ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Í’u‚¢‚Ä‚¯‚Ú‚è
+ } else if (dsd->bl.id == group->src_id) { //‘Š•û‚ªƒOƒ‹?ƒv‚ðŽ‚Á‚Ä‚¢‚éPC‚ª—Ž‚¿‚é(Ž©•ª‚̓Oƒ‹?ƒv‚ðŽ‚Á‚Ä‚¢‚È‚¢)
+ if (flag & 1) //ƒƒOƒAƒEƒg
+ dsd->sc_data[SC_DANCING].val4 = 0; //‘Š•û‚Ì‘Š•û‚ð0‚É‚µ‚ć‘tI—¹¨’Êí‚̃_ƒ“ƒX?‘Ô
+ if(flag & 2) //ƒnƒG”ò‚Ñ‚È‚Ç
+ return; //‡‘t‚àƒ_ƒ“ƒX?‘Ô‚àI—¹‚³‚¹‚È‚¢•ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Í’u‚¢‚Ä‚¯‚Ú‚è
+ }
+ status_change_end(src, SC_DANCING, -1); //Ž©•ª‚̃Xƒe?ƒ^ƒX‚ðI—¹‚³‚¹‚é
+ //‚»‚µ‚ăOƒ‹?ƒv‚ÍÁ‚³‚È‚¢•Á‚³‚È‚¢‚̂ŃXƒe?ƒ^ƒXŒvŽZ‚à‚¢‚ç‚È‚¢H
+ return;
+ } else if (dsd) {
+ if (src->id == group->src_id) //ƒOƒ‹?ƒv‚ðŽ‚Á‚Ä‚éPC‚ªŽ~‚ß‚é
+ status_change_end(&dsd->bl, SC_DANCING, -1); //‘ŠŽè‚̃Xƒe?ƒ^ƒX‚ðI—¹‚³‚¹‚é
+ if(dsd->bl.id == group->src_id) //‘Š•û‚ªƒOƒ‹?ƒv‚ðŽ‚Á‚Ä‚¢‚éPC‚ªŽ~‚ß‚é(Ž©•ª‚̓Oƒ‹?ƒv‚ðŽ‚Á‚Ä‚¢‚È‚¢)
+ status_change_end(src, SC_DANCING, -1); //Ž©•ª‚̃Xƒe?ƒ^ƒX‚ðI—¹‚³‚¹‚é
}
- skill_status_change_end(src,SC_DANCING,-1);//Ž©•ª‚̃Xƒe?ƒ^ƒX‚ðI—¹‚³‚¹‚é
- //‚»‚µ‚ăOƒ‹?ƒv‚ÍÁ‚³‚È‚¢•Á‚³‚È‚¢‚̂ŃXƒe?ƒ^ƒXŒvŽZ‚à‚¢‚ç‚È‚¢H
+ }
+ if(flag & 2 && group) { //ƒnƒG‚Å”ò‚ñ‚¾‚Æ‚«‚Æ‚©‚̓†ƒjƒbƒg‚à”ò‚Ô
+ struct map_session_data *sd = (struct map_session_data *)src;
+ if (sd) skill_unit_move_unit_group(group, sd->bl.m, (sd->to_x - sd->bl.x), (sd->to_y - sd->bl.y));
return;
- }else{
- if(dsd && src->id == group->src_id){ //ƒOƒ‹?ƒv‚ðŽ‚Á‚Ä‚éPC‚ªŽ~‚ß‚é
- skill_status_change_end((struct block_list *)dsd,SC_DANCING,-1);//‘ŠŽè‚̃Xƒe?ƒ^ƒX‚ðI—¹‚³‚¹‚é
- }
- if(dsd && dsd->bl.id == group->src_id){ //‘Š•û‚ªƒOƒ‹?ƒv‚ðŽ‚Á‚Ä‚¢‚éPC‚ªŽ~‚ß‚é(Ž©•ª‚̓Oƒ‹?ƒv‚ðŽ‚Á‚Ä‚¢‚È‚¢)
- skill_status_change_end(src,SC_DANCING,-1);//Ž©•ª‚̃Xƒe?ƒ^ƒX‚ðI—¹‚³‚¹‚é
- }
}
}
- if(flag&2 && group && src->type==BL_PC){ //ƒnƒG‚Å”ò‚ñ‚¾‚Æ‚«‚Æ‚©‚̓†ƒjƒbƒg‚à”ò‚Ô
- struct map_session_data *sd = (struct map_session_data *)src;
- skill_unit_move_unit_group(group, sd->bl.m,(sd->to_x - sd->bl.x),(sd->to_y - sd->bl.y));
- return;
- }
skill_delunitgroup(group);
- if(src->type==BL_PC)
- pc_calcstatus((struct map_session_data *)src,0);
}
}
@@ -10138,10 +8174,13 @@ struct skill_unit *skill_initunit(struct skill_unit_group *group,int idx,int x,i
map_addblock(&unit->bl);
clif_skill_setunit(unit);
+
+ if (group->skill_id==HP_BASILICA)
+ skill_basilica_cell(unit,CELL_SETBASILICA);
+
return unit;
}
-int skill_unit_timer_sub_ondelete( struct block_list *bl, va_list ap );
/*==========================================
* ƒXƒLƒ‹ƒ†ƒjƒbƒgíœ
*------------------------------------------
@@ -10149,7 +8188,6 @@ int skill_unit_timer_sub_ondelete( struct block_list *bl, va_list ap );
int skill_delunit(struct skill_unit *unit)
{
struct skill_unit_group *group;
- int range;
nullpo_retr(0, unit);
if(!unit->alive)
@@ -10159,11 +8197,15 @@ int skill_delunit(struct skill_unit *unit)
/* onlimitƒCƒxƒ“ƒgŒÄ‚Ño‚µ */
skill_unit_onlimit( unit,gettick() );
- /* ondeleteƒCƒxƒ“ƒgŒÄ‚Ño‚µ */
- range=group->range;
- map_foreachinarea( skill_unit_timer_sub_ondelete, unit->bl.m,
- unit->bl.x-range,unit->bl.y-range,unit->bl.x+range,unit->bl.y+range,0,
- &unit->bl,gettick() );
+ /* onoutƒCƒxƒ“ƒgŒÄ‚Ño‚µ */
+ if (!unit->range) {
+ map_foreachinarea(skill_unit_effect,unit->bl.m,
+ unit->bl.x,unit->bl.y,unit->bl.x,unit->bl.y,0,
+ &unit->bl,gettick(),0);
+ }
+
+ if (group->skill_id==HP_BASILICA)
+ skill_basilica_cell(unit,CELL_CLRBASILICA);
clif_skill_delunit(unit);
@@ -10179,7 +8221,7 @@ int skill_delunit(struct skill_unit *unit)
* ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹?ƒv‰Šú‰»
*------------------------------------------
*/
-static int skill_unit_group_newid=10;
+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)
{
@@ -10227,11 +8269,11 @@ struct skill_unit_group *skill_initunitgroup(struct block_list *src,
}
group->src_id=src->id;
- group->party_id=battle_get_party_id(src);
- group->guild_id=battle_get_guild_id(src);
+ 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=10;
+ 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;
@@ -10239,39 +8281,23 @@ struct skill_unit_group *skill_initunitgroup(struct block_list *src,
group->skill_lv=skilllv;
group->unit_id=unit_id;
group->map=src->m;
- group->range=0;
group->limit=10000;
group->interval=1000;
group->tick=gettick();
group->valstr=NULL;
- if( skill_is_danceskill(skillid) ){
+ if (skill_get_unit_flag(skillid)&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;
}
- skill_status_change_start(src,SC_DANCING,skillid,(int)group,0,0,skill_get_time(skillid,skilllv)+1000,0);
- switch(skillid){ //‡‘tƒXƒLƒ‹‚Í‘Š•û‚ðƒ_ƒ“ƒX?‘Ô‚É‚·‚é
- 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 BD_RAGNAROK: /* _?‚Ì?¨ */
- case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç */
- {
- int range=1;
- int c=0;
- if(sd){
- map_foreachinarea(skill_check_condition_use_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);
- }
- }
+ status_change_start(src,SC_DANCING,skillid,(int)group,0,0,skill_get_time(skillid,skilllv)+1000,0);
+ //‡‘tƒXƒLƒ‹‚Í‘Š•û‚ðƒ_ƒ“ƒXó‘Ô‚É‚·‚é
+ if (sd && skill_get_unit_flag(skillid)&UF_ENSEMBLE) {
+ int c=0;
+ map_foreachinarea(skill_check_condition_use_sub,sd->bl.m,
+ sd->bl.x-1,sd->bl.y-1,sd->bl.x+1,sd->bl.y+1,BL_PC,&sd->bl,&c);
}
}
return group;
@@ -10291,10 +8317,16 @@ int skill_delunitgroup(struct skill_unit_group *group)
return 0;
src=map_id2bl(group->src_id);
- if( skill_is_danceskill(group->skill_id) ){ //ƒ_ƒ“ƒXƒXƒLƒ‹‚̓_ƒ“ƒX?‘Ô‚ð‰ðœ‚·‚é
- if(src)
- skill_status_change_end(src,SC_DANCING,-1);
+ //ƒ_ƒ“ƒXƒXƒLƒ‹‚̓_ƒ“ƒXó‘Ô‚ð‰ðœ‚·‚é
+ if(src) {
+ if (skill_get_unit_flag(group->skill_id)&UF_DANCE)
+ status_change_end(src,SC_DANCING,-1);
+ if (group->unit_id == 0x86) {
+ 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);
}
+ }
group->alive_count=0;
if(group->unit!=NULL){
@@ -10307,7 +8339,7 @@ int skill_delunitgroup(struct skill_unit_group *group)
group->valstr=NULL;
}
- map_freeblock(group->unit); /* free()‚Ì‘Ö‚í‚è */
+ map_freeblock(group->unit); /* aFree()‚Ì‘Ö‚í‚è */
group->unit=NULL;
group->src_id=0;
group->group_id=0;
@@ -10329,13 +8361,14 @@ int skill_clear_unitgroup(struct block_list *src)
if(src->type==BL_PC){
group=((struct map_session_data *)src)->skillunit;
maxsug=MAX_SKILLUNITGROUP;
- }else if(src->type==BL_MOB){
+ } else if(src->type==BL_MOB){
group=((struct mob_data *)src)->skillunit;
maxsug=MAX_MOBSKILLUNITGROUP;
- }else if(src->type==BL_PET){ // [Valaris]
+ } 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++)
@@ -10350,54 +8383,46 @@ int skill_clear_unitgroup(struct block_list *src)
*------------------------------------------
*/
struct skill_unit_group_tickset *skill_unitgrouptickset_search(
- struct block_list *bl,int group_id)
+ struct block_list *bl,struct skill_unit_group *group,int tick)
{
- int i,j=0,k,s=group_id%MAX_SKILLUNITGROUPTICKSET;
- struct skill_unit_group_tickset *set=NULL;
+ 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{
- set=((struct mob_data *)bl)->skillunittick;
- }
- if(set==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;
- for(i=0;i<MAX_SKILLUNITGROUPTICKSET;i++)
- if( set[(k=(i+s)%MAX_SKILLUNITGROUPTICKSET)].group_id == group_id )
- return &set[k];
- else if( set[k].group_id==0 )
- j=k;
- return &set[j];
-}
-
-/*==========================================
- * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹?ƒv‚Ì”í‰e‹¿tickíœ
- *------------------------------------------
- */
-int skill_unitgrouptickset_delete(struct block_list *bl,int group_id)
-{
- int i,s=group_id%MAX_SKILLUNITGROUPTICKSET;
- struct skill_unit_group_tickset *set=NULL,*ts;
-
- nullpo_retr(0, bl);
+ if (skill_get_unit_flag(group->skill_id)&UF_NOOVERLAP)
+ id = s = group->skill_id;
+ else
+ id = s = group->group_id;
- if(bl->type==BL_PC){
- set=((struct map_session_data *)bl)->skillunittick;
- }else{
- set=((struct mob_data *)bl)->skillunittick;
+ 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(set!=NULL){
-
- for(i=0;i<MAX_SKILLUNITGROUPTICKSET;i++)
- if( (ts=&set[(i+s)%MAX_SKILLUNITGROUPTICKSET])->group_id == group_id )
- ts->group_id=0;
-
+ if (j == -1) {
+ if(battle_config.error_log) {
+ sprintf (tmp_output, "skill_unitgrouptickset_search: tickset is full\n");
+ ShowWarning (tmp_output);
+ }
+ j = id % MAX_SKILLUNITGROUPTICKSET;
}
- return 0;
+
+ set[j].id = id;
+ set[j].tick = tick;
+ return &set[j];
}
/*==========================================
@@ -10406,49 +8431,27 @@ int skill_unitgrouptickset_delete(struct block_list *bl,int group_id)
*/
int skill_unit_timer_sub_onplace( struct block_list *bl, va_list ap )
{
- struct block_list *src;
- struct skill_unit *su;
+ struct skill_unit *unit;
+ struct skill_unit_group *group;
unsigned int tick;
nullpo_retr(0, bl);
nullpo_retr(0, ap);
- src=va_arg(ap,struct block_list*);
-
- tick=va_arg(ap,unsigned int);
- su = (struct skill_unit *)src;
+ unit = va_arg(ap,struct skill_unit *);
+ tick = va_arg(ap,unsigned int);
- if( su && su->alive ) {
- struct skill_unit_group *sg;
- sg = su->group;
- if(sg && battle_check_target(src,bl,sg->target_flag )>0)
- skill_unit_onplace( su, bl, tick );
- }
- return 0;
-}
+ if (bl->type!=BL_PC && bl->type!=BL_MOB)
+ return 0;
+ if (!unit->alive || bl->prev==NULL)
+ return 0;
-/*==========================================
- * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒ^ƒCƒ}?íœ?——p(foreachinarea)
- *------------------------------------------
- */
-int skill_unit_timer_sub_ondelete( struct block_list *bl, va_list ap )
-{
- struct block_list *src;
- struct skill_unit *su;
- unsigned int tick;
+ nullpo_retr(0, group=unit->group);
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
- src=va_arg(ap,struct block_list*);
+ if (battle_check_target(&unit->bl,bl,group->target_flag)<=0)
+ return 0;
- tick=va_arg(ap,unsigned int);
- su = (struct skill_unit *)src;
+ skill_unit_onplace_timer(unit,bl,tick);
- if( su && su->alive ){
- struct skill_unit_group *sg;
- sg = su->group;
- if( sg && battle_check_target(src,bl,sg->target_flag )>0 )
- skill_unit_ondelete( su, bl, tick );
- }
return 0;
}
@@ -10466,28 +8469,38 @@ int skill_unit_timer_sub( struct block_list *bl, va_list ap )
nullpo_retr(0, bl);
nullpo_retr(0, ap);
nullpo_retr(0, unit=(struct skill_unit *)bl);
- nullpo_retr(0, group=unit->group);
tick=va_arg(ap,unsigned int);
if(!unit->alive)
return 0;
+ group=unit->group;
- range=(unit->range!=0)?unit->range:group->range;
+ nullpo_retr(0, group);
+ range = unit->range;
- /* onplaceƒCƒxƒ“ƒgŒÄ‚Ño‚µ */
- if(unit->alive && unit->range>=0){
- map_foreachinarea( skill_unit_timer_sub_onplace, bl->m,
- bl->x-range,bl->y-range,bl->x+range,bl->y+range,0,
- bl,tick);
- if(group->unit_id == 0xaa && DIFF_TICK(tick,group->tick)>=6000*group->val2){
- map_foreachinarea( skill_idun_heal, bl->m,
- bl->x-range,bl->y-range,bl->x+range,bl->y+range,0,unit);
- group->val2++;
+ /* 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,0,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;
}
}
+ // ƒCƒhƒDƒ“‚Ì—ÑŒç‚É‚æ‚é‰ñ•œ
+ if (group->unit_id==0xaa && DIFF_TICK(tick,group->tick)>=6000*group->val3) {
+ struct block_list *src = map_id2bl(group->src_id);
+ int range = skill_get_unit_layout_type(group->skill_id,group->skill_lv);
+ nullpo_retr(0, src);
+ map_foreachinarea(skill_idun_heal,src->m,
+ src->x-range,src->y-range,src->x+range,src->y+range,0,unit);
+ group->val3++;
+ }
/* ŽžŠÔØ‚êíœ */
- if(unit->alive &&
- (DIFF_TICK(tick,group->tick)>=group->limit || DIFF_TICK(tick,group->tick)>=unit->limit) ){
+ if((DIFF_TICK(tick,group->tick)>=group->limit || DIFF_TICK(tick,group->tick)>=unit->limit)){
switch(group->unit_id){
case 0x8f: /* ƒuƒ‰ƒXƒgƒ}ƒCƒ“ */
group->unit_id = 0x8c;
@@ -10516,7 +8529,21 @@ int skill_unit_timer_sub( struct block_list *bl, va_list ap )
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);
}
@@ -10549,92 +8576,33 @@ int skill_unit_timer( int tid,unsigned int tick,int id,int data)
* ƒXƒLƒ‹ƒ†ƒjƒbƒgˆÚ“®Žž?——p(foreachinarea)
*------------------------------------------
*/
-int skill_unit_out_all_sub( struct block_list *bl, va_list ap )
-{
- struct skill_unit *unit;
- struct skill_unit_group *group;
- struct block_list *src;
- int range;
- unsigned int tick;
-
- 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 *)bl);
- nullpo_retr(0, group=unit->group);
-
- tick=va_arg(ap,unsigned int);
-
- if(!unit->alive || src->prev==NULL)
- return 0;
-
- range=(unit->range!=0)?unit->range:group->range;
-
- if( range<0 || battle_check_target(bl,src,group->target_flag )<=0 )
- return 0;
-
- if( src->x >= bl->x-range && src->x <= bl->x+range &&
- src->y >= bl->y-range && src->y <= bl->y+range )
- skill_unit_onout( unit, src, tick );
-
- return 0;
-}
-
-
-/*==========================================
- * ƒXƒLƒ‹ƒ†ƒjƒbƒgˆÚ“®Žž?—
- *------------------------------------------
- */
-int skill_unit_out_all( struct block_list *bl,unsigned int tick,int range)
-{
- nullpo_retr(0, bl);
-
- if( bl->prev==NULL )
- return 0;
-
- if(range<7)
- range=7;
- map_foreachinarea( skill_unit_out_all_sub,
- bl->m,bl->x-range,bl->y-range,bl->x+range,bl->y+range,BL_SKILL,
- bl,tick );
-
- 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 *unit = (struct skill_unit *)bl;
struct skill_unit_group *group;
- struct block_list *src;
- int range;
- unsigned int tick;
+ struct block_list *target;
+ unsigned int tick,flag;
nullpo_retr(0, bl);
nullpo_retr(0, ap);
- nullpo_retr(0, unit=(struct skill_unit *)bl);
- nullpo_retr(0, src=va_arg(ap,struct block_list*));
-
- tick=va_arg(ap,unsigned int);
+ nullpo_retr(0, target=va_arg(ap,struct block_list*));
+ tick = va_arg(ap,unsigned int);
+ flag = va_arg(ap,int);
- if(!unit->alive || src->prev==NULL)
+ if (target->type!=BL_PC && target->type!=BL_MOB)
return 0;
- if((group=unit->group) == NULL)
+ nullpo_retr(0, group=unit->group);
+ if (group->interval!=-1)
return 0;
- range=(unit->range!=0)?unit->range:group->range;
- if( range<0 || battle_check_target(bl,src,group->target_flag )<=0 )
+ if (!unit->alive || target->prev==NULL)
return 0;
- if( src->x >= bl->x-range && src->x <= bl->x+range &&
- src->y >= bl->y-range && src->y <= bl->y+range )
- skill_unit_onplace( unit, src, tick );
+ if (flag)
+ skill_unit_onplace(unit,target,tick);
else
- skill_unit_onout( unit, src, tick );
+ skill_unit_onout(unit,target,tick);
return 0;
}
@@ -10643,173 +8611,117 @@ int skill_unit_move_sub( struct block_list *bl, va_list ap )
* ƒXƒLƒ‹ƒ†ƒjƒbƒgˆÚ“®Žž?—
*------------------------------------------
*/
-int skill_unit_move( struct block_list *bl,unsigned int tick,int range)
+int skill_unit_move(struct block_list *bl,unsigned int tick,int flag)
{
nullpo_retr(0, bl);
- if( bl->prev==NULL )
+ if(bl->prev==NULL )
return 0;
- if(range<7)
- range=7;
- map_foreachinarea( skill_unit_move_sub,
- bl->m,bl->x-range,bl->y-range,bl->x+range,bl->y+range,BL_SKILL,
- bl,tick );
+ map_foreachinarea(skill_unit_move_sub,
+ bl->m,bl->x,bl->y,bl->x,bl->y,BL_SKILL,bl,tick,flag);
return 0;
}
/*==========================================
- * ƒXƒLƒ‹ƒ†ƒjƒbƒgŽ©?‚̈ړ®Žž?—(foreachinarea)
- *------------------------------------------
- */
-int skill_unit_move_unit_group_sub( struct block_list *bl, va_list ap )
-{
- struct skill_unit *unit;
- struct skill_unit_group *group;
- struct block_list *src;
- int range;
- unsigned int tick;
-
- 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, group=unit->group);
-
- tick=va_arg(ap,unsigned int);
-
- if(!unit->alive || bl->prev==NULL)
- return 0;
-
- range=(unit->range!=0)?unit->range:group->range;
-
- if( range<0 || battle_check_target(src,bl,group->target_flag )<=0 )
- return 0;
- if( bl->x >= src->x-range && bl->x <= src->x+range &&
- bl->y >= src->y-range && bl->y <= src->y+range )
- skill_unit_onplace( unit, bl, tick );
- else
- skill_unit_onout( unit, 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;
+ 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;
- if( group->unit_count<=0)
+ // ˆÚ“®‰Â”\‚ȃXƒLƒ‹‚̓_ƒ“ƒXŒn‚ÆAƒuƒ‰ƒXƒgƒ}ƒCƒ“AƒNƒŒƒCƒ‚ƒA[ƒgƒ‰ƒbƒv‚Ì‚Ý
+ if (!(skill_get_unit_flag(group->skill_id)&UF_DANCE) &&
+ group->skill_id!=HT_CLAYMORETRAP && group->skill_id!=HT_BLASTMINE)
return 0;
- if(group->unit!=NULL){
- if(!battle_config.unit_movement_type){
- int i;
- for(i=0;i<group->unit_count;i++){
- struct skill_unit *unit=&group->unit[i];
- if(unit->alive && !(m==unit->bl.m && dx==0 && dy==0)){
- int range=unit->range;
- map_delblock(&unit->bl);
- unit->bl.m = m;
- unit->bl.x += dx;
- unit->bl.y += dy;
- map_addblock(&unit->bl);
- clif_skill_setunit(unit);
- if(range>0){
- if(range<7)
- range=7;
- map_foreachinarea( skill_unit_move_unit_group_sub, unit->bl.m,
- unit->bl.x-range,unit->bl.y-range,unit->bl.x+range,unit->bl.y+range,0,
- &unit->bl,gettick() );
- }
- }
+ m_flag = (int *) aMalloc(sizeof(int)*group->unit_count);
+ memset(m_flag,0,sizeof(int)*group->unit_count);// ˆÚ“®ƒtƒ‰ƒO
+ // æ‚Ƀtƒ‰ƒO‚ð‘S•”Œˆ‚ß‚é
+ // m_flag
+ // 0: ’PƒˆÚ“®
+ // 1: ƒ†ƒjƒbƒg‚ðˆÚ“®‚·‚é(Œ»ˆÊ’u‚©‚烆ƒjƒbƒg‚ª‚È‚­‚È‚é)
+ // 2: Žc—¯•VˆÊ’u‚ªˆÚ“®æ‚Æ‚È‚é(ˆÚ“®æ‚Ƀ†ƒjƒbƒg‚ª‘¶Ý‚µ‚È‚¢)
+ // 3: Žc—¯
+ 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){
+ // ˆÚ“®æ‚Ƀ†ƒjƒbƒg‚ª‚©‚Ô‚Á‚Ä‚¢‚é
+ m_flag[i] |= 0x1;
}
- }else{
- int i,j, *r_flag, *s_flag, *m_flag;
- struct skill_unit *unit1;
- struct skill_unit *unit2;
- r_flag = (int *) malloc(sizeof(int) * group->unit_count);
- s_flag = (int *) malloc(sizeof(int) * group->unit_count);
- m_flag = (int *) malloc(sizeof(int) * group->unit_count);
- memset(r_flag,0, sizeof(int) * group->unit_count);// ?³ƒtƒ‰ƒO
- memset(s_flag,0, sizeof(int) * group->unit_count);// ?³ƒtƒ‰ƒO
- memset(m_flag,0, sizeof(int) * group->unit_count);// ?³ƒtƒ‰ƒO
-
- //æ‚Ƀtƒ‰ƒO‚ð‘S•”Œˆ‚ß‚é
- for(i=0;i<group->unit_count;i++){
- int move_check=0;// ‚©‚Ô‚èƒtƒ‰ƒO
- unit1=&group->unit[i];
- for(j=0;j<group->unit_count;j++){
- unit2=&group->unit[j];
- if(unit1->bl.m==m && unit1->bl.x+dx==unit2->bl.x && unit1->bl.y+dy==unit2->bl.y){
- //ˆÚ“®æ‚Ƀ†ƒjƒbƒg‚ª‚©‚Ô‚Á‚Ä‚½‚ç
- s_flag[i]=1;// ˆÚ“®‘O‚̃†ƒjƒbƒgƒiƒ“ƒo?‚Ì?³ƒtƒ‰ƒOon
- r_flag[j]=1;// ‚©‚Ԃ郆ƒjƒbƒgƒiƒ“ƒo?‚Ì?—¯ƒtƒ‰ƒOon
- move_check=1;//ƒ†ƒjƒbƒg‚ª‚©‚Ô‚Á‚½B
- break;
- }
- }
- if(!move_check)// ƒ†ƒjƒbƒg‚ª‚©‚Ô‚Á‚Ä‚È‚©‚Á‚½‚ç
- m_flag[i]=1;// ˆÚ“®‘Oƒ†ƒjƒbƒgƒiƒ“ƒo?‚̈ړ®ƒtƒ‰ƒOon
- }
-
- //ƒtƒ‰ƒO‚ÉŠî‚¢‚ă†ƒjƒbƒgˆÚ“®
- for(i=0;i<group->unit_count;i++){
- unit1=&group->unit[i];
- if(m_flag[i]){// ˆÚ“®ƒtƒ‰ƒO‚ªon‚Å
- if(!r_flag[i]){// ?—¯ƒtƒ‰ƒO‚ªoff‚È‚ç
- //?ƒˆÚ“®(range‚à?³‚Ì•K—v–³‚µ)
- int range=unit1->range;
- map_delblock(&unit1->bl);
- unit1->bl.m = m;
- unit1->bl.x += dx;
- unit1->bl.y += dy;
- map_addblock(&unit1->bl);
- clif_skill_setunit(unit1);
- if(range > 0){
- if(range < 7)
- range = 7;
- map_foreachinarea( skill_unit_move_unit_group_sub, unit1->bl.m,
- unit1->bl.x-range,unit1->bl.y-range,unit1->bl.x+range,unit1->bl.y+range,0,
- &unit1->bl,gettick() );
- }
- }else{// ?—¯ƒtƒ‰ƒO‚ªon‚È‚ç
- //‹óƒ†ƒjƒbƒg‚É‚È‚é‚Ì‚ÅA?³‰Â”\‚ȃ†ƒjƒbƒg‚ð’T‚·
- for(j=0;j<group->unit_count;j++){
- unit2=&group->unit[j];
- if(s_flag[j] && !r_flag[j]){
- // ?³ˆÚ“®(range?³•t‚«)
- int range=unit1->range;
- map_delblock(&unit2->bl);
- unit2->bl.m = m;
- unit2->bl.x = unit1->bl.x + dx;
- unit2->bl.y = unit1->bl.y + dy;
- unit2->range = unit1->range;
- map_addblock(&unit2->bl);
- clif_skill_setunit(unit2);
- if(range > 0){
- if(range < 7)
- range = 7;
- map_foreachinarea( skill_unit_move_unit_group_sub, unit2->bl.m,
- unit2->bl.x-range,unit2->bl.y-range,unit2->bl.x+range,unit2->bl.y+range,0,
- &unit2->bl,gettick() );
- }
- s_flag[j]=0;// ?³Š®—¹‚µ‚½‚Ì‚Åoff
- break;
- }
- }
- }
+ if (unit1->bl.x-dx==unit2->bl.x && unit1->bl.y-dy==unit2->bl.y){
+ // ƒ†ƒjƒbƒg‚ª‚±‚Ìꊂɂâ‚Á‚Ä‚­‚é
+ m_flag[i] |= 0x2;
+ }
+ }
+ }
+ // ƒtƒ‰ƒO‚ÉŠî‚¢‚ă†ƒjƒbƒgˆÚ“®
+ // ƒtƒ‰ƒO‚ª1‚Ìunit‚ð’T‚µAƒtƒ‰ƒO‚ª2‚Ìunit‚̈ړ®æ‚Ɉڂ·
+ j = 0;
+ for (i=0;i<group->unit_count;i++) {
+ unit1=&group->unit[i];
+ if (!unit1->alive)
+ continue;
+ if (!(m_flag[i]&0x2)) {
+ // ƒ†ƒjƒbƒg‚ª‚È‚­‚È‚éꊂŃXƒLƒ‹ƒ†ƒjƒbƒg‰e‹¿‚ðÁ‚·
+ map_foreachinarea(skill_unit_effect,unit1->bl.m,
+ unit1->bl.x,unit1->bl.y,unit1->bl.x,unit1->bl.y,0,
+ &unit1->bl,tick,0);
+ }
+ if (m_flag[i]==0) {
+ // ’PƒˆÚ“®
+ map_delblock(&unit1->bl);
+ unit1->bl.m = m;
+ unit1->bl.x += dx;
+ unit1->bl.y += dy;
+ map_addblock(&unit1->bl);
+ clif_skill_setunit(unit1);
+ } else if (m_flag[i]==1) {
+ // ƒtƒ‰ƒO‚ª2‚Ì‚à‚Ì‚ð’T‚µ‚Ä‚»‚̃†ƒjƒbƒg‚̈ړ®æ‚Ɉړ®
+ for(;j<group->unit_count;j++) {
+ if (m_flag[j]==2) {
+ // Œp³ˆÚ“®
+ unit2 = &group->unit[j];
+ if (!unit2->alive)
+ continue;
+ map_delblock(&unit1->bl);
+ unit1->bl.m = m;
+ unit1->bl.x = unit2->bl.x+dx;
+ unit1->bl.y = unit2->bl.y+dy;
+ map_addblock(&unit1->bl);
+ clif_skill_setunit(unit1);
+ j++;
+ break;
}
}
- free(r_flag);
- free(s_flag);
- free(m_flag);
+ }
+ if (!(m_flag[i]&0x2)) {
+ // ˆÚ“®Œã‚ÌꊂŃXƒLƒ‹ƒ†ƒjƒbƒg‚ð”­“®
+ map_foreachinarea(skill_unit_effect,unit1->bl.m,
+ unit1->bl.x,unit1->bl.y,unit1->bl.x,unit1->bl.y,0,
+ &unit1->bl,tick,1);
}
}
+ aFree(m_flag);
return 0;
}
@@ -10935,62 +8847,57 @@ int skill_produce_mix( struct map_session_data *sd,
/* Šm—¦”»’è */
equip = itemdb_isequip(nameid);
if(!equip) {
+// Corrected rates [DracoRPG] --------------------------//
if(skill_produce_db[idx].req_skill==AM_PHARMACY) {
- if((nameid >= 501 && nameid <= 506) || (nameid >= 545 && nameid <= 547) || nameid == 525)
- make_per = 2000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_POTIONPITCHER)*100;
- else if(nameid == 970)
- make_per = 1500 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300;
- else if(nameid == 7135)
- make_per = 1000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_DEMONSTRATION)*100;
- else if(nameid == 7136)
- make_per = 1000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_ACIDTERROR)*100;
- else if(nameid == 7137)
- make_per = 1000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_CANNIBALIZE)*100;
- else if(nameid == 7138)
- make_per = 1000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_SPHEREMINE)*100;
- else if(nameid == 7139)
- make_per = 1000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300 + pc_checkskill(sd,AM_CP_WEAPON)*100 +
- pc_checkskill(sd,AM_CP_SHIELD)*100 + pc_checkskill(sd,AM_CP_ARMOR)*100 + pc_checkskill(sd,AM_CP_HELM)*100;
- else
- make_per = 1000 + sd->status.base_level*30 + sd->paramc[3]*20 + sd->paramc[4]*15 + pc_checkskill(sd,AM_LEARNINGPOTION)*100 + pc_checkskill(sd,AM_PHARMACY)*300;
+ make_per = pc_checkskill(sd,AM_LEARNINGPOTION)*100
+ + pc_checkskill(sd,AM_PHARMACY)*300 + sd->status.job_level*20
+ + sd->paramc[4]*10+sd->paramc[5]*10;
+
+ if(nameid >= 501 && nameid <= 505) // Normal potions
+ make_per += 2000 + pc_checkskill(sd,AM_POTIONPITCHER)*100;
+ else if(nameid >= 605 && nameid <= 606) // Anodyne & Aloevera (not sure of the formula, I put the same base value as normal pots but without the Aid Potion bonus since they are not throwable pots ^^)
+ make_per += 2000;
+ else if(nameid >= 545 && nameid <= 547) // Concentrated potions
+ ;
+ else if(nameid == 970) // Alcohol
+ make_per += 1000;
+ else if(nameid == 7135) // Bottle Grenade
+ make_per += 500 + pc_checkskill(sd,AM_DEMONSTRATION)*100;
+ else if(nameid == 7136) // Acid Bottle
+ make_per += 500 + pc_checkskill(sd,AM_ACIDTERROR)*100;
+ else if(nameid == 7137) // Plant Bottle
+ make_per += 500 + pc_checkskill(sd,AM_CANNIBALIZE)*100;
+ else if(nameid == 7138) // Marine Sphere Bottle
+ make_per += 500 + pc_checkskill(sd,AM_SPHEREMINE)*100;
+ else if(nameid == 7139) // Glistening Coat
+ make_per += 500 + pc_checkskill(sd,AM_CP_WEAPON)*100 + pc_checkskill(sd,AM_CP_SHIELD)*100 +
+ pc_checkskill(sd,AM_CP_ARMOR)*100 + pc_checkskill(sd,AM_CP_HELM)*100;
} else if (skill_produce_db[idx].req_skill == ASC_CDP) {
make_per = 2000 + 40*sd->paramc[4] + 20*sd->paramc[5];
- //make_per = 20 + (20*sd->paramc[4])/50 + (20*sd->paramc[5])/100;
} else {
if(nameid == 998)
- make_per = 2000 + sd->status.base_level*30 + sd->paramc[4]*20 + sd->paramc[5]*10 + pc_checkskill(sd,skill_produce_db[idx].req_skill)*600;
- else if(nameid == 985)
- make_per = 1000 + sd->status.base_level*30 + sd->paramc[4]*20 + sd->paramc[5]*10 + (pc_checkskill(sd,skill_produce_db[idx].req_skill)-1)*500;
+ make_per = 1500 + sd->status.job_level*35 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,skill_produce_db[idx].req_skill)*600;
else
- make_per = 1000 + sd->status.base_level*30 + sd->paramc[4]*20 + sd->paramc[5]*10 + pc_checkskill(sd,skill_produce_db[idx].req_skill)*500;
- }
- }
- else {
- int add_per;
- if(pc_search_inventory(sd,989) >= 0) add_per = 750;
- else if(pc_search_inventory(sd,988) >= 0) add_per = 500;
- else if(pc_search_inventory(sd,987) >= 0) add_per = 250;
- else if(pc_search_inventory(sd,986) >= 0) add_per = 0;
- else add_per = -500;
- if(ele) add_per -= 500;
- add_per -= sc*500;
+ make_per = 1000 + sd->status.job_level*35 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,skill_produce_db[idx].req_skill)*500;
+ }
+ if(battle_config.pp_rate != 100)
+ make_per = make_per * battle_config.pp_rate / 100;
+ } else { // Corrected rates [DracoRPG]
+ int add_per=0;
+ if(pc_search_inventory(sd,989) >= 0) add_per = 400;
+ else if(pc_search_inventory(sd,988) >= 0) add_per = 300;
+ else if(pc_search_inventory(sd,987) >= 0) add_per = 200;
+ else if(pc_search_inventory(sd,986) >= 0) add_per = 100;
wlv = itemdb_wlv(nameid);
- make_per = ((250 + sd->status.base_level*15 + sd->paramc[4]*10 + sd->paramc[5]*5 + pc_checkskill(sd,skill_produce_db[idx].req_skill)*500 +
- add_per) * (100 - (wlv - 1)*20))/100 + pc_checkskill(sd,BS_WEAPONRESEARCH)*100 + ((wlv >= 3)? pc_checkskill(sd,BS_ORIDEOCON)*100 : 0);
+ make_per = 1500 + sd->status.job_level*35 + sd->paramc[4]*10 + sd->paramc[5]*10 + pc_checkskill(sd,skill_produce_db[idx].req_skill)*1000 + pc_checkskill(sd,BS_WEAPONRESEARCH)*100 +
+ ((wlv >= 3)? pc_checkskill(sd,BS_ORIDEOCON)*100 : 0) + add_per - (ele? 2500:0) - sc*((4-wlv)*500) - wlv*1000;
+ if(battle_config.wp_rate != 100) /* Šm—¦•â³ */
+ make_per = make_per * battle_config.wp_rate / 100;
}
+// -----------------------------------------------------//
if(make_per < 1) make_per = 1;
- if(skill_produce_db[idx].req_skill==AM_PHARMACY ||
- skill_produce_db[idx].req_skill==ASC_CDP) {
- if( battle_config.pp_rate!=100 )
- make_per=make_per*battle_config.pp_rate/100;
- }
- else {
- if( battle_config.wp_rate!=100 ) /* Šm—¦•â³ */
- make_per=make_per*battle_config.wp_rate/100;
- }
-
// if(battle_config.etc_log)
// printf("make rate = %d\n",make_per);
@@ -11013,10 +8920,8 @@ int skill_produce_mix( struct map_session_data *sd,
*((unsigned long *)(&tmp_item.card[2]))=sd->char_id; /* ƒLƒƒƒ‰ID */
}
- #ifndef TXT_ONLY
if(log_config.produce > 0)
log_produce(sd,nameid,slot1,slot2,slot3,1);
- #endif //USE_SQL
switch (skill_produce_db[idx].req_skill) {
case AM_PHARMACY:
@@ -11037,12 +8942,9 @@ int skill_produce_mix( struct map_session_data *sd,
clif_additem(sd,0,0,flag);
map_addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
}
- }
- else {
- #ifndef TXT_ONLY
+ } else {
if(log_config.produce > 0)
log_produce(sd,nameid,slot1,slot2,slot3,0);
- #endif //USE_SQL
switch (skill_produce_db[idx].req_skill) {
case AM_PHARMACY:
@@ -11110,6 +9012,230 @@ int skill_arrow_create( struct map_session_data *sd,int nameid)
* ‰Šú‰»Œn
*/
+/*----------------------------------------------------------------------------
+ * ‰Šú‰»Œ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, max = 0;
+
+ for (i=0; i<MAX_SKILL_LEVEL; i++) {
+ if (str) {
+ val[i] = max = atoi(str);
+ str = strchr(str,':');
+ if (str)
+ *str++=0;
+ } else {
+ val[i] = max;
+ }
+ }
+ return i;
+}
+
+/*
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì”z’uî•ñì¬
+ */
+void skill_init_unit_layout()
+{
+ 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_DARKGRANDCROSS:
+ {
+ 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:
+ printf("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?ƒ^
@@ -11134,46 +9260,27 @@ int skill_readdb(void)
return 1;
}
while(fgets(line,1020,fp)){
- char *split[50], *split2[MAX_SKILL_LEVEL];
+ char *split[50];
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;
- }
+ j = skill_split_str(line,split,14);
if(split[13]==NULL || j<14)
continue;
i=atoi(split[0]);
if (i>=10000 && i<10015) // for guild skills [Celest]
i -= 9500;
- else if(i<0 || i>MAX_SKILL_DB)
+ else if(i<=0 || i>MAX_SKILL_DB)
continue;
/* printf("skill id=%d\n",i); */
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[1];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].range[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ 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]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[7];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].num[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[7],skill_db[i].num);
if(strcmpi(split[8],"yes") == 0)
skill_db[i].castcancel=1;
@@ -11190,17 +9297,11 @@ int skill_readdb(void)
skill_db[i].skill_type=BF_MISC;
else
skill_db[i].skill_type=0;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[13];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].blewcount[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[13],skill_db[i].blewcount);
}
fclose(fp);
- printf("read db/skill_db.txt done\n");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_db.txt");
+ ShowStatus(tmp_output);
fp=fopen("db/skill_require_db.txt","r");
if(fp==NULL){
@@ -11208,91 +9309,39 @@ int skill_readdb(void)
return 1;
}
while(fgets(line,1020,fp)){
- char *split[51], *split2[MAX_SKILL_LEVEL];
+ char *split[50];
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j<30 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ j = skill_split_str(line,split,30);
if(split[29]==NULL || j<30)
continue;
i=atoi(split[0]);
if (i>=10000 && i<10015) // for guild skills [Celest]
i -= 9500;
- else if(i<0 || i>MAX_SKILL_DB)
+ else if(i<=0 || i>MAX_SKILL_DB)
continue;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[1];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].hp[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[2];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].mhp[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[3];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].sp[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[4];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].hp_rate[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[5];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].sp_rate[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[6];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].zeny[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[7];j<32 && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<32 && split2[k];k++) {
- l = atoi(split2[k]);
- if(l == 99) {
+ 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;
@@ -11309,14 +9358,7 @@ int skill_readdb(void)
else if( strcmpi(split[8],"water")==0 ) skill_db[i].state=ST_WATER;
else skill_db[i].state=ST_NONE;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[9];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].spiritball[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ 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]);
@@ -11339,7 +9381,8 @@ int skill_readdb(void)
skill_db[i].amount[9]=atoi(split[29]);
}
fclose(fp);
- printf("read db/skill_require_db.txt done\n");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_require_db.txt");
+ ShowStatus(tmp_output);
/* ƒLƒƒƒXƒeƒBƒ“ƒOƒf?ƒ^ƒx?ƒX */
fp=fopen("db/skill_cast_db.txt","r");
@@ -11348,62 +9391,70 @@ int skill_readdb(void)
return 1;
}
while(fgets(line,1020,fp)){
- char *split[50], *split2[MAX_SKILL_LEVEL];
+ char *split[50];
memset(split,0,sizeof(split)); // [Valaris] thanks to fov
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j<5 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
+ 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)
+ else if(i<=0 || i>MAX_SKILL_DB)
continue;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[1];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].cast[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
-
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[2];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].delay[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ 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);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_cast_db.txt");
+ ShowStatus(tmp_output);
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[3];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].upkeep_time[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ /* ƒXƒLƒ‹ƒ†ƒjƒbƒgƒf[ƒ^ƒx[ƒX */
+ fp = fopen("db/skill_unit_db.txt","r");
+ if (fp==NULL) {
+ printf("can't read db/skill_unit_db.txt\n");
+ 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;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[4];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].upkeep_time2[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ 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],"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 skill_db[i].unit_target = strtol(split[6],NULL,16);
+
+ skill_db[i].unit_flag = strtol(split[7],NULL,16);
+ k++;
}
fclose(fp);
- printf("read db/skill_cast_db.txt done\n");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_unit_db.txt");
+ ShowStatus(tmp_output);
+ skill_init_unit_layout();
/* »‘¢ŒnƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX */
memset(skill_produce_db,0,sizeof(skill_produce_db));
@@ -11422,16 +9473,11 @@ int skill_readdb(void)
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<3 + MAX_PRODUCE_RESOURCE * 2 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- if(split[0]==NULL)
+ 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;
+ if(i<=0) continue;
skill_produce_db[k].nameid=i;
skill_produce_db[k].itemlv=atoi(split[1]);
@@ -11446,7 +9492,8 @@ int skill_readdb(void)
break;
}
fclose(fp);
- printf("read %s done (count=%d)\n",filename[m],k);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,filename[m]);
+ ShowStatus(tmp_output);
}
memset(skill_arrow_db,0,sizeof(skill_arrow_db));
@@ -11462,12 +9509,8 @@ int skill_readdb(void)
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<13 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- if(split[0]==NULL)
+ j = skill_split_str(line,split,13);
+ if(split[0]==0) //fixed by Lupus
continue;
i=atoi(split[0]);
if(i<=0)
@@ -11484,7 +9527,8 @@ int skill_readdb(void)
break;
}
fclose(fp);
- printf("read db/create_arrow_db.txt done (count=%d)\n",k);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,"db/create_arrow_db.txt");
+ ShowStatus(tmp_output);
memset(skill_abra_db,0,sizeof(skill_abra_db));
fp=fopen("db/abra_db.txt","r");
@@ -11498,12 +9542,8 @@ int skill_readdb(void)
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<13 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- if(split[0]==NULL)
+ j = skill_split_str(line,split,13);
+ if(split[0]==0) //fixed by Lupus
continue;
i=atoi(split[0]);
if(i<=0)
@@ -11517,7 +9557,8 @@ int skill_readdb(void)
break;
}
fclose(fp);
- printf("read db/abra_db.txt done (count=%d)\n",k);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,"db/abra_db.txt");
+ ShowStatus(tmp_output);
fp=fopen("db/skill_castnodex_db.txt","r");
if(fp==NULL){
@@ -11525,33 +9566,27 @@ int skill_readdb(void)
return 1;
}
while(fgets(line,1020,fp)){
- char *split[50], *split2[MAX_SKILL_LEVEL];
- memset(split,0,sizeof(split));
+ char *split[50];
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j<2 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
-
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,3);
+ 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)
+ else if(i<=0 || i>MAX_SKILL_DB)
continue;
- memset(split2,0,sizeof(split2));
- for(j=0,p=split[1];j<MAX_SKILL_LEVEL && p;j++){
- split2[j]=p;
- p=strchr(p,':');
- if(p) *p++=0;
- }
- for(k=0;k<MAX_SKILL_LEVEL;k++)
- skill_db[i].castnodex[k]=(split2[k])? atoi(split2[k]):atoi(split2[0]);
+ skill_split_atoi(split[1],skill_db[i].castnodex);
+ if (!split[2])
+ continue;
+ skill_split_atoi(split[2],skill_db[i].delaynodex);
}
fclose(fp);
- printf("read db/skill_castnodex_db.txt done\n");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_castnodex_db.txt");
+ ShowStatus(tmp_output);
fp=fopen("db/skill_nocast_db.txt","r");
if(fp==NULL){
@@ -11564,35 +9599,75 @@ int skill_readdb(void)
if(line[0]=='/' && line[1]=='/')
continue;
memset(split,0,sizeof(split));
- for(j=0,p=line;j<2 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- if(split[0]==NULL)
+ j = skill_split_str(line,split,2);
+ if(split[0]==0) //fixed by Lupus
continue;
i=atoi(split[0]);
- if(i < 0 || i > MAX_SKILL_DB)
+ 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);
- printf("read db/skill_nocast_db done\n");
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/skill_nocast_db");
+ ShowStatus(tmp_output);
return 0;
}
-void skill_reload(void)
+/*===============================================
+ * 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++;
+ }
- <empty skill database>
- <?>
+ p=strchr(p,10);
+ if(!p) break;
+ p++;
+ }
+ aFree(buf);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\leveluseskillspamount.txt");
+ ShowStatus(tmp_output);
- */
+ return 0;
+}
- do_init_skill();
+void skill_reload(void)
+{
+ skill_readdb();
+ if (battle_config.skill_sp_override_grffile)
+ skill_read_skillspamount();
}
/*==========================================
@@ -11602,12 +9677,13 @@ void skill_reload(void)
int do_init_skill(void)
{
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_status_change_timer,"skill_status_change_timer");
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
index a8bf30e3c..67d7a906c 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1,10 +1,10 @@
-// $Id: skill.h,v 1.5 2004/11/26 5:47:12 PM Celestia Exp $
+// $Id: skill.h,v 1.5 2004/12/23 7:43:16 PM Celestia $
#ifndef _SKILL_H_
#define _SKILL_H_
#include "map.h"
-#define MAX_SKILL_DB 515
+#define MAX_SKILL_DB 750
#define MAX_SKILL_PRODUCE_DB 150
#define MAX_PRODUCE_RESOURCE 7
#define MAX_SKILL_ARROW_DB 150
@@ -23,7 +23,14 @@ struct skill_db {
int weapon,state,spiritball[MAX_SKILL_LEVEL];
int itemid[10],amount[10];
int castnodex[MAX_SKILL_LEVEL];
+ int delaynodex[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];
@@ -34,6 +41,24 @@ struct skill_name_db {
};
extern const struct skill_name_db skill_names[];
+#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_DANCE = 0x0100, // ƒ_ƒ“ƒXƒXƒLƒ‹
+ UF_ENSEMBLE = 0x0200, // ‡‘tƒXƒLƒ‹
+};
+
// ƒAƒCƒeƒ€ì¬ƒf?ƒ^ƒx?ƒX
struct skill_produce_db {
int nameid, trigger;
@@ -57,6 +82,9 @@ struct skill_abra_db {
};
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;
@@ -86,6 +114,7 @@ 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_tree_get_max( int id, int b_class ); // Celest
// ƒXƒLƒ‹‚ÌŽg—p
@@ -109,9 +138,6 @@ 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);
-struct skill_unit_group_tickset *skill_unitgrouptickset_search(
- struct block_list *bl,int group_id);
-int skill_unitgrouptickset_delete(struct block_list *bl,int group_id);
int skill_clear_unitgroup(struct block_list *src);
int skill_unit_ondamaged(struct skill_unit *src,struct block_list *bl,
@@ -119,21 +145,25 @@ int skill_unit_ondamaged(struct skill_unit *src,struct block_list *bl,
int skill_castfix( struct block_list *bl, int time );
int skill_delayfix( struct block_list *bl, int time );
-int skill_check_unit_range(int m,int x,int y,int range,int skillid);
-int skill_check_unit_range2(int m,int x,int y,int range);
+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 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);
struct skill_unit_group *skill_check_dancing( struct block_list *src );
void skill_stop_dancing(struct block_list *src, int flag);
+// 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_check_moonlit (struct block_list *bl, int dx, int dy);
void skill_brandishspear_first(struct square *tc,int dir,int x,int y);
void skill_brandishspear_dir(struct square *tc,int dir,int are);
int skill_autospell(struct map_session_data *md,int skillid);
@@ -142,19 +172,13 @@ void skill_devotion2(struct block_list *bl,int crusader);
int skill_devotion3(struct block_list *bl,int target);
void skill_devotion_end(struct map_session_data *md,struct map_session_data *sd,int target);
-#define skill_calc_heal(bl,skill_lv) (( battle_get_lv(bl)+battle_get_int(bl) )/8 *(4+ skill_lv*8))
+#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);
-int skill_type_cloaking(struct block_list *bl);
-int skill_is_danceskill(int id);
// ƒXƒe?ƒ^ƒXˆÙí
-int skill_status_change_start(struct block_list *bl,int type,int val1,int val2,int val3,int val4,int tick,int flag);
-int skill_status_change_timer(int tid, unsigned int tick, int id, int data);
-int skill_encchant_eremental_end(struct block_list *bl, int type);
-int skill_status_change_end( struct block_list* bl , int type,int tid );
-int skill_status_change_clear(struct block_list *bl,int type);
+int skill_enchant_elemental_end(struct block_list *bl, int type);
int skillnotok(int skillid, struct map_session_data *sd);
// ƒAƒCƒeƒ€ì¬
@@ -180,201 +204,6 @@ enum {
ST_RECOV_WEIGHT_RATE,ST_MOVE_ENABLE,ST_WATER,
};
-enum { // struct map_session_data ‚Ì status_change‚Ì”Ô?ƒe?ƒuƒ‹
-// SC_SENDMAX–¢?‚̓Nƒ‰ƒCƒAƒ“ƒg‚Ö‚Ì’Ê’m‚ ‚èB
-// 2-2ŽŸE‚Ì’l‚Í‚È‚ñ‚©‚ß‚¿‚á‚­‚¿‚á‚Á‚Û‚¢‚Ì‚ÅŽb’èB‚½‚Ô‚ñ?X‚³‚ê‚Ü‚·B
- SC_SENDMAX =128,
- SC_PROVOKE = 0,
- SC_ENDURE = 1,
- SC_TWOHANDQUICKEN = 2,
- SC_CONCENTRATE = 3,
- SC_HIDING = 4,
- SC_CLOAKING = 5,
- SC_ENCPOISON = 6,
- SC_POISONREACT = 7,
- SC_QUAGMIRE = 8,
- SC_ANGELUS = 9,
- SC_BLESSING =10,
- SC_SIGNUMCRUCIS =11,
- SC_INCREASEAGI =12,
- SC_DECREASEAGI =13,
- SC_SLOWPOISON =14,
- SC_IMPOSITIO =15,
- SC_SUFFRAGIUM =16,
- SC_ASPERSIO =17,
- SC_BENEDICTIO =18,
- SC_KYRIE =19,
- SC_MAGNIFICAT =20,
- SC_GLORIA =21,
- SC_AETERNA =22,
- SC_ADRENALINE =23,
- SC_WEAPONPERFECTION =24,
- SC_OVERTHRUST =25,
- SC_MAXIMIZEPOWER =26,
- SC_RIDING =27,
- SC_FALCON =28,
- SC_TRICKDEAD =29,
- SC_LOUD =30,
- SC_ENERGYCOAT =31,
- SC_HALLUCINATION =34,
- SC_WEIGHT50 =35,
- SC_WEIGHT90 =36,
- SC_SPEEDPOTION0 =37,
- SC_SPEEDPOTION1 =38,
- SC_SPEEDPOTION2 =39,
- SC_STRIPWEAPON =50,
- SC_STRIPSHIELD =51,
- SC_STRIPARMOR =52,
- SC_STRIPHELM =53,
- SC_CP_WEAPON =54,
- SC_CP_SHIELD =55,
- SC_CP_ARMOR =56,
- SC_CP_HELM =57,
- SC_AUTOGUARD =58,
- SC_REFLECTSHIELD =59,
- SC_DEVOTION =60,
- SC_PROVIDENCE =61,
- SC_DEFENDER =62,
- SC_AUTOSPELL =65,
- SC_SPEARSQUICKEN =68,
- SC_EXPLOSIONSPIRITS =86,
- SC_STEELBODY =87,
- SC_COMBO =89,
- SC_FLAMELAUNCHER =90,
- SC_FROSTWEAPON =91,
- SC_LIGHTNINGLOADER =92,
- SC_SEISMICWEAPON =93,
- SC_AURABLADE =103, /* ƒI?ƒ‰ƒuƒŒ?ƒh */
- SC_PARRYING =104, /* ƒpƒŠƒCƒ“ƒO */
- SC_CONCENTRATION =105, /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
- SC_TENSIONRELAX =106, /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
- SC_BERSERK =107, /* ƒo?ƒT?ƒN */
- SC_ASSUMPTIO =110, /* ƒAƒVƒƒƒ“ƒvƒeƒBƒI */
- SC_MAGICPOWER =113, /* –‚–@—Í?• */
- SC_TRUESIGHT =115, /* ƒgƒDƒ‹?ƒTƒCƒg */
- SC_WINDWALK =116, /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
- SC_MELTDOWN =117, /* ƒƒ‹ƒgƒ_ƒEƒ“ */
- SC_CARTBOOST =118, /* ƒJ?ƒgƒu?ƒXƒg */
- SC_REJECTSWORD =120, /* ƒŠƒWƒFƒNƒgƒ\?ƒh */
- SC_MARIONETTE =121, /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
- SC_HEADCRUSH =124, /* ƒwƒbƒhƒNƒ‰ƒbƒVƒ… */
- SC_JOINTBEAT =125, /* ƒWƒ‡ƒCƒ“ƒgƒr?ƒg */
-
- SC_STONE =128,
- SC_FREEZE =129,
- SC_STAN =130,
- SC_SLEEP =131,
- SC_POISON =132,
- SC_CURSE =133,
- SC_SILENCE =134,
- SC_CONFUSION =135,
- SC_BLIND =136,
- SC_DIVINA = SC_SILENCE,
-
- SC_SAFETYWALL =140,
- SC_PNEUMA =141,
- SC_WATERBALL =142,
- SC_ANKLE =143,
- SC_DANCING =144,
- SC_KEEPING =145,
- SC_BARRIER =146,
-
- SC_MAGICROD =149,
- SC_SIGHT =150,
- SC_RUWACH =151,
- SC_AUTOCOUNTER =152,
- SC_VOLCANO =153,
- SC_DELUGE =154,
- SC_VIOLENTGALE =155,
- SC_BLADESTOP_WAIT =156,
- SC_BLADESTOP =157,
- SC_EXTREMITYFIST =158,
- SC_GRAFFITI =159,
-
- SC_LULLABY =160,
- SC_RICHMANKIM =161,
- SC_ETERNALCHAOS =162,
- SC_DRUMBATTLE =163,
- SC_NIBELUNGEN =164,
- SC_ROKISWEIL =165,
- SC_INTOABYSS =166,
- SC_SIEGFRIED =167,
- SC_DISSONANCE =168,
- SC_WHISTLE =169,
- SC_ASSNCROS =170,
- SC_POEMBRAGI =171,
- SC_APPLEIDUN =172,
- SC_UGLYDANCE =173,
- SC_HUMMING =174,
- SC_DONTFORGETME =175,
- SC_FORTUNE =176,
- SC_SERVICE4U =177,
-
- SC_SPIDERWEB =180, /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
- SC_MEMORIZE =181, /* ƒƒ‚ƒ‰ƒCƒY */
-// SC_DPOISON =182, /* –Ò“Å */
-
-// SC_EDP =183, /* ƒGƒtƒFƒNƒg‚ª”»–¾‚µ‚½‚çˆÚ“® */
-
- SC_WEDDING =187, //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
- SC_NOCHAT =188, //ÔƒGƒ‚?‘Ô
- SC_SPLASHER =189, /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
- SC_SELFDESTRUCTION =190, /* Ž©”š */
-
-
-// Used by English Team
- SC_BROKNARMOR =32,
- SC_BROKNWEAPON =33,
- SC_SLOWDOWN =45, // for skill slowdown
- SC_SIGHTTRASHER =73,
-// SC_BASILICA =125, // 125 is the same id as joint break
- SC_BASILICA =102, // temporarily use this before an actual id is found [celest]
- SC_EDP =114, //
- SC_MARIONETTE2 =122, // Marionette target
- SC_ENSEMBLE =159,
- SC_FOGWALL =178,
- SC_GOSPEL =179,
- SC_LANDPROTECTOR =182,
- SC_ADAPTATION =183,
- SC_CHASEWALK =184,
- SC_ATKPOT =185, // [Valaris]
- SC_MATKPOT =186, // [Valaris]
- SC_MINDBREAKER =191,
- SC_SPELLBREAKER =192,
- SC_DPOISON =193, /* –Ò“Å */
- SC_BLOCKSKILL =194, // for disallowing the use of a skill for a time period
-
-// [Celest]
- SC_BLEEDING = 124, // Temporarily same id as headcrush
- SC_MOONLIT = 195,
- SC_LEADERSHIP = 196,
- SC_GLORYWOUNDS = 197,
- SC_SOULCOLD = 198,
- SC_HAWKEYES = 199,
- SC_BATTLEORDERS = 200,
- SC_REGENERATION = 201,
- SC_PRESERVE = 202,
-
-// -- testing various SC effects
-// SC_AURABLADE =81,
-// SC_CONCENTRATION =83,
-// SC_TENSIONRELAX =84,
-// SC_BERSERK =85,
-// SC_CALLSPIRITS =100,
-// SC_PARRYING =100,
-// SC_FREECAST =101,
-// SC_ABSORBSPIRIT =102,
-// SC_ASSUMPTIO =114,
-// SC_SHARPSHOOT =127,
-// SC_GANGSTER =184,
-// SC_CANNIBALIZE =186,
-// SC_SPHEREMINE =187,
-// SC_METEOSTORM =189,
-// SC_CASTCANCEL =190,
-// SC_SPIDERWEB =191,
-};
-extern int SkillStatusChangeTable[];
-
enum {
NV_BASIC = 1,
@@ -737,6 +566,22 @@ enum {
NPC_SELFDESTRUCTION2 = 331,
ITM_TOMAHAWK = 337,
NPC_DARKCROSS = 338,
+ NPC_DARKGRANDCROSS,
+ NPC_DARKSOULSTRIKE,
+ NPC_DARKJUPITEL,
+ // temporary names for mob skills [Celest]
+ NPC_BIND,
+ NPC_BREAKWEAPON,
+ NPC_BREAKARMOR,
+ NPC_BREAKHELM,
+ NPC_BREAKSHIELD,
+ NPC_UNDEADATTACK,
+
+ NPC_RUNAWAY = 348,
+ NPC_EXPLOSIONSPIRITS,
+ NPC_INCAGI,
+
+ NPC_RECALL = 354,
LK_AURABLADE = 355,
LK_PARRYING,
@@ -794,7 +639,8 @@ enum {
WE_BABY,
WE_CALLPARENT,
WE_CALLBABY,
- TK_RUN,
+
+ TK_RUN = 411,
TK_READYSTORM,
TK_STORMKICK,
TK_READYDOWN,
diff --git a/src/map/status.c b/src/map/status.c
new file mode 100644
index 000000000..a9967d956
--- /dev/null
+++ b/src/map/status.c
@@ -0,0 +1,5159 @@
+
+// ƒXƒe[ƒ^ƒXŒvŽZAó‘ÔˆÙ툗
+#include <time.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <memory.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"
+
+/* ƒXƒLƒ‹”Ô?„ƒXƒe?ƒ^ƒXˆÙí”Ô??Š·ƒe?ƒuƒ‹ */
+int SkillStatusChangeTable[]={ /* status.h‚Ìenum‚ÌSC_***‚Æ‚ ‚킹‚邱‚Æ */
+/* 0- */
+ -1,-1,-1,-1,-1,-1,
+ SC_PROVOKE, /* ƒvƒƒ{ƒbƒN */
+ -1, 1,-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 */
+ SC_PNEUMA, /* ƒjƒ…[ƒ} */
+ -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_DIVINA, /* ƒŒƒ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,
+ SC_SELFDESTRUCTION,
+ -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,
+ SC_KEEPING,
+ -1,-1,
+ SC_BARRIER,
+ -1,-1,
+ 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_FLAMELAUNCHER,
+ SC_FROSTWEAPON,
+ SC_LIGHTNINGLOADER,
+ SC_SEISMICWEAPON,
+ -1,
+ SC_VOLCANO,
+ SC_DELUGE,
+ SC_VIOLENTGALE,
+ SC_LANDPROTECTOR,
+ -1,
+/* 290- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 300- */
+ -1,-1,-1,-1,-1,-1,
+ SC_LULLABY,
+ SC_RICHMANKIM,
+ SC_ETERNALCHAOS,
+ SC_DRUMBATTLE,
+/* 310- */
+ SC_NIBELUNGEN,
+ SC_ROKISWEIL,
+ SC_INTOABYSS,
+ SC_SIEGFRIED,
+ -1,-1,-1,
+ SC_DISSONANCE,
+ -1,
+ SC_WHISTLE,
+/* 320- */
+ SC_ASSNCROS,
+ SC_POEMBRAGI,
+ SC_APPLEIDUN,
+ -1,-1,
+ SC_UGLYDANCE,
+ -1,
+ SC_HUMMING,
+ SC_DONTFORGETME,
+ SC_FORTUNE,
+/* 330- */
+ SC_SERVICE4U,
+ SC_SELFDESTRUCTION,
+ -1,-1,-1,-1,-1,-1,-1,-1,
+/* 340- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 350- */
+ -1,-1,-1,-1,-1,
+ SC_AURABLADE,
+ SC_PARRYING,
+ SC_CONCENTRATION,
+ SC_TENSIONRELAX,
+ SC_BERSERK,
+/* 360- */
+ SC_BERSERK,
+ 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,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+};
+
+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];
+static int refinebonus[5][3]; // ¸˜Bƒ{[ƒiƒXƒe[ƒuƒ‹(refine_db.txt)
+int percentrefinery[5][10]; // ¸˜B¬Œ÷—¦(refine_db.txt)
+static int atkmods[3][20]; // •ŠíATKƒTƒCƒYC³(size_fix.txt)
+static char job_bonus[3][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
+
+/*==========================================
+ * ¸˜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;
+}
+
+/*==========================================
+ * ¸˜B¬Œ÷—¦
+ *------------------------------------------
+ */
+int status_percentrefinery(struct map_session_data *sd,struct item *item)
+{
+ int percent;
+
+ nullpo_retr(0, item);
+ percent=percentrefinery[itemdb_wlv(item->nameid)][(int)item->refine];
+
+ percent += pc_checkskill(sd,BS_WEAPONRESEARCH); // •ŠíŒ¤‹†ƒXƒLƒ‹ŠŽ
+
+ // Šm—¦‚Ì—LŒø”͈̓`ƒFƒbƒN
+ if( percent > 100 ){
+ percent = 100;
+ }
+ if( percent < 0 ){
+ percent = 0;
+ }
+
+ return percent;
+}
+
+/*==========================================
+ * ƒ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)
+{
+ 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,aspd_rate,wele,wele_,def_ele,refinedef=0;
+ int pele=0,pdef_ele=0;
+ int str,dstr,dex;
+ struct pc_base_job s_class;
+
+ nullpo_retr(0, sd);
+
+ //?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
+ s_class = pc_calc_base_job(sd->status.class_);
+
+ 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->watk;
+ b_def = sd->def;
+ b_watk2 = sd->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[s_class.job]+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++;
+ }
+ }
+
+ memset(sd->paramb,0,sizeof(sd->paramb));
+ memset(sd->parame,0,sizeof(sd->parame));
+ sd->hit = 0;
+ sd->flee = 0;
+ sd->flee2 = 0;
+ sd->critical = 0;
+ sd->aspd = 0;
+ sd->watk = 0;
+ sd->def = 0;
+ sd->mdef = 0;
+ sd->watk2 = 0;
+ sd->def2 = 0;
+ sd->mdef2 = 0;
+ sd->status.max_hp = 0;
+ sd->status.max_sp = 0;
+ sd->attackrange = 0;
+ sd->attackrange_ = 0;
+ sd->atk_ele = 0;
+ sd->def_ele = 0;
+ sd->star =0;
+ sd->overrefine =0;
+ sd->matk1 =0;
+ sd->matk2 =0;
+ 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->base_atk=0;
+ sd->arrow_atk=0;
+ sd->arrow_ele=0;
+ sd->arrow_hit=0;
+ sd->arrow_range=0;
+ sd->nhealhp=sd->nhealsp=sd->nshealhp=sd->nshealsp=sd->nsshealhp=sd->nsshealsp=0;
+ memset(sd->addele,0,sizeof(sd->addele));
+ memset(sd->addrace,0,sizeof(sd->addrace));
+ memset(sd->addsize,0,sizeof(sd->addsize));
+ memset(sd->addele_,0,sizeof(sd->addele_));
+ memset(sd->addrace_,0,sizeof(sd->addrace_));
+ memset(sd->addsize_,0,sizeof(sd->addsize_));
+ memset(sd->subele,0,sizeof(sd->subele));
+ memset(sd->subrace,0,sizeof(sd->subrace));
+ memset(sd->addeff,0,sizeof(sd->addeff));
+ memset(sd->addeff2,0,sizeof(sd->addeff2));
+ memset(sd->reseff,0,sizeof(sd->reseff));
+ memset(&sd->special_state,0,sizeof(sd->special_state));
+ memset(sd->weapon_coma_ele,0,sizeof(sd->weapon_coma_ele));
+ memset(sd->weapon_coma_race,0,sizeof(sd->weapon_coma_race));
+ memset(sd->weapon_atk,0,sizeof(sd->weapon_atk));
+ memset(sd->weapon_atk_rate,0,sizeof(sd->weapon_atk_rate));
+
+ sd->watk_ = 0; //“ñ“—¬—p(?)
+ sd->watk_2 = 0;
+ sd->atk_ele_ = 0;
+ sd->star_ = 0;
+ sd->overrefine_ = 0;
+
+ sd->aspd_rate = 100;
+ sd->speed_rate = 100;
+ sd->hprecov_rate = 100;
+ sd->sprecov_rate = 100;
+ sd->critical_def = 0;
+ sd->double_rate = 0;
+ sd->near_attack_def_rate = sd->long_attack_def_rate = 0;
+ sd->atk_rate = sd->matk_rate = 100;
+ sd->ignore_def_ele = sd->ignore_def_race = 0;
+ sd->ignore_def_ele_ = sd->ignore_def_race_ = 0;
+ sd->ignore_mdef_ele = sd->ignore_mdef_race = 0;
+ sd->arrow_cri = 0;
+ sd->magic_def_rate = sd->misc_def_rate = 0;
+ memset(sd->arrow_addele,0,sizeof(sd->arrow_addele));
+ memset(sd->arrow_addrace,0,sizeof(sd->arrow_addrace));
+ memset(sd->arrow_addsize,0,sizeof(sd->arrow_addsize));
+ memset(sd->arrow_addeff,0,sizeof(sd->arrow_addeff));
+ memset(sd->arrow_addeff2,0,sizeof(sd->arrow_addeff2));
+ memset(sd->magic_addele,0,sizeof(sd->magic_addele));
+ memset(sd->magic_addrace,0,sizeof(sd->magic_addrace));
+ memset(sd->magic_subrace,0,sizeof(sd->magic_subrace));
+ sd->perfect_hit = 0;
+ 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->def_ratio_atk_ele = sd->def_ratio_atk_ele_ = 0;
+ sd->def_ratio_atk_race = sd->def_ratio_atk_race_ = 0;
+ sd->get_zeny_num = 0;
+ sd->add_damage_class_count = sd->add_damage_class_count_ = sd->add_magic_damage_class_count = 0;
+ sd->add_def_class_count = sd->add_mdef_class_count = 0;
+ sd->monster_drop_item_count = 0;
+ memset(sd->add_damage_classrate,0,sizeof(sd->add_damage_classrate));
+ memset(sd->add_damage_classrate_,0,sizeof(sd->add_damage_classrate_));
+ memset(sd->add_magic_damage_classrate,0,sizeof(sd->add_magic_damage_classrate));
+ memset(sd->add_def_classrate,0,sizeof(sd->add_def_classrate));
+ memset(sd->add_mdef_classrate,0,sizeof(sd->add_mdef_classrate));
+ memset(sd->monster_drop_race,0,sizeof(sd->monster_drop_race));
+ memset(sd->monster_drop_itemrate,0,sizeof(sd->monster_drop_itemrate));
+ sd->speed_add_rate = sd->aspd_add_rate = 100;
+ sd->double_add_rate = sd->perfect_hit_add = sd->get_zeny_add_num = 0;
+ sd->splash_range = sd->splash_add_range = 0;
+ sd->autospell_id = sd->autospell_lv = sd->autospell_rate = 0;
+ sd->hp_drain_rate = sd->hp_drain_per = sd->sp_drain_rate = sd->sp_drain_per = 0;
+ sd->hp_drain_rate_ = sd->hp_drain_per_ = sd->sp_drain_rate_ = sd->sp_drain_per_ = 0;
+ sd->short_weapon_damage_return = sd->long_weapon_damage_return = 0;
+ sd->magic_damage_return = 0; //AppleGirl Was Here
+ sd->random_attack_increase_add = sd->random_attack_increase_per = 0;
+ sd->hp_drain_value = sd->hp_drain_value_ = sd->sp_drain_value = sd->sp_drain_value_ = 0;
+ sd->unbreakable_equip = 0;
+
+ sd->break_weapon_rate = sd->break_armor_rate = 0;
+ sd->add_steal_rate = 0;
+ sd->crit_atk_rate = 0;
+ sd->no_regen = 0;
+ sd->unstripable_equip = 0;
+ sd->autospell2_id = sd->autospell2_lv = sd->autospell2_rate = 0;
+ memset(sd->critaddrace,0,sizeof(sd->critaddrace));
+ memset(sd->addeff3,0,sizeof(sd->addeff3));
+ memset(sd->addeff3_type,0,sizeof(sd->addeff3_type));
+ memset(sd->skillatk,0,sizeof(sd->skillatk));
+ sd->add_damage_class_count = sd->add_damage_class_count_ = sd->add_magic_damage_class_count = 0;
+ sd->add_def_class_count = sd->add_mdef_class_count = 0;
+ sd->add_damage_class_count2 = 0;
+ memset(sd->add_damage_classid,0,sizeof(sd->add_damage_classid));
+ memset(sd->add_damage_classid_,0,sizeof(sd->add_damage_classid_));
+ memset(sd->add_magic_damage_classid,0,sizeof(sd->add_magic_damage_classid));
+ memset(sd->add_damage_classrate,0,sizeof(sd->add_damage_classrate));
+ memset(sd->add_damage_classrate_,0,sizeof(sd->add_damage_classrate_));
+ memset(sd->add_magic_damage_classrate,0,sizeof(sd->add_magic_damage_classrate));
+ memset(sd->add_def_classid,0,sizeof(sd->add_def_classid));
+ memset(sd->add_def_classrate,0,sizeof(sd->add_def_classrate));
+ memset(sd->add_mdef_classid,0,sizeof(sd->add_mdef_classid));
+ memset(sd->add_mdef_classrate,0,sizeof(sd->add_mdef_classrate));
+ memset(sd->add_damage_classid2,0,sizeof(sd->add_damage_classid2));
+ memset(sd->add_damage_classrate2,0,sizeof(sd->add_damage_classrate2));
+ sd->sp_gain_value = 0;
+ sd->ignore_def_mob = sd->ignore_def_mob_ = 0;
+ sd->hp_loss_rate = sd->hp_loss_value = sd->hp_loss_type = 0;
+ memset(sd->addrace2,0,sizeof(sd->addrace2));
+ memset(sd->addrace2_,0,sizeof(sd->addrace2_));
+ sd->hp_gain_value = sd->sp_drain_type = 0;
+ memset(sd->subsize,0,sizeof(sd->subsize));
+ memset(sd->unequip_losehp,0,sizeof(sd->unequip_losehp));
+ memset(sd->unequip_losesp,0,sizeof(sd->unequip_losesp));
+ memset(sd->subrace2,0,sizeof(sd->subrace2));
+ memset(sd->expaddrace,0,sizeof(sd->expaddrace));
+ memset(sd->sp_gain_race,0,sizeof(sd->sp_gain_race));
+
+ if(!sd->disguiseflag && sd->disguise) {
+ sd->disguise=0;
+ clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+ 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);
+ clif_clearchar(&sd->bl, 9);
+ pc_setpos(sd, sd->mapname, sd->bl.x, sd->bl.y, 3);
+ }
+
+ if (sd->status.guild_id > 0) {
+ struct guild *g = guild_search(sd->status.guild_id);
+ if (g && strcmp(sd->status.name,g->master)==0)
+ sd->state.gmaster_flag = (int)g;
+ }
+
+ 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) {
+ 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;
+ }
+ }
+ }
+ }
+ else if(sd->inventory_data[index]->type==5){ // –h‹ï
+ 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);
+ }
+ }
+ }
+ }
+ }
+ wele = sd->atk_ele;
+ wele_ = sd->atk_ele_;
+ def_ele = sd->def_ele;
+ if(sd->status.pet_id > 0) {
+ struct pet_data *pd=sd->pd;
+ if((pd && battle_config.pet_status_support==1) && (battle_config.pet_equip_required==0 || (battle_config.pet_equip_required && pd->equip > 0))) {
+ if(sd->status.pet_id > 0 && sd->petDB && sd->pet.intimate > 0 &&
+ pd->state.skillbonus == 1) {
+ pc_bonus(sd,pd->skillbonustype,pd->skillbonusval);
+// run_script(sd->petDB->script,0,sd->bl.id,0);
+ }
+ pele = sd->atk_ele;
+ pdef_ele = sd->def_ele;
+ sd->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(i == 8 && sd->status.inventory[index].equip == 0x20) {
+ //“ñ“—¬—pƒf?ƒ^“ü—Í
+ sd->watk_ += sd->inventory_data[index]->atk;
+ sd->watk_2 = (r=sd->status.inventory[index].refine)* // ¸?U?—Í
+ refinebonus[wlv][0];
+ if( (r-=refinebonus[wlv][2])>0 ) // ‰ß?¸?ƒ{?ƒiƒX
+ sd->overrefine_ = r*refinebonus[wlv][1];
+
+ if(sd->status.inventory[index].card[0]==0x00ff){ // »‘¢•Ší
+ sd->star_ = (sd->status.inventory[index].card[1]>>8); // ¯‚Ì‚©‚¯‚ç
+ 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]->equip_script,0,sd->bl.id,0);
+ sd->state.lr_flag = 0;
+ }
+ else { //“ñ“—¬•ŠíˆÈŠO
+ sd->watk += sd->inventory_data[index]->atk;
+ sd->watk2 += (r=sd->status.inventory[index].refine)* // ¸?U?—Í
+ refinebonus[wlv][0];
+ if( (r-=refinebonus[wlv][2])>0 ) // ‰ß?¸?ƒ{?ƒiƒX
+ sd->overrefine += r*refinebonus[wlv][1];
+
+ if(sd->status.inventory[index].card[0]==0x00ff){ // »‘¢•Ší
+ sd->star += (sd->status.inventory[index].card[1]>>8); // ¯‚Ì‚©‚¯‚ç
+ wele = (sd->status.inventory[index].card[1]&0x0f); // ? «
+ }
+ sd->attackrange += sd->inventory_data[index]->range;
+ run_script(sd->inventory_data[index]->equip_script,0,sd->bl.id,0);
+ }
+ }
+ else if(sd->inventory_data[index]->type == 5) {
+ sd->watk += sd->inventory_data[index]->atk;
+ refinedef += sd->status.inventory[index].refine*refinebonus[0][0];
+ run_script(sd->inventory_data[index]->equip_script,0,sd->bl.id,0);
+ }
+ }
+ }
+
+ if(sd->equip_index[10] >= 0){ // –î
+ index = sd->equip_index[10];
+ if(sd->inventory_data[index]){ //‚Ü‚¾?«‚ª“ü‚Á‚Ä‚¢‚È‚¢
+ sd->state.lr_flag = 2;
+ run_script(sd->inventory_data[index]->equip_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->atk_ele = wele;
+ if(wele_ > 0)
+ sd->atk_ele_ = wele_;
+ if(def_ele > 0)
+ sd->def_ele = def_ele;
+ if(battle_config.pet_status_support) {
+ if(pele > 0 && !sd->atk_ele)
+ sd->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->get_zeny_num += sd->get_zeny_add_num;
+ sd->splash_range += sd->splash_add_range;
+ if(sd->speed_add_rate != 100)
+ sd->speed_rate += sd->speed_add_rate - 100;
+ if(sd->aspd_add_rate != 100)
+ sd->aspd_rate += sd->aspd_add_rate - 100;
+
+ // •ŠíATKƒTƒCƒY•â³ (‰EŽè)
+ sd->atkmods[0] = atkmods[0][sd->weapontype1];
+ sd->atkmods[1] = atkmods[1][sd->weapontype1];
+ sd->atkmods[2] = atkmods[2][sd->weapontype1];
+ //•ŠíATKƒTƒCƒY•â³ (¶Žè)
+ sd->atkmods_[0] = atkmods[0][sd->weapontype2];
+ sd->atkmods_[1] = atkmods[1][sd->weapontype2];
+ sd->atkmods_[2] = atkmods[2][sd->weapontype2];
+
+ // jobƒ{?ƒiƒX•ª
+ for(i=0;i<sd->status.job_level && i<MAX_LEVEL;i++){
+ if(job_bonus[s_class.upper][s_class.job][i])
+ sd->paramb[job_bonus[s_class.upper][s_class.job][i]-1]++;
+ }
+
+ if( (skill=pc_checkskill(sd,MC_INCCARRY))>0 ) // skill can be used with an item now, thanks to orn [Valaris]
+ sd->max_weight += skill*2000;
+
+ if( (skill=pc_checkskill(sd,AC_OWL))>0 ) // ‚Ó‚­‚낤‚Ì–Ú
+ sd->paramb[4] += skill;
+
+ if((skill=pc_checkskill(sd,BS_HILTBINDING))>0) { // Hilt binding gives +1 str +4 atk
+ sd->paramb[0] ++;
+ sd->base_atk += 4;
+ }
+ if((skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){ // Dragonology increases +1 int every 2 levels
+ sd->paramb[3] += (int) ((skill+1)*0.5);
+ }
+
+ // ƒXƒe?ƒ^ƒX?‰»‚É‚æ‚éŠî–{ƒpƒ‰ƒ?ƒ^•â³
+ if(sd->sc_count){
+ if(sd->sc_data[SC_CONCENTRATE].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1){ // W’†—ÍŒüã
+ 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;
+ }
+ if(sd->sc_data[SC_INCREASEAGI].timer!=-1){ // ‘¬“x?‰Á
+ sd->paramb[1]+= 2+sd->sc_data[SC_INCREASEAGI].val1;
+ sd->speed -= sd->speed *25/100;
+ }
+ if(sd->sc_data[SC_DECREASEAGI].timer!=-1) { // ‘¬“xŒ¸­(agi‚Íbattle.c‚Å)
+ sd->speed = sd->speed *125/100;
+ sd->paramb[1] -= 2 + sd->sc_data[SC_DECREASEAGI].val1; // reduce agility [celest]
+ }
+ if(sd->sc_data[SC_CLOAKING].timer!=-1) {
+ sd->critical_rate += 100; // critical increases
+ sd->speed = sd->speed * (sd->sc_data[SC_CLOAKING].val3-sd->sc_data[SC_CLOAKING].val1*3) /100;
+ }
+ if(sd->sc_data[SC_CHASEWALK].timer!=-1) {
+ sd->speed = sd->speed * sd->sc_data[SC_CHASEWALK].val3 /100; // slow down by chasewalk
+ if(sd->sc_data[SC_CHASEWALK].val4)
+ sd->paramb[0] += (1<<(sd->sc_data[SC_CHASEWALK].val1-1)); // increases strength after 10 seconds
+ }
+ if(sd->sc_data[SC_SLOWDOWN].timer!=-1)
+ sd->speed = sd->speed*150/100;
+ if(sd->sc_data[SC_SPEEDUP0].timer!=-1 && sd->sc_data[SC_INCREASEAGI].timer==-1)
+ sd->speed -= sd->speed*25/100;
+ if(sd->sc_data[SC_BLESSING].timer!=-1){ // ƒuƒŒƒbƒVƒ“ƒO
+ sd->paramb[0]+= sd->sc_data[SC_BLESSING].val1;
+ sd->paramb[3]+= sd->sc_data[SC_BLESSING].val1;
+ sd->paramb[4]+= sd->sc_data[SC_BLESSING].val1;
+ }
+ if(sd->sc_data[SC_GLORIA].timer!=-1) // ƒOƒƒŠƒA
+ sd->paramb[5]+= 30;
+ if(sd->sc_data[SC_LOUD].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1) // ƒ‰ƒEƒhƒ{ƒCƒX
+ sd->paramb[0]+= 4;
+ if(sd->sc_data[SC_QUAGMIRE].timer!=-1){ // ƒNƒ@ƒOƒ}ƒCƒA
+ //int agib = (sd->status.agi+sd->paramb[1]+sd->parame[1])*(sd->sc_data[SC_QUAGMIRE].val1*10)/100;
+ //int dexb = (sd->status.dex+sd->paramb[4]+sd->parame[4])*(sd->sc_data[SC_QUAGMIRE].val1*10)/100;
+ //sd->paramb[1]-= agib > 50 ? 50 : agib;
+ //sd->paramb[4]-= dexb > 50 ? 50 : dexb;
+ sd->paramb[1]-= sd->sc_data[SC_QUAGMIRE].val1*5;
+ sd->paramb[4]-= sd->sc_data[SC_QUAGMIRE].val1*5;
+ sd->speed = sd->speed*3/2;
+ }
+ if(sd->sc_data[SC_TRUESIGHT].timer!=-1){ // ƒgƒDƒ‹?ƒTƒCƒg
+ sd->paramb[0]+= 5;
+ sd->paramb[1]+= 5;
+ sd->paramb[2]+= 5;
+ sd->paramb[3]+= 5;
+ sd->paramb[4]+= 5;
+ sd->paramb[5]+= 5;
+ }
+ if(sd->sc_data[SC_MARIONETTE].timer!=-1){
+ // skip partner checking -- should be handled in status_change_timer
+ //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/2; // bonuses not included
+ 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;
+ }
+ }
+ if(sd->sc_data[SC_GOSPEL].timer!=-1 && sd->sc_data[SC_GOSPEL].val4 == BCT_PARTY){
+ if (sd->sc_data[SC_GOSPEL].val3 == 6) {
+ sd->paramb[0]+= 2;
+ sd->paramb[1]+= 2;
+ sd->paramb[2]+= 2;
+ sd->paramb[3]+= 2;
+ sd->paramb[4]+= 2;
+ sd->paramb[5]+= 2;
+ }
+ }
+ // New guild skills - Celest
+ 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) {
+ if (sd->sc_data[SC_GUILDAURA].val4 & 1<<0)
+ sd->paramb[0] += 2;
+ if (sd->sc_data[SC_GUILDAURA].val4 & 1<<1)
+ sd->paramb[2] += 2;
+ if (sd->sc_data[SC_GUILDAURA].val4 & 1<<2)
+ sd->paramb[1] += 2;
+ if (sd->sc_data[SC_GUILDAURA].val4 & 1<<3)
+ sd->paramb[4] += 2;
+ }
+ }
+
+ //1“x‚àŽ€‚ñ‚Å‚È‚¢Job70ƒXƒpƒmƒr‚É+10
+ if(s_class.job == 23 && sd->die_counter == 0 && sd->status.job_level >= 70){
+ sd->paramb[0]+= 15;
+ sd->paramb[1]+= 15;
+ sd->paramb[2]+= 15;
+ sd->paramb[3]+= 15;
+ sd->paramb[4]+= 15;
+ sd->paramb[5]+= 15;
+ }
+ 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];
+ for(i=0;i<6;i++)
+ if(sd->paramc[i] < 0) sd->paramc[i] = 0;
+
+ if (sd->sc_count) {
+ if (sd->sc_data[SC_CURSE].timer!=-1)
+ sd->paramc[5] = 0;
+ }
+
+ if(sd->status.weapon == 11 || sd->status.weapon == 13 || sd->status.weapon == 14) {
+ str = sd->paramc[4];
+ dex = sd->paramc[0];
+ }
+ else {
+ str = sd->paramc[0];
+ dex = sd->paramc[4];
+ }
+ dstr = str/10;
+ sd->base_atk += str + dstr*dstr + dex/5 + sd->paramc[5]/5;
+ 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;
+ }
+ sd->hit += sd->paramc[4] + sd->status.base_level;
+ sd->flee += sd->paramc[1] + sd->status.base_level;
+ sd->def2 += sd->paramc[2];
+ sd->mdef2 += sd->paramc[3];
+ sd->flee2 += sd->paramc[5]+10;
+ sd->critical += (sd->paramc[5]*3)+10;
+
+ if(sd->base_atk < 1)
+ sd->base_atk = 1;
+ if(sd->critical_rate != 100)
+ sd->critical = (sd->critical*sd->critical_rate)/100;
+ if(sd->critical < 10) sd->critical = 10;
+ if(sd->hit_rate != 100)
+ sd->hit = (sd->hit*sd->hit_rate)/100;
+ if(sd->hit < 1) sd->hit = 1;
+ if(sd->flee_rate != 100)
+ sd->flee = (sd->flee*sd->flee_rate)/100;
+ if(sd->flee < 1) sd->flee = 1;
+ if(sd->flee2_rate != 100)
+ sd->flee2 = (sd->flee2*sd->flee2_rate)/100;
+ if(sd->flee2 < 10) sd->flee2 = 10;
+ if(sd->def_rate != 100)
+ sd->def = (sd->def*sd->def_rate)/100;
+ if(sd->def < 0) sd->def = 0;
+ if(sd->def2_rate != 100)
+ sd->def2 = (sd->def2*sd->def2_rate)/100;
+ if(sd->def2 < 1) sd->def2 = 1;
+ if(sd->mdef_rate != 100)
+ sd->mdef = (sd->mdef*sd->mdef_rate)/100;
+ if(sd->mdef < 0) sd->mdef = 0;
+ if(sd->mdef2_rate != 100)
+ sd->mdef2 = (sd->mdef2*sd->mdef2_rate)/100;
+ if(sd->mdef2 < 1) sd->mdef2 = 1;
+
+ // “ñ“—¬ ASPD C³
+ if (sd->status.weapon <= 16)
+ sd->aspd += aspd_base[s_class.job][sd->status.weapon]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[s_class.job][sd->status.weapon]/1000;
+ else
+ sd->aspd += (
+ (aspd_base[s_class.job][sd->weapontype1]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[s_class.job][sd->weapontype1]/1000) +
+ (aspd_base[s_class.job][sd->weapontype2]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[s_class.job][sd->weapontype2]/1000)
+ ) * 140 / 200;
+
+ aspd_rate = sd->aspd_rate;
+
+ //U?‘¬“x?‰Á
+
+ if((skill=pc_checkskill(sd,AC_VULTURE))>0){ // ƒƒV‚Ì–Ú
+ sd->hit += skill;
+ if(sd->status.weapon == 11)
+ sd->attackrange += skill;
+ }
+
+ if( (skill=pc_checkskill(sd,BS_WEAPONRESEARCH))>0) // •Ší?‹†‚Ì–½’†—¦?‰Á
+ sd->hit += skill*2;
+ if(sd->status.option&2 && (skill = pc_checkskill(sd,RG_TUNNELDRIVE))>0 ) // ƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒu // ƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒu
+ sd->speed += (100-16*skill)*DEFAULT_WALK_SPEED/100;
+ //sd->speed += (1.2*DEFAULT_WALK_SPEED - skill*9);
+ if (pc_iscarton(sd) && (skill=pc_checkskill(sd,MC_PUSHCART))>0) // ƒJ?ƒg‚É‚æ‚鑬“x’ቺ
+ sd->speed += (short) ((10-skill) * (DEFAULT_WALK_SPEED * 0.1));
+ else if (pc_isriding(sd)) { // ƒyƒRƒyƒR?‚è‚É‚æ‚鑬“x?‰Á
+ sd->speed -= (short) ((0.25 * DEFAULT_WALK_SPEED));
+ sd->max_weight += 10000;
+ }
+ if((skill=pc_checkskill(sd,CR_TRUST))>0) { // ƒtƒFƒCƒX
+ sd->status.max_hp += skill*200;
+ sd->subele[6] += skill*5;
+ }
+ if((skill=pc_checkskill(sd,BS_SKINTEMPER))>0) {
+ sd->subele[0] += skill;
+ sd->subele[3] += skill*5;
+ }
+ if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0 )
+ aspd_rate -= (int) (skill*0.5);
+
+ bl=sd->status.base_level;
+
+ sd->status.max_hp += (3500 + bl*hp_coefficient2[s_class.job] + hp_sigma_val[s_class.job][(bl > 0)? bl-1:0])/100 * (100 + sd->paramc[2])/100 + (sd->parame[2] - sd->paramcard[2]);
+ if (s_class.upper==1) // [MouseJstr]
+ sd->status.max_hp = sd->status.max_hp * 130/100;
+ else if (s_class.upper==2)
+ sd->status.max_hp = sd->status.max_hp * 70/100;
+
+ if (sd->hprate <= 0)
+ sd->hprate = 1;
+ if(sd->hprate!=100)
+ sd->status.max_hp = sd->status.max_hp*sd->hprate/100;
+
+ if(sd->sc_count && sd->sc_data[SC_BERSERK].timer!=-1){ // ƒo?ƒT?ƒN
+ sd->status.max_hp = sd->status.max_hp * 3;
+ // sd->status.hp = sd->status.hp * 3;
+ if(sd->status.max_hp > battle_config.max_hp) // removed negative max hp bug by Valaris
+ sd->status.max_hp = battle_config.max_hp;
+ if(sd->status.hp > battle_config.max_hp) // removed negative max hp bug by Valaris
+ sd->status.hp = battle_config.max_hp;
+ }
+ if(s_class.job == 23 && sd->status.base_level >= 99){
+ sd->status.max_hp = sd->status.max_hp + 2000;
+ }
+
+ if(sd->status.max_hp > battle_config.max_hp) // removed negative max hp bug by Valaris
+ sd->status.max_hp = battle_config.max_hp;
+ if(sd->status.max_hp <= 0) sd->status.max_hp = 1; // end
+
+ // Å‘åSPŒvŽZ
+ sd->status.max_sp += ((sp_coefficient[s_class.job] * bl) + 1000)/100 * (100 + sd->paramc[3])/100 + (sd->parame[3] - sd->paramcard[3]);
+ if (s_class.upper==1) // [MouseJstr]
+ sd->status.max_sp = sd->status.max_sp * 130/100;
+ else if (s_class.upper==2)
+ sd->status.max_sp = sd->status.max_sp * 70/100;
+ if (sd->sprate <= 0)
+ sd->sprate = 1;
+ if(sd->sprate!=100)
+ sd->status.max_sp = sd->status.max_sp*sd->sprate/100;
+
+ if((skill=pc_checkskill(sd,HP_MEDITATIO))>0) // ƒƒfƒBƒeƒCƒeƒBƒI
+ sd->status.max_sp += sd->status.max_sp*skill/100;
+ if((skill=pc_checkskill(sd,HW_SOULDRAIN))>0) /* ƒ\ƒEƒ‹ƒhƒŒƒCƒ“ */
+ sd->status.max_sp += sd->status.max_sp*2*skill/100;
+
+ if(sd->status.max_sp < 0 || sd->status.max_sp > battle_config.max_sp)
+ sd->status.max_sp = battle_config.max_sp;
+
+ //Ž©‘R‰ñ•œHP
+ sd->nhealhp = 1 + (sd->paramc[2]/5) + (sd->status.max_hp/200);
+ if((skill=pc_checkskill(sd,SM_RECOVERY)) > 0) { /* HP‰ñ•œ—ÍŒüã */
+ sd->nshealhp = skill*5 + (sd->status.max_hp*skill/500);
+ if(sd->nshealhp > 0x7fff) sd->nshealhp = 0x7fff;
+ }
+ //Ž©‘R‰ñ•œSP
+ 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;
+ if((skill=pc_checkskill(sd,MG_SRECOVERY)) > 0) { /* SP‰ñ•œ—ÍŒüã */
+ sd->nshealsp = skill*3 + (sd->status.max_sp*skill/500);
+ if(sd->nshealsp > 0x7fff) sd->nshealsp = 0x7fff;
+ }
+
+ if((skill = pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0) {
+ sd->nsshealhp = skill*4 + (sd->status.max_hp*skill/500);
+ sd->nsshealsp = skill*2 + (sd->status.max_sp*skill/500);
+ if(sd->nsshealhp > 0x7fff) sd->nsshealhp = 0x7fff;
+ if(sd->nsshealsp > 0x7fff) sd->nsshealsp = 0x7fff;
+ }
+ if(sd->hprecov_rate != 100) {
+ sd->nhealhp = sd->nhealhp*sd->hprecov_rate/100;
+ if(sd->nhealhp < 1) sd->nhealhp = 1;
+ }
+ if(sd->sprecov_rate != 100) {
+ sd->nhealsp = sd->nhealsp*sd->sprecov_rate/100;
+ if(sd->nhealsp < 1) sd->nhealsp = 1;
+ }
+ /* if((skill=pc_checkskill(sd,HP_MEDITATIO)) > 0) { // f?fffBfefCfefBfI,I'SPR,A*,I',E`,¡©Z((c)¡®R¢¶n~.©«,E',(c),(c),e'
+ sd->nhealsp += 3*skill*(sd->status.max_sp)/100;
+ if(sd->nhealsp > 0x7fff) sd->nhealsp = 0x7fff;
+ } Increase natural SP regen instead of colossal SP Recovery effect [DracoRPG]*/
+
+ // Ží‘°‘Ï«i‚±‚ê‚Å‚¢‚¢‚ÌH ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“‚Æ“¯‚¶?—‚ª‚¢‚é‚©‚àj
+ if( (skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){ // ƒhƒ‰ƒSƒmƒƒW?
+ skill = skill*4;
+ sd->addrace[9]+=skill;
+ sd->addrace_[9]+=skill;
+ sd->subrace[9]+=skill;
+ sd->magic_addrace[9]+=skill;
+ sd->magic_subrace[9]-=skill;
+ }
+
+ //Fleeã¸
+ if( (skill=pc_checkskill(sd,TF_MISS))>0 ){ // ‰ñ”ð—¦?‰Á
+ sd->flee += skill*((sd->status.class_==12 || sd->status.class_==17 || sd->status.class_==4013 || sd->status.class_==4018) ? 4 : 3);
+ if((sd->status.class_==12 || sd->status.class_==4013) && (sd->sc_count && sd->sc_data[SC_CLOAKING].timer==-1))
+ sd->speed -= (short)(skill*1.5/100 * DEFAULT_WALK_SPEED);
+ }
+ if( (skill=pc_checkskill(sd,MO_DODGE))>0 ) // Œ©Ø‚è
+ sd->flee += (skill*3)>>1;
+
+ // ƒXƒLƒ‹‚âƒXƒe?ƒ^ƒXˆÙí‚É‚æ‚é?‚è‚̃pƒ‰ƒ?ƒ^•â³
+ if(sd->sc_count){
+ // ATK/DEF?‰»Œ`
+ if(sd->sc_data[SC_ANGELUS].timer!=-1) // ƒGƒ“ƒWƒFƒ‰ƒX
+ sd->def2 = sd->def2*(110+5*sd->sc_data[SC_ANGELUS].val1)/100;
+ if(sd->sc_data[SC_IMPOSITIO].timer!=-1) {// ƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒX
+ sd->watk += sd->sc_data[SC_IMPOSITIO].val1*5;
+ index = sd->equip_index[8];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
+ sd->watk_ += sd->sc_data[SC_IMPOSITIO].val1*5;
+ }
+ if(sd->sc_data[SC_PROVOKE].timer!=-1){ // ƒvƒƒ{ƒbƒN
+ sd->def2 = sd->def2*(100-6*sd->sc_data[SC_PROVOKE].val1)/100;
+ sd->base_atk = sd->base_atk*(100+2*sd->sc_data[SC_PROVOKE].val1)/100;
+ sd->watk = sd->watk*(100+2*sd->sc_data[SC_PROVOKE].val1)/100;
+ index = sd->equip_index[8];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
+ sd->watk_ = sd->watk_*(100+2*sd->sc_data[SC_PROVOKE].val1)/100;
+ }
+ if(sd->sc_data[SC_ENDURE].timer!=-1)
+ sd->mdef2 += sd->sc_data[SC_ENDURE].val1;
+ if(sd->sc_data[SC_MINDBREAKER].timer!=-1){ // ƒvƒƒ{ƒbƒN
+ sd->mdef2 = sd->mdef2*(100-6*sd->sc_data[SC_MINDBREAKER].val1)/100;
+ sd->matk1 = sd->matk1*(100+2*sd->sc_data[SC_MINDBREAKER].val1)/100;
+ sd->matk2 = sd->matk2*(100+2*sd->sc_data[SC_MINDBREAKER].val1)/100;
+ }
+ if(sd->sc_data[SC_POISON].timer!=-1) // “Å?‘Ô
+ sd->def2 = sd->def2*75/100;
+ if(sd->sc_data[SC_CURSE].timer!=-1){
+ sd->base_atk = sd->base_atk*75/100;
+ sd->watk = sd->watk*75/100;
+ index = sd->equip_index[8];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
+ sd->watk_ = sd->watk_*75/100;
+ }
+ if(sd->sc_data[SC_DRUMBATTLE].timer!=-1){ // ?‘¾ŒÛ‚Ì‹¿‚«
+ sd->watk += sd->sc_data[SC_DRUMBATTLE].val2;
+ sd->def += sd->sc_data[SC_DRUMBATTLE].val3;
+ index = sd->equip_index[8];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
+ sd->watk_ += sd->sc_data[SC_DRUMBATTLE].val2;
+ }
+ if(sd->sc_data[SC_NIBELUNGEN].timer!=-1) { // ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö
+ index = sd->equip_index[9];
+ /*if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 3)
+ sd->watk += sd->sc_data[SC_NIBELUNGEN].val3;
+ index = sd->equip_index[8];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 3)
+ sd->watk_ += sd->sc_data[SC_NIBELUNGEN].val3;
+ index = sd->equip_index[9];*/
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 4)
+ sd->watk2 += sd->sc_data[SC_NIBELUNGEN].val3;
+ index = sd->equip_index[8];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 4)
+ sd->watk_2 += sd->sc_data[SC_NIBELUNGEN].val3;
+ }
+
+ if(sd->sc_data[SC_VOLCANO].timer!=-1 && sd->def_ele==3){ // ƒ{ƒ‹ƒP?ƒm
+ sd->watk += sd->sc_data[SC_VOLCANO].val3;
+ }
+
+ if(sd->sc_data[SC_SIGNUMCRUCIS].timer!=-1)
+ sd->def = sd->def * (100 - sd->sc_data[SC_SIGNUMCRUCIS].val2)/100;
+ if(sd->sc_data[SC_ETERNALCHAOS].timer!=-1) // ƒGƒ^?ƒiƒ‹ƒJƒIƒX
+ sd->def=0;
+
+ if(sd->sc_data[SC_CONCENTRATION].timer!=-1){ //ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“
+ sd->watk = sd->watk * (100 + 5*sd->sc_data[SC_CONCENTRATION].val1)/100;
+ index = sd->equip_index[8];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
+ sd->watk_ = sd->watk * (100 + 5*sd->sc_data[SC_CONCENTRATION].val1)/100;
+ sd->def = sd->def * (100 - 5*sd->sc_data[SC_CONCENTRATION].val1)/100;
+ }
+
+ if(sd->sc_data[SC_MAGICPOWER].timer!=-1){ //–‚–@—Í?•
+ sd->matk1 = sd->matk1*(100+5*sd->sc_data[SC_MAGICPOWER].val1)/100;
+ sd->matk2 = sd->matk2*(100+5*sd->sc_data[SC_MAGICPOWER].val1)/100;
+ }
+ if(sd->sc_data[SC_ATKPOT].timer!=-1)
+ sd->watk += sd->sc_data[SC_ATKPOT].val1;
+ if(sd->sc_data[SC_MATKPOT].timer!=-1){
+ sd->matk1 += sd->sc_data[SC_MATKPOT].val1;
+ sd->matk2 += sd->sc_data[SC_MATKPOT].val1;
+ }
+
+ // ASPD/ˆÚ“®‘¬“x?‰»Œn
+ if(sd->sc_data[SC_TWOHANDQUICKEN].timer != -1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1) // 2HQ
+ aspd_rate -= 30;
+ if(sd->sc_data[SC_ADRENALINE].timer != -1 && sd->sc_data[SC_TWOHANDQUICKEN].timer == -1 &&
+ sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1) { // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…
+ if(sd->sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penalty)
+ aspd_rate -= 30;
+ else
+ aspd_rate -= 25;
+ }
+ if(sd->sc_data[SC_SPEARSQUICKEN].timer != -1 && sd->sc_data[SC_ADRENALINE].timer == -1 &&
+ sd->sc_data[SC_TWOHANDQUICKEN].timer == -1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1) // ƒXƒsƒAƒNƒBƒbƒPƒ“
+ aspd_rate -= sd->sc_data[SC_SPEARSQUICKEN].val2;
+ if(sd->sc_data[SC_ASSNCROS].timer!=-1 && // —[—z‚̃AƒTƒVƒ“ƒNƒƒX
+ sd->sc_data[SC_TWOHANDQUICKEN].timer==-1 && sd->sc_data[SC_ADRENALINE].timer==-1 && sd->sc_data[SC_SPEARSQUICKEN].timer==-1 &&
+ sd->sc_data[SC_DONTFORGETME].timer == -1)
+ aspd_rate -= 5+sd->sc_data[SC_ASSNCROS].val1+sd->sc_data[SC_ASSNCROS].val2+sd->sc_data[SC_ASSNCROS].val3;
+ if(sd->sc_data[SC_DONTFORGETME].timer!=-1){ // Ž„‚ð–Y‚ê‚È‚¢‚Å
+ aspd_rate += sd->sc_data[SC_DONTFORGETME].val1*3 + sd->sc_data[SC_DONTFORGETME].val2 + (sd->sc_data[SC_DONTFORGETME].val3>>16);
+ sd->speed= sd->speed*(100+sd->sc_data[SC_DONTFORGETME].val1*2 + sd->sc_data[SC_DONTFORGETME].val2 + (sd->sc_data[SC_DONTFORGETME].val3&0xffff))/100;
+ }
+ if( sd->sc_data[i=SC_SPEEDPOTION3].timer!=-1 ||
+ sd->sc_data[i=SC_SPEEDPOTION2].timer!=-1 ||
+ sd->sc_data[i=SC_SPEEDPOTION1].timer!=-1 ||
+ sd->sc_data[i=SC_SPEEDPOTION0].timer!=-1) // ? ‘¬ƒ|?ƒVƒ‡ƒ“
+ aspd_rate -= sd->sc_data[i].val2;
+ if(sd->sc_data[SC_WINDWALK].timer!=-1 && sd->sc_data[SC_INCREASEAGI].timer==-1) //ƒEƒBƒ“ƒhƒEƒH?ƒNŽbÍLv*2%Œ¸ŽZ
+ sd->speed -= sd->speed *(sd->sc_data[SC_WINDWALK].val1*2)/100;
+ if(sd->sc_data[SC_CARTBOOST].timer!=-1) // ƒJ?ƒgƒu?ƒXƒg
+ sd->speed -= (DEFAULT_WALK_SPEED * 20)/100;
+ if(sd->sc_data[SC_BERSERK].timer!=-1) //ƒo?ƒT?ƒN’†‚ÍIA‚Æ“¯‚¶‚®‚ç‚¢‘¬‚¢H
+ sd->speed -= sd->speed *25/100;
+ if(sd->sc_data[SC_WEDDING].timer!=-1) //Œ‹¥’†‚Í?‚­‚Ì‚ª?‚¢
+ sd->speed = 2*DEFAULT_WALK_SPEED;
+
+ // HIT/FLEE?‰»Œn
+ if(sd->sc_data[SC_WHISTLE].timer!=-1){ // Œû“J
+ sd->flee += sd->flee * (sd->sc_data[SC_WHISTLE].val1
+ +sd->sc_data[SC_WHISTLE].val2+(sd->sc_data[SC_WHISTLE].val3>>16))/100;
+ sd->flee2+= (sd->sc_data[SC_WHISTLE].val1+sd->sc_data[SC_WHISTLE].val2+(sd->sc_data[SC_WHISTLE].val3&0xffff)) * 10;
+ }
+ if(sd->sc_data[SC_HUMMING].timer!=-1) // ƒnƒ~ƒ“ƒO
+ sd->hit += (sd->sc_data[SC_HUMMING].val1*2+sd->sc_data[SC_HUMMING].val2
+ +sd->sc_data[SC_HUMMING].val3) * sd->hit/100;
+ if(sd->sc_data[SC_VIOLENTGALE].timer!=-1 && sd->def_ele==4){ // ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹
+ sd->flee += sd->flee*sd->sc_data[SC_VIOLENTGALE].val3/100;
+ }
+ if(sd->sc_data[SC_BLIND].timer!=-1){ // ˆÃ?
+ sd->hit -= sd->hit*25/100;
+ sd->flee -= sd->flee*25/100;
+ }
+ if(sd->sc_data[SC_WINDWALK].timer!=-1) // ƒEƒBƒ“ƒhƒEƒH?ƒN
+ sd->flee += sd->flee*(sd->sc_data[SC_WINDWALK].val2)/100;
+ if(sd->sc_data[SC_SPIDERWEB].timer!=-1) //ƒXƒpƒCƒ_?ƒEƒFƒu
+ sd->flee -= sd->flee*50/100;
+ if(sd->sc_data[SC_TRUESIGHT].timer!=-1) //ƒgƒDƒ‹?ƒTƒCƒg
+ sd->hit += 3*(sd->sc_data[SC_TRUESIGHT].val1);
+ if(sd->sc_data[SC_CONCENTRATION].timer!=-1) //ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“
+ sd->hit += (10*(sd->sc_data[SC_CONCENTRATION].val1));
+
+ // ‘Ï«
+ if(sd->sc_data[SC_SIEGFRIED].timer!=-1){ // •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh
+ 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){ // ƒvƒƒ”ƒBƒfƒ“ƒX
+ sd->subele[6] += sd->sc_data[SC_PROVIDENCE].val2; // ? ¹?«
+ sd->subrace[6] += sd->sc_data[SC_PROVIDENCE].val2; // ? ?–‚
+ }
+
+ // ‚»‚Ì‘¼
+ if(sd->sc_data[SC_APPLEIDUN].timer!=-1){ // ƒCƒhƒDƒ“‚Ì—ÑŒç
+ sd->status.max_hp += ((5+sd->sc_data[SC_APPLEIDUN].val1*2+((sd->sc_data[SC_APPLEIDUN].val2+1)>>1)
+ +sd->sc_data[SC_APPLEIDUN].val3/10) * sd->status.max_hp)/100;
+ if(sd->status.max_hp < 0 || sd->status.max_hp > battle_config.max_hp)
+ sd->status.max_hp = battle_config.max_hp;
+ }
+ if(sd->sc_data[SC_DELUGE].timer!=-1 && sd->def_ele==1){ // ƒfƒŠƒ…?ƒW
+ sd->status.max_hp += sd->status.max_hp * deluge_eff[sd->sc_data[SC_DELUGE].val1-1]/100;
+ if(sd->status.max_hp < 0 || sd->status.max_hp > battle_config.max_hp)
+ sd->status.max_hp = battle_config.max_hp;
+ }
+ if(sd->sc_data[SC_SERVICE4U].timer!=-1) { // ƒT?ƒrƒXƒtƒH?ƒ†?
+ sd->status.max_sp += sd->status.max_sp*(10+sd->sc_data[SC_SERVICE4U].val1+sd->sc_data[SC_SERVICE4U].val2
+ +sd->sc_data[SC_SERVICE4U].val3)/100;
+ if(sd->status.max_sp < 0 || sd->status.max_sp > battle_config.max_sp)
+ sd->status.max_sp = battle_config.max_sp;
+ sd->dsprate-=(10+sd->sc_data[SC_SERVICE4U].val1*3+sd->sc_data[SC_SERVICE4U].val2
+ +sd->sc_data[SC_SERVICE4U].val3);
+ if(sd->dsprate<0)sd->dsprate=0;
+ }
+
+ if(sd->sc_data[SC_FORTUNE].timer!=-1) // K‰^‚̃LƒX
+ sd->critical += (10+sd->sc_data[SC_FORTUNE].val1+sd->sc_data[SC_FORTUNE].val2
+ +sd->sc_data[SC_FORTUNE].val3)*10;
+
+ if(sd->sc_data[SC_EXPLOSIONSPIRITS].timer!=-1){ // ”š—ô”g“®
+ if(s_class.job==23)
+ sd->critical += sd->sc_data[SC_EXPLOSIONSPIRITS].val1*100;
+ else
+ sd->critical += sd->sc_data[SC_EXPLOSIONSPIRITS].val2;
+ }
+
+ if(sd->sc_data[SC_STEELBODY].timer!=-1){ // ‹à„
+ sd->def = 90;
+ sd->mdef = 90;
+ aspd_rate += 25;
+ sd->speed = (sd->speed * 125) / 100;
+ }
+ if(sd->sc_data[SC_DEFENDER].timer != -1) {
+ //sd->aspd += (550 - sd->sc_data[SC_DEFENDER].val1*50);
+ aspd_rate += (25 - sd->sc_data[SC_DEFENDER].val1*5);
+ sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100;
+ }
+ if(sd->sc_data[SC_ENCPOISON].timer != -1)
+ sd->addeff[4] += sd->sc_data[SC_ENCPOISON].val2;
+
+ if( sd->sc_data[SC_DANCING].timer!=-1 ){ // ‰‰‘t/ƒ_ƒ“ƒXŽg—p’†
+ sd->speed = (short) ((double)sd->speed * (6.- 0.4 * pc_checkskill(sd, ((s_class.job == 19) ? BA_MUSICALLESSON : DC_DANCINGLESSON))));
+ //sd->speed*=4;
+ sd->nhealsp = 0;
+ sd->nshealsp = 0;
+ sd->nsshealsp = 0;
+ }
+ if(sd->sc_data[SC_CURSE].timer!=-1)
+ sd->speed += 450;
+
+ if(sd->sc_data[SC_TRUESIGHT].timer!=-1) //ƒgƒDƒ‹?ƒTƒCƒg
+ sd->critical += sd->critical*(sd->sc_data[SC_TRUESIGHT].val1)/100;
+
+/* if(sd->sc_data[SC_VOLCANO].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“(?«‚Íbattle.c‚Å)
+ sd->addeff[2]+=sd->sc_data[SC_VOLCANO].val2;//% of granting
+ if(sd->sc_data[SC_DELUGE].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“(?«‚Íbattle.c‚Å)
+ sd->addeff[0]+=sd->sc_data[SC_DELUGE].val2;//% of granting
+ */
+ if(sd->sc_data[SC_BERSERK].timer!=-1) { //All Def/MDef reduced to 0 while in Berserk [DracoRPG]
+ sd->def = sd->def2 = 0;
+ sd->mdef = sd->mdef2 = 0;
+ sd->flee -= sd->flee*50/100;
+ aspd_rate -= 30;
+ //sd->base_atk *= 3;
+ }
+ if(sd->sc_data[SC_KEEPING].timer!=-1)
+ sd->def = 100;
+ if(sd->sc_data[SC_BARRIER].timer!=-1)
+ sd->mdef = 100;
+
+ if(sd->sc_data[SC_JOINTBEAT].timer!=-1) { // Random break [DracoRPG]
+ switch(sd->sc_data[SC_JOINTBEAT].val2) {
+ case 1: //Ankle break
+ sd->speed_rate += 50;
+ break;
+ case 2: //Wrist break
+ sd->aspd_rate += 25;
+ break;
+ case 3: //Knee break
+ sd->speed_rate += 30;
+ sd->aspd_rate += 10;
+ break;
+ case 4: //Shoulder break
+ sd->def2 -= sd->def2*50/100;
+ break;
+ case 5: //Waist break
+ sd->def2 -= sd->def2*50/100;
+ sd->base_atk -= sd->base_atk*25/100;
+ break;
+ }
+ }
+
+ if(sd->sc_data[SC_GOSPEL].timer!=-1) {
+ if (sd->sc_data[SC_GOSPEL].val4 == BCT_PARTY){
+ switch (sd->sc_data[SC_GOSPEL].val3)
+ {
+ case 4:
+ sd->status.max_hp += sd->status.max_hp * 25 / 100;
+ if(sd->status.max_hp > battle_config.max_hp)
+ sd->status.max_hp = battle_config.max_hp;
+ break;
+ case 5:
+ sd->status.max_sp += sd->status.max_sp * 25 / 100;
+ if(sd->status.max_sp > battle_config.max_sp)
+ sd->status.max_sp = battle_config.max_sp;
+ break;
+ case 11:
+ sd->def += sd->def * 25 / 100;
+ sd->def2 += sd->def2 * 25 / 100;
+ break;
+ case 12:
+ sd->base_atk += sd->base_atk * 8 / 100;
+ break;
+ case 13:
+ sd->flee += sd->flee * 5 / 100;
+ break;
+ case 14:
+ sd->hit += sd->hit * 5 / 100;
+ break;
+ }
+ } else if (sd->sc_data[SC_GOSPEL].val4 == BCT_ENEMY){
+ switch (sd->sc_data[SC_GOSPEL].val3)
+ {
+ case 5:
+ sd->def = 0;
+ sd->def2 = 0;
+ break;
+ case 6:
+ sd->base_atk = 0;
+ sd->watk = 0;
+ sd->watk2 = 0;
+ break;
+ case 7:
+ sd->flee = 0;
+ break;
+ case 8:
+ sd->speed_rate += 75;
+ aspd_rate += 75;
+ break;
+ }
+ }
+ }
+ // custom stats, since there's no info on how much it actually gives ^^; [Celest]
+ if (sd->sc_data[SC_GUILDAURA].timer != -1) {
+ if (sd->sc_data[SC_GUILDAURA].val4 & 1<<4) {
+ sd->hit += 10;
+ sd->flee += 10;
+ }
+ }
+ }
+
+ if (sd->speed_rate <= 0)
+ sd->speed_rate = 1;
+
+ if(sd->speed_rate != 100)
+ sd->speed = sd->speed*sd->speed_rate/100;
+ if(sd->speed < 1) sd->speed = 1;
+ if(aspd_rate != 100)
+ sd->aspd = sd->aspd*aspd_rate/100;
+ if(pc_isriding(sd)) // ‹R•ºC—û
+ sd->aspd = sd->aspd*(100 + 10*(5 - pc_checkskill(sd,KN_CAVALIERMASTERY)))/ 100;
+ if(sd->aspd < battle_config.max_aspd) sd->aspd = battle_config.max_aspd;
+ sd->amotion = sd->aspd;
+ sd->dmotion = 800-sd->paramc[1]*4;
+ if(sd->dmotion<400)
+ sd->dmotion = 400;
+ if(sd->skilltimer != -1 && (skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
+ sd->prev_speed = sd->speed;
+ sd->speed = sd->speed*(175 - skill*5)/100;
+ }
+
+ if(sd->status.hp>sd->status.max_hp)
+ sd->status.hp=sd->status.max_hp;
+ if(sd->status.sp>sd->status.max_sp)
+ sd->status.sp=sd->status.max_sp;
+
+ if(first&4)
+ 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);
+ }
+ return 0;
+ }
+
+ 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
+ }
+
+ if( memcmp(b_skill,sd->status.skill,sizeof(sd->status.skill)) || b_attackrange != sd->attackrange)
+ clif_skillinfoblock(sd); // ƒXƒLƒ‹‘—M
+
+ 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->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->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);
+
+/* if(before.cart_num != before.cart_num || before.cart_max_num != before.cart_max_num ||
+ before.cart_weight != before.cart_weight || before.cart_max_weight != before.cart_max_weight )
+ clif_updatestatus(sd,SP_CARTINFO);*/
+
+ //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 ) && !pc_isdead(sd))
+ // ƒI?ƒgƒo?ƒT?ƒN?“®
+ status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
+
+ return 0;
+}
+
+/*==========================================
+ * For quick calculating [Celest]
+ *------------------------------------------
+ */
+int status_calc_speed (struct map_session_data *sd)
+{
+ int b_speed, skill;
+ struct pc_base_job s_class;
+
+ nullpo_retr(0, sd);
+
+ s_class = pc_calc_base_job(sd->status.class_);
+
+ b_speed = sd->speed;
+ sd->speed = DEFAULT_WALK_SPEED ;
+
+ if(sd->sc_count){
+ if(sd->sc_data[SC_INCREASEAGI].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1){ // ‘¬“x?‰Á
+ sd->speed -= sd->speed *25/100;
+ }
+ if(sd->sc_data[SC_DECREASEAGI].timer!=-1) {
+ sd->speed = sd->speed *125/100;
+ }
+ if(sd->sc_data[SC_CLOAKING].timer!=-1) {
+ sd->speed = sd->speed * (sd->sc_data[SC_CLOAKING].val3-sd->sc_data[SC_CLOAKING].val1*3) /100;
+ }
+ if(sd->sc_data[SC_CHASEWALK].timer!=-1) {
+ sd->speed = sd->speed * sd->sc_data[SC_CHASEWALK].val3 /100;
+ }
+ if(sd->sc_data[SC_QUAGMIRE].timer!=-1){
+ sd->speed = sd->speed*3/2;
+ }
+ if(sd->sc_data[SC_WINDWALK].timer!=-1 && sd->sc_data[SC_INCREASEAGI].timer==-1) {
+ sd->speed -= sd->speed *(sd->sc_data[SC_WINDWALK].val1*2)/100;
+ }
+ if(sd->sc_data[SC_CARTBOOST].timer!=-1) {
+ sd->speed -= (DEFAULT_WALK_SPEED * 20)/100;
+ }
+ if(sd->sc_data[SC_BERSERK].timer!=-1) {
+ sd->speed -= sd->speed *25/100;
+ }
+ if(sd->sc_data[SC_WEDDING].timer!=-1) {
+ sd->speed = 2*DEFAULT_WALK_SPEED;
+ }
+ if(sd->sc_data[SC_DONTFORGETME].timer!=-1){
+ sd->speed= sd->speed*(100+sd->sc_data[SC_DONTFORGETME].val1*2 + sd->sc_data[SC_DONTFORGETME].val2 + (sd->sc_data[SC_DONTFORGETME].val3&0xffff))/100;
+ }
+ if(sd->sc_data[SC_STEELBODY].timer!=-1){
+ sd->speed = (sd->speed * 125) / 100;
+ }
+ if(sd->sc_data[SC_DEFENDER].timer != -1) {
+ sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100;
+ }
+ if( sd->sc_data[SC_DANCING].timer!=-1 ){
+ sd->speed = (int) ((double)sd->speed * (6.- 0.4 * pc_checkskill(sd, ((s_class.job == 19) ? BA_MUSICALLESSON : DC_DANCINGLESSON))));
+ }
+ if(sd->sc_data[SC_CURSE].timer!=-1)
+ sd->speed += 450;
+ if(sd->sc_data[SC_SLOWDOWN].timer!=-1)
+ sd->speed = sd->speed*150/100;
+ if(sd->sc_data[SC_SPEEDUP0].timer!=-1)
+ sd->speed -= sd->speed*25/100;
+ }
+
+ if(sd->status.option&2 && (skill = pc_checkskill(sd,RG_TUNNELDRIVE))>0 )
+ sd->speed += (100-16*skill)*DEFAULT_WALK_SPEED/100;
+ if (pc_iscarton(sd) && (skill=pc_checkskill(sd,MC_PUSHCART))>0)
+ sd->speed += (short) ((10-skill) * (DEFAULT_WALK_SPEED * 0.1));
+ else if (pc_isriding(sd)) {
+ sd->speed -= (short) ((0.25 * DEFAULT_WALK_SPEED));
+ }
+ if((skill=pc_checkskill(sd,TF_MISS))>0)
+ if(s_class.job==12)
+ sd->speed -= (short) (sd->speed *(skill*1.5)/100);
+
+ if(sd->speed_rate != 100)
+ sd->speed = sd->speed*sd->speed_rate/100;
+ if(sd->speed < 1) sd->speed = 1;
+
+ if(sd->skilltimer != -1 && (skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
+ sd->prev_speed = sd->speed;
+ sd->speed = sd->speed*(175 - skill*5)/100;
+ }
+
+ 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 && (struct mob_data *)bl)
+ return ((struct mob_data *)bl)->class_;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->status.class_;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return ((struct pet_data *)bl)->class_;
+ else
+ return 0;
+}
+/*==========================================
+ * ‘ÎÛ‚Ì•ûŒü‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_dir(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return ((struct mob_data *)bl)->dir;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->dir;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return ((struct pet_data *)bl)->dir;
+ else
+ return 0;
+}
+/*==========================================
+ * ‘Îۂ̃Œƒxƒ‹‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_lv(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return ((struct mob_data *)bl)->level;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->status.base_level;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return ((struct pet_data *)bl)->msd->pet.level;
+ else
+ return 0;
+}
+
+/*==========================================
+ * ‘ÎÛ‚ÌŽË’ö‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_range(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return mob_db[((struct mob_data *)bl)->class_].range;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->attackrange;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return mob_db[((struct pet_data *)bl)->class_].range;
+ else
+ return 0;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌHP‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_hp(struct block_list *bl)
+{
+ nullpo_retr(1, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return ((struct mob_data *)bl)->hp;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->status.hp;
+ else
+ return 1;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMHP‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_max_hp(struct block_list *bl)
+{
+ nullpo_retr(1, bl);
+
+ if(bl->type==BL_PC && ((struct map_session_data *)bl))
+ return ((struct map_session_data *)bl)->status.max_hp;
+ else {
+ struct status_change *sc_data;
+ int max_hp = 1;
+
+ if(bl->type == BL_MOB) {
+ struct mob_data *md;
+ nullpo_retr(1, md = (struct mob_data *)bl);
+ max_hp = mob_db[md->class_].max_hp;
+
+ if(battle_config.mobs_level_up) // mobs leveling up increase [Valaris]
+ max_hp += (md->level - mob_db[md->class_].lv) * status_get_vit(bl);
+
+ if(mob_db[md->class_].mexp > 0) { //MVP Monsters
+ if(battle_config.mvp_hp_rate != 100) {
+ double hp = (double)max_hp * battle_config.mvp_hp_rate / 100.0;
+ max_hp = (hp > 0x7FFFFFFF ? 0x7FFFFFFF : (int)hp);
+ }
+ }
+ else { //Common MONSTERS
+ if(battle_config.monster_hp_rate != 100) {
+ double hp = (double)max_hp * battle_config.monster_hp_rate / 100.0;
+ max_hp = (hp > 0x7FFFFFFF ? 0x7FFFFFFF : (int)hp);
+ }
+ }
+ }
+ else if(bl->type == BL_PET) {
+ struct pet_data *pd;
+ nullpo_retr(1, pd = (struct pet_data*)bl);
+ max_hp = mob_db[pd->class_].max_hp;
+
+ if(mob_db[pd->class_].mexp > 0) { //MVP Monsters
+ if(battle_config.mvp_hp_rate != 100)
+ max_hp = (max_hp * battle_config.mvp_hp_rate)/100;
+ }
+ else { //Common MONSTERS
+ if(battle_config.monster_hp_rate != 100)
+ max_hp = (max_hp * battle_config.monster_hp_rate)/100;
+ }
+ }
+
+ sc_data = status_get_sc_data(bl);
+ if(sc_data) {
+ if(sc_data[SC_APPLEIDUN].timer != -1)
+ max_hp += ((5 + sc_data[SC_APPLEIDUN].val1 * 2 + ((sc_data[SC_APPLEIDUN].val2 + 1) >> 1)
+ + sc_data[SC_APPLEIDUN].val3 / 10) * max_hp)/100;
+ if(sc_data[SC_GOSPEL].timer != -1 &&
+ sc_data[SC_GOSPEL].val4 == BCT_PARTY &&
+ sc_data[SC_GOSPEL].val3 == 4)
+ max_hp += max_hp * 25 / 100;
+ }
+ if(max_hp < 1) max_hp = 1;
+ return max_hp;
+ }
+ return 1;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌStr‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_str(struct block_list *bl)
+{
+ int str = 0;
+ nullpo_retr(0, bl);
+
+ if (bl->type == BL_PC && ((struct map_session_data *)bl))
+ return ((struct map_session_data *)bl)->paramc[0];
+ else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+
+ if(bl->type == BL_MOB && ((struct mob_data *)bl)) {
+ str = mob_db[((struct mob_data *)bl)->class_].str;
+ if(battle_config.mobs_level_up) // mobs leveling up increase [Valaris]
+ str += ((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class_].lv;
+ }
+ else if(bl->type == BL_PET && ((struct pet_data *)bl))
+ str = mob_db[((struct pet_data *)bl)->class_].str;
+
+ if(sc_data) {
+ if(sc_data[SC_LOUD].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1)
+ str += 4;
+ if( sc_data[SC_BLESSING].timer != -1){ // ƒuƒŒƒbƒVƒ“ƒO
+ int race = status_get_race(bl);
+ if(battle_check_undead(race,status_get_elem_type(bl)) || race == 6)
+ str >>= 1; // ˆ« –‚/•sŽ€
+ else str += sc_data[SC_BLESSING].val1; // ‚»‚Ì‘¼
+ }
+ if(sc_data[SC_TRUESIGHT].timer!=-1) // ƒgƒDƒ‹[ƒTƒCƒg
+ str += 5;
+ }
+ }
+ 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 && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->paramc[1];
+ else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ if(bl->type == BL_MOB && (struct mob_data *)bl) {
+ agi = mob_db[((struct mob_data *)bl)->class_].agi;
+ if(battle_config.mobs_level_up) // increase of mobs leveling up [Valaris]
+ agi += ((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class_].lv;
+ }
+ else if(bl->type == BL_PET && (struct pet_data *)bl)
+ agi = mob_db[((struct pet_data *)bl)->class_].agi;
+
+ if(sc_data) {
+ if(sc_data[SC_INCREASEAGI].timer!=-1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // ‘¬“x‘‰Á(PC‚Ípc.c‚Å)
+ agi += 2 + sc_data[SC_INCREASEAGI].val1;
+ if(sc_data[SC_CONCENTRATE].timer!=-1 && sc_data[SC_QUAGMIRE].timer == -1)
+ agi += agi * (2 + sc_data[SC_CONCENTRATE].val1)/100;
+ if(sc_data[SC_DECREASEAGI].timer!=-1) // ‘¬“xŒ¸­
+ agi -= 2 + sc_data[SC_DECREASEAGI].val1;
+ if(sc_data[SC_QUAGMIRE].timer!=-1 ) { // ƒNƒ@ƒOƒ}ƒCƒA
+ //agi >>= 1;
+ //int agib = agi*(sc_data[SC_QUAGMIRE].val1*10)/100;
+ //agi -= agib > 50 ? 50 : agib;
+ agi -= sc_data[SC_QUAGMIRE].val1*10;
+ }
+ if(sc_data[SC_TRUESIGHT].timer!=-1) // ƒgƒDƒ‹[ƒTƒCƒg
+ agi += 5;
+ }
+ }
+ 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 && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->paramc[2];
+ else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ if(bl->type == BL_MOB && (struct mob_data *)bl) {
+ vit = mob_db[((struct mob_data *)bl)->class_].vit;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ vit += ((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class_].lv;
+ }
+ else if(bl->type == BL_PET && (struct pet_data *)bl)
+ vit = mob_db[((struct pet_data *)bl)->class_].vit;
+ if(sc_data) {
+ if(sc_data[SC_STRIPARMOR].timer != -1)
+ vit = vit*60/100;
+ if(sc_data[SC_TRUESIGHT].timer!=-1) // ƒgƒDƒ‹[ƒTƒCƒg
+ vit += 5;
+ }
+ }
+ 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 && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->paramc[3];
+ else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ if(bl->type == BL_MOB && (struct mob_data *)bl){
+ int_ = mob_db[((struct mob_data *)bl)->class_].int_;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ int_ += ((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class_].lv;
+ }
+ else if(bl->type == BL_PET && (struct pet_data *)bl)
+ int_ = mob_db[((struct pet_data *)bl)->class_].int_;
+
+ if(sc_data) {
+ if(sc_data[SC_BLESSING].timer != -1){ // ƒuƒŒƒbƒVƒ“ƒO
+ int race = status_get_race(bl);
+ if(battle_check_undead(race,status_get_elem_type(bl)) || race == 6 )
+ int_ >>= 1; // ˆ« –‚/•sŽ€
+ else
+ int_ += sc_data[SC_BLESSING].val1; // ‚»‚Ì‘¼
+ }
+ if(sc_data[SC_STRIPHELM].timer != -1)
+ int_ = int_*60/100;
+ if(sc_data[SC_TRUESIGHT].timer!=-1) // ƒgƒDƒ‹[ƒTƒCƒg
+ int_ += 5;
+ }
+ }
+ 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 && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->paramc[4];
+ else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ if(bl->type == BL_MOB && (struct mob_data *)bl) {
+ dex = mob_db[((struct mob_data *)bl)->class_].dex;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ dex += ((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class_].lv;
+ }
+ else if(bl->type == BL_PET && (struct pet_data *)bl)
+ dex = mob_db[((struct pet_data *)bl)->class_].dex;
+
+ if(sc_data) {
+ if(sc_data[SC_CONCENTRATE].timer!=-1 && sc_data[SC_QUAGMIRE].timer == -1)
+ dex += dex*(2+sc_data[SC_CONCENTRATE].val1)/100;
+ if(sc_data[SC_BLESSING].timer != -1){ // ƒuƒŒƒbƒVƒ“ƒO
+ int race = status_get_race(bl);
+ if(battle_check_undead(race,status_get_elem_type(bl)) || race == 6 )
+ dex >>= 1; // ˆ« –‚/•sŽ€
+ else dex += sc_data[SC_BLESSING].val1; // ‚»‚Ì‘¼
+ }
+ if(sc_data[SC_QUAGMIRE].timer!=-1) { // ƒNƒ@ƒOƒ}ƒCƒA
+ // dex >>= 1;
+ //int dexb = dex*(sc_data[SC_QUAGMIRE].val1*10)/100;
+ //dex -= dexb > 50 ? 50 : dexb;
+ dex -= sc_data[SC_QUAGMIRE].val1*10;
+ }
+ if(sc_data[SC_TRUESIGHT].timer!=-1) // ƒgƒDƒ‹[ƒTƒCƒg
+ dex += 5;
+ }
+ }
+ 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 && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->paramc[5];
+ else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ if(bl->type == BL_MOB && (struct mob_data *)bl) {
+ luk = mob_db[((struct mob_data *)bl)->class_].luk;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ luk += ((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class_].lv;
+ }
+ else if(bl->type == BL_PET && (struct pet_data *)bl)
+ luk = mob_db[((struct pet_data *)bl)->class_].luk;
+ if(sc_data) {
+ if(sc_data[SC_GLORIA].timer!=-1) // ƒOƒƒŠƒA(PC‚Ípc.c‚Å)
+ luk += 30;
+ if(sc_data[SC_TRUESIGHT].timer!=-1) // ƒgƒDƒ‹[ƒTƒCƒg
+ luk += 5;
+ if(sc_data[SC_CURSE].timer!=-1) // Žô‚¢
+ luk = 0;
+ }
+ }
+ 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 && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->flee;
+ else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ flee = status_get_agi(bl) + status_get_lv(bl);
+
+ if(sc_data){
+ if(sc_data[SC_WHISTLE].timer!=-1)
+ flee += flee*(sc_data[SC_WHISTLE].val1+sc_data[SC_WHISTLE].val2
+ +(sc_data[SC_WHISTLE].val3>>16))/100;
+ if(sc_data[SC_BLIND].timer!=-1)
+ flee -= flee*25/100;
+ if(sc_data[SC_WINDWALK].timer!=-1) // ƒEƒBƒ“ƒhƒEƒH[ƒN
+ flee += flee*(sc_data[SC_WINDWALK].val2)/100;
+ if(sc_data[SC_SPIDERWEB].timer!=-1) //ƒXƒpƒCƒ_[ƒEƒFƒu
+ flee -= flee*50/100;
+ if(sc_data[SC_GOSPEL].timer!=-1) {
+ if (sc_data[SC_GOSPEL].val4 == BCT_PARTY &&
+ sc_data[SC_GOSPEL].val3 == 13)
+ flee += flee*5/100;
+ else if (sc_data[SC_GOSPEL].val4 == BCT_ENEMY &&
+ sc_data[SC_GOSPEL].val3 == 7)
+ flee = 0;
+ }
+ }
+ }
+ 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 && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->hit;
+ else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ hit = status_get_dex(bl) + status_get_lv(bl);
+
+ if(sc_data) {
+ if(sc_data[SC_HUMMING].timer!=-1) //
+ hit += hit*(sc_data[SC_HUMMING].val1*2+sc_data[SC_HUMMING].val2
+ +sc_data[SC_HUMMING].val3)/100;
+ if(sc_data[SC_BLIND].timer!=-1) // Žô‚¢
+ hit -= hit*25/100;
+ if(sc_data[SC_TRUESIGHT].timer!=-1) // ƒgƒDƒ‹[ƒTƒCƒg
+ hit += 3*(sc_data[SC_TRUESIGHT].val1);
+ if(sc_data[SC_CONCENTRATION].timer!=-1) //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“
+ hit += (hit*(10*(sc_data[SC_CONCENTRATION].val1)))/100;
+ if(sc_data[SC_GOSPEL].timer!=-1 &&
+ sc_data[SC_GOSPEL].val4 == BCT_PARTY &&
+ sc_data[SC_GOSPEL].val3 == 14)
+ hit += hit*5/100;
+ if(sc_data[SC_EXPLOSIONSPIRITS].timer!=-1)
+ hit += 20*sc_data[SC_EXPLOSIONSPIRITS].val1;
+ }
+ }
+ 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 && (struct map_session_data *)bl){
+ return ((struct map_session_data *)bl)->flee2;
+ } else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ flee2 = status_get_luk(bl)+1;
+
+ if(sc_data) {
+ if(sc_data[SC_WHISTLE].timer!=-1)
+ flee2 += (sc_data[SC_WHISTLE].val1+sc_data[SC_WHISTLE].val2
+ +(sc_data[SC_WHISTLE].val3&0xffff))*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 && (struct map_session_data *)bl){
+ return ((struct map_session_data *)bl)->critical;
+ } else {
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+ critical = status_get_luk(bl)*3 + 1;
+
+ if(sc_data) {
+ if(sc_data[SC_FORTUNE].timer!=-1)
+ critical += (10+sc_data[SC_FORTUNE].val1+sc_data[SC_FORTUNE].val2
+ + sc_data[SC_FORTUNE].val3)*10;
+ if(sc_data[SC_EXPLOSIONSPIRITS].timer!=-1)
+ critical += sc_data[SC_EXPLOSIONSPIRITS].val2;
+ if(sc_data[SC_TRUESIGHT].timer!=-1) //ƒgƒDƒ‹[ƒTƒCƒg
+ critical += critical*sc_data[SC_TRUESIGHT].val1/100;
+ }
+ }
+ if(critical < 1) critical = 1;
+ return critical;
+}
+/*==========================================
+ * base_atk‚̎擾
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ *------------------------------------------
+ */
+int status_get_baseatk(struct block_list *bl)
+{
+ int batk = 1;
+ nullpo_retr(1, bl);
+
+ if(bl->type==BL_PC && (struct map_session_data *)bl) {
+ batk = ((struct map_session_data *)bl)->base_atk; //ݒ肳‚ê‚Ä‚¢‚é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 { //‚»‚êˆÈŠO‚È‚ç
+ struct status_change *sc_data;
+ int str,dstr;
+ str = status_get_str(bl); //STR
+ dstr = str/10;
+ batk = dstr*dstr + str; //base_atk‚ðŒvŽZ‚·‚é
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data) { //ó‘ÔˆÙí‚ ‚è
+ if(sc_data[SC_PROVOKE].timer!=-1) //PC‚Ńvƒƒ{ƒbƒN(SM_PROVOKE)ó‘Ô
+ batk = batk*(100+2*sc_data[SC_PROVOKE].val1)/100; //base_atk‘‰Á
+ if(sc_data[SC_CURSE].timer!=-1) //Žô‚í‚ê‚Ä‚¢‚½‚ç
+ batk -= batk*25/100; //base_atk‚ª25%Œ¸­
+ if(sc_data[SC_CONCENTRATION].timer!=-1) //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“
+ batk += batk*(5*sc_data[SC_CONCENTRATION].val1)/100;
+ }
+ }
+ 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);
+
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data*)bl)->watk;
+ else {
+ struct status_change *sc_data;
+ sc_data=status_get_sc_data(bl);
+
+ if(bl->type == BL_MOB && (struct mob_data *)bl)
+ atk = mob_db[((struct mob_data*)bl)->class_].atk1;
+ else if(bl->type == BL_PET && (struct pet_data *)bl)
+ atk = mob_db[((struct pet_data*)bl)->class_].atk1;
+
+ if(sc_data) {
+ if(sc_data[SC_PROVOKE].timer!=-1)
+ atk = atk*(100+2*sc_data[SC_PROVOKE].val1)/100;
+ if(sc_data[SC_CURSE].timer!=-1)
+ atk -= atk*25/100;
+ if(sc_data[SC_CONCENTRATION].timer!=-1) //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“
+ atk += atk*(5*sc_data[SC_CONCENTRATION].val1)/100;
+ if(sc_data[SC_EXPLOSIONSPIRITS].timer!=-1)
+ atk += (1000*sc_data[SC_EXPLOSIONSPIRITS].val1);
+ if(sc_data[SC_STRIPWEAPON].timer!=-1)
+ atk -= atk*10/100;
+
+ if(sc_data[SC_GOSPEL].timer!=-1) {
+ if (sc_data[SC_GOSPEL].val4 == BCT_PARTY &&
+ sc_data[SC_GOSPEL].val3 == 12)
+ atk += atk*8/100;
+ else if (sc_data[SC_GOSPEL].val4 == BCT_ENEMY &&
+ sc_data[SC_GOSPEL].val3 == 6)
+ atk = 0;
+ }
+ }
+ }
+ 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 && (struct map_session_data *)bl){
+ int atk=((struct map_session_data*)bl)->watk_;
+ return atk;
+ }
+ else
+ return 0;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌAtk2‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_atk2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data*)bl)->watk2;
+ else {
+ struct status_change *sc_data=status_get_sc_data(bl);
+ int atk2=0;
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ atk2 = mob_db[((struct mob_data*)bl)->class_].atk2;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ atk2 = mob_db[((struct pet_data*)bl)->class_].atk2;
+ if(sc_data) {
+ if( sc_data[SC_IMPOSITIO].timer!=-1)
+ atk2 += sc_data[SC_IMPOSITIO].val1*5;
+ if( sc_data[SC_PROVOKE].timer!=-1 )
+ atk2 = atk2*(100+2*sc_data[SC_PROVOKE].val1)/100;
+ if( sc_data[SC_CURSE].timer!=-1 )
+ atk2 -= atk2*25/100;
+ if(sc_data[SC_DRUMBATTLE].timer!=-1)
+ atk2 += sc_data[SC_DRUMBATTLE].val2;
+ if(sc_data[SC_NIBELUNGEN].timer!=-1 && (status_get_element(bl)/10) >= 8 )
+ atk2 += sc_data[SC_NIBELUNGEN].val3;
+ if(sc_data[SC_STRIPWEAPON].timer!=-1)
+ atk2 = atk2*sc_data[SC_STRIPWEAPON].val2/100;
+ if(sc_data[SC_CONCENTRATION].timer!=-1) //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“
+ atk2 += atk2*(5*sc_data[SC_CONCENTRATION].val1)/100;
+ if(sc_data[SC_EXPLOSIONSPIRITS].timer!=-1)
+ atk2 += (1000*sc_data[SC_EXPLOSIONSPIRITS].val1);
+ }
+ if(atk2 < 0) atk2 = 0;
+ return atk2;
+ }
+ return 0;
+}
+/*==========================================
+ * ‘Îۂ̶ŽèAtk2‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_atk_2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data*)bl)->watk_2;
+ else
+ return 0;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMAtk1‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_matk1(struct block_list *bl)
+{
+ int matk = 0;
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->matk1;
+ else {
+ struct status_change *sc_data;
+ int int_ = status_get_int(bl);
+ matk = int_+(int_/5)*(int_/5);
+
+ sc_data = status_get_sc_data(bl);
+ if(sc_data) {
+ if(sc_data[SC_MINDBREAKER].timer!=-1)
+ matk = matk*(100+2*sc_data[SC_MINDBREAKER].val1)/100;
+ }
+ }
+ return matk;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMAtk2‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_matk2(struct block_list *bl)
+{
+ int matk = 0;
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->matk2;
+ else {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ int int_ = status_get_int(bl);
+ matk = int_+(int_/7)*(int_/7);
+
+ if(sc_data) {
+ if(sc_data[SC_MINDBREAKER].timer!=-1)
+ matk = matk*(100+2*sc_data[SC_MINDBREAKER].val1)/100;
+ }
+ }
+ return matk;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌDef‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_def(struct block_list *bl)
+{
+ struct status_change *sc_data;
+ int def=0,skilltimer=-1,skillid=0;
+
+ nullpo_retr(0, bl);
+ sc_data=status_get_sc_data(bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl){
+ def = ((struct map_session_data *)bl)->def;
+ skilltimer = ((struct map_session_data *)bl)->skilltimer;
+ skillid = ((struct map_session_data *)bl)->skillid;
+ }
+ else if(bl->type==BL_MOB && (struct mob_data *)bl) {
+ def = mob_db[((struct mob_data *)bl)->class_].def;
+ skilltimer = ((struct mob_data *)bl)->skilltimer;
+ skillid = ((struct mob_data *)bl)->skillid;
+ }
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ def = mob_db[((struct pet_data *)bl)->class_].def;
+
+ if(def < 1000000) {
+ if(sc_data) {
+ //“€Œ‹AΉ»Žž‚͉EƒVƒtƒg
+ if(sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0))
+ def >>= 1;
+
+ if (bl->type != BL_PC) {
+ //ƒL[ƒsƒ“ƒOŽž‚ÍDEF100
+ if( sc_data[SC_KEEPING].timer!=-1)
+ def = 100;
+ //ƒvƒƒ{ƒbƒNŽž‚ÍŒ¸ŽZ
+ if( sc_data[SC_PROVOKE].timer!=-1)
+ def = (def*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100;
+ //푾ŒÛ‚Ì‹¿‚«Žž‚͉ÁŽZ
+ if( sc_data[SC_DRUMBATTLE].timer!=-1)
+ def += sc_data[SC_DRUMBATTLE].val3;
+ //“Å‚É‚©‚©‚Á‚Ä‚¢‚鎞‚ÍŒ¸ŽZ
+ if(sc_data[SC_POISON].timer!=-1)
+ def = def*75/100;
+ //ƒXƒgƒŠƒbƒvƒV[ƒ‹ƒhŽž‚ÍŒ¸ŽZ
+ if(sc_data[SC_STRIPSHIELD].timer!=-1)
+ def = def*sc_data[SC_STRIPSHIELD].val2/100;
+ //ƒVƒOƒiƒ€ƒNƒ‹ƒVƒXŽž‚ÍŒ¸ŽZ
+ if(sc_data[SC_SIGNUMCRUCIS].timer!=-1)
+ def = def * (100 - sc_data[SC_SIGNUMCRUCIS].val2)/100;
+ //‰i‰“‚̬“׎ž‚ÍDEF0‚É‚È‚é
+ if(sc_data[SC_ETERNALCHAOS].timer!=-1)
+ def = 0;
+ //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“Žž‚ÍŒ¸ŽZ
+ if( sc_data[SC_CONCENTRATION].timer!=-1)
+ def = (def*(100 - 5*sc_data[SC_CONCENTRATION].val1))/100;
+
+ if(sc_data[SC_GOSPEL].timer!=-1) {
+ if (sc_data[SC_GOSPEL].val4 == BCT_PARTY &&
+ sc_data[SC_GOSPEL].val3 == 11)
+ def += def*25/100;
+ else if (sc_data[SC_GOSPEL].val4 == BCT_ENEMY &&
+ sc_data[SC_GOSPEL].val3 == 5)
+ def = 0;
+ }
+ if(sc_data[SC_JOINTBEAT].timer!=-1) {
+ if (sc_data[SC_JOINTBEAT].val2 == 4)
+ def -= def*50/100;
+ else if (sc_data[SC_JOINTBEAT].val2 == 5)
+ def -= def*25/100;
+ }
+ }
+ }
+ //‰r¥’†‚͉r¥ŽžŒ¸ŽZ—¦‚ÉŠî‚¢‚ÄŒ¸ŽZ
+ if(skilltimer != -1) {
+ int def_rate = skill_get_castdef(skillid);
+ if(def_rate != 0)
+ def = (def * (100 - def_rate))/100;
+ }
+ }
+ if(def < 0) def = 0;
+ return def;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMDef‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_mdef(struct block_list *bl)
+{
+ struct status_change *sc_data;
+ int mdef=0;
+
+ nullpo_retr(0, bl);
+ sc_data=status_get_sc_data(bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ mdef = ((struct map_session_data *)bl)->mdef;
+ else if(bl->type==BL_MOB && (struct mob_data *)bl)
+ mdef = mob_db[((struct mob_data *)bl)->class_].mdef;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ mdef = mob_db[((struct pet_data *)bl)->class_].mdef;
+
+ if(mdef < 1000000) {
+ if(sc_data) {
+ //ƒoƒŠƒA[ó‘ÔŽž‚ÍMDEF100
+ if(sc_data[SC_BARRIER].timer != -1)
+ mdef = 100;
+ //“€Œ‹AΉ»Žž‚Í1.25”{
+ if(sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0))
+ mdef = mdef*125/100;
+ if( sc_data[SC_MINDBREAKER].timer!=-1 && bl->type != BL_PC)
+ mdef -= (mdef*6*sc_data[SC_MINDBREAKER].val1)/100;
+ }
+ }
+ if(mdef < 0) mdef = 0;
+ return mdef;
+}
+/*==========================================
+ * ‘ÎÛ‚Ì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 {
+ struct status_change *sc_data;
+
+ if(bl->type==BL_MOB)
+ def2 = mob_db[((struct mob_data *)bl)->class_].vit;
+ else if(bl->type==BL_PET)
+ def2 = mob_db[((struct pet_data *)bl)->class_].vit;
+
+ sc_data = status_get_sc_data(bl);
+ if(sc_data) {
+ if(sc_data[SC_ANGELUS].timer != -1)
+ def2 = def2*(110+5*sc_data[SC_ANGELUS].val1)/100;
+ if(sc_data[SC_PROVOKE].timer!=-1)
+ def2 = (def2*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100;
+ if(sc_data[SC_POISON].timer!=-1)
+ def2 = def2*75/100;
+ //ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“Žž‚ÍŒ¸ŽZ
+ if( sc_data[SC_CONCENTRATION].timer!=-1)
+ def2 = def2*(100 - 5*sc_data[SC_CONCENTRATION].val1)/100;
+
+ if(sc_data[SC_GOSPEL].timer!=-1) {
+ if (sc_data[SC_GOSPEL].val4 == BCT_PARTY &&
+ sc_data[SC_GOSPEL].val3 == 11)
+ def2 += def2*25/100;
+ else if (sc_data[SC_GOSPEL].val4 == BCT_ENEMY &&
+ sc_data[SC_GOSPEL].val3 == 5)
+ def2 = 0;
+ }
+ }
+ }
+ if(def2 < 1) def2 = 1;
+ return def2;
+}
+/*==========================================
+ * ‘ÎÛ‚Ì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 {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if(bl->type == BL_MOB)
+ mdef2 = mob_db[((struct mob_data *)bl)->class_].int_ + (mob_db[((struct mob_data *)bl)->class_].vit>>1);
+ else if(bl->type == BL_PET)
+ mdef2 = mob_db[((struct pet_data *)bl)->class_].int_ + (mob_db[((struct pet_data *)bl)->class_].vit>>1);
+ if(sc_data) {
+ if(sc_data[SC_MINDBREAKER].timer!=-1)
+ mdef2 -= (mdef2*6*sc_data[SC_MINDBREAKER].val1)/100;
+ }
+ }
+ if(mdef2 < 0) mdef2 = 0;
+ return mdef2;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌSpeed(ˆÚ“®‘¬“x)‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ * Speed‚ͬ‚³‚¢‚Ù‚¤‚ªˆÚ“®‘¬“x‚ª‘¬‚¢
+ *------------------------------------------
+ */
+int status_get_speed(struct block_list *bl)
+{
+ nullpo_retr(1000, bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->speed;
+ else {
+ struct status_change *sc_data=status_get_sc_data(bl);
+ int speed = 1000;
+ if(bl->type==BL_MOB && (struct mob_data *)bl) {
+ speed = ((struct mob_data *)bl)->speed;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ speed-=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class_].lv;
+ }
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ speed = ((struct pet_data *)bl)->msd->petDB->speed;
+
+ if(sc_data) {
+ //‘¬“x‘‰ÁŽž‚Í25%Œ¸ŽZ
+ if(sc_data[SC_INCREASEAGI].timer!=-1)
+ speed -= speed*25/100;
+ //ƒEƒBƒ“ƒhƒEƒH[ƒNŽž‚ÍLv*2%Œ¸ŽZ
+ else if(sc_data[SC_WINDWALK].timer!=-1)
+ speed -= (speed*(sc_data[SC_WINDWALK].val1*2))/100;
+ //‘¬“xŒ¸­Žž‚Í25%‰ÁŽZ
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ speed = speed*125/100;
+ //ƒNƒ@ƒOƒ}ƒCƒAŽž‚Í50%‰ÁŽZ
+ if(sc_data[SC_QUAGMIRE].timer!=-1)
+ speed = speed*3/2;
+ //Ž„‚ð–Y‚ê‚È‚¢‚ÅcŽž‚͉ÁŽZ
+ if(sc_data[SC_DONTFORGETME].timer!=-1)
+ speed = speed*(100+sc_data[SC_DONTFORGETME].val1*2 + sc_data[SC_DONTFORGETME].val2 + (sc_data[SC_DONTFORGETME].val3&0xffff))/100;
+ //‹à„Žž‚Í25%‰ÁŽZ
+ if(sc_data[SC_STEELBODY].timer!=-1)
+ speed = speed*125/100;
+ //ƒfƒBƒtƒFƒ“ƒ_[Žž‚͉ÁŽZ
+ if(sc_data[SC_DEFENDER].timer!=-1)
+ speed = (speed * (155 - sc_data[SC_DEFENDER].val1*5)) / 100;
+ //—x‚èó‘Ô‚Í4”{’x‚¢
+ if(sc_data[SC_DANCING].timer!=-1 )
+ speed *= 6;
+ //Žô‚¢Žž‚Í450‰ÁŽZ
+ if(sc_data[SC_CURSE].timer!=-1)
+ speed = speed + 450;
+ if(sc_data[SC_SLOWDOWN].timer!=-1)
+ speed = speed*150/100;
+ if(sc_data[SC_SPEEDUP0].timer!=-1)
+ speed -= speed*25/100;
+ if(sc_data[SC_GOSPEL].timer!=-1 &&
+ sc_data[SC_GOSPEL].val4 == BCT_ENEMY &&
+ sc_data[SC_GOSPEL].val3 == 8)
+ speed = speed*125/100;
+ if(sc_data[SC_JOINTBEAT].timer!=-1) {
+ if (sc_data[SC_JOINTBEAT].val2 == 1)
+ speed = speed*150/100;
+ else if (sc_data[SC_JOINTBEAT].val2 == 3)
+ speed = speed*130/100;
+ }
+ }
+ if(speed < 1) speed = 1;
+ return speed;
+ }
+
+ return 1000;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌaDelay(UŒ‚ŽžƒfƒBƒŒƒC)‚ð•Ô‚·(”Ä—p)
+ * aDelay‚ͬ‚³‚¢‚Ù‚¤‚ªUŒ‚‘¬“x‚ª‘¬‚¢
+ *------------------------------------------
+ */
+int status_get_adelay(struct block_list *bl)
+{
+ nullpo_retr(4000, bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return (((struct map_session_data *)bl)->aspd<<1);
+ else {
+ struct status_change *sc_data=status_get_sc_data(bl);
+ int adelay=4000,aspd_rate = 100,i;
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ adelay = mob_db[((struct mob_data *)bl)->class_].adelay;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ adelay = mob_db[((struct pet_data *)bl)->class_].adelay;
+
+ if(sc_data) {
+ //ƒc[ƒnƒ“ƒhƒNƒCƒbƒPƒ“Žg—pŽž‚ŃNƒ@ƒOƒ}ƒCƒA‚Å‚àŽ„‚ð–Y‚ê‚È‚¢‚Åc‚Å‚à‚È‚¢Žž‚Í3Š„Œ¸ŽZ
+ if(sc_data[SC_TWOHANDQUICKEN].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // 2HQ
+ aspd_rate -= 30;
+ //ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…Žg—pŽž‚Ńc[ƒnƒ“ƒhƒNƒCƒbƒPƒ“‚Å‚àƒNƒ@ƒOƒ}ƒCƒA‚Å‚àŽ„‚ð–Y‚ê‚È‚¢‚Åc‚Å‚à‚È‚¢Žž‚Í
+ if(sc_data[SC_ADRENALINE].timer != -1 && sc_data[SC_TWOHANDQUICKEN].timer == -1 &&
+ sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) { // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…
+ //Žg—pŽÒ‚ƃp[ƒeƒBƒƒ“ƒo[‚ÅŠi·‚ªo‚éÝ’è‚Å‚È‚¯‚ê‚Î3Š„Œ¸ŽZ
+ if(sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penalty)
+ aspd_rate -= 30;
+ //‚»‚¤‚Å‚È‚¯‚ê‚Î2.5Š„Œ¸ŽZ
+ else
+ aspd_rate -= 25;
+ }
+ //ƒXƒsƒAƒNƒBƒbƒPƒ“Žž‚ÍŒ¸ŽZ
+ if(sc_data[SC_SPEARSQUICKEN].timer != -1 && sc_data[SC_ADRENALINE].timer == -1 &&
+ sc_data[SC_TWOHANDQUICKEN].timer == -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // ƒXƒsƒAƒNƒBƒbƒPƒ“
+ aspd_rate -= sc_data[SC_SPEARSQUICKEN].val2;
+ //—[“ú‚̃AƒTƒVƒ“ƒNƒƒXŽž‚ÍŒ¸ŽZ
+ if(sc_data[SC_ASSNCROS].timer!=-1 && // —[—z‚̃AƒTƒVƒ“ƒNƒƒX
+ sc_data[SC_TWOHANDQUICKEN].timer==-1 && sc_data[SC_ADRENALINE].timer==-1 && sc_data[SC_SPEARSQUICKEN].timer==-1 &&
+ sc_data[SC_DONTFORGETME].timer == -1)
+ aspd_rate -= 5+sc_data[SC_ASSNCROS].val1+sc_data[SC_ASSNCROS].val2+sc_data[SC_ASSNCROS].val3;
+ //Ž„‚ð–Y‚ê‚È‚¢‚ÅcŽž‚͉ÁŽZ
+ if(sc_data[SC_DONTFORGETME].timer!=-1) // Ž„‚ð–Y‚ê‚È‚¢‚Å
+ aspd_rate += sc_data[SC_DONTFORGETME].val1*3 + sc_data[SC_DONTFORGETME].val2 + (sc_data[SC_DONTFORGETME].val3>>16);
+ //‹à„Žž25%‰ÁŽZ
+ if(sc_data[SC_STEELBODY].timer!=-1) // ‹à„
+ aspd_rate += 25;
+ //‘‘¬ƒ|[ƒVƒ‡ƒ“Žg—pŽž‚ÍŒ¸ŽZ
+ if( sc_data[i=SC_SPEEDPOTION3].timer!=-1 || sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1)
+ aspd_rate -= sc_data[i].val2;
+ //ƒfƒBƒtƒFƒ“ƒ_[Žž‚͉ÁŽZ
+ if(sc_data[SC_DEFENDER].timer != -1)
+ aspd_rate += (25 - sc_data[SC_DEFENDER].val1*5);
+ //adelay += (1100 - sc_data[SC_DEFENDER].val1*100);
+ if(sc_data[SC_GOSPEL].timer!=-1 &&
+ sc_data[SC_GOSPEL].val4 == BCT_ENEMY &&
+ sc_data[SC_GOSPEL].val3 == 8)
+ aspd_rate = aspd_rate*125/100;
+ if(sc_data[SC_JOINTBEAT].timer!=-1) {
+ if (sc_data[SC_JOINTBEAT].val2 == 2)
+ aspd_rate = aspd_rate*125/100;
+ else if (sc_data[SC_JOINTBEAT].val2 == 3)
+ aspd_rate = aspd_rate*110/100;
+ }
+ }
+ 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;
+ }
+ return 4000;
+}
+int status_get_amotion(struct block_list *bl)
+{
+ nullpo_retr(2000, bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->amotion;
+ else {
+ struct status_change *sc_data=status_get_sc_data(bl);
+ int amotion=2000,aspd_rate = 100,i;
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ amotion = mob_db[((struct mob_data *)bl)->class_].amotion;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ amotion = mob_db[((struct pet_data *)bl)->class_].amotion;
+
+ if(sc_data) {
+ if(sc_data[SC_TWOHANDQUICKEN].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // 2HQ
+ aspd_rate -= 30;
+ if(sc_data[SC_ADRENALINE].timer != -1 && sc_data[SC_TWOHANDQUICKEN].timer == -1 &&
+ sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) { // ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…
+ if(sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penalty)
+ aspd_rate -= 30;
+ else
+ aspd_rate -= 25;
+ }
+ if(sc_data[SC_SPEARSQUICKEN].timer != -1 && sc_data[SC_ADRENALINE].timer == -1 &&
+ sc_data[SC_TWOHANDQUICKEN].timer == -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // ƒXƒsƒAƒNƒBƒbƒPƒ“
+ aspd_rate -= sc_data[SC_SPEARSQUICKEN].val2;
+ if(sc_data[SC_ASSNCROS].timer!=-1 && // —[—z‚̃AƒTƒVƒ“ƒNƒƒX
+ sc_data[SC_TWOHANDQUICKEN].timer==-1 && sc_data[SC_ADRENALINE].timer==-1 && sc_data[SC_SPEARSQUICKEN].timer==-1 &&
+ sc_data[SC_DONTFORGETME].timer == -1)
+ aspd_rate -= 5+sc_data[SC_ASSNCROS].val1+sc_data[SC_ASSNCROS].val2+sc_data[SC_ASSNCROS].val3;
+ if(sc_data[SC_DONTFORGETME].timer!=-1) // Ž„‚ð–Y‚ê‚È‚¢‚Å
+ aspd_rate += sc_data[SC_DONTFORGETME].val1*3 + sc_data[SC_DONTFORGETME].val2 + (sc_data[SC_DONTFORGETME].val3>>16);
+ if(sc_data[SC_STEELBODY].timer!=-1) // ‹à„
+ aspd_rate += 25;
+ if( sc_data[i=SC_SPEEDPOTION3].timer!=-1 || sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1)
+ aspd_rate -= sc_data[i].val2;
+ if(sc_data[SC_DEFENDER].timer != -1)
+ aspd_rate += (25 - sc_data[SC_DEFENDER].val1*5);
+ //amotion += (550 - sc_data[SC_DEFENDER].val1*50);
+ }
+ 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 && (struct mob_data *)bl){
+ ret=mob_db[((struct mob_data *)bl)->class_].dmotion;
+ if(battle_config.monster_damage_delay_rate != 100)
+ ret = ret*battle_config.monster_damage_delay_rate/400;
+ }
+ else if(bl->type==BL_PC && (struct map_session_data *)bl){
+ ret=((struct map_session_data *)bl)->dmotion;
+ if(battle_config.pc_damage_delay_rate != 100)
+ ret = ret*battle_config.pc_damage_delay_rate/400;
+ }
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ ret=mob_db[((struct pet_data *)bl)->class_].dmotion;
+ else
+ return 2000;
+
+ if((sc_data && (sc_data[SC_ENDURE].timer!=-1 || sc_data[SC_BERSERK].timer!=-1)) ||
+ (bl->type == BL_PC && ((struct map_session_data *)bl)->special_state.infinite_endure))
+ ret=0;
+
+ return ret;
+}
+int status_get_element(struct block_list *bl)
+{
+ int ret = 20;
+ struct status_change *sc_data;
+
+ nullpo_retr(ret, bl);
+ sc_data = status_get_sc_data(bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl) // 10‚̈ÊLv*2A‚P‚̈ʑ®«
+ ret=((struct mob_data *)bl)->def_ele;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ ret=20+((struct map_session_data *)bl)->def_ele; // –hŒä‘®«Lv1
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ ret = mob_db[((struct pet_data *)bl)->class_].element;
+
+ if(sc_data) {
+ if( sc_data[SC_BENEDICTIO].timer!=-1 ) // ¹‘Ì~•Ÿ
+ ret=26;
+ if( sc_data[SC_FREEZE].timer!=-1 ) // “€Œ‹
+ ret=21;
+ if( sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
+ ret=22;
+ }
+
+ return ret;
+}
+
+int status_get_attack_element(struct block_list *bl)
+{
+ int ret = 0;
+ struct status_change *sc_data=status_get_sc_data(bl);
+
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ ret=0;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ ret=((struct map_session_data *)bl)->atk_ele;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ ret=0;
+
+ if(sc_data) {
+ if( sc_data[SC_FROSTWEAPON].timer!=-1) // ƒtƒƒXƒgƒEƒFƒ|ƒ“
+ ret=1;
+ if( sc_data[SC_SEISMICWEAPON].timer!=-1) // ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“
+ ret=2;
+ if( sc_data[SC_FLAMELAUNCHER].timer!=-1) // ƒtƒŒ[ƒ€ƒ‰ƒ“ƒ`ƒƒ[
+ ret=3;
+ if( sc_data[SC_LIGHTNINGLOADER].timer!=-1) // ƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[
+ ret=4;
+ if( sc_data[SC_ENCPOISON].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“
+ ret=5;
+ if( sc_data[SC_ASPERSIO].timer!=-1) // ƒAƒXƒyƒ‹ƒVƒI
+ ret=6;
+ }
+
+ return ret;
+}
+int status_get_attack_element2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl) {
+ int ret = ((struct map_session_data *)bl)->atk_ele_;
+ struct status_change *sc_data = ((struct map_session_data *)bl)->sc_data;
+
+ if(sc_data) {
+ if( sc_data[SC_FROSTWEAPON].timer!=-1) // ƒtƒƒXƒgƒEƒFƒ|ƒ“
+ ret=1;
+ if( sc_data[SC_SEISMICWEAPON].timer!=-1) // ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“
+ ret=2;
+ if( sc_data[SC_FLAMELAUNCHER].timer!=-1) // ƒtƒŒ[ƒ€ƒ‰ƒ“ƒ`ƒƒ[
+ ret=3;
+ if( sc_data[SC_LIGHTNINGLOADER].timer!=-1) // ƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[
+ ret=4;
+ if( sc_data[SC_ENCPOISON].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“
+ ret=5;
+ if( sc_data[SC_ASPERSIO].timer!=-1) // ƒAƒXƒyƒ‹ƒVƒI
+ ret=6;
+ }
+ return ret;
+ }
+ return 0;
+}
+int status_get_party_id(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->status.party_id;
+ else if(bl->type==BL_MOB && (struct mob_data *)bl){
+ struct mob_data *md=(struct mob_data *)bl;
+ if( md->master_id>0 )
+ return -md->master_id;
+ return -md->bl.id;
+ }
+ else if(bl->type==BL_SKILL && (struct skill_unit *)bl)
+ return ((struct skill_unit *)bl)->group->party_id;
+ else
+ return 0;
+}
+int status_get_guild_id(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->status.guild_id;
+ else if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return ((struct mob_data *)bl)->class_;
+ else if(bl->type==BL_SKILL && (struct skill_unit *)bl)
+ return ((struct skill_unit *)bl)->group->guild_id;
+ else
+ return 0;
+}
+int status_get_race(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return mob_db[((struct mob_data *)bl)->class_].race;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return 7;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return mob_db[((struct pet_data *)bl)->class_].race;
+ else
+ return 0;
+}
+int status_get_size(struct block_list *bl)
+{
+ nullpo_retr(1, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return mob_db[((struct mob_data *)bl)->class_].size;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return mob_db[((struct pet_data *)bl)->class_].size;
+ else if(bl->type==BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ //if (pc_isriding(sd)) // fact or rumour?
+ // return 2;
+ if (pc_calc_upper(sd->status.class_) == 2)
+ return 0;
+ return 1;
+ } else
+ return 1;
+}
+int status_get_mode(struct block_list *bl)
+{
+ nullpo_retr(0x01, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return mob_db[((struct mob_data *)bl)->class_].mode;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return mob_db[((struct pet_data *)bl)->class_].mode;
+ else
+ return 0x01; // ‚Æ‚è‚ ‚¦‚¸“®‚­‚Æ‚¢‚¤‚±‚Æ‚Å1
+}
+
+int status_get_mexp(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return mob_db[((struct mob_data *)bl)->class_].mexp;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return mob_db[((struct pet_data *)bl)->class_].mexp;
+ else
+ return 0;
+}
+int status_get_race2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type == BL_MOB && (struct mob_data *)bl)
+ return mob_db[((struct mob_data *)bl)->class_].race2;
+ else if(bl->type==BL_PET && (struct pet_data *)bl)
+ return mob_db[((struct pet_data *)bl)->class_].race2;
+ else
+ return 0;
+}
+int status_isdead(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type == BL_MOB && (struct mob_data *)bl)
+ return ((struct mob_data *)bl)->state.state == MS_DEAD;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return pc_isdead((struct map_session_data *)bl);
+ else
+ return 0;
+}
+
+// StatusChangeŒn‚ÌŠ“¾
+struct status_change *status_get_sc_data(struct block_list *bl)
+{
+ nullpo_retr(NULL, bl);
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return ((struct mob_data*)bl)->sc_data;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ 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 && (struct mob_data *)bl)
+ return &((struct mob_data*)bl)->sc_count;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ 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 && (struct mob_data *)bl)
+ return &((struct mob_data*)bl)->opt1;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return &((struct map_session_data*)bl)->opt1;
+ else if(bl->type==BL_NPC && (struct npc_data *)bl)
+ 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 && (struct mob_data *)bl)
+ return &((struct mob_data*)bl)->opt2;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return &((struct map_session_data*)bl)->opt2;
+ else if(bl->type==BL_NPC && (struct npc_data *)bl)
+ 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 && (struct mob_data *)bl)
+ return &((struct mob_data*)bl)->opt3;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return &((struct map_session_data*)bl)->opt3;
+ else if(bl->type==BL_NPC && (struct npc_data *)bl)
+ 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 && (struct mob_data *)bl)
+ return &((struct mob_data*)bl)->option;
+ else if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return &((struct map_session_data*)bl)->status.option;
+ else if(bl->type==BL_NPC && (struct npc_data *)bl)
+ 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:
+ case SC_BLIND:
+ sc_def = 100 - (3 + status_get_int(bl) + status_get_luk(bl)/3);
+ break;
+ case SC_CURSE:
+ sc_def = 100 - (3 + status_get_luk(bl));
+ break;
+
+ default:
+ sc_def = 100;
+ break;
+ }
+
+ if(bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
+ if (md && md->class_ == 1288)
+ 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 && sc_data[SC_GOSPEL].timer != -1 &&
+ sc_data[SC_GOSPEL].val4 == BCT_PARTY &&
+ sc_data[SC_GOSPEL].val3 == 3)
+ sc_def -= 25;
+ }
+
+ return (sc_def < 0) ? 0 : sc_def;
+}
+
+/*==========================================
+ * ƒXƒe[ƒ^ƒXˆÙíŠJŽn
+ *------------------------------------------
+ */
+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;
+ int type2 = type;
+
+ nullpo_retr(0, bl);
+ if(bl->type == BL_SKILL)
+ return 0;
+ if(bl->type == BL_MOB)
+ if (status_isdead(bl)) return 0;
+
+ 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));
+
+
+ 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;
+
+ 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;
+
+// case SC_CONFUSION:
+ default:
+ scdef=0;
+ }
+ if(scdef>=100)
+ return 0;
+ if(bl->type==BL_PC){
+ sd=(struct map_session_data *)bl;
+ if( sd && type == SC_ADRENALINE && !(skill_get_weapontype(BS_ADRENALINE)&(1<<sd->status.weapon)))
+ return 0;
+
+ if(SC_STONE<=type && type<=SC_BLIND){ /* ƒJ?ƒh‚É‚æ‚é‘Ï« */
+ if( sd && sd->reseff[type-SC_STONE] > 0 && rand()%10000<sd->reseff[type-SC_STONE]){
+ if(battle_config.battle_log)
+ printf("PC %d skill_sc_start: card‚É‚æ‚éˆÙí‘Ï«?“®\n",sd->bl.id);
+ return 0;
+ }
+ }
+ }
+ else if(bl->type == BL_MOB) {
+ }
+ else {
+ if(battle_config.error_log)
+ printf("status_change_start: neither MOB nor PC !\n");
+ return 0;
+ }
+
+ if(type==SC_FREEZE && undead_flag && !(flag&1))
+ 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_WEAPONPERFECTION || type == SC_OVERTHRUST) &&
+ sc_data[type].timer != -1 && sc_data[type].val2 && !val2)
+ return 0;
+
+ if(mode & 0x20 && (type==SC_STONE || type==SC_FREEZE ||
+ type==SC_STAN || type==SC_SLEEP || type==SC_SILENCE || type==SC_QUAGMIRE || type == SC_DECREASEAGI || type == SC_SIGNUMCRUCIS || type == SC_PROVOKE ||
+ (type == SC_BLESSING && (undead_flag || race == 6))) && !(flag&1)){
+ /* ƒ{ƒX‚É‚Í?‚©‚È‚¢(‚½‚¾‚µƒJ?ƒh‚É‚æ‚é?‰Ê‚Í“K—p‚³‚ê‚é) */
+ return 0;
+ }
+ if(type==SC_FREEZE || type==SC_STAN || type==SC_SLEEP)
+ battle_stopwalking(bl,1);
+
+ if(sc_data[type].timer != -1){ /* ‚·‚Å‚É“¯‚¶ˆÙí‚É‚È‚Á‚Ä‚¢‚éꇃ^ƒCƒ}‰ðœ */
+ if(sc_data[type].val1 > val1 && type != SC_COMBO && type != SC_DANCING && type != SC_DEVOTION &&
+ type != SC_SPEEDPOTION0 && type != SC_SPEEDPOTION1 && type != SC_SPEEDPOTION2 && type != SC_SPEEDPOTION3
+ && type != SC_ATKPOT && type != SC_MATKPOT) // added atk and matk potions [Valaris]
+ return 0;
+
+ if ((type >=SC_STAN && type <= SC_BLIND) || type == SC_DPOISON)
+ return 0;/* ?‚¬‘«‚µ‚ª‚Å‚«‚È‚¢?‘ÔˆÙí‚Å‚ ‚鎞‚Í?‘ÔˆÙí‚ðs‚í‚È‚¢ */
+
+ (*sc_count)--;
+ delete_timer(sc_data[type].timer, status_change_timer);
+ sc_data[type].timer = -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_LOUD || type==SC_TRUESIGHT ||
+ type==SC_WINDWALK || type==SC_CARTBOOST || type==SC_ASSNCROS))
+ 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
+#ifdef TWILIGHT
+ val2 = 40; // [Celest]
+#else
+ val2 = 7; // [Celest]
+#endif
+ break;
+ case SC_AUTOBERSERK:
+ {
+ 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_CONCENTRATE: /* W’†—ÍŒüã */
+ case SC_BLESSING: /* ƒuƒŒƒbƒVƒ“ƒO */
+ case SC_ANGELUS: /* ƒAƒ“ƒ[ƒ‹ƒX */
+ calc_flag = 1;
+ break;
+
+ case SC_INCREASEAGI: /* ‘¬“x㸠*/
+ calc_flag = 1;
+ if(sc_data[SC_DECREASEAGI].timer!=-1 )
+ status_change_end(bl,SC_DECREASEAGI,-1);
+ // the effect will still remain [celest]
+// if(sc_data[SC_WINDWALK].timer!=-1 ) /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
+// status_change_end(bl,SC_WINDWALK,-1);
+ break;
+ case SC_DECREASEAGI: /* ‘¬“xŒ¸­ */
+ if (bl->type == BL_PC) // 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_SPEARSQUICKEN].timer!=-1 )
+ status_change_end(bl,SC_SPEARSQUICKEN,-1);
+ if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
+ status_change_end(bl,SC_TWOHANDQUICKEN,-1);
+ break;
+ case SC_SIGNUMCRUCIS: /* ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX */
+ calc_flag = 1;
+// val2 = 14 + val1;
+ val2 = 10 + val1*2;
+ tick = 600*1000;
+ clif_emotion(bl,4);
+ break;
+ case SC_SLOWPOISON:
+ if (sc_data[SC_POISON].timer == -1 && sc_data[SC_DPOISON].timer == -1)
+ return 0;
+ break;
+ case SC_TWOHANDQUICKEN: /* 2HQ */
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ return 0;
+ *opt3 |= 1;
+ calc_flag = 1;
+ break;
+ case SC_ADRENALINE: /* ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ… */
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ return 0;
+ if(bl->type == BL_PC)
+ 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)
+ if(pc_checkskill(sd,BS_HILTBINDING)>0)
+ tick += tick / 10;
+ break;
+ case SC_OVERTHRUST: /* ƒI?ƒo?ƒXƒ‰ƒXƒg */
+ if(bl->type == BL_PC)
+ if(pc_checkskill(sd,BS_HILTBINDING)>0)
+ tick += tick / 10;
+ *opt3 |= 2;
+ break;
+ case SC_MAXIMIZEPOWER: /* ƒ}ƒLƒVƒ}ƒCƒYƒpƒ?(SP‚ª1Œ¸‚鎞ŠÔ,val2‚É‚à) */
+ if(bl->type == BL_PC)
+ val2 = tick;
+ else
+ tick = 5000*val1;
+ 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 */
+ val2=val1/2 + val1%2; // [Celest]
+ break;
+ case SC_IMPOSITIO: /* ƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒX */
+ calc_flag = 1;
+ break;
+ case SC_ASPERSIO: /* ƒAƒXƒyƒ‹ƒVƒI */
+ skill_enchant_elemental_end(bl,SC_ASPERSIO);
+ break;
+ case SC_SUFFRAGIUM: /* ƒTƒtƒ‰ƒMƒ€ */
+ case SC_BENEDICTIO: /* ¹? */
+ case SC_MAGNIFICAT: /* ƒ}ƒOƒjƒtƒBƒJ?ƒg */
+ case SC_AETERNA: /* ƒG?ƒeƒ‹ƒi */
+ 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ƒ\ƒ“ */
+ 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_GLORIA: /* ƒOƒƒŠƒA */
+ calc_flag = 1;
+ break;
+ case SC_LOUD: /* ƒ‰ƒEƒhƒ{ƒCƒX */
+ calc_flag = 1;
+ break;
+ case SC_TRICKDEAD: /* Ž€‚ñ‚¾‚Ó‚è */
+ if (bl->type == BL_PC) {
+ pc_stopattack((struct map_session_data *)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_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_LOUD].timer!=-1 )
+ status_change_end(bl,SC_LOUD,-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:
+ val2 = 5;
+ break;
+ case SC_FLAMELAUNCHER: /* ƒtƒŒ?ƒ€ƒ‰ƒ“ƒ`ƒƒ? */
+ skill_enchant_elemental_end(bl,SC_FLAMELAUNCHER);
+ break;
+ case SC_FROSTWEAPON: /* ƒtƒƒXƒgƒEƒFƒ|ƒ“ */
+ skill_enchant_elemental_end(bl,SC_FROSTWEAPON);
+ break;
+ case SC_LIGHTNINGLOADER: /* ƒ‰ƒCƒgƒjƒ“ƒOƒ?ƒ_? */
+ skill_enchant_elemental_end(bl,SC_LIGHTNINGLOADER);
+ break;
+ case SC_SEISMICWEAPON: /* ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“ */
+ skill_enchant_elemental_end(bl,SC_SEISMICWEAPON);
+ break;
+ case SC_DEVOTION: /* ƒfƒBƒ{?ƒVƒ‡ƒ“ */
+ calc_flag = 1;
+ 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_STRIPARMOR:
+ case SC_STRIPHELM:
+ case SC_CP_WEAPON:
+ case SC_CP_SHIELD:
+ case SC_CP_ARMOR:
+ case SC_CP_HELM:
+ break;
+
+ case SC_AUTOSPELL: /* ƒI?ƒgƒXƒyƒ‹ */
+ val4 = 5 + val1*2;
+ break;
+
+ case SC_VOLCANO:
+ calc_flag = 1;
+ val3 = val1*10;
+ //val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
+ break;
+ case SC_DELUGE:
+ calc_flag = 1;
+ //val3 = val1>=5?15: (val1==4?14: (val1==3?12: ( val1==2?9:5 ) ) );
+ //val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
+ 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;
+ //val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
+ break;
+
+ case SC_SPEARSQUICKEN: /* ƒXƒsƒAƒNƒCƒbƒPƒ“ */
+ calc_flag = 1;
+ val2 = 20+val1;
+ *opt3 |= 1;
+ break;
+ case SC_COMBO:
+ break;
+ case SC_BLADESTOP_WAIT: /* ”’nŽæ‚è(‘Ò‚¿) */
+ 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 */
+ val2 = 11;
+ break;
+ case SC_RICHMANKIM:
+ break;
+ case SC_ETERNALCHAOS: /* ƒGƒ^?ƒiƒ‹ƒJƒIƒX */
+ calc_flag = 1;
+ break;
+ case SC_DRUMBATTLE: /* ?‘¾ŒÛ‚Ì‹¿‚« */
+ calc_flag = 1;
+ val2 = (val1+1)*25;
+ val3 = (val1+1)*2;
+ break;
+ case SC_NIBELUNGEN: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
+ calc_flag = 1;
+ //val2 = (val1+2)*50;
+ val3 = (val1+2)*25;
+ break;
+ case SC_ROKISWEIL: /* ƒƒL‚Ì‹©‚Ñ */
+ break;
+ case SC_INTOABYSS: /* [•£‚Ì’†‚É */
+ break;
+ case SC_SIEGFRIED: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
+ calc_flag = 1;
+ val2 = 55 + val1*5;
+ val3 = val1*10;
+ break;
+ case SC_DISSONANCE: /* •s‹¦˜a‰¹ */
+ val2 = 10;
+ break;
+ case SC_WHISTLE: /* Œû“J */
+ calc_flag = 1;
+ break;
+ case SC_ASSNCROS: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
+ calc_flag = 1;
+ break;
+ case SC_POEMBRAGI: /* ƒuƒ‰ƒM‚ÌŽ */
+ break;
+ case SC_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
+ calc_flag = 1;
+ break;
+ case SC_UGLYDANCE: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
+ val2 = 10;
+ break;
+ case SC_HUMMING: /* ƒnƒ~ƒ“ƒO */
+ 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_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_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_FORTUNE: /* K‰^‚̃LƒX */
+ calc_flag = 1;
+ break;
+ case SC_SERVICE4U: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
+ calc_flag = 1;
+ break;
+ case SC_MOONLIT:
+ val2 = bl->id;
+ break;
+ case SC_DANCING: /* ƒ_ƒ“ƒX/‰‰‘t’† */
+ calc_flag = 1;
+ val3= tick / 1000;
+ tick = 1000;
+ break;
+
+ case SC_EXPLOSIONSPIRITS: // ”š—ô”g“®
+ calc_flag = 1;
+ val2 = 75 + 25*val1;
+ *opt3 |= 8;
+ break;
+ case SC_STEELBODY: // ‹à„
+ calc_flag = 1;
+ *opt3 |= 16;
+ break;
+ case SC_EXTREMITYFIST: /* ˆ¢C—…”e™€Œ */
+ break;
+ case SC_AUTOCOUNTER:
+ val3 = val4 = 0;
+ break;
+
+ case SC_SPEEDPOTION0: /* ?‘¬ƒ|?ƒVƒ‡ƒ“ */
+ case SC_SPEEDPOTION1:
+ case SC_SPEEDPOTION2:
+ case SC_SPEEDPOTION3:
+ calc_flag = 1;
+ tick = 1000 * tick;
+ val2 = 5*(2+type-SC_SPEEDPOTION0);
+ break;
+
+ /* atk & matk potions [Valaris] */
+ case SC_ATKPOT:
+ case SC_MATKPOT:
+ calc_flag = 1;
+ tick = 1000 * tick;
+ break;
+ case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
+ {
+ time_t timer;
+
+ calc_flag = 1;
+ tick = 10000;
+ if(!val2)
+ val2 = time(&timer);
+ }
+ break;
+ case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
+ {
+ time_t timer;
+
+ if(!battle_config.muting_players)
+ break;
+
+ tick = 60000;
+ if(!val2)
+ val2 = time(&timer);
+ updateflag = SP_MANNER;
+ save_flag = 1; // celest
+ }
+ break;
+ case SC_SELFDESTRUCTION: //Ž©”š
+ clif_skillcasting(bl,bl->id, bl->id,0,0,331,skill_get_time(val2,val1));
+ val3 = tick / 1000;
+ tick = 1000;
+ break;
+
+ /* option1 */
+ case SC_STONE: /* Ή» */
+ if(!(flag&2)) {
+ int sc_def = status_get_mdef(bl)*200;
+ tick = tick - sc_def;
+ }
+ val3 = tick/1000;
+ if(val3 < 1) val3 = 1;
+ tick = 5000;
+ val2 = 1;
+ break;
+ case SC_SLEEP: /* ‡–° */
+ if(!(flag&2)) {
+// int sc_def = 100 - (status_get_int(bl) + status_get_luk(bl)/3);
+// tick = tick * sc_def / 100;
+// if(tick < 1000) tick = 1000;
+ 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 mhp = status_get_max_hp(bl);
+ int hp = status_get_hp(bl);
+ // MHP?1/4????????
+ if (hp > mhp>>2) {
+ if(bl->type == BL_PC) {
+ int diff = mhp*10/100;
+ if (hp - diff < mhp>>2)
+ hp = hp - (mhp>>2);
+ pc_heal((struct map_session_data *)bl, -hp, 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: /* “Å */
+ calc_flag = 1;
+ 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;
+ break;
+ case SC_SILENCE: /* ’¾?iƒŒƒbƒNƒXƒfƒr?ƒij */
+ if (sc_data && sc_data[SC_GOSPEL].timer!=-1) {
+ skill_delunitgroup((struct skill_unit_group *)sc_data[SC_GOSPEL].val3);
+ 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:
+ val2 = tick;
+ tick = 100;
+ clif_emotion(bl,1);
+ if (sd) {
+ pc_stop_walking (sd, 0);
+ }
+ break;
+ case SC_BLIND: /* ˆÃ? */
+ calc_flag = 1;
+ if(!(flag&2)) {
+ int sc_def = status_get_lv(bl)/10 + status_get_int(bl)/15;
+ tick = 30000 - sc_def;
+ }
+ break;
+ case SC_CURSE:
+ calc_flag = 1;
+ if(!(flag&2)) {
+ int sc_def = 100 - status_get_vit(bl);
+ tick = tick * sc_def / 100;
+ }
+ break;
+
+ /* option */
+ case SC_HIDING: /* ƒnƒCƒfƒBƒ“ƒO */
+ calc_flag = 1;
+ if(bl->type == BL_PC) {
+ val2 = tick / 1000; /* Ž?ŽžŠÔ */
+ tick = 1000;
+ }
+ break;
+ case SC_CHASEWALK:
+ case SC_CLOAKING: /* ƒNƒ?ƒLƒ“ƒO */
+ if(bl->type == BL_PC) {
+ calc_flag = 1; // [Celest]
+ val2 = tick;
+ val3 = type==SC_CLOAKING ? 130-val1*3 : 135-val1*5;
+ }
+ else
+ tick = 5000*val1;
+ break;
+ case SC_SIGHT: /* ƒTƒCƒg/ƒ‹ƒAƒt */
+ case SC_RUWACH:
+ val2 = tick/250;
+ tick = 10;
+ break;
+
+ /* ƒZ?ƒtƒeƒBƒEƒH?ƒ‹Aƒjƒ…?ƒ} */
+ case SC_SAFETYWALL: case SC_PNEUMA:
+ tick=((struct skill_unit *)val2)->group->limit;
+ break;
+
+ /* ƒAƒ“ƒNƒ‹ */
+ case SC_ANKLE:
+ break;
+
+ /* ƒXƒLƒ‹‚¶‚á‚È‚¢/ŽžŠÔ‚É?ŒW‚µ‚È‚¢ */
+ case SC_RIDING:
+ calc_flag = 1;
+ tick = 600*1000;
+ break;
+ case SC_FALCON:
+ case SC_WEIGHT50:
+ case SC_WEIGHT90:
+ case SC_BROKNWEAPON:
+ case SC_BROKNARMOR:
+ tick=600*1000;
+ break;
+
+ case SC_AUTOGUARD:
+ {
+ int i,t;
+ for(i=val2=0;i<val1;i++) {
+ t = 5-(i>>1);
+ val2 += (t < 0)? 1:t;
+ }
+ }
+ break;
+
+ case SC_DEFENDER:
+ calc_flag = 1;
+ val2 = 5 + val1*15;
+ break;
+
+ case SC_KEEPING:
+ case SC_BARRIER:
+ calc_flag = 1;
+
+ case SC_HALLUCINATION:
+ break;
+
+ case SC_CONCENTRATION: /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
+ *opt3 |= 1;
+ calc_flag = 1;
+ break;
+
+ case SC_TENSIONRELAX: /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
+ if(bl->type == BL_PC) {
+ tick = 10000;
+ } else return 0;
+ break;
+
+ case SC_AURABLADE: /* ƒI?ƒ‰ƒuƒŒ?ƒh */
+ case SC_PARRYING: /* ƒpƒŠƒCƒ“ƒO */
+// case SC_ASSUMPTIO: /* */
+// case SC_HEADCRUSH: /* ƒwƒbƒhƒNƒ‰ƒbƒVƒ… */
+// case SC_JOINTBEAT: /* ƒWƒ‡ƒCƒ“ƒgƒr?ƒg */
+// case SC_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
+
+ //‚Æ‚è‚ ‚¦‚¸Žè?‚«
+ break;
+
+// -- moonsoul (for new upper class related skill status effects)
+/*
+ case SC_AURABLADE:
+ val2 = val1*10;
+ break;
+ case SC_PARRYING:
+ val2=val1*3;
+ break;
+ case SC_CONCENTRATION:
+ calc_flag=1;
+ val2=val1*10;
+ val3=val1*5;
+ break;
+ case SC_TENSIONRELAX:
+// val2 = 10;
+// val3 = 15;
+ break;
+ case SC_BERSERK:
+ calc_flag=1;
+ break;
+ case SC_ASSUMPTIO:
+ if(sc_data[SC_KYRIE].timer!=-1 )
+ status_change_end(bl,SC_KYRIE,-1);
+ break;*/
+
+ case SC_WINDWALK: /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
+ calc_flag = 1;
+ val2 = (val1 / 2); //Flee㸗¦
+ break;
+
+ case SC_JOINTBEAT: // Random break [DracoRPG]
+ calc_flag = 1;
+ val2 = rand()%6 + 1;
+ if (val2 == 6) 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){
+ sd->status.hp = sd->status.max_hp * 3;
+ sd->status.sp = 0;
+ clif_updatestatus(sd,SP_HP);
+ clif_updatestatus(sd,SP_SP);
+ clif_status_change(bl,SC_INCREASEAGI,1); /* ƒAƒCƒRƒ“•\Ž¦ */
+ sd->canregen_tick = gettick() + 300000;
+ }
+ *opt3 |= 128;
+ tick = 10000;
+ calc_flag = 1;
+ break;
+
+ case SC_ASSUMPTIO: /* ƒAƒXƒ€ƒvƒeƒBƒI */
+ if(sc_data[SC_KYRIE].timer!=-1 )
+ status_change_end(bl,SC_KYRIE,-1);
+ break;
+ *opt3 |= 2048;
+ break;
+
+ case SC_BASILICA: // [celest]
+ break;
+
+ case SC_GOSPEL:
+ if (val4 == BCT_SELF) { // self effect
+ int i;
+ if (sd) {
+ sd->canact_tick += tick;
+ sd->canmove_tick += tick;
+ }
+ val2 = tick;
+ tick = 1000;
+ for (i=0; i<=26; i++) {
+ if(sc_data[i].timer!=-1)
+ status_change_end(bl,i,-1);
+ }
+ for (i=58; i<=62; i++) {
+ if(sc_data[i].timer!=-1)
+ status_change_end(bl,i,-1);
+ }
+ for (i=132; i<=136; i++) {
+ if(sc_data[i].timer!=-1)
+ status_change_end(bl,i,-1);
+ }
+ }
+ break;
+
+ case SC_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
+ case SC_MARIONETTE2:
+ val2 = tick;
+ if (!val3)
+ return 0;
+ tick = 1000;
+ calc_flag = 1;
+ *opt3 |= 1024;
+ break;
+
+ case SC_MELTDOWN: /* ƒƒ‹ƒgƒ_ƒEƒ“ */
+ case SC_CARTBOOST: /* ƒJ?ƒgƒu?ƒXƒg */
+ case SC_TRUESIGHT: /* ƒgƒDƒ‹?ƒTƒCƒg */
+ case SC_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+ calc_flag = 1;
+ 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_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
+ break;
+
+ case SC_FOGWALL:
+ break;
+
+ case SC_PRESERVE:
+ break;
+
+ case SC_BLEEDING:
+ {
+ // every 1 vit deducts 1 second
+ val3 = tick - status_get_vit(bl) * 1000;
+ // minimum 50 seconds
+ if (val3 < 50000)
+ val3 = 50000;
+ val4 = 10000;
+ tick = 1000;
+ }
+ break;
+
+ case SC_SLOWDOWN:
+ case SC_SPEEDUP0:
+ calc_flag = 1;
+ break;
+
+ case SC_REGENERATION:
+ val1 = 2;
+ case SC_BATTLEORDERS:
+ tick = 60000; // 1 minute
+ calc_flag = 1;
+ break;
+
+ case SC_GUILDAURA:
+ calc_flag = 1;
+ tick = 1000;
+ break;
+
+ case SC_BABY:
+ type2 = _SC_BABY;
+ break;
+
+ default:
+ if(battle_config.error_log)
+ printf("UnknownStatusChange [%d]\n", type);
+ return 0;
+ }
+
+ if(bl->type==BL_PC &&
+ (type<SC_SENDMAX || type==SC_PRESERVE || type==SC_BATTLEORDERS || type==SC_BABY))
+ clif_status_change(bl,type2,1); /* ƒAƒCƒRƒ“•\Ž¦ */
+
+ /* option‚Ì?X */
+ switch(type){
+ case SC_STONE:
+ case SC_FREEZE:
+ case SC_STAN:
+ case SC_SLEEP:
+ battle_stopattack(bl); /* U?’âŽ~ */
+ skill_stop_dancing(bl,0); /* ‰‰‘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 = 6;
+ else
+ *opt1 = type - SC_STONE + 1;
+ 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 |= 1;
+ opt_flag = 1;
+ break;
+ case SC_SIGNUMCRUCIS:
+ *opt2 |= 0x40;
+ opt_flag = 1;
+ break;
+ case SC_HIDING:
+ case SC_CLOAKING:
+ battle_stopattack(bl); /* U?’âŽ~ */
+ *option |= ((type==SC_HIDING)?2:4);
+ opt_flag =1 ;
+ break;
+ case SC_CHASEWALK:
+ battle_stopattack(bl); /* U?’âŽ~ */
+ *option |= 16388;
+ opt_flag =1 ;
+ break;
+ case SC_SIGHT:
+ *option |= 1;
+ opt_flag = 1;
+ break;
+ case SC_RUWACH:
+ *option |= 8192;
+ opt_flag = 1;
+ break;
+ case SC_WEDDING:
+ *option |= 4096;
+ opt_flag = 1;
+ }
+
+ 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); // save the player status
+
+ if(bl->type==BL_PC && updateflag)
+ clif_updatestatus(sd,updateflag); /* ƒXƒe?ƒ^ƒX‚ðƒNƒ‰ƒCƒAƒ“ƒg‚É‘—‚é */
+
+ 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 < MAX_STATUSCHANGE; i++){
+ if(sc_data[i].timer != -1){ /* ˆÙ킪‚ ‚é‚È‚çƒ^ƒCƒ}?‚ð휂·‚é */
+ status_change_end(bl, i, -1);
+ }
+ }
+ *sc_count = 0;
+ *opt1 = 0;
+ *opt2 = 0;
+ *opt3 = 0;
+ *option &= OPTION_MASK;
+
+ if (night_flag == 1 && type == BL_PC && !map[bl->m].flag.indoors && // by [Yor]
+ !map[bl->m].flag.indoors && battle_config.night_darkness_level <= 0) // [celest]
+ *opt2 |= STATE_BLIND;
+
+ 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 status_change* sc_data;
+ int opt_flag=0, calc_flag = 0;
+ short *sc_count, *option, *opt1, *opt2, *opt3;
+ int type2 = type;
+
+ nullpo_retr(0, bl);
+ if(bl->type!=BL_PC && bl->type!=BL_MOB) {
+ if(battle_config.error_log)
+ printf("status_change_end: neither MOB nor PC !\n");
+ return 0;
+ }
+ 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 && 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_TWOHANDQUICKEN: /* 2HQ */
+ 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_DEFENDER:
+ case SC_SPEEDPOTION0: /* ?‘¬ƒ|?ƒVƒ‡ƒ“ */
+ case SC_SPEEDPOTION1:
+ case SC_SPEEDPOTION2:
+ case SC_SPEEDPOTION3:
+ case SC_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
+ case SC_RIDING:
+ 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_ATKPOT: /* attack potion [Valaris] */
+ case SC_MATKPOT: /* magic attack potion [Valaris] */
+ case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
+ case SC_MELTDOWN: /* ƒƒ‹ƒgƒ_ƒEƒ“ */
+ case SC_MINDBREAKER: /* ƒ}ƒCƒ“ƒhƒuƒŒ[ƒJ[ */
+ // Celest
+ case SC_EDP:
+ case SC_SLOWDOWN:
+ case SC_SPEEDUP0:
+ case SC_BATTLEORDERS:
+ case SC_REGENERATION:
+ case SC_GUILDAURA:
+ calc_flag = 1;
+ break;
+ case SC_AUTOBERSERK:
+ if (sc_data[SC_PROVOKE].timer != -1)
+ status_change_end(bl,SC_PROVOKE,-1);
+ break;
+ case SC_BERSERK: /* ƒo?ƒT?ƒN */
+ calc_flag = 1;
+ clif_status_change(bl,SC_INCREASEAGI,0); /* ƒAƒCƒRƒ“Á‹Ž */
+ break;
+ case SC_DEVOTION: /* ƒfƒBƒ{?ƒVƒ‡ƒ“ */
+ {
+ struct map_session_data *md = map_id2sd(sc_data[type].val1);
+ sc_data[type].val1=sc_data[type].val2=0;
+ skill_devotion(md,bl->id);
+ calc_flag = 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].val4 && (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].val4=0;
+ }
+ }
+ calc_flag = 1;
+ break;
+ case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
+ {
+ struct map_session_data *sd=NULL;
+ if(bl->type == BL_PC && (sd=(struct map_session_data *)bl)){
+ 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_SELFDESTRUCTION: /* Ž©”š */
+ {
+ //Ž©•ª‚̃_ƒ?ƒW‚Í0‚É‚µ‚Ä
+ struct mob_data *md=NULL;
+ if(bl->type == BL_MOB && (md=(struct mob_data*)bl))
+ skill_castend_damage_id(bl, bl,sc_data[type].val2,sc_data[type].val1,gettick(),0 );
+ }
+ 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;
+
+ // celest
+ case SC_CONFUSION:
+ {
+ struct map_session_data *sd=NULL;
+ if(bl->type == BL_PC && (sd=(struct map_session_data *)bl)){
+ sd->next_walktime = -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 (*status_get_sc_count(pbl) > 0 &&
+ (sc_data = status_get_sc_data(pbl)) &&
+ sc_data[type2].timer != -1)
+ status_change_end(pbl, type2, -1);
+ }
+ calc_flag = 1;
+ }
+ break;
+
+ case SC_BABY:
+ type2 = _SC_BABY;
+ break;
+ }
+
+ if(bl->type==BL_PC &&
+ (type<SC_SENDMAX || type==SC_PRESERVE || type==SC_BATTLEORDERS || type==SC_BABY))
+ clif_status_change(bl,type2,0); /* ƒAƒCƒRƒ“Á‹Ž */
+
+ 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:
+ if (sc_data[SC_DPOISON].timer != -1) //
+ break; // DPOISON—p‚̃IƒvƒVƒ‡ƒ“
+ *opt2 &= ~1; // ‚ª?—p‚É—pˆÓ‚³‚ꂽꇂɂÍ
+ opt_flag = 1; // ‚±‚±‚Í휂·‚é
+ break; //
+ case SC_CURSE:
+ case SC_SILENCE:
+ case SC_BLIND:
+ *opt2 &= ~(1<<(type-SC_POISON));
+ opt_flag = 1;
+ break;
+ case SC_DPOISON:
+ if (sc_data[SC_POISON].timer != -1) // DPOISON—p‚̃IƒvƒVƒ‡ƒ“‚ª
+ break; // —pˆÓ‚³‚ꂽ‚çíœ
+ *opt2 &= ~1; // “Å?‘Ô‰ðœ
+ opt_flag = 1;
+ break;
+ case SC_SIGNUMCRUCIS:
+ *opt2 &= ~0x40;
+ opt_flag = 1;
+ break;
+
+ case SC_HIDING:
+ case SC_CLOAKING:
+ *option &= ~((type == SC_HIDING) ? 2 : 4);
+ calc_flag = 1; // orn
+ opt_flag = 1 ;
+ break;
+
+ case SC_CHASEWALK:
+ *option &= ~16388;
+ opt_flag = 1 ;
+ break;
+
+ case SC_SIGHT:
+ *option &= ~1;
+ opt_flag = 1;
+ break;
+ case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
+ *option &= ~4096;
+ opt_flag = 1;
+ break;
+ case SC_RUWACH:
+ *option &= ~8192;
+ opt_flag = 1;
+ break;
+
+ //opt3
+ case SC_TWOHANDQUICKEN: /* 2HQ */
+ 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: // ‹à„
+ *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;
+ }
+
+ if (night_flag == 1 && (*opt2 & STATE_BLIND) == 0 && bl->type == BL_PC && // by [Yor]
+ !map[bl->m].flag.indoors && battle_config.night_darkness_level <= 0) { // [celest]
+ *opt2 |= STATE_BLIND;
+ opt_flag = 1;
+ }
+
+ if(opt_flag) /* option‚Ì?X‚ð?‚¦‚é */
+ clif_changeoption(bl);
+
+ if (bl->type == BL_PC && 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)
+ printf("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){
+ if( sd->status.sp > 0 ){ /* SPØ‚ê‚é‚Ü‚ÅŽ? */
+ 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[sd->bl.m].flag.gvg) sp *= 5;
+ if( sd->status.sp > sp){
+ sd->status.sp -= sp; // update sp cost [Celest]
+ clif_updatestatus(sd,SP_SP);
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ sc_data[type].val2+tick, status_change_timer, bl->id, data);
+ sc_data[SC_CHASEWALK].val4++;
+ if (sc_data[SC_CHASEWALK].val4 > 3)
+ sc_data[SC_CHASEWALK].val4 = 0;
+ status_calc_pc (sd, 0);
+ 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 */
+ {
+ int range = 5;
+ if ( type == SC_SIGHT ) range = 7;
+ map_foreachinarea( status_change_timer_sub,
+ bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,0,
+ 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_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_ENDURE: /* ƒCƒ“ƒfƒ…ƒA */
+ case SC_AUTOBERSERK: // Celest
+ if(sd && sd->special_state.infinite_endure) {
+#ifdef TWILIGHT
+ sc_data[type].timer=add_timer( 1000*600+tick,status_change_timer, bl->id, data );
+#else
+ sc_data[type].timer=add_timer( 1000*60+tick,status_change_timer, bl->id, data );
+#endif
+ //sc_data[type].val2=1;
+ return 0;
+ }
+ break;
+
+ case SC_DISSONANCE: /* •s‹¦˜a‰¹ */
+ if( (--sc_data[type].val2)>0){
+ struct skill_unit *unit=
+ (struct skill_unit *)sc_data[type].val4;
+ struct block_list *src;
+ /*if(!unit || !unit->group)
+ break;
+ src=map_id2bl(unit->group->src_id);
+ if(!src)
+ break;*/
+ nullpo_retb(unit);
+ nullpo_retb(unit->group);
+ nullpo_retb(src=map_id2bl(unit->group->src_id));
+ skill_attack(BF_MISC,src,&unit->bl,bl,unit->group->skill_id,sc_data[type].val1,tick,0);
+ if( (bl->type==BL_MOB) && (MS_DEAD==((struct mob_data *)bl)->state.state) )
+ break;
+ sc_data[type].timer=add_timer(skill_get_time2(unit->group->skill_id,unit->group->skill_lv)+tick,
+ status_change_timer, bl->id, data );
+ return 0;
+ }
+ break;
+
+ case SC_LULLABY: /* ŽqŽç‰S */
+ if( (--sc_data[type].val2)>0){
+ struct skill_unit *unit=
+ (struct skill_unit *)sc_data[type].val4;
+ nullpo_retb(unit);
+ nullpo_retb(unit->group);
+ if(unit->group->src_id == bl->id)
+ break;
+ skill_additional_effect(bl,bl,unit->group->skill_id,sc_data[type].val1,BF_LONG|BF_SKILL|BF_MISC,tick);
+ if (unit->group != 0)
+ {
+ sc_data[type].timer=add_timer(skill_get_time(unit->group->skill_id,unit->group->skill_lv)/10+tick,
+ status_change_timer, bl->id, data );
+ return 0;
+ }// dont forget the brackets
+ }
+ 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 = 1;
+ 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:
+ case SC_DPOISON:
+ if (sc_data[SC_SLOWPOISON].timer == -1 && (--sc_data[type].val3) > 0) {
+ int hp = status_get_max_hp(bl);
+ if (type == SC_POISON && status_get_hp(bl) < hp>>2)
+ break;
+ if(sd) {
+ hp = (type == SC_DPOISON) ? 3 + hp/50 : 3 + hp*3/200;
+ pc_heal(sd, -hp, 0);
+ } else if (bl->type == BL_MOB) {
+ struct mob_data *md;
+ nullpo_retr(0, md=(struct mob_data *)bl);
+ hp = (type == SC_DPOISON) ? 3 + hp/100 : 3 + hp/200;
+ md->hp -= hp;
+ }
+ }
+ if (sc_data[type].val3 > 0)
+ {
+ sc_data[type].timer=add_timer(1000+tick,status_change_timer, bl->id, data );
+ // hmm setting up a timer and breaking then to call status_change_end just right away?
+ // I think you're missing brackets and a:
+ 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 ){
+/* if(sc_data[type].val2 % (sc_data[type].val1+3) ==0 ){
+ sd->status.sp -= 12;
+ clif_updatestatus(sd,SP_SP);
+ } */
+ 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);
+ // calling status_change_end then break and call it again might not be that what is necessary
+ // or am I wrong?
+ // so I just add brackets and a:
+ return 0;
+ }
+ }
+ break;
+ case SC_BLEEDING: // [celest]
+ // i hope i haven't interpreted it wrong.. which i might ^^;
+ // Source:
+ // - 10õ©ª´ªÈªËHPª¬Êõá´
+ // - õóúìªÎªÞªÞ«µ?«Ðì¹ÔѪä«ê«í«°ª·ªÆªâ?ÍýªÏἪ¨ªÊª¤
+ if((sc_data[type].val3 -= 1000) > 0) {
+ if((sc_data[type].val4 -= 1000) > 0) {
+ int hp = rand()%300+400;
+ if(sd) {
+ pc_heal(sd,-hp,0);
+ sd->canmove_tick = tick+1000;
+ }
+ else if(bl->type == BL_MOB) {
+ struct mob_data *md;
+ nullpo_retr(0, md=(struct mob_data *)bl);
+ md->hp -= hp;
+ }
+ }
+ if (sd) {
+ sd->canact_tick = tick+1000;
+ }
+
+ sc_data[type].timer=add_timer(1000+tick,status_change_timer, bl->id, data );
+ // hmm setting up a timer and breaking then to call status_change_end just right away?
+ // I think you're missing a:
+ return 0;
+ }
+ break;
+
+ /* ŽžŠÔØ‚ê–³‚µHH */
+ case SC_AETERNA:
+ case SC_TRICKDEAD:
+ case SC_RIDING:
+ case SC_FALCON:
+ case SC_WEIGHT50:
+ case SC_WEIGHT90:
+ case SC_MAGICPOWER: /* –‚–@—Í?• */
+ case SC_REJECTSWORD: /* ƒŠƒWƒFƒNƒgƒ\?ƒh */
+ case SC_MEMORIZE: /* ƒƒ‚ƒ‰ƒCƒY */
+ case SC_BROKNWEAPON:
+ case SC_BROKNARMOR:
+ case SC_SACRIFICE:
+ 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;
+ if(sd){
+ if(sd->status.sp > 0 && (--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 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 DC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc 10•b‚ÅSP1 */
+ case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç 10•b‚ÅSP1H */
+ s=10;
+ break;
+ }
+ if(s && ((sc_data[type].val3 % s) == 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_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;
+ }
+ }
+ break;
+ case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
+ if(sd){
+ time_t timer;
+ if(time(&timer) < ((sc_data[type].val2) + 3600)){ //1ŽžŠÔ‚½‚Á‚Ä‚¢‚È‚¢‚Ì‚Å??
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ 10000+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ break;
+ case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
+ if(sd && battle_config.muting_players){
+ time_t timer;
+ if((++sd->status.manner) && time(&timer) < ((sc_data[type].val2) + 60*(0-sd->status.manner))){ //ŠJŽn‚©‚çstatus.manner•ª?‚Á‚Ä‚È‚¢‚Ì‚Å??
+ clif_updatestatus(sd,SP_MANNER);
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è(60•b) */
+ 60000+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ break;
+ case SC_SELFDESTRUCTION: /* Ž©”š */
+ if(--sc_data[type].val3>0){
+ struct mob_data *md;
+ if(bl->type==BL_MOB && (md=(struct mob_data *)bl) && md->speed > 250){
+ md->speed -= 250;
+ md->next_walktime=tick;
+ }
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ 1000+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;
+
+ // Celest
+ case SC_CONFUSION:
+ {
+ int i = 3000;
+ //struct mob_data *md;
+ if (sd) {
+ pc_randomwalk (sd, gettick());
+ sd->next_walktime = tick + (i=1000 + rand()%1000);
+ } /*else if (bl->type==BL_MOB && (md=(struct mob_data *)bl) && md->mode&1 && mob_can_move(md)) {
+ md->state.state=MS_WALK;
+ 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;
+ mob_randomwalk(md,tick);
+ }*/
+ if ((sc_data[type].val2 -= 1000) > 0) {
+ sc_data[type].timer = add_timer(
+ i + tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ break;
+
+ case SC_GOSPEL:
+ {
+ int calc_flag = 0;
+ if (sc_data[type].val3 > 0) {
+ sc_data[type].val3 = 0;
+ calc_flag = 1;
+ }
+ if(sd && 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(sd->status.hp - hp > 0 &&
+ sd->status.sp - sp > 0){
+ sd->status.hp -= hp;
+ sd->status.sp -= sp;
+ clif_updatestatus(sd,SP_HP);
+ clif_updatestatus(sd,SP_SP);
+ if ((sc_data[type].val2 -= 10000) > 0) {
+ sc_data[type].timer = add_timer(
+ 10000+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ } else if (sd && sc_data[type].val4 == BCT_PARTY) {
+ int i;
+ switch ((i = rand() % 12)) {
+ case 1: // heal between 100-1000
+ {
+ struct block_list tbl;
+ int heal = rand() % 900 + 100;
+ tbl.id = 0;
+ tbl.m = bl->m;
+ tbl.x = bl->x;
+ tbl.y = bl->y;
+ clif_skill_nodamage(&tbl,bl,AL_HEAL,heal,1);
+ battle_heal(NULL,bl,heal,0,0);
+ }
+ break;
+ case 2: // end negative status
+ {
+ int j;
+ for (j=0; j<4; j++)
+ if(sc_data[i + SC_POISON].timer!=-1) {
+ status_change_end(bl,j,-1);
+ break;
+ }
+ }
+ break;
+ case 3: // +25% resistance to negative status
+ case 4: // +25% max hp
+ case 5: // +25% max sp
+ case 6: // +2 to all stats
+ case 11: // +25% armor and vit def
+ case 12: // +8% atk
+ case 13: // +5% flee
+ case 14: // +5% hit
+ sc_data[type].val3 = i;
+ if (i == 6 ||
+ (i >= 11 && i <= 14))
+ calc_flag = 1;
+ break;
+ case 7: // level 5 bless
+ {
+ struct block_list tbl;
+ tbl.id = 0;
+ tbl.m = bl->m;
+ tbl.x = bl->x;
+ tbl.y = bl->y;
+ clif_skill_nodamage(&tbl,bl,AL_BLESSING,5,1);
+ status_change_start(bl,SkillStatusChangeTable[AL_BLESSING],5,0,0,0,10000,0 );
+ }
+ break;
+ case 8: // level 5 increase agility
+ {
+ struct block_list tbl;
+ tbl.id = 0;
+ tbl.m = bl->m;
+ tbl.x = bl->x;
+ tbl.y = bl->y;
+ clif_skill_nodamage(&tbl,bl,AL_INCAGI,5,1);
+ status_change_start(bl,SkillStatusChangeTable[AL_INCAGI],5,0,0,0,10000,0 );
+ }
+ break;
+ case 9: // holy element to weapon
+ {
+ struct block_list tbl;
+ tbl.id = 0;
+ tbl.m = bl->m;
+ tbl.x = bl->x;
+ tbl.y = bl->y;
+ clif_skill_nodamage(&tbl,bl,PR_ASPERSIO,1,1);
+ status_change_start(bl,SkillStatusChangeTable[PR_ASPERSIO],1,0,0,0,10000,0 );
+ }
+ break;
+ case 10: // holy element to armour
+ {
+ struct block_list tbl;
+ tbl.id = 0;
+ tbl.m = bl->m;
+ tbl.x = bl->x;
+ tbl.y = bl->y;
+ clif_skill_nodamage(&tbl,bl,PR_BENEDICTIO,1,1);
+ status_change_start(bl,SkillStatusChangeTable[PR_BENEDICTIO],1,0,0,0,10000,0 );
+ }
+ break;
+ default:
+ break;
+ }
+ } else if (sc_data[type].val4 == BCT_ENEMY) {
+ int i;
+ switch ((i = rand() % 8)) {
+ case 1: // damage between 300-800
+ case 2: // damage between 150-550 (ignore def)
+ battle_damage(NULL, bl, rand() % 500,0); // temporary damage
+ break;
+ case 3: // random status effect
+ {
+ int effect[3] = {
+ SC_CURSE,
+ SC_BLIND,
+ SC_POISON };
+ status_change_start(bl,effect[rand()%3],1,0,0,0,10000,0 );
+ }
+ break;
+ case 4: // level 10 provoke
+ {
+ struct block_list tbl;
+ tbl.id = 0;
+ tbl.m = bl->m;
+ tbl.x = bl->x;
+ tbl.y = bl->y;
+ clif_skill_nodamage(&tbl,bl,SM_PROVOKE,1,1);
+ status_change_start(bl,SkillStatusChangeTable[SM_PROVOKE],10,0,0,0,10000,0 );
+ }
+ break;
+ case 5: // 0 def
+ case 6: // 0 atk
+ case 7: // 0 flee
+ case 8: // -75% move speed and aspd
+ sc_data[type].val3 = i;
+ calc_flag = 1;
+ break;
+ default:
+ break;
+ }
+ }
+ if (sd && calc_flag)
+ status_calc_pc (sd, 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;
+ }// ugh, don't forget the brackets
+ }
+ 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;
+ int type;
+ unsigned int tick;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, src=va_arg(ap,struct block_list*));
+ type=va_arg(ap,int);
+ tick=va_arg(ap,unsigned int);
+
+ if(bl->type!=BL_PC && bl->type!=BL_MOB)
+ return 0;
+
+ switch( type ){
+ case SC_SIGHT: /* ƒTƒCƒg */
+ case SC_CONCENTRATE:
+ if( (*status_get_option(bl))&6 ){
+ 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))&6 ){
+ 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,sc_data[type].val1,tick,0);
+ }
+ break;
+ }
+ 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,k;
+ FILE *fp;
+ char line[1024],*p;
+
+ // JOB•â³?’l‚P
+ fp=fopen("db/job_db1.txt","r");
+ if(fp==NULL){
+ printf("can't read db/job_db1.txt\n");
+ return 1;
+ }
+ i=0;
+ while(fgets(line, sizeof(line)-1, fp)){
+ char *split[50];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ for(j=0,p=line;j<21 && p;j++){
+ split[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if(j<21)
+ continue;
+ max_weight_base[i]=atoi(split[0]);
+ hp_coefficient[i]=atoi(split[1]);
+ hp_coefficient2[i]=atoi(split[2]);
+ sp_coefficient[i]=atoi(split[3]);
+ for(j=0;j<17;j++)
+ aspd_base[i][j]=atoi(split[j+4]);
+ i++;
+// -- moonsoul (below two lines added to accommodate high numbered new class ids)
+ if(i==24)
+ i=4001;
+ if(i==MAX_PC_CLASS)
+ break;
+ }
+ fclose(fp);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/job_db1.txt");
+ ShowStatus(tmp_output);
+
+ // JOBƒ{?ƒiƒX
+ memset(job_bonus,0,sizeof(job_bonus));
+ fp=fopen("db/job_db2.txt","r");
+ if(fp==NULL){
+ printf("can't read db/job_db2.txt\n");
+ return 1;
+ }
+ i=0;
+ while(fgets(line, sizeof(line)-1, fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ for(j=0,p=line;j<MAX_LEVEL && p;j++){
+ if(sscanf(p,"%d",&k)==0)
+ break;
+ job_bonus[0][i][j]=k;
+ job_bonus[2][i][j]=k; //—{ŽqE‚̃{?ƒiƒX‚Í•ª‚©‚ç‚È‚¢‚Ì‚Å?
+ p=strchr(p,',');
+ if(p) p++;
+ }
+ i++;
+// -- moonsoul (below two lines added to accommodate high numbered new class ids)
+ if(i==24)
+ i=4001;
+ if(i==MAX_PC_CLASS)
+ break;
+ }
+ fclose(fp);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/job_db2.txt");
+ ShowStatus(tmp_output);
+
+ // JOBƒ{?ƒiƒX2 ?¶E—p
+ fp=fopen("db/job_db2-2.txt","r");
+ if(fp==NULL){
+ printf("can't read db/job_db2-2.txt\n");
+ return 1;
+ }
+ i=0;
+ while(fgets(line, sizeof(line)-1, fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ for(j=0,p=line;j<MAX_LEVEL && p;j++){
+ if(sscanf(p,"%d",&k)==0)
+ break;
+ job_bonus[1][i][j]=k;
+ p=strchr(p,',');
+ if(p) p++;
+ }
+ i++;
+ if(i==MAX_PC_CLASS)
+ break;
+ }
+ fclose(fp);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/job_db2-2.txt");
+ ShowStatus(tmp_output);
+
+ // ƒTƒCƒY•â³ƒe?ƒuƒ‹
+ for(i=0;i<3;i++)
+ for(j=0;j<20;j++)
+ atkmods[i][j]=100;
+ fp=fopen("db/size_fix.txt","r");
+ if(fp==NULL){
+ printf("can't read db/size_fix.txt\n");
+ 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);
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/size_fix.txt");
+ ShowStatus(tmp_output);
+
+ // ¸?ƒf?ƒ^ƒe?ƒuƒ‹
+ for(i=0;i<5;i++){
+ for(j=0;j<10;j++)
+ percentrefinery[i][j]=100;
+ refinebonus[i][0]=0;
+ refinebonus[i][1]=0;
+ refinebonus[i][2]=10;
+ }
+ fp=fopen("db/refine_db.txt","r");
+ if(fp==NULL){
+ printf("can't read db/refine_db.txt\n");
+ 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<10 && split[j];j++)
+ percentrefinery[i][j]=atoi(split[j+3]);
+ i++;
+ }
+ fclose(fp); //Lupus. close this file!!!
+ sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/refine_db.txt");
+ ShowStatus(tmp_output);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ŠÖŒW‰Šú‰»ˆ—
+ *------------------------------------------
+ */
+int do_init_status(void)
+{
+ add_timer_func_list(status_change_timer,"status_change_timer");
+ 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..a07c47153
--- /dev/null
+++ b/src/map/status.h
@@ -0,0 +1,271 @@
+#ifndef _STATUS_H_
+#define _STATUS_H_
+
+enum { // struct map_session_data ‚Ì status_change‚Ì”Ô?ƒe?ƒuƒ‹
+// SC_SENDMAX–¢?‚̓Nƒ‰ƒCƒAƒ“ƒg‚Ö‚Ì’Ê’m‚ ‚èB
+// 2-2ŽŸE‚Ì’l‚Í‚È‚ñ‚©‚ß‚¿‚á‚­‚¿‚á‚Á‚Û‚¢‚Ì‚ÅŽb’èB‚½‚Ô‚ñ?X‚³‚ê‚Ü‚·B
+ SC_SENDMAX = 128, // note: max is now 182, but we'll need to do alot of moving around
+ SC_PROVOKE = 0,
+ SC_ENDURE = 1,
+ SC_TWOHANDQUICKEN = 2,
+ SC_CONCENTRATE = 3,
+ SC_HIDING = 4,
+ SC_CLOAKING = 5,
+ SC_ENCPOISON = 6,
+ SC_POISONREACT = 7,
+ SC_QUAGMIRE = 8,
+ SC_ANGELUS = 9,
+ SC_BLESSING = 10,
+ SC_SIGNUMCRUCIS = 11,
+ SC_INCREASEAGI = 12,
+ SC_DECREASEAGI = 13,
+ SC_SLOWPOISON = 14,
+ SC_IMPOSITIO = 15,
+ SC_SUFFRAGIUM = 16,
+ SC_ASPERSIO = 17,
+ SC_BENEDICTIO = 18,
+ SC_KYRIE = 19,
+ SC_MAGNIFICAT = 20,
+ SC_GLORIA = 21,
+ SC_AETERNA = 22,
+ SC_ADRENALINE = 23,
+ SC_WEAPONPERFECTION = 24,
+ SC_OVERTHRUST = 25,
+ SC_MAXIMIZEPOWER = 26,
+ SC_RIDING = 27,
+ SC_FALCON = 28,
+ SC_TRICKDEAD = 29,
+ SC_LOUD = 30,
+ SC_ENERGYCOAT = 31,
+ SC_BROKNARMOR = 32,
+ SC_BROKNWEAPON = 33,
+ SC_HALLUCINATION = 34,
+ SC_WEIGHT50 = 35,
+ SC_WEIGHT90 = 36,
+ SC_SPEEDPOTION0 = 37,
+ SC_SPEEDPOTION1 = 38,
+ SC_SPEEDPOTION2 = 39,
+ SC_SPEEDPOTION3 = 40,
+ SC_SPEEDUP0 = 41, // for skill speedup
+ SC_SPEEDUP1 = 42, // for skill speedup
+//-- 43-50
+ SC_STRIPWEAPON = 50,
+ SC_STRIPSHIELD = 51,
+ SC_STRIPARMOR = 52,
+ SC_STRIPHELM = 53,
+ SC_CP_WEAPON = 54,
+ SC_CP_SHIELD = 55,
+ SC_CP_ARMOR = 56,
+ SC_CP_HELM = 57,
+ SC_AUTOGUARD = 58,
+ SC_REFLECTSHIELD = 59,
+ SC_DEVOTION = 60,
+ SC_PROVIDENCE = 61,
+ SC_DEFENDER = 62,
+ SC_AUTOSPELL = 65,
+ SC_SPEARSQUICKEN = 68,
+//-- 69-85
+ SC_EXPLOSIONSPIRITS = 86,
+ SC_STEELBODY = 87,
+ SC_COMBO = 89,
+ SC_FLAMELAUNCHER = 90,
+ SC_FROSTWEAPON = 91,
+ SC_LIGHTNINGLOADER = 92,
+ SC_SEISMICWEAPON = 93,
+//-- 94-102
+ SC_AURABLADE = 103, /* ƒI?ƒ‰ƒuƒŒ?ƒh */
+ SC_PARRYING = 104, /* ƒpƒŠƒCƒ“ƒO */
+ SC_CONCENTRATION = 105, /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
+ SC_TENSIONRELAX = 106, /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
+ SC_BERSERK = 107, /* ƒo?ƒT?ƒN */
+//-- 108, 109
+ SC_ASSUMPTIO = 110, /* ƒAƒVƒƒƒ“ƒvƒeƒBƒI */
+//-- 111, 112
+ SC_MAGICPOWER = 113, /* –‚–@—Í?• */
+ SC_EDP = 114, /* ƒGƒtƒFƒNƒg‚ª”»–¾‚µ‚½‚çˆÚ“® */
+ SC_TRUESIGHT = 115, /* ƒgƒDƒ‹?ƒTƒCƒg */
+ SC_WINDWALK = 116, /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
+ SC_MELTDOWN = 117, /* ƒƒ‹ƒgƒ_ƒEƒ“ */
+ SC_CARTBOOST = 118, /* ƒJ?ƒgƒu?ƒXƒg */
+//-- 119
+ SC_REJECTSWORD = 120, /* ƒŠƒWƒFƒNƒgƒ\?ƒh */
+ SC_MARIONETTE = 121, /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
+ SC_MARIONETTE2 = 122, // Marionette target
+//-- 123
+ SC_BLEEDING = 124, /* ƒwƒbƒhƒNƒ‰ƒbƒVƒ… */
+ SC_JOINTBEAT = 125, /* ƒWƒ‡ƒCƒ“ƒgƒr?ƒg */
+//-- 126, 127
+
+ SC_STONE = 128,
+ SC_FREEZE = 129,
+// <-- 130 = a baby skill status?
+ SC_STAN = 130,
+ SC_SLEEP = 131,
+// <-- 132 = another baby skill?
+ SC_POISON = 132,
+ SC_CURSE = 133,
+ SC_SILENCE = 134,
+ SC_CONFUSION = 135,
+ SC_BLIND = 136,
+ SC_DIVINA = SC_SILENCE,
+//-- 137-139
+ SC_SAFETYWALL = 140,
+ SC_PNEUMA = 141,
+//-- 142
+ SC_ANKLE = 143,
+ SC_DANCING = 144,
+ SC_KEEPING = 145,
+ SC_BARRIER = 146,
+//-- 147,148
+ SC_MAGICROD = 149,
+ SC_SIGHT = 150,
+ SC_RUWACH = 151,
+ SC_AUTOCOUNTER = 152,
+ SC_VOLCANO = 153,
+ SC_DELUGE = 154,
+ SC_VIOLENTGALE = 155,
+ SC_BLADESTOP_WAIT = 156,
+ SC_BLADESTOP = 157,
+ SC_EXTREMITYFIST = 158,
+//-- 159
+ SC_LULLABY =160,
+ SC_RICHMANKIM =161,
+ SC_ETERNALCHAOS =162,
+ SC_DRUMBATTLE =163,
+ SC_NIBELUNGEN =164,
+ SC_ROKISWEIL =165,
+ SC_INTOABYSS =166,
+ SC_SIEGFRIED =167,
+ SC_DISSONANCE =168,
+ SC_WHISTLE =169,
+ SC_ASSNCROS =170,
+ SC_POEMBRAGI =171,
+ SC_APPLEIDUN =172,
+ SC_UGLYDANCE =173,
+ SC_HUMMING =174,
+ SC_DONTFORGETME =175,
+ SC_FORTUNE =176,
+ SC_SERVICE4U =177,
+ SC_SPIDERWEB =180, /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+// <-- 181 = unknown status
+// <-- 182 = unknown status
+ SC_SACRIFICE =184, /* ƒTƒNƒŠƒtƒ@ƒCƒX */
+ SC_WEDDING =187, //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
+ SC_NOCHAT =188, //ÔƒGƒ‚?‘Ô
+ SC_SPLASHER =189, /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
+ SC_SELFDESTRUCTION =190, /* Ž©”š */
+ SC_MEMORIZE =197, /* ƒƒ‚ƒ‰ƒCƒY */ // changed from 181 to 192
+ SC_DPOISON =198, /* –Ò“Å */
+
+// Used by English Team
+ SC_SLOWDOWN =45, // for skill slowdown
+ SC_AUTOBERSERK =46,
+ SC_SIGHTTRASHER =73,
+ SC_BASILICA =102, // temporarily use this before an actual id is found [celest]
+
+ SC_ENSEMBLE =159,
+ SC_FOGWALL =178,
+ SC_GOSPEL =179,
+ SC_PRESERVE =181,
+ SC_BATTLEORDERS =182,
+ SC_MOONLIT =183,
+ SC_ATKPOT =185, // [Valaris]
+ SC_MATKPOT =186, // [Valaris]
+ SC_MINDBREAKER =191,
+ SC_SPELLBREAKER =192,
+ SC_LANDPROTECTOR =193,
+ SC_ADAPTATION =194,
+ SC_CHASEWALK =195,
+ SC_REGENERATION =196,
+ SC_GUILDAURA =199,
+ SC_BABY =200,
+
+// Icons
+ _SC_BABY =200
+};
+extern int SkillStatusChangeTable[];
+
+extern int current_equip_item_index;
+
+// ƒ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_baseatk(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_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_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);
+
+// ƒXƒe[ƒ^ƒXŒvŽZ pc.c ‚©‚番—£
+// pc_calcstatus
+int status_calc_pc(struct map_session_data* sd,int first);
+int status_calc_speed(struct map_session_data*); // [Celest]
+// int status_calc_skilltree(struct map_session_data *sd);
+int status_getrefinebonus(int lv,int type);
+int status_percentrefinery(struct map_session_data *sd,struct item *item);
+extern int percentrefinery[5][10];
+
+int status_readdb(void);
+int do_init_status(void);
+
+#endif
diff --git a/src/map/storage.c b/src/map/storage.c
index fc6f63cdd..82ecd9321 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -3,14 +3,18 @@
#include <stdlib.h>
#include <string.h>
-#include "db.h"
+#include "../common/db.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
+
#include "itemdb.h"
#include "clif.h"
#include "intif.h"
#include "pc.h"
#include "storage.h"
#include "guild.h"
-#include "nullpo.h"
+#include "battle.h"
+#include "atcommand.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -42,13 +46,13 @@ struct item *i2=(struct item *)_i2;
void sortage_sortitem(struct storage* stor){
nullpo_retv(stor);
- qsort(stor->storage, MAX_STORAGE, sizeof(struct item), storage_comp_item);
+ 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);
+ qsort(gstor->storage_, MAX_GUILD_STORAGE, sizeof(struct item), storage_comp_item);
}
/*==========================================
@@ -61,17 +65,32 @@ int do_init_storage(void) // map.c::do_init()‚©‚çŒÄ‚΂ê‚é
guild_storage_db=numdb_init();
return 1;
}
-
-void do_final_storage(void) // map.c::do_final()‚©‚çŒÄ‚΂ê‚é
+static int guild_storage_db_final(void *key,void *data,va_list ap)
+{
+ struct guild_storage *gstor=(struct guild_storage *) data;
+ aFree(gstor);
+ return 0;
+}
+static int storage_db_final(void *key,void *data,va_list ap)
{
+ struct storage *stor=(struct storage *) data;
+ aFree(stor);
+ return 0;
+}
+void do_final_storage(void) // by [MC Cameri]
+{
+ if (storage_db)
+ numdb_final(storage_db,storage_db_final);
+ if (guild_storage_db)
+ numdb_final(guild_storage_db,guild_storage_db_final);
}
struct storage *account2storage(int account_id)
{
struct storage *stor;
- stor=numdb_search(storage_db,account_id);
+ stor=(struct storage *) numdb_search(storage_db,account_id);
if(stor == NULL) {
- stor = calloc(sizeof(struct storage), 1);
+ stor = (struct storage *) aCallocA(sizeof(struct storage), 1);
if(stor == NULL){
printf("storage: out of memory!\n");
exit(0);
@@ -85,15 +104,15 @@ struct storage *account2storage(int account_id)
// Just to ask storage, without creation
struct storage *account2storage2(int account_id) {
- return numdb_search(storage_db, account_id);
+ return (struct storage *) numdb_search(storage_db, account_id);
}
int storage_delete(int account_id)
{
- struct storage *stor = numdb_search(storage_db,account_id);
+ struct storage *stor = (struct storage *) numdb_search(storage_db,account_id);
if(stor) {
numdb_erase(storage_db,account_id);
- free(stor);
+ aFree(stor);
}
return 0;
}
@@ -108,38 +127,25 @@ int storage_storageopen(struct map_session_data *sd)
nullpo_retr(0, sd);
- if((stor = numdb_search(storage_db,sd->status.account_id)) != NULL) {
- stor->storage_status = 1;
- sd->state.storage_flag = 0;
- clif_storageitemlist(sd,stor);
- clif_storageequiplist(sd,stor);
- clif_updatestorageamount(sd,stor);
- return 0;
+ if(pc_isGM(sd) && pc_isGM(sd) < battle_config.gm_can_drop_lv) {
+ clif_displaymessage(sd->fd, msg_txt(246));
+ return 1;
+ }
+ if((stor = (struct storage *) numdb_search(storage_db,sd->status.account_id)) != NULL) {
+ if (stor->storage_status == 0) {
+ stor->storage_status = 1;
+ sd->state.storage_flag = 0;
+ clif_storageitemlist(sd,stor);
+ clif_storageequiplist(sd,stor);
+ clif_updatestorageamount(sd,stor);
+ return 0;
+ }
} else
intif_request_storage(sd->status.account_id);
return 1;
}
-int storage_storageopen2(struct map_session_data *sd, struct map_session_data *pl_sd)
-{
- struct storage *stor;
- if(sd == NULL || pl_sd == NULL)
- {
- printf("storage_storageopen nullpo\n");
- return 0;
- }
-
- if((stor = numdb_search(storage_db,pl_sd->status.account_id)) != NULL)
- {
- clif_storageitemlist(sd,stor);
- clif_storageequiplist(sd,stor);
- clif_updatestorageamount(sd,stor);
- return 1;
- }
- return 0;
-}
-
/*==========================================
* ƒJƒvƒ‰‘qŒÉ‚ÖƒAƒCƒeƒ€’ljÁ
*------------------------------------------
@@ -153,6 +159,8 @@ int storage_additem(struct map_session_data *sd,struct storage *stor,struct item
nullpo_retr(1, stor);
nullpo_retr(1, item_data);
+ stor->dirty = 1;
+
if(item_data->nameid <= 0 || amount <= 0)
return 1;
nullpo_retr(1, data = itemdb_search(item_data->nameid));
@@ -161,12 +169,10 @@ int storage_additem(struct map_session_data *sd,struct storage *stor,struct item
if(!itemdb_isequip2(data)){
// ‘•”õ•i‚Å‚Í‚È‚¢‚Ì‚ÅAŠùŠ—L•i‚È‚çŒÂ”‚̂ݕω»‚³‚¹‚é
for(i=0;i<MAX_STORAGE;i++){
- if(stor->storage[i].nameid == item_data->nameid &&
- stor->storage[i].card[0] == item_data->card[0] && stor->storage[i].card[1] == item_data->card[1] &&
- stor->storage[i].card[2] == item_data->card[2] && stor->storage[i].card[3] == item_data->card[3]){
- if(stor->storage[i].amount+amount > MAX_AMOUNT)
+ if( compare_item (&stor->storage_[i], item_data)) {
+ if(stor->storage_[i].amount+amount > MAX_AMOUNT)
return 1;
- stor->storage[i].amount+=amount;
+ stor->storage_[i].amount+=amount;
clif_storageitemadded(sd,stor,i,amount);
break;
}
@@ -175,9 +181,9 @@ int storage_additem(struct map_session_data *sd,struct storage *stor,struct item
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;
+ 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);
@@ -187,6 +193,7 @@ int storage_additem(struct map_session_data *sd,struct storage *stor,struct item
if(i>=MAX_STORAGE)
return 1;
}
+
return 0;
}
/*==========================================
@@ -198,17 +205,19 @@ int storage_delitem(struct map_session_data *sd,struct storage *stor,int n,int a
nullpo_retr(1, sd);
nullpo_retr(1, stor);
- if(stor->storage[n].nameid==0 || stor->storage[n].amount<amount)
+ 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_[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;
}
/*==========================================
@@ -220,15 +229,16 @@ int storage_storageadd(struct map_session_data *sd,int index,int amount)
struct storage *stor;
nullpo_retr(0, sd);
- nullpo_retr(0, stor=account2storage(sd->status.account_id));
+ 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
- if(storage_additem(sd,stor,&sd->status.inventory[index],amount)==0)
- // remove item from inventory
- pc_delitem(sd,index,amount,0);
- } // valid amount
+ 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
@@ -245,15 +255,16 @@ int storage_storageget(struct map_session_data *sd,int index,int amount)
int flag;
nullpo_retr(0, sd);
- nullpo_retr(0, stor=account2storage(sd->status.account_id));
+ 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)
+ 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
clif_additem(sd,0,0,flag);
+// log_fromstorage(sd, index, 0);
} // valid amount
}// valid index
}// storage open
@@ -269,7 +280,7 @@ int storage_storageaddfromcart(struct map_session_data *sd,int index,int amount)
struct storage *stor;
nullpo_retr(0, sd);
- nullpo_retr(0, stor=account2storage(sd->status.account_id));
+ 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
@@ -292,12 +303,12 @@ int storage_storagegettocart(struct map_session_data *sd,int index,int amount)
struct storage *stor;
nullpo_retr(0, sd);
- nullpo_retr(0, stor=account2storage(sd->status.account_id));
+ 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){
+ 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
@@ -317,12 +328,14 @@ int storage_storageclose(struct map_session_data *sd)
struct storage *stor;
nullpo_retr(0, sd);
- nullpo_retr(0, stor=account2storage(sd->status.account_id));
+ nullpo_retr(0, stor=account2storage2(sd->status.account_id));
stor->storage_status=0;
sd->state.storage_flag = 0;
clif_storageclose(sd);
+ storage_storage_save(sd);
+
sortage_sortitem(stor);
return 0;
}
@@ -337,20 +350,36 @@ int storage_storage_quit(struct map_session_data *sd)
nullpo_retr(0, sd);
- stor = numdb_search(storage_db,sd->status.account_id);
- if(stor) stor->storage_status = 0;
+ stor = (struct storage *) numdb_search(storage_db,sd->status.account_id);
+ if(stor) {
+ stor->storage_status = 0;
+ storage_storage_save(sd);
+ }
return 0;
}
+void storage_storage_dirty(struct map_session_data *sd)
+{
+ struct storage *stor;
+
+ stor=(struct storage *) numdb_search(storage_db,sd->status.account_id);
+
+ if(stor)
+ stor->dirty = 1;
+}
+
int storage_storage_save(struct map_session_data *sd)
{
struct storage *stor;
nullpo_retr(0, sd);
- stor=numdb_search(storage_db,sd->status.account_id);
- if(stor) intif_send_storage(stor);
+ stor=(struct storage *) numdb_search(storage_db,sd->status.account_id);
+ if(stor && stor->dirty) {
+ intif_send_storage(stor);
+ stor->dirty = 0;
+ }
return 0;
}
@@ -359,9 +388,9 @@ struct guild_storage *guild2storage(int guild_id)
{
struct guild_storage *gs = NULL;
if(guild_search(guild_id) != NULL) {
- gs=numdb_search(guild_storage_db,guild_id);
+ gs=(struct guild_storage *) numdb_search(guild_storage_db,guild_id);
if(gs == NULL) {
- gs = calloc(sizeof(struct guild_storage), 1);
+ gs = (struct guild_storage *) aCallocA(sizeof(struct guild_storage), 1);
if(gs==NULL){
printf("storage: out of memory!\n");
exit(0);
@@ -375,10 +404,10 @@ struct guild_storage *guild2storage(int guild_id)
int guild_storage_delete(int guild_id)
{
- struct guild_storage *gstor = numdb_search(guild_storage_db,guild_id);
+ struct guild_storage *gstor = (struct guild_storage *) numdb_search(guild_storage_db,guild_id);
if(gstor) {
numdb_erase(guild_storage_db,guild_id);
- free(gstor);
+ aFree(gstor);
}
return 0;
}
@@ -391,7 +420,7 @@ int storage_guild_storageopen(struct map_session_data *sd)
if(sd->status.guild_id <= 0)
return 2;
- if((gstor = numdb_search(guild_storage_db,sd->status.guild_id)) != NULL) {
+ if((gstor = (struct guild_storage *) numdb_search(guild_storage_db,sd->status.guild_id)) != NULL) {
if(gstor->storage_status)
return 1;
gstor->storage_status = 1;
@@ -427,12 +456,10 @@ int guild_storage_additem(struct map_session_data *sd,struct guild_storage *stor
if(!itemdb_isequip2(data)){
// ‘•”õ•i‚Å‚Í‚È‚¢‚Ì‚ÅAŠùŠ—L•i‚È‚çŒÂ”‚̂ݕω»‚³‚¹‚é
for(i=0;i<MAX_GUILD_STORAGE;i++){
- if(stor->storage[i].nameid == item_data->nameid &&
- stor->storage[i].card[0] == item_data->card[0] && stor->storage[i].card[1] == item_data->card[1] &&
- stor->storage[i].card[2] == item_data->card[2] && stor->storage[i].card[3] == item_data->card[3]){
- if(stor->storage[i].amount+amount > MAX_AMOUNT)
+ if(compare_item(&stor->storage_[i], item_data)) {
+ if(stor->storage_[i].amount+amount > MAX_AMOUNT)
return 1;
- stor->storage[i].amount+=amount;
+ stor->storage_[i].amount+=amount;
clif_guildstorageitemadded(sd,stor,i,amount);
break;
}
@@ -441,9 +468,9 @@ int guild_storage_additem(struct map_session_data *sd,struct guild_storage *stor
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;
+ 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);
@@ -461,12 +488,12 @@ int guild_storage_delitem(struct map_session_data *sd,struct guild_storage *stor
nullpo_retr(1, sd);
nullpo_retr(1, stor);
- if(stor->storage[n].nameid==0 || stor->storage[n].amount<amount)
+ 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_[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);
}
@@ -485,6 +512,7 @@ int storage_guild_storageadd(struct map_session_data *sd,int index,int amount)
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);
@@ -506,11 +534,12 @@ int storage_guild_storageget(struct map_session_data *sd,int index,int amount)
if((stor=guild2storage(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)
+ 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
@@ -548,8 +577,8 @@ int storage_guild_storagegettocart(struct map_session_data *sd,int index,int amo
if((stor=guild2storage(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){
+ 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
@@ -583,7 +612,7 @@ int storage_guild_storage_quit(struct map_session_data *sd,int flag)
nullpo_retr(0, sd);
- stor = numdb_search(guild_storage_db,sd->status.guild_id);
+ stor = (struct guild_storage *) numdb_search(guild_storage_db,sd->status.guild_id);
if(stor) {
if(!flag)
intif_send_guild_storage(sd->status.account_id,stor);
diff --git a/src/map/storage.h b/src/map/storage.h
index 352dee4f0..7b2ac2cbe 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -5,7 +5,6 @@
#include "mmo.h"
int storage_storageopen(struct map_session_data *sd);
-int storage_storageopen2(struct map_session_data *sd,struct map_session_data *pl_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);
@@ -18,6 +17,7 @@ struct storage *account2storage2(int account_id);
int storage_delete(int account_id);
int storage_storage_quit(struct map_session_data *sd);
int storage_storage_save(struct map_session_data *sd);
+void storage_storage_dirty(struct map_session_data *sd);
struct guild_storage *guild2storage(int guild_id);
int guild_storage_delete(int guild_id);
diff --git a/src/map/trade.c b/src/map/trade.c
index 9d2128690..eb1d45ba2 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -1,6 +1,10 @@
+// $Id: trade.c 375 2005-03-04 21:33:31Z Yor $
+//#include <config.h>
+
#include <stdio.h>
#include <string.h>
+#include "../common/nullpo.h"
#include "clif.h"
#include "itemdb.h"
#include "map.h"
@@ -8,44 +12,46 @@
#include "pc.h"
#include "npc.h"
#include "battle.h"
-#include "nullpo.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)
-{
+void trade_traderequest(struct map_session_data *sd, int target_id) {
struct map_session_data *target_sd;
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¿’†
+ 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;
}
}
- if((target_sd->trade_partner !=0) || (sd->trade_partner !=0)) {
- trade_tradecancel(sd); //person is in another trade
- }
- else{
- if((pc_isGM(sd) < 60) && (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) {
+ if(pc_isGM(sd) && pc_isGM(target_sd) < battle_config.gm_can_drop_lv) {
+ 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 {
+ if (!pc_isGM(sd) && (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);
+ clif_traderequest(target_sd, sd->status.name);
}
}
- }
- else{
- clif_tradestart(sd,1); //character does not exist
+ } else {
+ clif_tradestart(sd, 1); // character does not exist
}
}
@@ -53,34 +59,103 @@ void trade_traderequest(struct map_session_data *sd,int target_id)
* Žæˆø—v¿
*------------------------------------------
*/
-void trade_tradeack(struct map_session_data *sd,int type)
-{
+void trade_tradeack(struct map_session_data *sd, int type) {
struct map_session_data *target_sd;
-
+ struct storage *stor;
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->deal_locked =0;
- sd->trade_partner=0;
- target_sd->deal_locked=0;
- target_sd->trade_partner=0;
+ if ((target_sd = map_id2sd(sd->trade_partner)) != NULL) {
+ clif_tradestart(target_sd, type);
+ clif_tradestart(sd, type);
+ if (type == 4) { // Cancel
+ sd->deal_locked = 0;
+ sd->trade_partner = 0;
+ target_sd->deal_locked = 0;
+ target_sd->trade_partner = 0;
}
- if(sd->npc_id != 0)
+ if (sd->npc_id != 0)
npc_event_dequeue(sd);
- if(target_sd->npc_id != 0)
+ if (target_sd->npc_id != 0)
npc_event_dequeue(target_sd);
+
+ //close STORAGE window if it's open. It protects from spooffing packets [Lupus]
+ stor=account2storage2(sd->status.account_id);
+ if(stor!=NULL && stor->storage_status == 1) {
+ if (sd->state.storage_flag) //is it Guild Storage or Common
+ storage_guild_storageclose(sd);
+ else
+ storage_storageclose(sd);
+ }//END OF STORAGE CLOSE
}
}
/*==========================================
+ * 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(0, sd);
+
+ // get inventory of player
+ memcpy(&inventory, &sd->status.inventory, sizeof(struct item) * MAX_INVENTORY);
+
+/* remove this part: arrows can be trade and equiped
+ // remove equiped items (they can not be trade)
+ for (i = 0; i < MAX_INVENTORY; i++)
+ if (inventory[i].nameid > 0 && inventory[i].equip)
+ memset(&inventory[i], 0, sizeof(struct item));
+*/
+
+ // check items in player inventory
+ for(i = 0; i < 10; i++)
+ if (sd->deal_item_amount[i] < 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_amount[i] > 0) {
+ index = sd->deal_item_index[i] - 2;
+ inventory[index].amount -= sd->deal_item_amount[i]; // 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;
+}
+
+/*==========================================
* ƒAƒCƒeƒ€’ljÁ
*------------------------------------------
*/
-void trade_tradeadditem(struct map_session_data *sd, int index, int amount)
-{
+void trade_tradeadditem(struct map_session_data *sd, int index, int amount) {
struct map_session_data *target_sd;
int trade_i;
int trade_weight = 0;
@@ -89,7 +164,7 @@ void trade_tradeadditem(struct map_session_data *sd, int index, int amount)
nullpo_retv(sd);
if (((target_sd = map_id2sd(sd->trade_partner)) != NULL) && (sd->deal_locked < 1)){
- if (index < 2 || index >= MAX_INVENTORY + 2){
+ if (index < 2 || index >= MAX_INVENTORY + 2) {
if (index == 0) {
if (amount > 0 && amount <= MAX_ZENY && amount <= sd->status.zeny && // check amount
(target_sd->status.zeny + amount) <= MAX_ZENY) { // fix positiv overflow
@@ -108,7 +183,7 @@ void trade_tradeadditem(struct map_session_data *sd, int index, int amount)
trade_weight += sd->inventory_data[index-2]->weight * amount;
if (target_sd->weight + trade_weight > target_sd->max_weight){
clif_tradeitemok(sd, index, 1); // fail to add item -- the player was over weighted.
- amount = 0; // [MouseJstr]
+ amount = 0;
} else {
for(c = 0; c == trade_i - 1; c++) { // re-deal exploit protection [Valaris]
if (sd->deal_item_index[c] == index) {
@@ -118,6 +193,10 @@ void trade_tradeadditem(struct map_session_data *sd, int index, int amount)
}
sd->deal_item_index[trade_i] = index;
sd->deal_item_amount[trade_i] += amount;
+ if (impossible_trade_check(sd)) { // check exploit (trade more items that you have)
+ trade_tradecancel(sd);
+ return;
+ }
clif_tradeitemok(sd, index, 0); // success to add item
clif_tradeadditem(sd, target_sd, index, amount);
}
@@ -134,27 +213,39 @@ void trade_tradeadditem(struct map_session_data *sd, int index, int amount)
* ƒAƒCƒeƒ€’ljÁŠ®—¹(ok‰Ÿ‚µ)
*------------------------------------------
*/
-void trade_tradeok(struct map_session_data *sd)
-{
+void trade_tradeok(struct map_session_data *sd) {
struct map_session_data *target_sd;
int trade_i;
nullpo_retv(sd);
-
- for(trade_i=0;trade_i<10;trade_i++) {
- if(sd->deal_item_amount[trade_i]>sd->status.inventory[sd->deal_item_index[trade_i]-2].amount ||
- sd->deal_item_amount[trade_i]<0) {
+
+ // check items
+ for(trade_i = 0; trade_i < 10; trade_i++) {
+ if ((((sd->deal_item_index[trade_i]-2) >= 0) &&
+ (sd->deal_item_amount[trade_i] > sd->status.inventory[sd->deal_item_index[trade_i]-2].amount)) ||
+ (sd->deal_item_amount[trade_i] < 0)) {
trade_tradecancel(sd);
return;
}
-
}
-
- if((target_sd = map_id2sd(sd->trade_partner)) != NULL){
- sd->deal_locked=1;
- clif_tradeitemok(sd,0,0);
- clif_tradedeal_lock(sd,0);
- clif_tradedeal_lock(target_sd,1);
+
+ // 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->deal_locked = 1;
+ clif_tradeitemok(sd, 0, 0);
+ clif_tradedeal_lock(sd, 0);
+ clif_tradedeal_lock(target_sd, 1);
}
}
@@ -162,38 +253,37 @@ void trade_tradeok(struct map_session_data *sd)
* ŽæˆøƒLƒƒƒ“ƒZƒ‹
*------------------------------------------
*/
-void trade_tradecancel(struct map_session_data *sd)
-{
+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_amount[trade_i] != 0) {
- clif_additem(sd,sd->deal_item_index[trade_i]-2,sd->deal_item_amount[trade_i],0);
- sd->deal_item_index[trade_i] =0;
- sd->deal_item_amount[trade_i]=0;
+ 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_amount[trade_i] != 0) {
+ clif_additem(sd, sd->deal_item_index[trade_i] - 2, sd->deal_item_amount[trade_i], 0);
+ sd->deal_item_index[trade_i] = 0;
+ sd->deal_item_amount[trade_i] = 0;
}
- if(target_sd->deal_item_amount[trade_i] != 0) {
- clif_additem(target_sd,target_sd->deal_item_index[trade_i]-2,target_sd->deal_item_amount[trade_i],0);
- target_sd->deal_item_index[trade_i] =0;
- target_sd->deal_item_amount[trade_i]=0;
+ if (target_sd->deal_item_amount[trade_i] != 0) {
+ clif_additem(target_sd, target_sd->deal_item_index[trade_i] - 2, target_sd->deal_item_amount[trade_i], 0);
+ target_sd->deal_item_index[trade_i] = 0;
+ target_sd->deal_item_amount[trade_i] = 0;
}
}
- if(sd->deal_zeny) {
- clif_updatestatus(sd,SP_ZENY);
- sd->deal_zeny=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;
+ if (target_sd->deal_zeny) {
+ clif_updatestatus(target_sd, SP_ZENY);
+ target_sd->deal_zeny = 0;
}
- sd->deal_locked =0;
- sd->trade_partner=0;
- target_sd->deal_locked=0;
- target_sd->trade_partner=0;
+ sd->deal_locked = 0;
+ sd->trade_partner = 0;
+ target_sd->deal_locked = 0;
+ target_sd->trade_partner = 0;
clif_tradecancelled(sd);
clif_tradecancelled(target_sd);
}
@@ -203,91 +293,96 @@ void trade_tradecancel(struct map_session_data *sd)
* Žæˆø‹–‘ø(trade‰Ÿ‚µ)
*------------------------------------------
*/
-void trade_tradecommit(struct map_session_data *sd)
-{
+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->deal_locked >=1) && (target_sd->deal_locked >=1) ){ // both have pressed 'ok'
- if(sd->deal_locked < 2) {sd->deal_locked=2;} // set locked to 2
- if(target_sd->deal_locked==2) { // the other one pressed 'trade' too
- for(trade_i=0; trade_i<10;trade_i++) {
- if(sd->deal_item_amount[trade_i] != 0) {
- int n=sd->deal_item_index[trade_i]-2;
- int flag;
-
- //Dupe Fix by mark
- if (sd->status.inventory[n].amount < sd->deal_item_amount[trade_i])
- sd->deal_item_amount[trade_i] = sd->status.inventory[n].amount;
- //End Dupe Fix
-
- #ifndef TXT_ONLY
- if(log_config.trade > 0)
- log_trade(sd,target_sd,n,sd->deal_item_amount[trade_i]);
- #endif //USE_SQL
-
- flag = pc_additem(target_sd,&sd->status.inventory[n],sd->deal_item_amount[trade_i]);
- if(flag==0)
- pc_delitem(sd,n,sd->deal_item_amount[trade_i],1);
- else
- clif_additem(sd,n,sd->deal_item_amount[trade_i],0);
- sd->deal_item_index[trade_i] =0;
- sd->deal_item_amount[trade_i]=0;
- }
- if(target_sd->deal_item_amount[trade_i] != 0) {
- int n=target_sd->deal_item_index[trade_i]-2;
- int flag;
-
- //Dupe Fix by mark
- if (target_sd->status.inventory[n].amount < target_sd->deal_item_amount[trade_i])
- target_sd->deal_item_amount[trade_i] = target_sd->status.inventory[n].amount;
- //End Dupe Fix
-
- #ifndef TXT_ONLY
- if(log_config.trade > 0)
- log_trade(target_sd,sd,n,target_sd->deal_item_amount[trade_i]);
- #endif //USE_SQL
-
- flag = pc_additem(sd,&target_sd->status.inventory[n],target_sd->deal_item_amount[trade_i]);
- if(flag==0)
- pc_delitem(target_sd,n,target_sd->deal_item_amount[trade_i],1);
- else
- clif_additem(target_sd,n,target_sd->deal_item_amount[trade_i],0);
- target_sd->deal_item_index[trade_i] =0;
- target_sd->deal_item_amount[trade_i]=0;
- }
+ if ((target_sd = map_id2sd(sd->trade_partner)) != NULL) {
+ if ((sd->deal_locked >= 1) && (target_sd->deal_locked >= 1)) { // both have pressed 'ok'
+ if (sd->deal_locked < 2) { // set locked to 2
+ sd->deal_locked = 2;
+ }
+ if (target_sd->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;
}
- if(sd->deal_zeny) {
- #ifndef TXT_ONLY
- if (log_config.trade > 0 && log_config.zeny > 0)
- log_zeny(sd, target_sd, sd->deal_zeny);
- #endif //USE_SQL
- sd->status.zeny -= sd->deal_zeny;
- clif_updatestatus(sd,SP_ZENY);
- target_sd->status.zeny += sd->deal_zeny;
- clif_updatestatus(target_sd,SP_ZENY);
- sd->deal_zeny=0;
+ // check exploit (trade more items that you have)
+ if (impossible_trade_check(target_sd)) {
+ trade_tradecancel(target_sd);
+ return;
}
- if(target_sd->deal_zeny) {
- #ifndef TXT_ONLY
- if (log_config.trade > 0 && log_config.zeny > 0)
- log_zeny(target_sd, sd, target_sd->deal_zeny);
- #endif //USE_SQL
- target_sd->status.zeny -= target_sd->deal_zeny;
- clif_updatestatus(target_sd,SP_ZENY);
- sd->status.zeny += target_sd->deal_zeny;
- clif_updatestatus(sd,SP_ZENY);
- target_sd->deal_zeny=0;
+ // 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
+
+ // trade is accepted
+ for(trade_i = 0; trade_i < 10; trade_i++) {
+ if (sd->deal_item_amount[trade_i] != 0) {
+ int n = sd->deal_item_index[trade_i] - 2;
+
+ if (sd->status.inventory[n].amount < sd->deal_item_amount[trade_i])
+ sd->deal_item_amount[trade_i] = sd->status.inventory[n].amount;
+ log_trade(sd, target_sd, n, sd->deal_item_amount[trade_i]);
+
+ flag = pc_additem(target_sd, &sd->status.inventory[n], sd->deal_item_amount[trade_i]);
+ if (flag == 0)
+ pc_delitem(sd, n, sd->deal_item_amount[trade_i], 1);
+ else
+ clif_additem(sd, n, sd->deal_item_amount[trade_i], 0);
+ sd->deal_item_index[trade_i] = 0;
+ sd->deal_item_amount[trade_i] = 0;
+
+ }
+ if (target_sd->deal_item_amount[trade_i] != 0) {
+ int n = target_sd->deal_item_index[trade_i] - 2;
+
+ if (target_sd->status.inventory[n].amount < target_sd->deal_item_amount[trade_i])
+ target_sd->deal_item_amount[trade_i] = target_sd->status.inventory[n].amount;
+
+ log_trade(target_sd, sd, n, target_sd->deal_item_amount[trade_i]);
+ flag = pc_additem(sd, &target_sd->status.inventory[n], target_sd->deal_item_amount[trade_i]);
+ if (flag == 0)
+ pc_delitem(target_sd, n, target_sd->deal_item_amount[trade_i], 1);
+ else
+ clif_additem(target_sd, n, target_sd->deal_item_amount[trade_i], 0);
+ target_sd->deal_item_index[trade_i] = 0;
+ target_sd->deal_item_amount[trade_i] = 0;
+ }
+ }
+ if (sd->deal_zeny) {
+ sd->status.zeny -= sd->deal_zeny;
+ target_sd->status.zeny += sd->deal_zeny;
+ }
+ if (target_sd->deal_zeny) {
+ 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->deal_locked = 0;
+ sd->trade_partner = 0;
+ target_sd->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); // do pc_makesavestatus and save storage too
+ chrif_save(target_sd); // do pc_makesavestatus and save storage too
+ // zeny value was modified!!!! hacker with packet modified
+ } else {
+ trade_tradecancel(sd);
}
- sd->deal_locked =0;
- sd->trade_partner=0;
- target_sd->deal_locked=0;
- target_sd->trade_partner=0;
- clif_tradecompleted(sd,0);
- clif_tradecompleted(target_sd,0);
}
}
}
diff --git a/src/map/vending.c b/src/map/vending.c
index a7aa708e5..2d3790596 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -48,7 +48,7 @@ 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)
{
- int i, j, w, z, new = 0, blank, vend_list[12];
+ int i, j, w, z, new_ = 0, blank, vend_list[12];
short amount, index;
struct map_session_data *vsd = map_id2sd(id);
@@ -99,8 +99,8 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha
case ADDITEM_EXIST:
break;
case ADDITEM_NEW:
- new++;
- if (new > blank)
+ new_++;
+ if (new_ > blank)
return; // Ží—Þ”’´‰ß
break;
case ADDITEM_OVERAMOUNT:
@@ -112,6 +112,7 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha
clif_tradecancelled(vsd);
return;
}
+
pc_payzeny(sd, z);
pc_getzeny(vsd, z);
for(i = 0; 8 + 4 * i < len; i++) {
@@ -122,6 +123,13 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha
vsd->vending[vend_list[i]].amount -= amount;
pc_cart_delitem(vsd, index, amount, 0);
clif_vendingreport(vsd, index, amount);
+
+ //log added by Lupus
+ if(log_config.vend > 0) {
+ log_vend(sd,vsd, index, amount, z); // for Item + Zeny. log.
+ //we log ZENY only with the 1st item. Then zero it for the rest items 8).
+ z = 0;
+ }
}
}
@@ -141,11 +149,14 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f
}
if (flag) {
- for(i = 0; 85 + 8 * i < len; i++) {
+ for(i = 0; (85 + 8 * i < len) && (i < MAX_VENDING); i++) {
sd->vending[i].index = *(short*)(p+8*i)-2;
sd->vending[i].amount = *(short*)(p+2+8*i);
sd->vending[i].value = *(int*)(p+4+8*i);
- if(sd->vending[i].value>battle_config.vending_max_value)sd->vending[i].value=battle_config.vending_max_value;
+ 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 == 0)
+ 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);
diff --git a/tool/Makefile b/src/tool/Makefile
index bbf18cf98..bbf18cf98 100644
--- a/tool/Makefile
+++ b/src/tool/Makefile
diff --git a/tool/adduser.c b/src/tool/adduser.c
index 1219540ab..1219540ab 100644
--- a/tool/adduser.c
+++ b/src/tool/adduser.c
diff --git a/tool/backup b/src/tool/backup
index 939c7eee7..939c7eee7 100644
--- a/tool/backup
+++ b/src/tool/backup
diff --git a/tool/cgi/addaccount.cgi b/src/tool/cgi/addaccount.cgi
index 7d1788c48..7d1788c48 100644
--- a/tool/cgi/addaccount.cgi
+++ b/src/tool/cgi/addaccount.cgi
diff --git a/tool/checkversion b/src/tool/checkversion
index 9e485d9a3..9e485d9a3 100644
--- a/tool/checkversion
+++ b/src/tool/checkversion
diff --git a/tool/convert.c b/src/tool/convert.c
index 16631c945..16631c945 100644
--- a/tool/convert.c
+++ b/src/tool/convert.c
diff --git a/tool/getlogincount b/src/tool/getlogincount
index 45c6f81f6..45c6f81f6 100644
--- a/tool/getlogincount
+++ b/src/tool/getlogincount
diff --git a/tool/ladmin b/src/tool/ladmin
index d0c0be485..d0c0be485 100644
--- a/tool/ladmin
+++ b/src/tool/ladmin
diff --git a/tool/mapcheck.sh b/src/tool/mapcheck.sh
index 337884c43..337884c43 100644
--- a/tool/mapcheck.sh
+++ b/src/tool/mapcheck.sh
diff --git a/tool/mapchecker.sh b/src/tool/mapchecker.sh
index 7250c342e..7250c342e 100644
--- a/tool/mapchecker.sh
+++ b/src/tool/mapchecker.sh
diff --git a/src/txt-converter/char/GNUmakefile b/src/txt-converter/char/GNUmakefile
deleted file mode 100644
index 56723ca5a..000000000
--- a/src/txt-converter/char/GNUmakefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all: char-converter
-sql: char-converter
-
-COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/db.o ../../common/malloc.o
-
-char-converter: char-converter.o strlib.o $(COMMON_OBJ)
- $(CC) -o ../../../$@ $^ $(LIB_S)
-
-char-converter.o: char-converter.c char.h strlib.h
-strlib.o: strlib.c strlib.h
-clean:
- rm -f *.o ../../../char-converter
-
diff --git a/src/txt-converter/char/Makefile b/src/txt-converter/char/Makefile
index 56723ca5a..6b85a04db 100644
--- a/src/txt-converter/char/Makefile
+++ b/src/txt-converter/char/Makefile
@@ -1,13 +1,13 @@
all: char-converter
sql: char-converter
-COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/db.o ../../common/malloc.o
+COMMON_OBJ = ../../common/obj/core.o ../../common/obj/socket.o ../../common/obj/timer.o ../../common/obj/grfio.o ../../common/obj/db.o ../../common/obj/lock.o ../../common/obj/nullpo.o ../../common/obj/malloc.o ../../common/obj/showmsg.o ../../common/obj/strlib.o
-char-converter: char-converter.o strlib.o $(COMMON_OBJ)
+char-converter: char-converter.o $(COMMON_OBJ)
$(CC) -o ../../../$@ $^ $(LIB_S)
-char-converter.o: char-converter.c char.h strlib.h
-strlib.o: strlib.c strlib.h
+char-converter.o: char-converter.c char.h ../../common/strlib.h
+strlib.o: strlib.c ../../common/strlib.h
clean:
rm -f *.o ../../../char-converter
diff --git a/src/txt-converter/char/char-converter.c b/src/txt-converter/char/char-converter.c
index 8928e240f..217bf2b15 100644
--- a/src/txt-converter/char/char-converter.c
+++ b/src/txt-converter/char/char-converter.c
@@ -16,16 +16,16 @@
#define STORAGE_MEMINC 16
-
+
#include "char.h"
-#include "strlib.h"
+#include "../../common/strlib.h"
#ifdef MEMWATCH
#include "memwatch.h"
#endif
-
+
char pet_txt[256]="save/pet.txt";
-char storage_txt[256]="save/storage.txt";
+char storage_txt[256]="save/storage.txt";
MYSQL mysql_handle;
MYSQL_RES* sql_res ;
@@ -39,7 +39,7 @@ char db_server_id[32] = "ragnarok";
char db_server_pw[32] = "ragnarok";
char db_server_logindb[32] = "ragnarok";
-struct storage *storage=NULL;
+struct storage *storage_=NULL;
struct mmo_map_server server[MAX_MAP_SERVERS];
int server_fd[MAX_MAP_SERVERS];
@@ -89,18 +89,18 @@ 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];
+ p->class_ = tmp_int[1];
memcpy(p->name, tmp_str, 24);
p->account_id = tmp_int[2];
p->char_id = tmp_int[3];
@@ -126,11 +126,11 @@ int inter_pet_fromstr(char *str, struct s_pet *p)
//---------------------------------------------------------
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 tmp_sql[65535];
MYSQL_RES* sql_res ;
MYSQL_ROW sql_row ;
-
+
jstrescapecpy (t_name, p->name);
if(p->hungry < 0)
p->hungry = 0;
@@ -148,19 +148,19 @@ int inter_pet_tosql(int pet_id, struct s_pet *p) {
sql_row = mysql_fetch_row(sql_res); //row fetching
if (!sql_row) //no row -> insert
sprintf(tmp_sql,"INSERT INTO `pet` (`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')",
- p->pet_id, p->class, t_name, p->account_id, p->char_id, p->level, p->egg_id,
+ p->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);
else //row reside -> updating
sprintf(tmp_sql, "UPDATE `pet` 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'",
- p->class, t_name, p->account_id, p->char_id, p->level, p->egg_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, p->pet_id);
mysql_free_result(sql_res) ; //resource free
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
}
-
+
printf ("pet dump success! - %d:%s\n", pet_id, p->name);
-
+
return 0;
}
@@ -168,27 +168,27 @@ int storage_tosql(int account_id,struct storage *p){
// id -> DB dump
// storage {`account_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`}
int i,j;
-
+
j=0;
-
+
//printf ("starting storage dump to DB - id: %d\n", account_id);
-
+
//delete old data.
sprintf(tmp_sql,"DELETE FROM `storage` WHERE `account_id`='%d'",account_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
}
-
+
//printf ("all storage item was deleted ok\n");
-
+
for(i=0;i<MAX_STORAGE;i++) {
- //printf ("save storage num: %d (%d:%d)\n",i, p->storage[i].nameid , p->storage[i].amount);
-
- if( (p->storage[i].nameid) && (p->storage[i].amount) ){
+ //printf ("save storage num: %d (%d:%d)\n",i, p->storage_[i].nameid , p->storage_[i].amount);
+
+ if( (p->storage_[i].nameid) && (p->storage_[i].amount) ){
sprintf(tmp_sql,"INSERT INTO `storage` (`account_id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`card0`,`card1`,`card2`,`card3`,`broken`) VALUES ('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
- p->account_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,
- p->storage[i].card[0], p->storage[i].card[1], p->storage[i].card[2], p->storage[i].card[3], p->storage[i].broken );
+ p->account_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,
+ p->storage_[i].card[0], p->storage_[i].card[1], p->storage_[i].card[2], p->storage_[i].card[3], p->storage_[i].broken );
//printf ("%s\n",tmp_sql);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
@@ -212,51 +212,51 @@ int storage_fromstr(char *str, struct storage *p)
if(set!=2)
return 0;
if(str[next]=='\n' || str[next]=='\r')
- return 1;
+ return 1;
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[11], &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];
- p->storage[i].broken = tmp_int[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];
+ p->storage_[i].broken = tmp_int[11];
next += len;
if (str[next] == ' ')
- 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];
- p->storage[i].broken = 0;
+ 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];
+ p->storage_[i].broken = 0;
next += len;
if (str[next] == ' ')
- next++;
+ next++;
}
-
+
else return 0;
}
return 1;
@@ -337,7 +337,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p) {
p->char_id = tmp_int[0];
p->account_id = tmp_int[1];
p->char_num = tmp_int[2];
- p->class = tmp_int[3];
+ p->class_ = tmp_int[3];
p->base_level = tmp_int[4];
p->job_level = tmp_int[5];
p->base_exp = tmp_int[6];
@@ -508,10 +508,10 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p) {
//==========================================================================================================
int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
int i,save_flag;
-
+
save_flag = char_id;
printf("request save char data... (%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
@@ -525,7 +525,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
"`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'",
- char_id,p->account_id,p->char_num,p->name,p->class, p->base_level, p->job_level,
+ 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->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,
@@ -535,17 +535,17 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
p->last_point.map, p->last_point.x, p->last_point.y,
p->save_point.map, p->save_point.x, p->save_point.y, p->partner_id
);
-
+
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
//`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
sprintf(tmp_sql,"DELETE FROM `memo` WHERE `char_id`='%d'",char_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (delete `memo`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
//insert here.
for(i=0;i<10;i++){
if(p->memo_point[i].map[0]){
@@ -560,7 +560,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (delete `inventory`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
//insert here.
for(i=0;i<MAX_INVENTORY;i++){
if(p->inventory[i].nameid){
@@ -579,7 +579,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (delete `cart_inventory`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
//insert here.
for(i=0;i<MAX_CART;i++){
if(p->cart[i].nameid){
@@ -593,14 +593,14 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
}
}
}
-
-
+
+
//`skill` (`char_id`, `id`, `lv`)
sprintf(tmp_sql,"DELETE FROM `skill` WHERE `char_id`='%d'",char_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (delete `skill`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
//insert here.
for(i=0;i<MAX_SKILL;i++){
if(p->skill[i].id){
@@ -618,7 +618,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (delete `global_reg_value`)- %s\n", mysql_error(&mysql_handle) );
}
-
+
//insert here.
for(i=0;i<p->global_reg_num;i++){
if(p->global_reg[i].value !=0){
@@ -629,10 +629,10 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
}
}
}
-
+
printf("saving char is done... (%d)\n",char_id);
save_flag = 0;
-
+
return 0;
}
//==========================================================================================================
@@ -645,7 +645,7 @@ int mmo_char_init(void){
char input;
FILE *fp;
-
+
//DB connection initialized
mysql_init(&mysql_handle);
printf("Connect DB server.... (inter server)\n");
@@ -658,7 +658,7 @@ int mmo_char_init(void){
else {
printf ("connect success! (inter server)\n");
}
-
+
printf("Warning : Make sure you backup your databases before continuing!\n");
@@ -667,14 +667,14 @@ int mmo_char_init(void){
if(input == 'y' || input == 'Y'){
printf("\nConverting Character Database...\n");
fp=fopen("save/athena.txt","r");
- char_dat=malloc(sizeof(char_dat[0])*256);
+ char_dat = (struct mmo_charstatus*)malloc(sizeof(char_dat[0])*256);
char_max=256;
if(fp==NULL)
return 0;
while(fgets(line, 65535, fp)){
if(char_num>=char_max){
char_max+=256;
- char_dat=realloc(char_dat, sizeof(char_dat[0]) *char_max);
+ char_dat = (struct mmo_charstatus*)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]);
@@ -689,8 +689,8 @@ int mmo_char_init(void){
printf("char data convert end\n");
fclose(fp);
}
-
- while(getchar() != '\n');
+
+ while(getchar() != '\n');
printf("\nDo you wish to convert your Storage Database to SQL? (y/n) : ");
input=getchar();
if(input == 'y' || input == 'Y') {
@@ -700,25 +700,25 @@ int mmo_char_init(void){
printf("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=malloc(sizeof(struct storage));
+ storage_ = (struct storage*)malloc(sizeof(struct storage));
}else{
- storage=realloc(storage,sizeof(struct storage)*(i+1));
+ 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)
+ 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("\nDo you wish to convert your Pet Database to SQL? (y/n) : ");
input=getchar();
@@ -726,8 +726,8 @@ int mmo_char_init(void){
printf("\nConverting Pet Database...\n");
if( (fp=fopen(pet_txt,"r")) ==NULL )
return 1;
-
- p=malloc(sizeof(struct s_pet));
+
+ p = (struct s_pet*)malloc(sizeof(struct s_pet));
while(fgets(line, sizeof(line), fp)){
if(p==NULL){
printf("int_pet: out of memory!\n");
@@ -789,10 +789,13 @@ int inter_config_read(const char *cfgName) {
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){
+ inter_config_read(w2);
}
}
fclose(fp);
-
+
printf("Reading interserver configuration: Done\n");
return 0;
@@ -825,7 +828,7 @@ int char_config_read(const char *cfgName) {
}
fclose(fp);
printf("Reading configuration: Done\n");
-
+
return 0;
}
diff --git a/src/txt-converter/char/char.h b/src/txt-converter/char/char.h
index b5864b31c..e1d5c90dc 100644
--- a/src/txt-converter/char/char.h
+++ b/src/txt-converter/char/char.h
@@ -24,9 +24,9 @@ struct mmo_map_server{
char map[MAX_MAP_PER_SERVER][16];
};
-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 mapif_sendall(char *buf,unsigned int len);
+int mapif_sendallwos(int fd,char *buf,unsigned int len);
+int mapif_send(int fd,char *buf,unsigned int len);
extern int autosave_interval;
diff --git a/src/txt-converter/char/strlib.c b/src/txt-converter/char/strlib.c
deleted file mode 100644
index 60803c1d1..000000000
--- a/src/txt-converter/char/strlib.c
+++ /dev/null
@@ -1,66 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "strlib.h"
-
-//-----------------------------------------------
-// string lib.
-unsigned char* jstrescape (unsigned char* pt) {
- //copy from here
- unsigned char * ptr;
- int i =0, j=0;
-
- //copy string to temporary
- ptr = malloc(J_MAX_MALLOC_SIZE);
- strcpy (ptr,pt);
-
- while (ptr[i] != '\0') {
- switch (ptr[i]) {
- case '\'':
- pt[j++] = '\\';
- pt[j++] = ptr[i++];
- break;
- default:
- pt[j++] = ptr[i++];
- }
- }
- pt[j++] = '\0';
- free (ptr);
- return (unsigned char*) &pt[0];
-}
-
-unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt) {
- //copy from here
- int i =0, j=0;
-
- while (spt[i] != '\0') {
- switch (spt[i]) {
- case '\'':
- pt[j++] = '\\';
- pt[j++] = spt[i++];
- break;
- default:
- pt[j++] = spt[i++];
- }
- }
- pt[j++] = '\0';
- return (unsigned char*) &pt[0];
-}
-int jmemescapecpy (unsigned char* pt,unsigned 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;
- default:
- pt[j++] = spt[i++];
- }
- }
- // copy size is 0 ~ (j-1)
- return j;
-}
diff --git a/src/txt-converter/char/strlib.h b/src/txt-converter/char/strlib.h
deleted file mode 100644
index 442cfac29..000000000
--- a/src/txt-converter/char/strlib.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _J_STR_H_
-#define _J_STR_H_
-#define J_MAX_MALLOC_SIZE 65535
-//string functions.
-//code by Jioh L. Jung
-unsigned char* jstrescape (unsigned char* pt);
-unsigned char* jstrescapecpy (unsigned char* pt,unsigned char* spt);
-int jmemescapecpy (unsigned char* pt,unsigned char* spt, int size);
-#endif
diff --git a/src/txt-converter/common/mmo.h b/src/txt-converter/common/mmo.h
index 178046a17..28462e99d 100644
--- a/src/txt-converter/common/mmo.h
+++ b/src/txt-converter/common/mmo.h
@@ -29,11 +29,11 @@
#define MAX_STORAGE 300
#define MAX_GUILD_STORAGE 1000
#define MAX_PARTY 12
-#define MAX_GUILD 56 // increased max guild members to accomodate for +2 increase for extension levels [Valaris]
-#define MAX_GUILDPOSITION 56 // increased max guild positions to accomodate for all members [Valaris]
+#define MAX_GUILD 16+10*6 // increased max guild members to accomodate for +6 increase for extension levels [Lupus]
+#define MAX_GUILDPOSITION 20 // increased max guild positions to accomodate for all members [Valaris]
#define MAX_GUILDEXPLUSION 32
#define MAX_GUILDALLIANCE 16
-#define MAX_GUILDSKILL 8
+#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
@@ -87,7 +87,7 @@ struct s_pet {
int account_id;
int char_id;
int pet_id;
- short class;
+ short class_;
short level;
short egg_id;//pet egg id
short equip;//pet equip name_id
@@ -105,7 +105,7 @@ struct mmo_charstatus {
int base_exp,job_exp,zeny;
- short class;
+ short class_;
short status_point,skill_point;
int hp,max_hp,sp,max_sp;
short option,karma,manner;
@@ -135,14 +135,14 @@ struct storage {
int account_id;
short storage_status;
short storage_amount;
- struct item storage[MAX_STORAGE];
+ struct item storage_[MAX_STORAGE];
};
struct guild_storage {
int guild_id;
short storage_status;
short storage_amount;
- struct item storage[MAX_GUILD_STORAGE];
+ struct item storage_[MAX_GUILD_STORAGE];
};
struct map_session_data;
@@ -168,7 +168,7 @@ struct party {
struct guild_member {
int account_id, char_id;
- short hair,hair_color,gender,class,lv;
+ short hair,hair_color,gender,class_,lv;
int exp,exp_payper;
short online,position;
int rsv1,rsv2;
@@ -237,8 +237,8 @@ struct guild_castle {
int Ghp4;
int Ghp5;
int Ghp6;
- int Ghp7;
- int GID0;
+ int Ghp7;
+ int GID0;
int GID1;
int GID2;
int GID3;
diff --git a/src/txt-converter/login/GNUmakefile b/src/txt-converter/login/GNUmakefile
deleted file mode 100644
index 9f34e143a..000000000
--- a/src/txt-converter/login/GNUmakefile
+++ /dev/null
@@ -1,11 +0,0 @@
-all: login-converter
-sql: login-converter
-
-COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/db.o ../../common/malloc.o
-COMMON_H = ../../common/core.h ../../common/socket.h ../../common/timer.h ../../common/mmo.h ../../common/version.h ../../common/db.h ../../common/malloc.h
-
-login-converter: login-converter.o ../../login_sql/md5calc.o ../../login_sql/strlib.o $(COMMON_OBJ)
- $(CC) -o ../../../$@ $^ $(LIB_S)
-login-converter.o: login-converter.c ../../login_sql/login.h ../../login_sql/md5calc.h ../../login_sql/strlib.h $(COMMON_H)
-clean:
- rm -f *.o ../../../login-converter
diff --git a/src/txt-converter/login/Makefile b/src/txt-converter/login/Makefile
index 9f34e143a..7158931d0 100644
--- a/src/txt-converter/login/Makefile
+++ b/src/txt-converter/login/Makefile
@@ -1,11 +1,12 @@
all: login-converter
sql: login-converter
-COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/db.o ../../common/malloc.o
-COMMON_H = ../../common/core.h ../../common/socket.h ../../common/timer.h ../../common/mmo.h ../../common/version.h ../../common/db.h ../../common/malloc.h
+COMMON_OBJ = ../../common/obj/core.o ../../common/obj/socket.o ../../common/obj/timer.o ../../common/obj/grfio.o ../../common/obj/db.o ../../common/obj/lock.o ../../common/obj/nullpo.o ../../common/obj/malloc.o ../../common/obj/showmsg.o ../../common/obj/strlib.o
-login-converter: login-converter.o ../../login_sql/md5calc.o ../../login_sql/strlib.o $(COMMON_OBJ)
+COMMON_H = ../../common/core.h ../../common/socket.h ../../common/timer.h ../../common/mmo.h ../../common/version.h ../../common/db.h ../../common/malloc.h ../../common/strlib.h
+
+login-converter: login-converter.o ../../login_sql/md5calc.o $(COMMON_OBJ)
$(CC) -o ../../../$@ $^ $(LIB_S)
-login-converter.o: login-converter.c ../../login_sql/login.h ../../login_sql/md5calc.h ../../login_sql/strlib.h $(COMMON_H)
+login-converter.o: login-converter.c ../../login_sql/login.h ../../login_sql/md5calc.h $(COMMON_H)
clean:
rm -f *.o ../../../login-converter
diff --git a/src/txt-converter/login/login-converter.c b/src/txt-converter/login/login-converter.c
index a277ca949..d301e8db3 100644
--- a/src/txt-converter/login/login-converter.c
+++ b/src/txt-converter/login/login-converter.c
@@ -40,7 +40,7 @@ struct {
int sex,delflag;
} auth_fifo[AUTH_FIFO_SIZE];
int auth_fifo_pos=0;
-struct {
+struct auth_dat_ {
int account_id, sex;
char userid[24], pass[24], lastlogin[24];
int logincount;
@@ -72,7 +72,7 @@ char db_server_logindb[32] = "ragnarok";
int isGM(int account_id)
{
struct gm_account *p;
- p = numdb_search(gm_account_db,account_id);
+ p = (struct gm_account*)numdb_search(gm_account_db,account_id);
if( p == NULL)
return 0;
return p->level;
@@ -95,7 +95,7 @@ int read_gm_account()
if(line[0] == '/' || line[1] == '/' || line[2] == '/')
continue;
- p=malloc(sizeof(struct gm_account));
+ p = (struct gm_account*)malloc(sizeof(struct gm_account));
if(p==NULL){
printf("gm_account: out of memory!\n");
exit(0);
@@ -145,7 +145,7 @@ int mmo_auth_init(void)
fp=fopen("save/account.txt","r");
- auth_dat=malloc(sizeof(auth_dat[0])*256);
+ auth_dat = (struct auth_dat_*)malloc(sizeof(auth_dat[0])*256);
auth_max=256;
if(fp==NULL)
return 0;
@@ -234,6 +234,10 @@ int login_config_read(const char *cfgName){
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");
diff --git a/src/webserver/Changelog.txt b/src/webserver/Changelog.txt
deleted file mode 100644
index e4d38bac0..000000000
--- a/src/webserver/Changelog.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Date Added
-12/3
- * Creation of eAthena Web Server v2 [MC Cameri] \ No newline at end of file
diff --git a/src/webserver/Makefile b/src/webserver/Makefile
index 000754036..077b39980 100644
--- a/src/webserver/Makefile
+++ b/src/webserver/Makefile
@@ -1,32 +1,20 @@
-CC = gcc -pipe
-MAKE = make
-OPT = -g -O2 -ffast-math
-
-ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
-CFLAGS = $(OPT) -Wall -I../common
-else
-CFLAGS = $(OPT) -Wall -I../common
-endif
-
-OBJ = main.o webserver.o ../common/showmsg.o
-LINKOBJ = main.o webserver.o ../common/showmsg.o
-
-all: clean webserver run
+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 webserver.exe ../common/showmsg.o
-
-webserver: main.o webserver.o ../common/showmsg.o
- $(CC) $(OPT) -o "Webserver.exe" $(OBJ)
-
-main.o: main.c
- $(CC) $(OPT) -c main.c -o main.o $(CFLAGS)
-
-webserver.o: webserver.c
- $(CC) $(OPT) -c webserver.c -o webserver.o $(CFLAGS)
-
-../common/showmsg.o: ../common/showmsg.c
- $(CC) $(OPT) -c ../common/showmsg.c -o ../common/showmsg.o $(CFLAGS)
-
-run:
- ./webserver
+ rm -f *.o
+ rm -f pages/*.o
+ rm -f webserver
diff --git a/src/webserver/Makefile.win b/src/webserver/Makefile.win
deleted file mode 100644
index 65cf676ad..000000000
--- a/src/webserver/Makefile.win
+++ /dev/null
@@ -1,35 +0,0 @@
-# Project: Webserver
-# Makefile created by Dev-C++ 4.9.8.0
-
-CPP = g++.exe -D__DEBUG__
-CC = gcc.exe -D__DEBUG__
-WINDRES = windres.exe
-RES =
-OBJ = main.o webserver.o ../common/showmsg.o $(RES)
-LINKOBJ = main.o webserver.o ../common/showmsg.o $(RES)
-LIBS = -L"C:/Program Files/Dev-Cpp/lib" -L"C:/cygwin/lib"
-INCS = -I"C:/Program Files/Dev-Cpp/include" -I"C:/cygwin/usr/include" -I"C:/cygwin/usr/include/mingw"
-CXXINCS = -I"C:/Program Files/Dev-Cpp/include/c++" -I"C:/Program Files/Dev-Cpp/include/c++/mingw32" -I"C:/Program Files/Dev-Cpp/include/c++/backward" -I"C:/Program Files/Dev-Cpp/include" -I"C:/cygwin/usr/include/c++/3.3.1"
-BIN = webserver.exe
-CXXFLAGS = $(CXXINCS) -pg -g3
-CFLAGS = $(INCS) -pg -g3
-
-.PHONY: all all-before all-after clean clean-custom
-
-all: all-before webserver.exe all-after
-
-
-clean: clean-custom
- rm -f $(OBJ) $(BIN)
-
-$(BIN): $(LINKOBJ)
- $(CC) $(LINKOBJ) -o "webserver.exe" $(LIBS)
-
-main.o: main.c
- $(CC) -c main.c -o main.o $(CFLAGS)
-
-webserver.o: webserver.c
- $(CC) -c webserver.c -o webserver.o $(CFLAGS)
-
-../common/showmsg.o: ../common/showmsg.c
- $(CC) -c ../common/showmsg.c -o ../common/showmsg.o $(CFLAGS)
diff --git a/src/webserver/WEBSER~1.layout b/src/webserver/WEBSER~1.layout
deleted file mode 100644
index 49854196f..000000000
--- a/src/webserver/WEBSER~1.layout
+++ /dev/null
@@ -1,24 +0,0 @@
-[Editors]
-Focused=-1
-Order=-1,0
-[Editor_0]
-Open=1
-Top=0
-CursorCol=5
-CursorRow=30
-TopLine=1
-LeftChar=1
-[Editor_1]
-Open=1
-Top=0
-CursorCol=1
-CursorRow=35
-TopLine=16
-LeftChar=1
-[Editor_2]
-Open=1
-Top=1
-CursorCol=14
-CursorRow=4
-TopLine=1
-LeftChar=1
diff --git a/src/webserver/Webserver.dev b/src/webserver/Webserver.dev
deleted file mode 100644
index 5bbb3a08c..000000000
--- a/src/webserver/Webserver.dev
+++ /dev/null
@@ -1,97 +0,0 @@
-[Project]
-FileName=Webserver.dev
-Name=Webserver
-UnitCount=5
-Type=1
-Ver=1
-ObjFiles=
-Includes=
-Libs=
-PrivateResource=
-ResourceIncludes=
-MakeIncludes=
-Compiler=
-CppCompiler=
-Linker=
-IsCpp=0
-Icon=
-ExeOutput=
-ObjectOutput=
-OverrideOutput=1
-OverrideOutputName=webserver.exe
-HostApplication=
-Folders=common
-CommandLine=
-IncludeVersionInfo=0
-SupportXPThemes=0
-CompilerSet=1
-CompilerSettings=000000000000000000
-
-[Unit1]
-FileName=main.c
-CompileCpp=0
-Folder=
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=$(CC) -c main.c -o main.o webserver.o $(CFLAGS)
-
-[VersionInfo]
-Major=0
-Minor=1
-Release=1
-Build=1
-LanguageID=1033
-CharsetID=1252
-CompanyName=
-FileVersion=
-FileDescription=Developed using the Dev-C++ IDE
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=
-AutoIncBuildNr=0
-
-[Unit2]
-FileName=webserver.c
-CompileCpp=0
-Folder=
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=1
-BuildCmd=$(CC) -c webserver.c -o webserver.o $(CFLAGS)
-
-[Unit3]
-FileName=webserver.h
-CompileCpp=0
-Folder=
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit4]
-FileName=..\common\showmsg.c
-CompileCpp=0
-Folder=common
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit5]
-FileName=..\common\showmsg.h
-CompileCpp=0
-Folder=common
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
diff --git a/src/webserver/Webserver.layout b/src/webserver/Webserver.layout
deleted file mode 100644
index b99312289..000000000
--- a/src/webserver/Webserver.layout
+++ /dev/null
@@ -1,38 +0,0 @@
-[Editors]
-Focused=0
-Order=0,2,1,-1
-[Editor_0]
-Open=1
-Top=1
-CursorCol=55
-CursorRow=128
-TopLine=95
-LeftChar=1
-[Editor_1]
-Open=1
-Top=0
-CursorCol=25
-CursorRow=113
-TopLine=92
-LeftChar=1
-[Editor_2]
-Open=1
-Top=0
-CursorCol=1
-CursorRow=21
-TopLine=1
-LeftChar=1
-[Editor_3]
-Open=0
-Top=0
-CursorCol=20
-CursorRow=2
-TopLine=1
-LeftChar=1
-[Editor_4]
-Open=0
-Top=0
-CursorCol=20
-CursorRow=1
-TopLine=1
-LeftChar=1
diff --git a/src/webserver/conf/webserver-athena.conf b/src/webserver/conf/webserver-athena.conf
deleted file mode 100644
index 6f84aa133..000000000
--- a/src/webserver/conf/webserver-athena.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-#############################################################
-# ______ __ __ #
-# /\ _ \/\ \__/\ \ #
-# __\ \ \L\ \ \ ,_\ \ \___ __ ___ __ #
-# /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\ #
-# /\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_ #
-# \ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ #
-# \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ #
-# eAthena Web Server (Second Edition) #
-# by MC Cameri #
-# ------------------------------------------------------- #
-# -Website/Forum- #
-# http://eathena.deltaanime.net/ #
-# -Download URL- #
-# http://eathena.systeminplace.net/ #
-# -IRC Channel- #
-# irc://irc.deltaanime.net/#athena #
-#############################################################
-
-// Display the eAthena Logo at startup?
-show_title: 1
-
-//Web Server Port
-port: 81
-
-//Web Server Password
-password: juan16
-
-//Page Header
-header: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-//Document index
-document_index: index.xhtml
-
-//Send favorite icon if provided?
-favicon: yes
diff --git a/webserver/doc/API.txt b/src/webserver/doc/API.txt
index c80f7bd44..c80f7bd44 100644
--- a/webserver/doc/API.txt
+++ b/src/webserver/doc/API.txt
diff --git a/webserver/doc/README b/src/webserver/doc/README
index 0e94ff2ae..0e94ff2ae 100644
--- a/webserver/doc/README
+++ b/src/webserver/doc/README
diff --git a/webserver/generate.c b/src/webserver/generate.c
index ad050db4c..ad050db4c 100644
--- a/webserver/generate.c
+++ b/src/webserver/generate.c
diff --git a/webserver/htmlstyle.c b/src/webserver/htmlstyle.c
index c3a4b927a..c3a4b927a 100644
--- a/webserver/htmlstyle.c
+++ b/src/webserver/htmlstyle.c
diff --git a/webserver/logs.c b/src/webserver/logs.c
index 405b4882b..405b4882b 100644
--- a/webserver/logs.c
+++ b/src/webserver/logs.c
diff --git a/src/webserver/main.c b/src/webserver/main.c
index 915d71b6d..59362558e 100644
--- a/src/webserver/main.c
+++ b/src/webserver/main.c
@@ -1,144 +1,142 @@
-/******************************************************************************
- # ______ __ __ #
- # /\ _ \/\ \__/\ \ #
- # __\ \ \L\ \ \ ,_\ \ \___ __ ___ __ #
- # /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\ #
- # /\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_ #
- # \ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ #
- # \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ #
- # eAthena Web Server (Second Edition) #
- # by MC Cameri #
- # ------------------------------------------------------- #
- # -Website/Forum- #
- # http://eathena.deltaanime.net/ #
- # -Download URL- #
- # http://eathena.systeminplace.net/ #
- # -IRC Channel- #
- # irc://irc.deltaanime.net/#athena #
- ******************************************************************************/
+/***************************************************************************
+ 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 <strings.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>
-#include <unistd.h>
-#include <errno.h>
-#include "../common/showmsg.h"
-#include "webserver.h"
+#define BLOG 10
-char ws_password[17];
-char ws_header[128];
+char *header = "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n";
+char recvin[500], password[25];
+int s_port;
-#define WEB_CONF "conf/webserver-athena.conf"
-#define MAX_CONNECTIONS 10
-#define HOME "home/"
-
-struct config config;
+void sigchld_handler(int s)
+{
+ while(wait(NULL) > 0);
+}
-int main(int argc, char *argv[])
+int main(int argc, char **argv)
{
- int server_fd, client_fd;
+ 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 sockaddr_in server_addr;
- struct sockaddr_in client_addr;
+
struct sigaction sa;
- char recvin[1024];
- char path[1024];
- char line[1024];
- int optval = 1;
- if (ws_config_read(WEB_CONF)) exit(0);
- if (config.show_title)
- ws_display_title();
- else
- printf("eAthena Web Server (Second Edition)\n");
- if (strcmpEx(ws_password,"webpass")==0)
- ShowWarning("You are using the default password (webpass), we highly "
- "recommend\n that you change it.\n");
- else if (strstr(ws_password,"webpass"))
- ShowWarning("Your password should not contain \"webpass\" in it, it is"
- " highly\n recommended that you change it.\n");
- printf("Web Server Password: %s\n",ws_password);
- printf("Web Server Port: %d\n",config.port);
-
- if ((server_fd = socket(AF_INET, SOCK_STREAM,0)) == -1) {
- ShowError("In main() -> Could not open socket.\n");
- return 1;
+
+ int yes=1;
+
+ if ((sockfd = socket(AF_INET, SOCK_STREAM,0)) == -1)
+ {
+ perror("Darn, this is broken.");
+ exit(0);
}
- if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(int)) == -1) {
- ShowError("In main() -> Could not set socket options.\n");
- return 1;
+
+ if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1)
+ {
+ perror("Error... :-(");
}
- server_addr.sin_family = AF_INET;
- server_addr.sin_port = htons(config.port);
- server_addr.sin_addr.s_addr = INADDR_ANY;
- memset(&(server_addr.sin_zero), '\0', 8);
-
- if (bind(server_fd, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) < 0) {
- snprintf(tmp_output,sizeof(tmp_output),"In main() -> Could not bind to port number: %d\n",config.port);
- ShowError(tmp_output);
- return 1;
+
+ //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(server_fd, MAX_CONNECTIONS) < 0) {
- snprintf(tmp_output,sizeof(tmp_output),"In main() -> Could not listen on port number: %d\n",config.port);
- ShowError(tmp_output);
- return 1;
+ if ( listen(sockfd, BLOG) == -1)
+ {
+ perror("can not listen on port");
+ exit(0);
}
- sa.sa_handler = ws_sigchld_handler;
+ sa.sa_handler = sigchld_handler;
+
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
- if (sigaction(SIGCHLD, &sa, NULL) < 0) {
- ShowError("In main() -> Invalid sigaction.\n");
- return 1;
+ if (sigaction(SIGCHLD, &sa, NULL) == -1)
+ {
+ perror("sigaction sucks");
+ exit(0);
}
- ShowInfo("eAthena Web Server is now listening for incoming connections.\n");
+
+ printf("The eAthena webserver is up and listening on port %i.\n", s_port);
while(1)
{
sin_size = sizeof(struct sockaddr_in);
- client_fd = accept(server_fd, (struct sockaddr *)&client_addr, &sin_size);
+ new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
if (!fork())
{
- close(server_fd);
+ close(sockfd);
memset(recvin, 0x0, 500);
- recv(client_fd, recvin, 500, 0);
- char *html_output;
- int count = 0;
- if (sscanf(recvin,"GET %[a-zA-Z_-.+\%#@~] %*[^\n]",path)==1) {
- FILE *fp;
- strcpy(tmp_output,HOME);
- strcat(tmp_output,path);
- fp = fopen(tmp_output,"r+");
- if (fp==NULL) {
- send(client_fd,"File not found",strlen("File not found"), 0);
- close(client_fd);
- }
- memset(tmp_output,0x0,strlen(tmp_output));
- html_output = (char*)malloc(sizeof(char)*2);
- while (fgets(line,1023,fp)) {
- html_output = (char*)realloc(sizeof(html_output)+(sizeof(char)*count));
- strcat(html_output,line);
- printf(line);
- }
- send(client_fd,tmp_output,sizeof(tmp_output),0);
- fclose(fp);
- }
- // send(client_fd, ws_header, strlen(ws_header), 0);
- // generate_page(password, client_fd, get_query(recvin), inet_ntoa(client_addr.sin_addr));
- // log_visit(get_query(recvin), inet_ntoa(client_addr.sin_addr));
- close(client_fd);
+ 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(client_fd);
+ close(new_fd);
}
+
return 0;
}
diff --git a/webserver/pages/about.c b/src/webserver/pages/about.c
index 2b0002ad8..2b0002ad8 100644
--- a/webserver/pages/about.c
+++ b/src/webserver/pages/about.c
diff --git a/webserver/pages/notdone.c b/src/webserver/pages/notdone.c
index a6492e361..a6492e361 100644
--- a/webserver/pages/notdone.c
+++ b/src/webserver/pages/notdone.c
diff --git a/webserver/pages/sample.c b/src/webserver/pages/sample.c
index be900a1bf..be900a1bf 100644
--- a/webserver/pages/sample.c
+++ b/src/webserver/pages/sample.c
diff --git a/webserver/parse.c b/src/webserver/parse.c
index 8e54a81de..8e54a81de 100644
--- a/webserver/parse.c
+++ b/src/webserver/parse.c
diff --git a/src/webserver/webserver.c b/src/webserver/webserver.c
deleted file mode 100644
index 0169cd028..000000000
--- a/src/webserver/webserver.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/******************************************************************************
- # ______ __ __ #
- # /\ _ \/\ \__/\ \ #
- # __\ \ \L\ \ \ ,_\ \ \___ __ ___ __ #
- # /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\ #
- # /\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_ #
- # \ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ #
- # \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ #
- # eAthena Web Server (Second Edition) #
- # by MC Cameri #
- # ------------------------------------------------------- #
- # -Website/Forum- #
- # http://eathena.deltaanime.net/ #
- # -Download URL- #
- # http://eathena.systeminplace.net/ #
- # -IRC Channel- #
- # irc://irc.deltaanime.net/#athena #
- ******************************************************************************/
-
-#include <stdio.h>
-#include <strings.h>
-#include "../common/showmsg.h"
-#include "webserver.h"
-
-char ws_password[17] = "pass";
-char ws_header[128] = {'\0'};
-
-/* Displays the eAthena Logo */
-void ws_display_title(void)
-{
- printf("\033[2J");
- printf("\033[37;44m (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1;33m (c)2004 eAthena Development Team presents \033[0;44m)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1m ______ __ __ \033[0;44m)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1m /\\ _ \\/\\ \\__/\\ \\ \033[0;44m)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1m __\\ \\ \\_\\ \\ \\ ,_\\ \\ \\___ __ ___ __ \033[0;44m)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1m /'__`\\ \\ __ \\ \\ \\/\\ \\ _ `\\ /'__`\\/' _ `\\ /'__`\\ \033[0;44m)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1m /\\ __/\\ \\ \\/\\ \\ \\ \\_\\ \\ \\ \\ \\/\\ __//\\ \\/\\ \\/\\ \\_\\.\\_ \033[0;44m)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1m \\ \\____\\\\ \\_\\ \\_\\ \\__\\\\ \\_\\ \\_\\ \\____\\ \\_\\ \\_\\ \\__/.\\_\\ \033[0;44m)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1m \\/____/ \\/_/\\/_/\\/__/ \\/_/\\/_/\\/____/\\/_/\\/_/\\/__/\\/_/ \033[0;44m)\033[K\033[0m\n");
- printf("\033[0;44m (\033[1m _ _ _ _ _ _ _ _ _ _ _ _ _ \033[0;44m)\033[K\033[0m\n"); // 1: bold char, 0: normal char
- printf("\033[0;44m (\033[1m / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ \033[0;44m)\033[K\033[0m\n"); // 1: bold char, 0: normal char
- printf("\033[0;44m (\033[1m ( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) \033[0;44m)\033[K\033[0m\n"); // 1: bold char, 0: normal char
- printf("\033[0;44m (\033[1m \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \033[0;44m)\033[K\033[0m\n"); // 1: bold char, 0: normal char
- printf("\033[0;44m (\033[1m \033[0;44m)\033[K\033[0m\n"); // yellow writing (33)
- printf("\033[0;44m (\033[1;33m Advanced Fusion Maps (c) 2003-2004 The Fusion Project \033[0;44m)\033[K\033[0m\n"); // yellow writing (33)
- printf("\033[37;44m (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)\033[K\033[0m\n\n"); // reset color
-}
-/* Returns a boolean value given character string */
-int ws_config_switch(const char *str) {
- if (strcmpEx(str, "on") == 0 || strcmpEx(str, "yes") == 0 ||
- strcmpEx(str, "oui") == 0 || strcmpEx(str, "ja") == 0 ||
- strcmpEx(str, "si") == 0 || strcmpEx(str,"true") == 0)
- return 1;
- if (strcmpEx(str, "off") == 0 || strcmpEx(str, "no") == 0 ||
- strcmpEx(str, "non") == 0 || strcmpEx(str, "nein") == 0 ||
- strcmpEx(str, "false") == 0)
- return 0;
- return atoi(str);
-}
-
-/* Reads the eAthena Web Server's configuration file */
-int ws_config_read(const char *cfgName)
-{
- int i;
- char line[1024],w1[1024],w2[1024],temp[1024];
- FILE *fp;
-
- /* Default values */
- config.show_title=0;
- config.port=80;
-
-
- fp=fopen(cfgName,"r");
- if(fp==NULL){
- snprintf(temp,sizeof(temp),"Could not open \033[1;29m%s\033[0;0m, file not found.\n",cfgName);
- ShowMessage(temp,MSG_ERROR);
- return 1;
- }
- while(fgets(line,1020,fp)){
- const struct {
- char str[128];
- int *val;
- } data[] ={
- //List of variables
- { "show_title", &config.show_title },
- { "port", &config.port },
- };
-
- if((line[0] == '/' && line[1] == '/') || (line[0]=='#') ||
- (sscanf(line,"%1023[^:]:%1023[^\n]",w1,w2) !=2))
- continue;
- for(i=0;i<sizeof(data)/(sizeof(data[0]));i++) {
- if(strcmpEx(w1,data[i].str)==0){
- *data[i].val=ws_config_switch(w2);
- break;
- }
- }
- if(strcmpEx(w1,"import")==0) {
- ws_config_read(w2);
- continue;
- }
- if(strcmpEx(w1,"password")==0) {
- if (strlen(w2)>16) {
- ShowError("The Web Server password is too long, maximum passwor"
- "d length is 16 characters.\n");
- return 1;
- }
- strcpy(ws_password,w2);
- continue;
- }
- if(strcmpEx(w1,"header")==0) {
- if (strlen(w2)>127) {
- ShowError("The Web Server header is too long, maximum header"
- "d length is 127 characters.\n");
- return 1;
- }
- strcpy(ws_header,w2);
- continue;
- }
- }
- fclose(fp);
-
- //Correct values
- if(config.show_title < 0)
- config.show_title = 0;
- if(config.port < 1 || config.port > 65534)
- config.port=80;
-
- return 0;
-}
-
-void ws_sigchld_handler(int s)
-{
- while(wait(NULL) > 0);
-}
diff --git a/src/webserver/webserver.h b/src/webserver/webserver.h
deleted file mode 100644
index 84ef02b62..000000000
--- a/src/webserver/webserver.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef WEBSERV_H_
-#define WEBSERV_H_
-
-#define strcmpEx(x,y) (strcasecmp(x,y))
-
-extern void ws_display_title(void);
-
-extern int ws_config_read(const char *cfgName);
-
-extern struct config {
- int show_title;
- int port;
-} config;
-
-extern char ws_password[17]; //16 chars + \0
-
-extern char ws_header[128]; //!?
-
-extern void ws_sigchld_handler(int s);
-
-#endif
diff --git a/src/zlib/FAQ b/src/zlib/FAQ
new file mode 100644
index 000000000..4f61f1094
--- /dev/null
+++ b/src/zlib/FAQ
@@ -0,0 +1,337 @@
+
+ Frequently Asked Questions about zlib
+
+
+If your question is not there, please check the zlib home page
+http://www.zlib.org which may have more recent information.
+The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
+
+
+ 1. Is zlib Y2K-compliant?
+
+ Yes. zlib doesn't handle dates.
+
+ 2. Where can I get a Windows DLL version?
+
+ The zlib sources can be compiled without change to produce a DLL.
+ See the file win32/DLL_FAQ.txt in the zlib distribution.
+ Pointers to the precompiled DLL are found in the zlib web site at
+ http://www.zlib.org.
+
+ 3. Where can I get a Visual Basic interface to zlib?
+
+ See
+ * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
+ * contrib/visual-basic.txt in the zlib distribution
+ * win32/DLL_FAQ.txt in the zlib distribution
+
+ 4. compress() returns Z_BUF_ERROR.
+
+ Make sure that before the call of compress, the length of the compressed
+ buffer is equal to the total size of the compressed buffer and not
+ zero. For Visual Basic, check that this parameter is passed by reference
+ ("as any"), not by value ("as long").
+
+ 5. deflate() or inflate() returns Z_BUF_ERROR.
+
+ Before making the call, make sure that avail_in and avail_out are not
+ zero. When setting the parameter flush equal to Z_FINISH, also make sure
+ that avail_out is big enough to allow processing all pending input.
+ Note that a Z_BUF_ERROR is not fatal--another call to deflate() or
+ inflate() can be made with more input or output space. A Z_BUF_ERROR
+ may in fact be unavoidable depending on how the functions are used, since
+ it is not possible to tell whether or not there is more output pending
+ when strm.avail_out returns with zero.
+
+ 6. Where's the zlib documentation (man pages, etc.)?
+
+ It's in zlib.h for the moment, and Francis S. Lin has converted it to a
+ web page zlib.html. Volunteers to transform this to Unix-style man pages,
+ please contact us (zlib@gzip.org). Examples of zlib usage are in the files
+ example.c and minigzip.c.
+
+ 7. Why don't you use GNU autoconf or libtool or ...?
+
+ Because we would like to keep zlib as a very small and simple
+ package. zlib is rather portable and doesn't need much configuration.
+
+ 8. I found a bug in zlib.
+
+ Most of the time, such problems are due to an incorrect usage of
+ zlib. Please try to reproduce the problem with a small program and send
+ the corresponding source to us at zlib@gzip.org . Do not send
+ multi-megabyte data files without prior agreement.
+
+ 9. Why do I get "undefined reference to gzputc"?
+
+ If "make test" produces something like
+
+ example.o(.text+0x154): undefined reference to `gzputc'
+
+ check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
+ /usr/X11R6/lib. Remove any old versions, then do "make install".
+
+10. I need a Delphi interface to zlib.
+
+ See the contrib/delphi directory in the zlib distribution.
+
+11. Can zlib handle .zip archives?
+
+ Not by itself, no. See the directory contrib/minizip in the zlib
+ distribution.
+
+12. Can zlib handle .Z files?
+
+ No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
+ the code of uncompress on your own.
+
+13. How can I make a Unix shared library?
+
+ make clean
+ ./configure -s
+ make
+
+14. How do I install a shared zlib library on Unix?
+
+ After the above, then:
+
+ make install
+
+ However, many flavors of Unix come with a shared zlib already installed.
+ Before going to the trouble of compiling a shared version of zlib and
+ trying to install it, you may want to check if it's already there! If you
+ can #include <zlib.h>, it's there. The -lz option will probably link to it.
+
+15. I have a question about OttoPDF.
+
+ We are not the authors of OttoPDF. The real author is on the OttoPDF web
+ site: Joel Hainley, jhainley@myndkryme.com.
+
+16. Can zlib decode Flate data in an Adobe PDF file?
+
+ Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ .
+ To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ .
+
+17. Why am I getting this "register_frame_info not found" error on Solaris?
+
+ After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
+ generates an error such as:
+
+ ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
+ symbol __register_frame_info: referenced symbol not found
+
+ The symbol __register_frame_info is not part of zlib, it is generated by
+ the C compiler (cc or gcc). You must recompile applications using zlib
+ which have this problem. This problem is specific to Solaris. See
+ http://www.sunfreeware.com for Solaris versions of zlib and applications
+ using zlib.
+
+18. Why does gzip give an error on a file I make with compress/deflate?
+
+ The compress and deflate functions produce data in the zlib format, which
+ is different and incompatible with the gzip format. The gz* functions in
+ zlib on the other hand use the gzip format. Both the zlib and gzip
+ formats use the same compressed data format internally, but have different
+ headers and trailers around the compressed data.
+
+19. Ok, so why are there two different formats?
+
+ The gzip format was designed to retain the directory information about
+ a single file, such as the name and last modification date. The zlib
+ format on the other hand was designed for in-memory and communication
+ channel applications, and has a much more compact header and trailer and
+ uses a faster integrity check than gzip.
+
+20. Well that's nice, but how do I make a gzip file in memory?
+
+ You can request that deflate write the gzip format instead of the zlib
+ format using deflateInit2(). You can also request that inflate decode
+ the gzip format using inflateInit2(). Read zlib.h for more details.
+
+ Note that you cannot specify special gzip header contents (e.g. a file
+ name or modification date), nor will inflate tell you what was in the
+ gzip header. If you need to customize the header or see what's in it,
+ you can use the raw deflate and inflate operations and the crc32()
+ function and roll your own gzip encoding and decoding. Read the gzip
+ RFC 1952 for details of the header and trailer format.
+
+21. Is zlib thread-safe?
+
+ Yes. However any library routines that zlib uses and any application-
+ provided memory allocation routines must also be thread-safe. zlib's gz*
+ functions use stdio library routines, and most of zlib's functions use the
+ library memory allocation routines by default. zlib's Init functions allow
+ for the application to provide custom memory allocation routines.
+
+ Of course, you should only operate on any given zlib or gzip stream from a
+ single thread at a time.
+
+22. Can I use zlib in my commercial application?
+
+ Yes. Please read the license in zlib.h.
+
+23. Is zlib under the GNU license?
+
+ No. Please read the license in zlib.h.
+
+24. The license says that altered source versions must be "plainly marked". So
+ what exactly do I need to do to meet that requirement?
+
+ You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
+ particular, the final version number needs to be changed to "f", and an
+ identification string should be appended to ZLIB_VERSION. Version numbers
+ x.x.x.f are reserved for modifications to zlib by others than the zlib
+ maintainers. For example, if the version of the base zlib you are altering
+ is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
+ ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
+ update the version strings in deflate.c and inftrees.c.
+
+ For altered source distributions, you should also note the origin and
+ nature of the changes in zlib.h, as well as in ChangeLog and README, along
+ with the dates of the alterations. The origin should include at least your
+ name (or your company's name), and an email address to contact for help or
+ issues with the library.
+
+ Note that distributing a compiled zlib library along with zlib.h and
+ zconf.h is also a source distribution, and so you should change
+ ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
+ in zlib.h as you would for a full source distribution.
+
+25. Will zlib work on a big-endian or little-endian architecture, and can I
+ exchange compressed data between them?
+
+ Yes and yes.
+
+26. Will zlib work on a 64-bit machine?
+
+ It should. It has been tested on 64-bit machines, and has no dependence
+ on any data types being limited to 32-bits in length. If you have any
+ difficulties, please provide a complete problem report to zlib@gzip.org
+
+27. Will zlib decompress data from the PKWare Data Compression Library?
+
+ No. The PKWare DCL uses a completely different compressed data format
+ than does PKZIP and zlib. However, you can look in zlib's contrib/blast
+ directory for a possible solution to your problem.
+
+28. Can I access data randomly in a compressed stream?
+
+ No, not without some preparation. If when compressing you periodically
+ use Z_FULL_FLUSH, carefully write all the pending data at those points,
+ and keep an index of those locations, then you can start decompression
+ at those points. You have to be careful to not use Z_FULL_FLUSH too
+ often, since it can significantly degrade compression.
+
+29. Does zlib work on MVS, OS/390, CICS, etc.?
+
+ We don't know for sure. We have heard occasional reports of success on
+ these systems. If you do use it on one of these, please provide us with
+ a report, instructions, and patches that we can reference when we get
+ these questions. Thanks.
+
+30. Is there some simpler, easier to read version of inflate I can look at
+ to understand the deflate format?
+
+ First off, you should read RFC 1951. Second, yes. Look in zlib's
+ contrib/puff directory.
+
+31. Does zlib infringe on any patents?
+
+ As far as we know, no. In fact, that was originally the whole point behind
+ zlib. Look here for some more information:
+
+ http://www.gzip.org/#faq11
+
+32. Can zlib work with greater than 4 GB of data?
+
+ Yes. inflate() and deflate() will process any amount of data correctly.
+ Each call of inflate() or deflate() is limited to input and output chunks
+ of the maximum value that can be stored in the compiler's "unsigned int"
+ type, but there is no limit to the number of chunks. Note however that the
+ strm.total_in and strm_total_out counters may be limited to 4 GB. These
+ counters are provided as a convenience and are not used internally by
+ inflate() or deflate(). The application can easily set up its own counters
+ updated after each call of inflate() or deflate() to count beyond 4 GB.
+ compress() and uncompress() may be limited to 4 GB, since they operate in a
+ single call. gzseek() and gztell() may be limited to 4 GB depending on how
+ zlib is compiled. See the zlibCompileFlags() function in zlib.h.
+
+ The word "may" appears several times above since there is a 4 GB limit
+ only if the compiler's "long" type is 32 bits. If the compiler's "long"
+ type is 64 bits, then the limit is 16 exabytes.
+
+33. Does zlib have any security vulnerabilities?
+
+ The only one that we are aware of is potentially in gzprintf(). If zlib
+ is compiled to use sprintf() or vsprintf(), then there is no protection
+ against a buffer overflow of a 4K string space, other than the caller of
+ gzprintf() assuring that the output will not exceed 4K. On the other
+ hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
+ normally be the case, then there is no vulnerability. The ./configure
+ script will display warnings if an insecure variation of sprintf() will
+ be used by gzprintf(). Also the zlibCompileFlags() function will return
+ information on what variant of sprintf() is used by gzprintf().
+
+ If you don't have snprintf() or vsnprintf() and would like one, you can
+ find a portable implementation here:
+
+ http://www.ijs.si/software/snprintf/
+
+ Note that you should be using the most recent version of zlib. Versions
+ 1.1.3 and before were subject to a double-free vulnerability.
+
+34. Is there a Java version of zlib?
+
+ Probably what you want is to use zlib in Java. zlib is already included
+ as part of the Java SDK in the java.util.zip package. If you really want
+ a version of zlib written in the Java language, look on the zlib home
+ page for links: http://www.zlib.org/
+
+35. I get this or that compiler or source-code scanner warning when I crank it
+ up to maximally-pedantic. Can't you guys write proper code?
+
+ Many years ago, we gave up attempting to avoid warnings on every compiler
+ in the universe. It just got to be a waste of time, and some compilers
+ were downright silly. So now, we simply make sure that the code always
+ works.
+
+36. Will zlib read the (insert any ancient or arcane format here) compressed
+ data format?
+
+ Probably not. Look in the comp.compression FAQ for pointers to various
+ formats and associated software.
+
+37. How can I encrypt/decrypt zip files with zlib?
+
+ zlib doesn't support encryption. The original PKZIP encryption is very weak
+ and can be broken with freely available programs. To get strong encryption,
+ use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
+ For PKZIP compatible "encryption", look at http://www.info-zip.org/
+
+38. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
+
+ "gzip" is the gzip format, and "deflate" is the zlib format. They should
+ probably have called the second one "zlib" instead to avoid confusion
+ with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
+ correctly points to the zlib specification in RFC 1950 for the "deflate"
+ transfer encoding, there have been reports of servers and browsers that
+ incorrectly produce or expect raw deflate data per the deflate
+ specficiation in RFC 1951, most notably Microsoft. So even though the
+ "deflate" transfer encoding using the zlib format would be the more
+ efficient approach (and in fact exactly what the zlib format was designed
+ for), using the "gzip" transfer encoding is probably more reliable due to
+ an unfortunate choice of name on the part of the HTTP 1.1 authors.
+
+ Bottom line: use the gzip format for HTTP 1.1 encoding.
+
+39. Does zlib support the new "Deflate64" format introduced by PKWare?
+
+ No. PKWare has apparently decided to keep that format proprietary, since
+ they have not documented it as they have previous compression formats.
+ In any case, the compression improvements are so modest compared to other
+ more modern approaches, that it's not worth the effort to implement.
+
+40. Can you please sign these lengthy legal documents and fax them back to us
+ so that we can use your software in our product?
+
+ No. Go away. Shoo.
diff --git a/src/zlib/README b/src/zlib/README
new file mode 100644
index 000000000..df95ae13f
--- /dev/null
+++ b/src/zlib/README
@@ -0,0 +1,126 @@
+ZLIB DATA COMPRESSION LIBRARY
+
+zlib 1.2.2 is a general purpose data compression library. All the code is
+thread safe. 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). These documents are also available in other
+formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
+
+All functions of the compression library are documented in the file zlib.h
+(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
+of the library is given in the file example.c which also tests that the library
+is working correctly. Another example is given in the file minigzip.c. The
+compression library itself is composed of all source files except example.c and
+minigzip.c.
+
+To compile all files and run the test program, follow the instructions given at
+the top of Makefile. In short "make test; make install" should work for most
+machines. For Unix: "./configure; make test; make install" For MSDOS, use one
+of the special makefiles such as Makefile.msc. For VMS, use Make_vms.com or
+descrip.mms.
+
+Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
+<info@winimage.com> for the Windows DLL version. The zlib home page is
+http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem,
+please check this site to verify that you have the latest version of zlib;
+otherwise get the latest version and check whether the problem still exists or
+not.
+
+PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking
+for help.
+
+Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
+issue of Dr. Dobb's Journal; a copy of the article is available in
+http://dogma.net/markn/articles/zlibtool/zlibtool.htm
+
+The changes made in version 1.2.2 are documented in the file ChangeLog.
+
+Unsupported third party contributions are provided in directory "contrib".
+
+A Java implementation of zlib is available in the Java Development Kit
+http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html
+See the zlib home page http://www.zlib.org for details.
+
+A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is in the
+CPAN (Comprehensive Perl Archive Network) sites
+http://www.cpan.org/modules/by-module/Compress/
+
+A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
+available in Python 1.5 and later versions, see
+http://www.python.org/doc/lib/module-zlib.html
+
+A zlib binding for TCL written by Andreas Kupries <a.kupries@westend.com> is
+availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html
+
+An experimental package to read and write files in .zip format, written on top
+of zlib by Gilles Vollant <info@winimage.com>, is available in the
+contrib/minizip directory of zlib.
+
+
+Notes for some targets:
+
+- For Windows DLL versions, please see win32/DLL_FAQ.txt
+
+- For 64-bit Irix, deflate.c must be compiled without any optimization. With
+ -O, one libpng test fails. The test works in 32 bit mode (with the -n32
+ compiler flag). The compiler bug has been reported to SGI.
+
+- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
+ when compiled with cc.
+
+- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
+ necessary to get gzprintf working correctly. This is done by configure.
+
+- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
+ other compilers. Use "make test" to check your compiler.
+
+- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
+
+- For PalmOs, see http://palmzlib.sourceforge.net/
+
+- When building a shared, i.e. dynamic library on Mac OS X, the library must be
+ installed before testing (do "make install" before "make test"), since the
+ library location is specified in the library.
+
+
+Acknowledgments:
+
+ The deflate format used by zlib was defined by Phil Katz. The deflate
+ and zlib specifications were written by L. Peter Deutsch. Thanks to all the
+ people who reported problems and suggested various improvements in zlib;
+ they are too numerous to cite here.
+
+Copyright notice:
+
+ (C) 1995-2004 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
+
+If you use the zlib library in a product, we would appreciate *not*
+receiving lengthy legal documents to sign. The sources are provided
+for free but without warranty of any kind. The library has been
+entirely written by Jean-loup Gailly and Mark Adler; it does not
+include third-party code.
+
+If you redistribute modified sources, we would appreciate that you include
+in the file ChangeLog history information documenting your changes. Please
+read the FAQ for more information on the distribution of modified source
+versions.
diff --git a/src/zlib/adler32.c b/src/zlib/adler32.c
new file mode 100644
index 000000000..624a1696e
--- /dev/null
+++ b/src/zlib/adler32.c
@@ -0,0 +1,74 @@
+/* adler32.c -- compute the Adler-32 checksum of a data stream
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#define ZLIB_INTERNAL
+#include "zlib.h"
+
+#define BASE 65521UL /* largest prime smaller than 65536 */
+#define NMAX 5552
+/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
+
+#define DO1(buf,i) {s1 += buf[i]; s2 += s1;}
+#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
+#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
+#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
+#define DO16(buf) DO8(buf,0); DO8(buf,8);
+
+#ifdef NO_DIVIDE
+# define MOD(a) \
+ do { \
+ if (a >= (BASE << 16)) a -= (BASE << 16); \
+ if (a >= (BASE << 15)) a -= (BASE << 15); \
+ if (a >= (BASE << 14)) a -= (BASE << 14); \
+ if (a >= (BASE << 13)) a -= (BASE << 13); \
+ if (a >= (BASE << 12)) a -= (BASE << 12); \
+ if (a >= (BASE << 11)) a -= (BASE << 11); \
+ if (a >= (BASE << 10)) a -= (BASE << 10); \
+ if (a >= (BASE << 9)) a -= (BASE << 9); \
+ if (a >= (BASE << 8)) a -= (BASE << 8); \
+ if (a >= (BASE << 7)) a -= (BASE << 7); \
+ if (a >= (BASE << 6)) a -= (BASE << 6); \
+ if (a >= (BASE << 5)) a -= (BASE << 5); \
+ if (a >= (BASE << 4)) a -= (BASE << 4); \
+ if (a >= (BASE << 3)) a -= (BASE << 3); \
+ if (a >= (BASE << 2)) a -= (BASE << 2); \
+ if (a >= (BASE << 1)) a -= (BASE << 1); \
+ if (a >= BASE) a -= BASE; \
+ } while (0)
+#else
+# define MOD(a) a %= BASE
+#endif
+
+/* ========================================================================= */
+uLong ZEXPORT adler32(adler, buf, len)
+ uLong adler;
+ const Bytef *buf;
+ uInt len;
+{
+ unsigned long s1 = adler & 0xffff;
+ unsigned long s2 = (adler >> 16) & 0xffff;
+ int k;
+
+ if (buf == Z_NULL) return 1L;
+
+ while (len > 0) {
+ k = len < NMAX ? (int)len : NMAX;
+ len -= k;
+ while (k >= 16) {
+ DO16(buf);
+ buf += 16;
+ k -= 16;
+ }
+ if (k != 0) do {
+ s1 += *buf++;
+ s2 += s1;
+ } while (--k);
+ MOD(s1);
+ MOD(s2);
+ }
+ return (s2 << 16) | s1;
+}
diff --git a/src/zlib/compress.c b/src/zlib/compress.c
new file mode 100644
index 000000000..24ef02919
--- /dev/null
+++ b/src/zlib/compress.c
@@ -0,0 +1,79 @@
+/* compress.c -- compress a memory buffer
+ * Copyright (C) 1995-2002 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#define ZLIB_INTERNAL
+#include "zlib.h"
+
+/* ===========================================================================
+ 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 0.1% larger than sourceLen plus
+ 12 bytes. 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.
+*/
+int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
+ Bytef *dest;
+ uLongf *destLen;
+ const Bytef *source;
+ uLong sourceLen;
+ int level;
+{
+ z_stream stream;
+ int err;
+
+ stream.next_in = (Bytef*)source;
+ stream.avail_in = (uInt)sourceLen;
+#ifdef MAXSEG_64K
+ /* Check for source > 64K on 16-bit machine: */
+ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
+#endif
+ stream.next_out = 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;
+ stream.opaque = (voidpf)0;
+
+ err = deflateInit(&stream, level);
+ if (err != Z_OK) return err;
+
+ err = deflate(&stream, Z_FINISH);
+ if (err != Z_STREAM_END) {
+ deflateEnd(&stream);
+ return err == Z_OK ? Z_BUF_ERROR : err;
+ }
+ *destLen = stream.total_out;
+
+ err = deflateEnd(&stream);
+ return err;
+}
+
+/* ===========================================================================
+ */
+int ZEXPORT compress (dest, destLen, source, sourceLen)
+ Bytef *dest;
+ uLongf *destLen;
+ const Bytef *source;
+ uLong sourceLen;
+{
+ return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
+}
+
+/* ===========================================================================
+ If the default memLevel or windowBits for deflateInit() is changed, then
+ this function needs to be updated.
+ */
+uLong ZEXPORT compressBound (sourceLen)
+ uLong sourceLen;
+{
+ return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
+}
diff --git a/src/zlib/crc32.c b/src/zlib/crc32.c
new file mode 100644
index 000000000..b39c7e125
--- /dev/null
+++ b/src/zlib/crc32.c
@@ -0,0 +1,333 @@
+/* crc32.c -- compute the CRC-32 of a data stream
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ *
+ * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
+ * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
+ * tables for updating the shift register in one step with three exclusive-ors
+ * instead of four steps with four exclusive-ors. This results about a factor
+ * of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
+ */
+
+/* @(#) $Id$ */
+
+/*
+ Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
+ protection on the static variables used to control the first-use generation
+ of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
+ first call get_crc_table() to initialize the tables before allowing more than
+ one thread to use crc32().
+ */
+
+#ifdef MAKECRCH
+# include <stdio.h>
+# ifndef DYNAMIC_CRC_TABLE
+# define DYNAMIC_CRC_TABLE
+# endif /* !DYNAMIC_CRC_TABLE */
+#endif /* MAKECRCH */
+
+#include "zutil.h" /* for STDC and FAR definitions */
+
+#define local static
+
+/* Find a four-byte integer type for crc32_little() and crc32_big(). */
+#ifndef NOBYFOUR
+# ifdef STDC /* need ANSI C limits.h to determine sizes */
+# include <limits.h>
+# define BYFOUR
+# if (UINT_MAX == 0xffffffffUL)
+ typedef unsigned int u4;
+# else
+# if (ULONG_MAX == 0xffffffffUL)
+ typedef unsigned long u4;
+# else
+# if (USHRT_MAX == 0xffffffffUL)
+ typedef unsigned short u4;
+# else
+# undef BYFOUR /* can't find a four-byte integer type! */
+# endif
+# endif
+# endif
+# endif /* STDC */
+#endif /* !NOBYFOUR */
+
+/* Definitions for doing the crc four data bytes at a time. */
+#ifdef BYFOUR
+# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
+ (((w)&0xff00)<<8)+(((w)&0xff)<<24))
+ local unsigned long crc32_little OF((unsigned long,
+ const unsigned char FAR *, unsigned));
+ local unsigned long crc32_big OF((unsigned long,
+ const unsigned char FAR *, unsigned));
+# define TBLS 8
+#else
+# define TBLS 1
+#endif /* BYFOUR */
+
+#ifdef DYNAMIC_CRC_TABLE
+
+local volatile int crc_table_empty = 1;
+local unsigned long FAR crc_table[TBLS][256];
+local void make_crc_table OF((void));
+#ifdef MAKECRCH
+ local void write_table OF((FILE *, const unsigned long FAR *));
+#endif /* MAKECRCH */
+
+/*
+ Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
+ x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
+
+ Polynomials over GF(2) are represented in binary, one bit per coefficient,
+ with the lowest powers in the most significant bit. Then adding polynomials
+ is just exclusive-or, and multiplying a polynomial by x is a right shift by
+ one. If we call the above polynomial p, and represent a byte as the
+ polynomial q, also with the lowest power in the most significant bit (so the
+ byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
+ where a mod b means the remainder after dividing a by b.
+
+ This calculation is done using the shift-register method of multiplying and
+ taking the remainder. The register is initialized to zero, and for each
+ incoming bit, x^32 is added mod p to the register if the bit is a one (where
+ x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
+ x (which is shifting right by one and adding x^32 mod p if the bit shifted
+ out is a one). We start with the highest power (least significant bit) of
+ q and repeat for all eight bits of q.
+
+ The first table is simply the CRC of all possible eight bit values. This is
+ all the information needed to generate CRCs on data a byte at a time for all
+ combinations of CRC register values and incoming bytes. The remaining tables
+ allow for word-at-a-time CRC calculation for both big-endian and little-
+ endian machines, where a word is four bytes.
+*/
+local void make_crc_table()
+{
+ unsigned long c;
+ int n, k;
+ unsigned long poly; /* polynomial exclusive-or pattern */
+ /* terms of polynomial defining this crc (except x^32): */
+ static volatile int first = 1; /* flag to limit concurrent making */
+ static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
+
+ /* See if another task is already doing this (not thread-safe, but better
+ than nothing -- significantly reduces duration of vulnerability in
+ case the advice about DYNAMIC_CRC_TABLE is ignored) */
+ if (first) {
+ first = 0;
+
+ /* make exclusive-or pattern from polynomial (0xedb88320UL) */
+ poly = 0UL;
+ for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
+ poly |= 1UL << (31 - p[n]);
+
+ /* generate a crc for every 8-bit value */
+ for (n = 0; n < 256; n++) {
+ c = (unsigned long)n;
+ for (k = 0; k < 8; k++)
+ c = c & 1 ? poly ^ (c >> 1) : c >> 1;
+ crc_table[0][n] = c;
+ }
+
+#ifdef BYFOUR
+ /* generate crc for each value followed by one, two, and three zeros,
+ and then the byte reversal of those as well as the first table */
+ for (n = 0; n < 256; n++) {
+ c = crc_table[0][n];
+ crc_table[4][n] = REV(c);
+ for (k = 1; k < 4; k++) {
+ c = crc_table[0][c & 0xff] ^ (c >> 8);
+ crc_table[k][n] = c;
+ crc_table[k + 4][n] = REV(c);
+ }
+ }
+#endif /* BYFOUR */
+
+ crc_table_empty = 0;
+ }
+ else { /* not first */
+ /* wait for the other guy to finish (not efficient, but rare) */
+ while (crc_table_empty)
+ ;
+ }
+
+#ifdef MAKECRCH
+ /* write out CRC tables to crc32.h */
+ {
+ FILE *out;
+
+ out = fopen("crc32.h", "w");
+ if (out == NULL) return;
+ fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
+ fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
+ fprintf(out, "local const unsigned long FAR ");
+ fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
+ write_table(out, crc_table[0]);
+# ifdef BYFOUR
+ fprintf(out, "#ifdef BYFOUR\n");
+ for (k = 1; k < 8; k++) {
+ fprintf(out, " },\n {\n");
+ write_table(out, crc_table[k]);
+ }
+ fprintf(out, "#endif\n");
+# endif /* BYFOUR */
+ fprintf(out, " }\n};\n");
+ fclose(out);
+ }
+#endif /* MAKECRCH */
+}
+
+#ifdef MAKECRCH
+local void write_table(out, table)
+ FILE *out;
+ const unsigned long FAR *table;
+{
+ int n;
+
+ for (n = 0; n < 256; n++)
+ fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n],
+ n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
+}
+#endif /* MAKECRCH */
+
+#else /* !DYNAMIC_CRC_TABLE */
+/* ========================================================================
+ * Tables of CRC-32s of all single-byte values, made by make_crc_table().
+ */
+#include "crc32.h"
+#endif /* DYNAMIC_CRC_TABLE */
+
+/* =========================================================================
+ * This function can be used by asm versions of crc32()
+ */
+const unsigned long FAR * ZEXPORT get_crc_table()
+{
+#ifdef DYNAMIC_CRC_TABLE
+ if (crc_table_empty)
+ make_crc_table();
+#endif /* DYNAMIC_CRC_TABLE */
+ return (const unsigned long FAR *)crc_table;
+}
+
+/* ========================================================================= */
+#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
+#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
+
+/* ========================================================================= */
+unsigned long ZEXPORT crc32(crc, buf, len)
+ unsigned long crc;
+ const unsigned char FAR *buf;
+ unsigned len;
+{
+ if (buf == Z_NULL) return 0UL;
+
+#ifdef DYNAMIC_CRC_TABLE
+ if (crc_table_empty)
+ make_crc_table();
+#endif /* DYNAMIC_CRC_TABLE */
+
+#ifdef BYFOUR
+ if (sizeof(void *) == sizeof(ptrdiff_t)) {
+ u4 endian;
+
+ endian = 1;
+ if (*((unsigned char *)(&endian)))
+ return crc32_little(crc, buf, len);
+ else
+ return crc32_big(crc, buf, len);
+ }
+#endif /* BYFOUR */
+ crc = crc ^ 0xffffffffUL;
+ while (len >= 8) {
+ DO8;
+ len -= 8;
+ }
+ if (len) do {
+ DO1;
+ } while (--len);
+ return crc ^ 0xffffffffUL;
+}
+
+#ifdef BYFOUR
+
+/* ========================================================================= */
+#define DOLIT4 c ^= *buf4++; \
+ c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
+ crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
+#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
+
+/* ========================================================================= */
+local unsigned long crc32_little(crc, buf, len)
+ unsigned long crc;
+ const unsigned char FAR *buf;
+ unsigned len;
+{
+ register u4 c;
+ register const u4 FAR *buf4;
+
+ c = (u4)crc;
+ c = ~c;
+ while (len && ((ptrdiff_t)buf & 3)) {
+ c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
+ len--;
+ }
+
+ buf4 = (const u4 FAR *)buf;
+ while (len >= 32) {
+ DOLIT32;
+ len -= 32;
+ }
+ while (len >= 4) {
+ DOLIT4;
+ len -= 4;
+ }
+ buf = (const unsigned char FAR *)buf4;
+
+ if (len) do {
+ c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
+ } while (--len);
+ c = ~c;
+ return (unsigned long)c;
+}
+
+/* ========================================================================= */
+#define DOBIG4 c ^= *++buf4; \
+ c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
+ crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
+#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
+
+/* ========================================================================= */
+local unsigned long crc32_big(crc, buf, len)
+ unsigned long crc;
+ const unsigned char FAR *buf;
+ unsigned len;
+{
+ register u4 c;
+ register const u4 FAR *buf4;
+
+ c = REV((u4)crc);
+ c = ~c;
+ while (len && ((ptrdiff_t)buf & 3)) {
+ c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
+ len--;
+ }
+
+ buf4 = (const u4 FAR *)buf;
+ buf4--;
+ while (len >= 32) {
+ DOBIG32;
+ len -= 32;
+ }
+ while (len >= 4) {
+ DOBIG4;
+ len -= 4;
+ }
+ buf4++;
+ buf = (const unsigned char FAR *)buf4;
+
+ if (len) do {
+ c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
+ } while (--len);
+ c = ~c;
+ return (unsigned long)(REV(c));
+}
+
+#endif /* BYFOUR */
diff --git a/src/zlib/crc32.h b/src/zlib/crc32.h
new file mode 100644
index 000000000..8053b6117
--- /dev/null
+++ b/src/zlib/crc32.h
@@ -0,0 +1,441 @@
+/* crc32.h -- tables for rapid CRC calculation
+ * Generated automatically by crc32.c
+ */
+
+local const unsigned long FAR crc_table[TBLS][256] =
+{
+ {
+ 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
+ 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
+ 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
+ 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
+ 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
+ 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
+ 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
+ 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
+ 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
+ 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
+ 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
+ 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
+ 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
+ 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
+ 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
+ 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
+ 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
+ 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
+ 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
+ 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
+ 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
+ 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
+ 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
+ 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
+ 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
+ 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
+ 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
+ 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
+ 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
+ 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
+ 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
+ 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
+ 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
+ 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
+ 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
+ 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
+ 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
+ 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
+ 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
+ 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
+ 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
+ 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
+ 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
+ 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
+ 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
+ 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
+ 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
+ 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
+ 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
+ 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
+ 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
+ 0x2d02ef8dUL
+#ifdef BYFOUR
+ },
+ {
+ 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
+ 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
+ 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
+ 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
+ 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
+ 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
+ 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
+ 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
+ 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
+ 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
+ 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
+ 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
+ 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
+ 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
+ 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
+ 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
+ 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
+ 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
+ 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
+ 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
+ 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
+ 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
+ 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
+ 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
+ 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
+ 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
+ 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
+ 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
+ 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
+ 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
+ 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
+ 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
+ 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
+ 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
+ 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
+ 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
+ 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
+ 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
+ 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
+ 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
+ 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
+ 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
+ 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
+ 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
+ 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
+ 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
+ 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
+ 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
+ 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
+ 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
+ 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
+ 0x9324fd72UL
+ },
+ {
+ 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
+ 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
+ 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
+ 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
+ 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
+ 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
+ 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
+ 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
+ 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
+ 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
+ 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
+ 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
+ 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
+ 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
+ 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
+ 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
+ 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
+ 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
+ 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
+ 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
+ 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
+ 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
+ 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
+ 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
+ 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
+ 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
+ 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
+ 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
+ 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
+ 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
+ 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
+ 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
+ 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
+ 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
+ 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
+ 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
+ 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
+ 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
+ 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
+ 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
+ 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
+ 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
+ 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
+ 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
+ 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
+ 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
+ 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
+ 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
+ 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
+ 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
+ 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
+ 0xbe9834edUL
+ },
+ {
+ 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
+ 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
+ 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
+ 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
+ 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
+ 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
+ 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
+ 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
+ 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
+ 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
+ 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
+ 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
+ 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
+ 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
+ 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
+ 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
+ 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
+ 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
+ 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
+ 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
+ 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
+ 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
+ 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
+ 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
+ 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
+ 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
+ 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
+ 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
+ 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
+ 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
+ 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
+ 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
+ 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
+ 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
+ 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
+ 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
+ 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
+ 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
+ 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
+ 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
+ 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
+ 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
+ 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
+ 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
+ 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
+ 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
+ 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
+ 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
+ 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
+ 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
+ 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
+ 0xde0506f1UL
+ },
+ {
+ 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
+ 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
+ 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
+ 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
+ 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
+ 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
+ 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
+ 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
+ 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
+ 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
+ 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
+ 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
+ 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
+ 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
+ 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
+ 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
+ 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
+ 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
+ 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
+ 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
+ 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
+ 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
+ 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
+ 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
+ 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
+ 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
+ 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
+ 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
+ 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
+ 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
+ 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
+ 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
+ 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
+ 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
+ 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
+ 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
+ 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
+ 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
+ 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
+ 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
+ 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
+ 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
+ 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
+ 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
+ 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
+ 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
+ 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
+ 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
+ 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
+ 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
+ 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
+ 0x8def022dUL
+ },
+ {
+ 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
+ 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
+ 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
+ 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
+ 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
+ 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
+ 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
+ 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
+ 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
+ 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
+ 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
+ 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
+ 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
+ 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
+ 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
+ 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
+ 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
+ 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
+ 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
+ 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
+ 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
+ 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
+ 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
+ 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
+ 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
+ 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
+ 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
+ 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
+ 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
+ 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
+ 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
+ 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
+ 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
+ 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
+ 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
+ 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
+ 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
+ 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
+ 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
+ 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
+ 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
+ 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
+ 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
+ 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
+ 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
+ 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
+ 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
+ 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
+ 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
+ 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
+ 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
+ 0x72fd2493UL
+ },
+ {
+ 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
+ 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
+ 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
+ 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
+ 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
+ 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
+ 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
+ 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
+ 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
+ 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
+ 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
+ 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
+ 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
+ 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
+ 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
+ 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
+ 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
+ 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
+ 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
+ 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
+ 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
+ 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
+ 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
+ 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
+ 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
+ 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
+ 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
+ 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
+ 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
+ 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
+ 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
+ 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
+ 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
+ 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
+ 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
+ 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
+ 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
+ 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
+ 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
+ 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
+ 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
+ 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
+ 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
+ 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
+ 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
+ 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
+ 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
+ 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
+ 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
+ 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
+ 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
+ 0xed3498beUL
+ },
+ {
+ 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
+ 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
+ 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
+ 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
+ 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
+ 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
+ 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
+ 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
+ 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
+ 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
+ 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
+ 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
+ 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
+ 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
+ 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
+ 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
+ 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
+ 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
+ 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
+ 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
+ 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
+ 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
+ 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
+ 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
+ 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
+ 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
+ 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
+ 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
+ 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
+ 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
+ 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
+ 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
+ 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
+ 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
+ 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
+ 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
+ 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
+ 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
+ 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
+ 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
+ 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
+ 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
+ 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
+ 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
+ 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
+ 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
+ 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
+ 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
+ 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
+ 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
+ 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
+ 0xf10605deUL
+#endif
+ }
+};
diff --git a/src/zlib/deflate.c b/src/zlib/deflate.c
new file mode 100644
index 000000000..0fc53bc1e
--- /dev/null
+++ b/src/zlib/deflate.c
@@ -0,0 +1,1502 @@
+/* deflate.c -- compress data using the deflation algorithm
+ * Copyright (C) 1995-2004 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/*
+ * ALGORITHM
+ *
+ * The "deflation" process depends on being able to identify portions
+ * of the input text which are identical to earlier input (within a
+ * sliding window trailing behind the input currently being processed).
+ *
+ * The most straightforward technique turns out to be the fastest for
+ * most input files: try all possible matches and select the longest.
+ * The key feature of this algorithm is that insertions into the string
+ * dictionary are very simple and thus fast, and deletions are avoided
+ * completely. Insertions are performed at each input character, whereas
+ * string matches are performed only when the previous match ends. So it
+ * is preferable to spend more time in matches to allow very fast string
+ * insertions and avoid deletions. The matching algorithm for small
+ * strings is inspired from that of Rabin & Karp. A brute force approach
+ * is used to find longer strings when a small match has been found.
+ * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
+ * (by Leonid Broukhis).
+ * A previous version of this file used a more sophisticated algorithm
+ * (by Fiala and Greene) which is guaranteed to run in linear amortized
+ * time, but has a larger average cost, uses more memory and is patented.
+ * However the F&G algorithm may be faster for some highly redundant
+ * files if the parameter max_chain_length (described below) is too large.
+ *
+ * ACKNOWLEDGEMENTS
+ *
+ * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
+ * I found it in 'freeze' written by Leonid Broukhis.
+ * Thanks to many people for bug reports and testing.
+ *
+ * REFERENCES
+ *
+ * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
+ * Available in http://www.ietf.org/rfc/rfc1951.txt
+ *
+ * A description of the Rabin and Karp algorithm is given in the book
+ * "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
+ *
+ * Fiala,E.R., and Greene,D.H.
+ * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
+ *
+ */
+
+/* @(#) $Id$ */
+
+#include "deflate.h"
+
+const char deflate_copyright[] =
+ " deflate 1.2.2 Copyright 1995-2004 Jean-loup Gailly ";
+/*
+ If you use the zlib library in a product, an acknowledgment is welcome
+ in the documentation of your product. If for some reason you cannot
+ include such an acknowledgment, I would appreciate that you keep this
+ copyright string in the executable of your product.
+ */
+
+/* ===========================================================================
+ * Function prototypes.
+ */
+typedef enum {
+ need_more, /* block not completed, need more input or more output */
+ block_done, /* block flush performed */
+ finish_started, /* finish started, need only more output at next deflate */
+ finish_done /* finish done, accept no more input or output */
+} block_state;
+
+typedef block_state (*compress_func) OF((deflate_state *s, int flush));
+/* Compression function. Returns the block state after the call. */
+
+local void fill_window OF((deflate_state *s));
+local block_state deflate_stored OF((deflate_state *s, int flush));
+local block_state deflate_fast OF((deflate_state *s, int flush));
+#ifndef FASTEST
+local block_state deflate_slow OF((deflate_state *s, int flush));
+#endif
+local void lm_init OF((deflate_state *s));
+local void putShortMSB OF((deflate_state *s, uInt b));
+local void flush_pending OF((z_streamp strm));
+local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
+#ifndef FASTEST
+#ifdef ASMV
+ void match_init OF((void)); /* asm code initialization */
+ uInt longest_match OF((deflate_state *s, IPos cur_match));
+#else
+local uInt longest_match OF((deflate_state *s, IPos cur_match));
+#endif
+#endif
+local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
+
+#ifdef DEBUG
+local void check_match OF((deflate_state *s, IPos start, IPos match,
+ int length));
+#endif
+
+/* ===========================================================================
+ * Local data
+ */
+
+#define NIL 0
+/* Tail of hash chains */
+
+#ifndef TOO_FAR
+# define TOO_FAR 4096
+#endif
+/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
+
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+/* Minimum amount of lookahead, except at the end of the input file.
+ * See deflate.c for comments about the MIN_MATCH+1.
+ */
+
+/* Values for max_lazy_match, good_match and max_chain_length, depending on
+ * the desired pack level (0..9). The values given below have been tuned to
+ * exclude worst case performance for pathological files. Better values may be
+ * found for specific files.
+ */
+typedef struct config_s {
+ ush good_length; /* reduce lazy search above this match length */
+ ush max_lazy; /* do not perform lazy search above this match length */
+ ush nice_length; /* quit search above this match length */
+ ush max_chain;
+ compress_func func;
+} config;
+
+#ifdef FASTEST
+local const config configuration_table[2] = {
+/* good lazy nice chain */
+/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
+/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */
+#else
+local const config configuration_table[10] = {
+/* good lazy nice chain */
+/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
+/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */
+/* 2 */ {4, 5, 16, 8, deflate_fast},
+/* 3 */ {4, 6, 32, 32, deflate_fast},
+
+/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */
+/* 5 */ {8, 16, 32, 32, deflate_slow},
+/* 6 */ {8, 16, 128, 128, deflate_slow},
+/* 7 */ {8, 32, 128, 256, deflate_slow},
+/* 8 */ {32, 128, 258, 1024, deflate_slow},
+/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */
+#endif
+
+/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
+ * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
+ * meaning.
+ */
+
+#define EQUAL 0
+/* result of memcmp for equal strings */
+
+#ifndef NO_DUMMY_DECL
+struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
+#endif
+
+/* ===========================================================================
+ * Update a hash value with the given input byte
+ * IN assertion: all calls to to UPDATE_HASH are made with consecutive
+ * input characters, so that a running hash key can be computed from the
+ * previous key instead of complete recalculation each time.
+ */
+#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
+
+
+/* ===========================================================================
+ * Insert string str in the dictionary and set match_head to the previous head
+ * of the hash chain (the most recent string with same hash key). Return
+ * the previous length of the hash chain.
+ * If this file is compiled with -DFASTEST, the compression level is forced
+ * to 1, and no hash chains are maintained.
+ * IN assertion: all calls to to INSERT_STRING are made with consecutive
+ * input characters and the first MIN_MATCH bytes of str are valid
+ * (except for the last MIN_MATCH-1 bytes of the input file).
+ */
+#ifdef FASTEST
+#define INSERT_STRING(s, str, match_head) \
+ (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
+ match_head = s->head[s->ins_h], \
+ s->head[s->ins_h] = (Pos)(str))
+#else
+#define INSERT_STRING(s, str, match_head) \
+ (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
+ match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
+ s->head[s->ins_h] = (Pos)(str))
+#endif
+
+/* ===========================================================================
+ * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
+ * prev[] will be initialized on the fly.
+ */
+#define CLEAR_HASH(s) \
+ s->head[s->hash_size-1] = NIL; \
+ zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
+
+/* ========================================================================= */
+int ZEXPORT deflateInit_(strm, level, version, stream_size)
+ z_streamp strm;
+ int level;
+ const char *version;
+ int stream_size;
+{
+ return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
+ Z_DEFAULT_STRATEGY, version, stream_size);
+ /* To do: ignore strm->next_in if we use it as window */
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
+ version, stream_size)
+ z_streamp strm;
+ int level;
+ int method;
+ int windowBits;
+ int memLevel;
+ int strategy;
+ const char *version;
+ int stream_size;
+{
+ deflate_state *s;
+ int wrap = 1;
+ static const char my_version[] = ZLIB_VERSION;
+
+ ushf *overlay;
+ /* We overlay pending_buf and d_buf+l_buf. This works since the average
+ * output size for (length,distance) codes is <= 24 bits.
+ */
+
+ if (version == Z_NULL || version[0] != my_version[0] ||
+ stream_size != sizeof(z_stream)) {
+ return Z_VERSION_ERROR;
+ }
+ if (strm == Z_NULL) return Z_STREAM_ERROR;
+
+ strm->msg = Z_NULL;
+ if (strm->zalloc == (alloc_func)0) {
+ strm->zalloc = zcalloc;
+ strm->opaque = (voidpf)0;
+ }
+ if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+
+#ifdef FASTEST
+ if (level != 0) level = 1;
+#else
+ if (level == Z_DEFAULT_COMPRESSION) level = 6;
+#endif
+
+ if (windowBits < 0) { /* suppress zlib wrapper */
+ wrap = 0;
+ windowBits = -windowBits;
+ }
+#ifdef GZIP
+ else if (windowBits > 15) {
+ wrap = 2; /* write gzip wrapper instead */
+ windowBits -= 16;
+ }
+#endif
+ if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
+ windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+ strategy < 0 || strategy > Z_RLE) {
+ return Z_STREAM_ERROR;
+ }
+ if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */
+ s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
+ if (s == Z_NULL) return Z_MEM_ERROR;
+ strm->state = (struct internal_state FAR *)s;
+ s->strm = strm;
+
+ s->wrap = wrap;
+ s->w_bits = windowBits;
+ s->w_size = 1 << s->w_bits;
+ s->w_mask = s->w_size - 1;
+
+ s->hash_bits = memLevel + 7;
+ s->hash_size = 1 << s->hash_bits;
+ s->hash_mask = s->hash_size - 1;
+ s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
+
+ s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
+ s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
+ s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
+
+ s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+
+ overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
+ s->pending_buf = (uchf *) overlay;
+ s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
+
+ if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
+ s->pending_buf == Z_NULL) {
+ s->status = FINISH_STATE;
+ strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+ deflateEnd (strm);
+ return Z_MEM_ERROR;
+ }
+ s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
+ s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
+
+ s->level = level;
+ s->strategy = strategy;
+ s->method = (Byte)method;
+
+ return deflateReset(strm);
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
+ z_streamp strm;
+ const Bytef *dictionary;
+ uInt dictLength;
+{
+ deflate_state *s;
+ uInt length = dictLength;
+ uInt n;
+ IPos hash_head = 0;
+
+ if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
+ strm->state->wrap == 2 ||
+ (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
+ return Z_STREAM_ERROR;
+
+ s = strm->state;
+ if (s->wrap)
+ strm->adler = adler32(strm->adler, dictionary, dictLength);
+
+ if (length < MIN_MATCH) return Z_OK;
+ if (length > MAX_DIST(s)) {
+ length = MAX_DIST(s);
+#ifndef USE_DICT_HEAD
+ dictionary += dictLength - length; /* use the tail of the dictionary */
+#endif
+ }
+ zmemcpy(s->window, dictionary, length);
+ s->strstart = length;
+ s->block_start = (long)length;
+
+ /* Insert all strings in the hash table (except for the last two bytes).
+ * s->lookahead stays null, so s->ins_h will be recomputed at the next
+ * call of fill_window.
+ */
+ s->ins_h = s->window[0];
+ UPDATE_HASH(s, s->ins_h, s->window[1]);
+ for (n = 0; n <= length - MIN_MATCH; n++) {
+ INSERT_STRING(s, n, hash_head);
+ }
+ if (hash_head) hash_head = 0; /* to make compiler happy */
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateReset (strm)
+ z_streamp strm;
+{
+ deflate_state *s;
+
+ if (strm == Z_NULL || strm->state == Z_NULL ||
+ strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
+ return Z_STREAM_ERROR;
+ }
+
+ strm->total_in = strm->total_out = 0;
+ strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
+ strm->data_type = Z_UNKNOWN;
+
+ s = (deflate_state *)strm->state;
+ s->pending = 0;
+ s->pending_out = s->pending_buf;
+
+ if (s->wrap < 0) {
+ s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
+ }
+ s->status = s->wrap ? INIT_STATE : BUSY_STATE;
+ strm->adler =
+#ifdef GZIP
+ s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
+#endif
+ adler32(0L, Z_NULL, 0);
+ s->last_flush = Z_NO_FLUSH;
+
+ _tr_init(s);
+ lm_init(s);
+
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflatePrime (strm, bits, value)
+ z_streamp strm;
+ int bits;
+ int value;
+{
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ strm->state->bi_valid = bits;
+ strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateParams(strm, level, strategy)
+ z_streamp strm;
+ int level;
+ int strategy;
+{
+ deflate_state *s;
+ compress_func func;
+ int err = Z_OK;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ s = strm->state;
+
+#ifdef FASTEST
+ if (level != 0) level = 1;
+#else
+ if (level == Z_DEFAULT_COMPRESSION) level = 6;
+#endif
+ if (level < 0 || level > 9 || strategy < 0 || strategy > Z_RLE) {
+ return Z_STREAM_ERROR;
+ }
+ func = configuration_table[s->level].func;
+
+ if (func != configuration_table[level].func && strm->total_in != 0) {
+ /* Flush the last buffer: */
+ err = deflate(strm, Z_PARTIAL_FLUSH);
+ }
+ if (s->level != level) {
+ s->level = level;
+ s->max_lazy_match = configuration_table[level].max_lazy;
+ s->good_match = configuration_table[level].good_length;
+ s->nice_match = configuration_table[level].nice_length;
+ s->max_chain_length = configuration_table[level].max_chain;
+ }
+ s->strategy = strategy;
+ return err;
+}
+
+/* =========================================================================
+ * For the default windowBits of 15 and memLevel of 8, this function returns
+ * a close to exact, as well as small, upper bound on the compressed size.
+ * They are coded as constants here for a reason--if the #define's are
+ * changed, then this function needs to be changed as well. The return
+ * value for 15 and 8 only works for those exact settings.
+ *
+ * For any setting other than those defaults for windowBits and memLevel,
+ * the value returned is a conservative worst case for the maximum expansion
+ * resulting from using fixed blocks instead of stored blocks, which deflate
+ * can emit on compressed data for some combinations of the parameters.
+ *
+ * This function could be more sophisticated to provide closer upper bounds
+ * for every combination of windowBits and memLevel, as well as wrap.
+ * But even the conservative upper bound of about 14% expansion does not
+ * seem onerous for output buffer allocation.
+ */
+uLong ZEXPORT deflateBound(strm, sourceLen)
+ z_streamp strm;
+ uLong sourceLen;
+{
+ deflate_state *s;
+ uLong destLen;
+
+ /* conservative upper bound */
+ destLen = sourceLen +
+ ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;
+
+ /* if can't get parameters, return conservative bound */
+ if (strm == Z_NULL || strm->state == Z_NULL)
+ return destLen;
+
+ /* if not default parameters, return conservative bound */
+ s = strm->state;
+ if (s->w_bits != 15 || s->hash_bits != 8 + 7)
+ return destLen;
+
+ /* default settings: return tight bound for that case */
+ return compressBound(sourceLen);
+}
+
+/* =========================================================================
+ * Put a short in the pending buffer. The 16-bit value is put in MSB order.
+ * IN assertion: the stream state is correct and there is enough room in
+ * pending_buf.
+ */
+local void putShortMSB (s, b)
+ deflate_state *s;
+ uInt b;
+{
+ put_byte(s, (Byte)(b >> 8));
+ put_byte(s, (Byte)(b & 0xff));
+}
+
+/* =========================================================================
+ * Flush as much pending output as possible. All deflate() output goes
+ * through this function so some applications may wish to modify it
+ * to avoid allocating a large strm->next_out buffer and copying into it.
+ * (See also read_buf()).
+ */
+local void flush_pending(strm)
+ z_streamp strm;
+{
+ unsigned len = strm->state->pending;
+
+ if (len > strm->avail_out) len = strm->avail_out;
+ if (len == 0) return;
+
+ zmemcpy(strm->next_out, strm->state->pending_out, len);
+ strm->next_out += len;
+ strm->state->pending_out += len;
+ strm->total_out += len;
+ strm->avail_out -= len;
+ strm->state->pending -= len;
+ if (strm->state->pending == 0) {
+ strm->state->pending_out = strm->state->pending_buf;
+ }
+}
+
+/* ========================================================================= */
+int ZEXPORT deflate (strm, flush)
+ z_streamp strm;
+ int flush;
+{
+ int old_flush; /* value of flush param for previous deflate call */
+ deflate_state *s;
+
+ if (strm == Z_NULL || strm->state == Z_NULL ||
+ flush > Z_FINISH || flush < 0) {
+ return Z_STREAM_ERROR;
+ }
+ s = strm->state;
+
+ if (strm->next_out == Z_NULL ||
+ (strm->next_in == Z_NULL && strm->avail_in != 0) ||
+ (s->status == FINISH_STATE && flush != Z_FINISH)) {
+ ERR_RETURN(strm, Z_STREAM_ERROR);
+ }
+ if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
+
+ s->strm = strm; /* just in case */
+ old_flush = s->last_flush;
+ s->last_flush = flush;
+
+ /* Write the header */
+ if (s->status == INIT_STATE) {
+#ifdef GZIP
+ if (s->wrap == 2) {
+ put_byte(s, 31);
+ put_byte(s, 139);
+ put_byte(s, 8);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, s->level == 9 ? 2 :
+ (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
+ 4 : 0));
+ put_byte(s, 255);
+ s->status = BUSY_STATE;
+ strm->adler = crc32(0L, Z_NULL, 0);
+ }
+ else
+#endif
+ {
+ uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
+ uInt level_flags;
+
+ if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
+ level_flags = 0;
+ else if (s->level < 6)
+ level_flags = 1;
+ else if (s->level == 6)
+ level_flags = 2;
+ else
+ level_flags = 3;
+ header |= (level_flags << 6);
+ if (s->strstart != 0) header |= PRESET_DICT;
+ header += 31 - (header % 31);
+
+ s->status = BUSY_STATE;
+ putShortMSB(s, header);
+
+ /* Save the adler32 of the preset dictionary: */
+ if (s->strstart != 0) {
+ putShortMSB(s, (uInt)(strm->adler >> 16));
+ putShortMSB(s, (uInt)(strm->adler & 0xffff));
+ }
+ strm->adler = adler32(0L, Z_NULL, 0);
+ }
+ }
+
+ /* Flush as much pending output as possible */
+ if (s->pending != 0) {
+ flush_pending(strm);
+ if (strm->avail_out == 0) {
+ /* Since avail_out is 0, deflate will be called again with
+ * more output space, but possibly with both pending and
+ * avail_in equal to zero. There won't be anything to do,
+ * but this is not an error situation so make sure we
+ * return OK instead of BUF_ERROR at next call of deflate:
+ */
+ s->last_flush = -1;
+ return Z_OK;
+ }
+
+ /* Make sure there is something to do and avoid duplicate consecutive
+ * flushes. For repeated and useless calls with Z_FINISH, we keep
+ * returning Z_STREAM_END instead of Z_BUF_ERROR.
+ */
+ } else if (strm->avail_in == 0 && flush <= old_flush &&
+ flush != Z_FINISH) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
+
+ /* User must not provide more input after the first FINISH: */
+ if (s->status == FINISH_STATE && strm->avail_in != 0) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
+
+ /* Start a new block or continue the current one.
+ */
+ if (strm->avail_in != 0 || s->lookahead != 0 ||
+ (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
+ block_state bstate;
+
+ bstate = (*(configuration_table[s->level].func))(s, flush);
+
+ if (bstate == finish_started || bstate == finish_done) {
+ s->status = FINISH_STATE;
+ }
+ if (bstate == need_more || bstate == finish_started) {
+ if (strm->avail_out == 0) {
+ s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
+ }
+ return Z_OK;
+ /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
+ * of deflate should use the same flush parameter to make sure
+ * that the flush is complete. So we don't have to output an
+ * empty block here, this will be done at next call. This also
+ * ensures that for a very small output buffer, we emit at most
+ * one empty block.
+ */
+ }
+ if (bstate == block_done) {
+ if (flush == Z_PARTIAL_FLUSH) {
+ _tr_align(s);
+ } else { /* FULL_FLUSH or SYNC_FLUSH */
+ _tr_stored_block(s, (char*)0, 0L, 0);
+ /* For a full flush, this empty block will be recognized
+ * as a special marker by inflate_sync().
+ */
+ if (flush == Z_FULL_FLUSH) {
+ CLEAR_HASH(s); /* forget history */
+ }
+ }
+ flush_pending(strm);
+ if (strm->avail_out == 0) {
+ s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
+ return Z_OK;
+ }
+ }
+ }
+ Assert(strm->avail_out > 0, "bug2");
+
+ if (flush != Z_FINISH) return Z_OK;
+ if (s->wrap <= 0) return Z_STREAM_END;
+
+ /* Write the trailer */
+#ifdef GZIP
+ if (s->wrap == 2) {
+ put_byte(s, (Byte)(strm->adler & 0xff));
+ put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
+ put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
+ put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
+ put_byte(s, (Byte)(strm->total_in & 0xff));
+ put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
+ put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
+ put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
+ }
+ else
+#endif
+ {
+ putShortMSB(s, (uInt)(strm->adler >> 16));
+ putShortMSB(s, (uInt)(strm->adler & 0xffff));
+ }
+ flush_pending(strm);
+ /* If avail_out is zero, the application will call deflate again
+ * to flush the rest.
+ */
+ if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
+ return s->pending != 0 ? Z_OK : Z_STREAM_END;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateEnd (strm)
+ z_streamp strm;
+{
+ int status;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+
+ status = strm->state->status;
+ if (status != INIT_STATE && status != BUSY_STATE &&
+ status != FINISH_STATE) {
+ return Z_STREAM_ERROR;
+ }
+
+ /* Deallocate in reverse order of allocations: */
+ TRY_FREE(strm, strm->state->pending_buf);
+ TRY_FREE(strm, strm->state->head);
+ TRY_FREE(strm, strm->state->prev);
+ TRY_FREE(strm, strm->state->window);
+
+ ZFREE(strm, strm->state);
+ strm->state = Z_NULL;
+
+ return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
+}
+
+/* =========================================================================
+ * Copy the source state to the destination state.
+ * To simplify the source, this is not supported for 16-bit MSDOS (which
+ * doesn't have enough memory anyway to duplicate compression states).
+ */
+int ZEXPORT deflateCopy (dest, source)
+ z_streamp dest;
+ z_streamp source;
+{
+#ifdef MAXSEG_64K
+ return Z_STREAM_ERROR;
+#else
+ deflate_state *ds;
+ deflate_state *ss;
+ ushf *overlay;
+
+
+ if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
+ return Z_STREAM_ERROR;
+ }
+
+ ss = source->state;
+
+ *dest = *source;
+
+ ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
+ if (ds == Z_NULL) return Z_MEM_ERROR;
+ dest->state = (struct internal_state FAR *) ds;
+ *ds = *ss;
+ ds->strm = dest;
+
+ ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
+ ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
+ ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
+ overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
+ ds->pending_buf = (uchf *) overlay;
+
+ if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
+ ds->pending_buf == Z_NULL) {
+ deflateEnd (dest);
+ return Z_MEM_ERROR;
+ }
+ /* following zmemcpy do not work for 16-bit MSDOS */
+ zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
+ zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
+ zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
+ zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
+
+ ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
+ ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
+ ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
+
+ ds->l_desc.dyn_tree = ds->dyn_ltree;
+ ds->d_desc.dyn_tree = ds->dyn_dtree;
+ ds->bl_desc.dyn_tree = ds->bl_tree;
+
+ return Z_OK;
+#endif /* MAXSEG_64K */
+}
+
+/* ===========================================================================
+ * Read a new buffer from the current input stream, update the adler32
+ * and total number of bytes read. All deflate() input goes through
+ * this function so some applications may wish to modify it to avoid
+ * allocating a large strm->next_in buffer and copying from it.
+ * (See also flush_pending()).
+ */
+local int read_buf(strm, buf, size)
+ z_streamp strm;
+ Bytef *buf;
+ unsigned size;
+{
+ unsigned len = strm->avail_in;
+
+ if (len > size) len = size;
+ if (len == 0) return 0;
+
+ strm->avail_in -= len;
+
+ if (strm->state->wrap == 1) {
+ strm->adler = adler32(strm->adler, strm->next_in, len);
+ }
+#ifdef GZIP
+ else if (strm->state->wrap == 2) {
+ strm->adler = crc32(strm->adler, strm->next_in, len);
+ }
+#endif
+ zmemcpy(buf, strm->next_in, len);
+ strm->next_in += len;
+ strm->total_in += len;
+
+ return (int)len;
+}
+
+/* ===========================================================================
+ * Initialize the "longest match" routines for a new zlib stream
+ */
+local void lm_init (s)
+ deflate_state *s;
+{
+ s->window_size = (ulg)2L*s->w_size;
+
+ CLEAR_HASH(s);
+
+ /* Set the default configuration parameters:
+ */
+ s->max_lazy_match = configuration_table[s->level].max_lazy;
+ s->good_match = configuration_table[s->level].good_length;
+ s->nice_match = configuration_table[s->level].nice_length;
+ s->max_chain_length = configuration_table[s->level].max_chain;
+
+ s->strstart = 0;
+ s->block_start = 0L;
+ s->lookahead = 0;
+ s->match_length = s->prev_length = MIN_MATCH-1;
+ s->match_available = 0;
+ s->ins_h = 0;
+#ifdef ASMV
+ match_init(); /* initialize the asm code */
+#endif
+}
+
+#ifndef FASTEST
+/* ===========================================================================
+ * Set match_start to the longest match starting at the given string and
+ * return its length. Matches shorter or equal to prev_length are discarded,
+ * in which case the result is equal to prev_length and match_start is
+ * garbage.
+ * IN assertions: cur_match is the head of the hash chain for the current
+ * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
+ * OUT assertion: the match length is not greater than s->lookahead.
+ */
+#ifndef ASMV
+/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
+ * match.S. The code will be functionally equivalent.
+ */
+local uInt longest_match(s, cur_match)
+ deflate_state *s;
+ IPos cur_match; /* current match */
+{
+ unsigned chain_length = s->max_chain_length;/* max hash chain length */
+ register Bytef *scan = s->window + s->strstart; /* current string */
+ register Bytef *match; /* matched string */
+ register int len; /* length of current match */
+ int best_len = s->prev_length; /* best match length so far */
+ int nice_match = s->nice_match; /* stop if match long enough */
+ IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+ s->strstart - (IPos)MAX_DIST(s) : NIL;
+ /* Stop when cur_match becomes <= limit. To simplify the code,
+ * we prevent matches with the string of window index 0.
+ */
+ Posf *prev = s->prev;
+ uInt wmask = s->w_mask;
+
+#ifdef UNALIGNED_OK
+ /* Compare two bytes at a time. Note: this is not always beneficial.
+ * Try with and without -DUNALIGNED_OK to check.
+ */
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
+ register ush scan_start = *(ushf*)scan;
+ register ush scan_end = *(ushf*)(scan+best_len-1);
+#else
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH;
+ register Byte scan_end1 = scan[best_len-1];
+ register Byte scan_end = scan[best_len];
+#endif
+
+ /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+ * It is easy to get rid of this optimization if necessary.
+ */
+ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+ /* Do not waste too much time if we already have a good match: */
+ if (s->prev_length >= s->good_match) {
+ chain_length >>= 2;
+ }
+ /* Do not look for matches beyond the end of the input. This is necessary
+ * to make deflate deterministic.
+ */
+ if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+ Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+ do {
+ Assert(cur_match < s->strstart, "no future");
+ match = s->window + cur_match;
+
+ /* Skip to next match if the match length cannot increase
+ * or if the match length is less than 2:
+ */
+#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
+ /* This code assumes sizeof(unsigned short) == 2. Do not use
+ * UNALIGNED_OK if your compiler uses a different size.
+ */
+ if (*(ushf*)(match+best_len-1) != scan_end ||
+ *(ushf*)match != scan_start) continue;
+
+ /* It is not necessary to compare scan[2] and match[2] since they are
+ * always equal when the other bytes match, given that the hash keys
+ * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
+ * strstart+3, +5, ... up to strstart+257. We check for insufficient
+ * lookahead only every 4th comparison; the 128th check will be made
+ * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
+ * necessary to put more guard bytes at the end of the window, or
+ * to check more often for insufficient lookahead.
+ */
+ Assert(scan[2] == match[2], "scan[2]?");
+ scan++, match++;
+ do {
+ } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ scan < strend);
+ /* The funny "do {}" generates better code on most compilers */
+
+ /* Here, scan <= window+strstart+257 */
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+ if (*scan == *match) scan++;
+
+ len = (MAX_MATCH - 1) - (int)(strend-scan);
+ scan = strend - (MAX_MATCH-1);
+
+#else /* UNALIGNED_OK */
+
+ if (match[best_len] != scan_end ||
+ match[best_len-1] != scan_end1 ||
+ *match != *scan ||
+ *++match != scan[1]) continue;
+
+ /* The check at best_len-1 can be removed because it will be made
+ * again later. (This heuristic is not always a win.)
+ * It is not necessary to compare scan[2] and match[2] since they
+ * are always equal when the other bytes match, given that
+ * the hash keys are equal and that HASH_BITS >= 8.
+ */
+ scan += 2, match++;
+ Assert(*scan == *match, "match[2]?");
+
+ /* We check for insufficient lookahead only every 8th comparison;
+ * the 256th check will be made at strstart+258.
+ */
+ do {
+ } while (*++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ scan < strend);
+
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+ len = MAX_MATCH - (int)(strend - scan);
+ scan = strend - MAX_MATCH;
+
+#endif /* UNALIGNED_OK */
+
+ if (len > best_len) {
+ s->match_start = cur_match;
+ best_len = len;
+ if (len >= nice_match) break;
+#ifdef UNALIGNED_OK
+ scan_end = *(ushf*)(scan+best_len-1);
+#else
+ scan_end1 = scan[best_len-1];
+ scan_end = scan[best_len];
+#endif
+ }
+ } while ((cur_match = prev[cur_match & wmask]) > limit
+ && --chain_length != 0);
+
+ if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+ return s->lookahead;
+}
+#endif /* ASMV */
+#endif /* FASTEST */
+
+/* ---------------------------------------------------------------------------
+ * Optimized version for level == 1 or strategy == Z_RLE only
+ */
+local uInt longest_match_fast(s, cur_match)
+ deflate_state *s;
+ IPos cur_match; /* current match */
+{
+ register Bytef *scan = s->window + s->strstart; /* current string */
+ register Bytef *match; /* matched string */
+ register int len; /* length of current match */
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH;
+
+ /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+ * It is easy to get rid of this optimization if necessary.
+ */
+ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+ Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+ Assert(cur_match < s->strstart, "no future");
+
+ match = s->window + cur_match;
+
+ /* Return failure if the match length is less than 2:
+ */
+ if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
+
+ /* The check at best_len-1 can be removed because it will be made
+ * again later. (This heuristic is not always a win.)
+ * It is not necessary to compare scan[2] and match[2] since they
+ * are always equal when the other bytes match, given that
+ * the hash keys are equal and that HASH_BITS >= 8.
+ */
+ scan += 2, match += 2;
+ Assert(*scan == *match, "match[2]?");
+
+ /* We check for insufficient lookahead only every 8th comparison;
+ * the 256th check will be made at strstart+258.
+ */
+ do {
+ } while (*++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ scan < strend);
+
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+ len = MAX_MATCH - (int)(strend - scan);
+
+ if (len < MIN_MATCH) return MIN_MATCH - 1;
+
+ s->match_start = cur_match;
+ return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
+}
+
+#ifdef DEBUG
+/* ===========================================================================
+ * Check that the match at match_start is indeed a match.
+ */
+local void check_match(s, start, match, length)
+ deflate_state *s;
+ IPos start, match;
+ int length;
+{
+ /* check that the match is indeed a match */
+ if (zmemcmp(s->window + match,
+ s->window + start, length) != EQUAL) {
+ fprintf(stderr, " start %u, match %u, length %d\n",
+ start, match, length);
+ do {
+ fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
+ } while (--length != 0);
+ z_error("invalid match");
+ }
+ if (z_verbose > 1) {
+ fprintf(stderr,"\\[%d,%d]", start-match, length);
+ do { putc(s->window[start++], stderr); } while (--length != 0);
+ }
+}
+#else
+# define check_match(s, start, match, length)
+#endif /* DEBUG */
+
+/* ===========================================================================
+ * Fill the window when the lookahead becomes insufficient.
+ * Updates strstart and lookahead.
+ *
+ * IN assertion: lookahead < MIN_LOOKAHEAD
+ * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
+ * At least one byte has been read, or avail_in == 0; reads are
+ * performed for at least two bytes (required for the zip translate_eol
+ * option -- not supported here).
+ */
+local void fill_window(s)
+ deflate_state *s;
+{
+ register unsigned n, m;
+ register Posf *p;
+ unsigned more; /* Amount of free space at the end of the window. */
+ uInt wsize = s->w_size;
+
+ do {
+ more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
+
+ /* Deal with !@#$% 64K limit: */
+ if (sizeof(int) <= 2) {
+ if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
+ more = wsize;
+
+ } else if (more == (unsigned)(-1)) {
+ /* Very unlikely, but possible on 16 bit machine if
+ * strstart == 0 && lookahead == 1 (input done a byte at time)
+ */
+ more--;
+ }
+ }
+
+ /* If the window is almost full and there is insufficient lookahead,
+ * move the upper half to the lower one to make room in the upper half.
+ */
+ if (s->strstart >= wsize+MAX_DIST(s)) {
+
+ zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
+ s->match_start -= wsize;
+ s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
+ s->block_start -= (long) wsize;
+
+ /* Slide the hash table (could be avoided with 32 bit values
+ at the expense of memory usage). We slide even when level == 0
+ to keep the hash table consistent if we switch back to level > 0
+ later. (Using level 0 permanently is not an optimal usage of
+ zlib, so we don't care about this pathological case.)
+ */
+ n = s->hash_size;
+ p = &s->head[n];
+ do {
+ m = *--p;
+ *p = (Pos)(m >= wsize ? m-wsize : NIL);
+ } while (--n);
+
+ n = wsize;
+#ifndef FASTEST
+ p = &s->prev[n];
+ do {
+ m = *--p;
+ *p = (Pos)(m >= wsize ? m-wsize : NIL);
+ /* If n is not on any hash chain, prev[n] is garbage but
+ * its value will never be used.
+ */
+ } while (--n);
+#endif
+ more += wsize;
+ }
+ if (s->strm->avail_in == 0) return;
+
+ /* If there was no sliding:
+ * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
+ * more == window_size - lookahead - strstart
+ * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
+ * => more >= window_size - 2*WSIZE + 2
+ * In the BIG_MEM or MMAP case (not yet supported),
+ * window_size == input_size + MIN_LOOKAHEAD &&
+ * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
+ * Otherwise, window_size == 2*WSIZE so more >= 2.
+ * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
+ */
+ Assert(more >= 2, "more < 2");
+
+ n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
+ s->lookahead += n;
+
+ /* Initialize the hash value now that we have some input: */
+ if (s->lookahead >= MIN_MATCH) {
+ s->ins_h = s->window[s->strstart];
+ UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
+#if MIN_MATCH != 3
+ Call UPDATE_HASH() MIN_MATCH-3 more times
+#endif
+ }
+ /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
+ * but this is not important since only literal bytes will be emitted.
+ */
+
+ } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
+}
+
+/* ===========================================================================
+ * Flush the current block, with given end-of-file flag.
+ * IN assertion: strstart is set to the end of the current match.
+ */
+#define FLUSH_BLOCK_ONLY(s, eof) { \
+ _tr_flush_block(s, (s->block_start >= 0L ? \
+ (charf *)&s->window[(unsigned)s->block_start] : \
+ (charf *)Z_NULL), \
+ (ulg)((long)s->strstart - s->block_start), \
+ (eof)); \
+ s->block_start = s->strstart; \
+ flush_pending(s->strm); \
+ Tracev((stderr,"[FLUSH]")); \
+}
+
+/* Same but force premature exit if necessary. */
+#define FLUSH_BLOCK(s, eof) { \
+ FLUSH_BLOCK_ONLY(s, eof); \
+ if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
+}
+
+/* ===========================================================================
+ * Copy without compression as much as possible from the input stream, return
+ * the current block state.
+ * This function does not insert new strings in the dictionary since
+ * uncompressible data is probably not useful. This function is used
+ * only for the level=0 compression option.
+ * NOTE: this function should be optimized to avoid extra copying from
+ * window to pending_buf.
+ */
+local block_state deflate_stored(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
+ * to pending_buf_size, and each stored block has a 5 byte header:
+ */
+ ulg max_block_size = 0xffff;
+ ulg max_start;
+
+ if (max_block_size > s->pending_buf_size - 5) {
+ max_block_size = s->pending_buf_size - 5;
+ }
+
+ /* Copy as much as possible from input to output: */
+ for (;;) {
+ /* Fill the window as much as possible: */
+ if (s->lookahead <= 1) {
+
+ Assert(s->strstart < s->w_size+MAX_DIST(s) ||
+ s->block_start >= (long)s->w_size, "slide too late");
+
+ fill_window(s);
+ if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
+
+ if (s->lookahead == 0) break; /* flush the current block */
+ }
+ Assert(s->block_start >= 0L, "block gone");
+
+ s->strstart += s->lookahead;
+ s->lookahead = 0;
+
+ /* Emit a stored block if pending_buf will be full: */
+ max_start = s->block_start + max_block_size;
+ if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
+ /* strstart == 0 is possible when wraparound on 16-bit machine */
+ s->lookahead = (uInt)(s->strstart - max_start);
+ s->strstart = (uInt)max_start;
+ FLUSH_BLOCK(s, 0);
+ }
+ /* Flush if we may have to slide, otherwise block_start may become
+ * negative and the data will be gone:
+ */
+ if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
+ FLUSH_BLOCK(s, 0);
+ }
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
+
+/* ===========================================================================
+ * Compress as much as possible from the input stream, return the current
+ * block state.
+ * This function does not perform lazy evaluation of matches and inserts
+ * new strings in the dictionary only for unmatched strings or for short
+ * matches. It is used only for the fast compression options.
+ */
+local block_state deflate_fast(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ IPos hash_head = NIL; /* head of the hash chain */
+ int bflush; /* set if current block must be flushed */
+
+ for (;;) {
+ /* Make sure that we always have enough lookahead, except
+ * at the end of the input file. We need MAX_MATCH bytes
+ * for the next match, plus MIN_MATCH bytes to insert the
+ * string following the next match.
+ */
+ if (s->lookahead < MIN_LOOKAHEAD) {
+ fill_window(s);
+ if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
+ return need_more;
+ }
+ if (s->lookahead == 0) break; /* flush the current block */
+ }
+
+ /* Insert the string window[strstart .. strstart+2] in the
+ * dictionary, and set hash_head to the head of the hash chain:
+ */
+ if (s->lookahead >= MIN_MATCH) {
+ INSERT_STRING(s, s->strstart, hash_head);
+ }
+
+ /* Find the longest match, discarding those <= prev_length.
+ * At this point we have always match_length < MIN_MATCH
+ */
+ if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
+ /* To simplify the code, we prevent matches with the string
+ * of window index 0 (in particular we have to avoid a match
+ * of the string with itself at the start of the input file).
+ */
+#ifdef FASTEST
+ if ((s->strategy < Z_HUFFMAN_ONLY) ||
+ (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
+ s->match_length = longest_match_fast (s, hash_head);
+ }
+#else
+ if (s->strategy < Z_HUFFMAN_ONLY) {
+ s->match_length = longest_match (s, hash_head);
+ } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
+ s->match_length = longest_match_fast (s, hash_head);
+ }
+#endif
+ /* longest_match() or longest_match_fast() sets match_start */
+ }
+ if (s->match_length >= MIN_MATCH) {
+ check_match(s, s->strstart, s->match_start, s->match_length);
+
+ _tr_tally_dist(s, s->strstart - s->match_start,
+ s->match_length - MIN_MATCH, bflush);
+
+ s->lookahead -= s->match_length;
+
+ /* Insert new strings in the hash table only if the match length
+ * is not too large. This saves time but degrades compression.
+ */
+#ifndef FASTEST
+ if (s->match_length <= s->max_insert_length &&
+ s->lookahead >= MIN_MATCH) {
+ s->match_length--; /* string at strstart already in table */
+ do {
+ s->strstart++;
+ INSERT_STRING(s, s->strstart, hash_head);
+ /* strstart never exceeds WSIZE-MAX_MATCH, so there are
+ * always MIN_MATCH bytes ahead.
+ */
+ } while (--s->match_length != 0);
+ s->strstart++;
+ } else
+#endif
+ {
+ s->strstart += s->match_length;
+ s->match_length = 0;
+ s->ins_h = s->window[s->strstart];
+ UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
+#if MIN_MATCH != 3
+ Call UPDATE_HASH() MIN_MATCH-3 more times
+#endif
+ /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
+ * matter since it will be recomputed at next deflate call.
+ */
+ }
+ } else {
+ /* No match, output a literal byte */
+ Tracevv((stderr,"%c", s->window[s->strstart]));
+ _tr_tally_lit (s, s->window[s->strstart], bflush);
+ s->lookahead--;
+ s->strstart++;
+ }
+ if (bflush) FLUSH_BLOCK(s, 0);
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
+
+#ifndef FASTEST
+/* ===========================================================================
+ * Same as above, but achieves better compression. We use a lazy
+ * evaluation for matches: a match is finally adopted only if there is
+ * no better match at the next window position.
+ */
+local block_state deflate_slow(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ IPos hash_head = NIL; /* head of hash chain */
+ int bflush; /* set if current block must be flushed */
+
+ /* Process the input block. */
+ for (;;) {
+ /* Make sure that we always have enough lookahead, except
+ * at the end of the input file. We need MAX_MATCH bytes
+ * for the next match, plus MIN_MATCH bytes to insert the
+ * string following the next match.
+ */
+ if (s->lookahead < MIN_LOOKAHEAD) {
+ fill_window(s);
+ if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
+ return need_more;
+ }
+ if (s->lookahead == 0) break; /* flush the current block */
+ }
+
+ /* Insert the string window[strstart .. strstart+2] in the
+ * dictionary, and set hash_head to the head of the hash chain:
+ */
+ if (s->lookahead >= MIN_MATCH) {
+ INSERT_STRING(s, s->strstart, hash_head);
+ }
+
+ /* Find the longest match, discarding those <= prev_length.
+ */
+ s->prev_length = s->match_length, s->prev_match = s->match_start;
+ s->match_length = MIN_MATCH-1;
+
+ if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
+ s->strstart - hash_head <= MAX_DIST(s)) {
+ /* To simplify the code, we prevent matches with the string
+ * of window index 0 (in particular we have to avoid a match
+ * of the string with itself at the start of the input file).
+ */
+ if (s->strategy < Z_HUFFMAN_ONLY) {
+ s->match_length = longest_match (s, hash_head);
+ } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
+ s->match_length = longest_match_fast (s, hash_head);
+ }
+ /* longest_match() or longest_match_fast() sets match_start */
+
+ if (s->match_length <= 5 && (s->strategy == Z_FILTERED
+#if TOO_FAR <= 32767
+ || (s->match_length == MIN_MATCH &&
+ s->strstart - s->match_start > TOO_FAR)
+#endif
+ )) {
+
+ /* If prev_match is also MIN_MATCH, match_start is garbage
+ * but we will ignore the current match anyway.
+ */
+ s->match_length = MIN_MATCH-1;
+ }
+ }
+ /* If there was a match at the previous step and the current
+ * match is not better, output the previous match:
+ */
+ if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
+ uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
+ /* Do not insert strings in hash table beyond this. */
+
+ check_match(s, s->strstart-1, s->prev_match, s->prev_length);
+
+ _tr_tally_dist(s, s->strstart -1 - s->prev_match,
+ s->prev_length - MIN_MATCH, bflush);
+
+ /* Insert in hash table all strings up to the end of the match.
+ * strstart-1 and strstart are already inserted. If there is not
+ * enough lookahead, the last two strings are not inserted in
+ * the hash table.
+ */
+ s->lookahead -= s->prev_length-1;
+ s->prev_length -= 2;
+ do {
+ if (++s->strstart <= max_insert) {
+ INSERT_STRING(s, s->strstart, hash_head);
+ }
+ } while (--s->prev_length != 0);
+ s->match_available = 0;
+ s->match_length = MIN_MATCH-1;
+ s->strstart++;
+
+ if (bflush) FLUSH_BLOCK(s, 0);
+
+ } else if (s->match_available) {
+ /* If there was no match at the previous position, output a
+ * single literal. If there was a match but the current match
+ * is longer, truncate the previous match to a single literal.
+ */
+ Tracevv((stderr,"%c", s->window[s->strstart-1]));
+ _tr_tally_lit(s, s->window[s->strstart-1], bflush);
+ if (bflush) {
+ FLUSH_BLOCK_ONLY(s, 0);
+ }
+ s->strstart++;
+ s->lookahead--;
+ if (s->strm->avail_out == 0) return need_more;
+ } else {
+ /* There is no previous match to compare with, wait for
+ * the next step to decide.
+ */
+ s->match_available = 1;
+ s->strstart++;
+ s->lookahead--;
+ }
+ }
+ Assert (flush != Z_NO_FLUSH, "no flush?");
+ if (s->match_available) {
+ Tracevv((stderr,"%c", s->window[s->strstart-1]));
+ _tr_tally_lit(s, s->window[s->strstart-1], bflush);
+ s->match_available = 0;
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
+#endif /* FASTEST */
diff --git a/src/zlib/deflate.h b/src/zlib/deflate.h
new file mode 100644
index 000000000..410681d18
--- /dev/null
+++ b/src/zlib/deflate.h
@@ -0,0 +1,325 @@
+/* deflate.h -- internal compression state
+ * Copyright (C) 1995-2002 Jean-loup Gailly
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id$ */
+
+#ifndef DEFLATE_H
+#define DEFLATE_H
+
+#include "zutil.h"
+
+/* define NO_GZIP when compiling if you want to disable gzip header and
+ trailer creation by deflate(). NO_GZIP would be used to avoid linking in
+ the crc code when it is not needed. For shared libraries, gzip encoding
+ should be left enabled. */
+#ifndef NO_GZIP
+# define GZIP
+#endif
+
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+#define LENGTH_CODES 29
+/* number of length codes, not counting the special END_BLOCK code */
+
+#define LITERALS 256
+/* number of literal bytes 0..255 */
+
+#define L_CODES (LITERALS+1+LENGTH_CODES)
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+#define D_CODES 30
+/* number of distance codes */
+
+#define BL_CODES 19
+/* number of codes used to transfer the bit lengths */
+
+#define HEAP_SIZE (2*L_CODES+1)
+/* maximum heap size */
+
+#define MAX_BITS 15
+/* All codes must not exceed MAX_BITS bits */
+
+#define INIT_STATE 42
+#define BUSY_STATE 113
+#define FINISH_STATE 666
+/* Stream status */
+
+
+/* Data structure describing a single value and its code string. */
+typedef struct ct_data_s {
+ union {
+ ush freq; /* frequency count */
+ ush code; /* bit string */
+ } fc;
+ union {
+ ush dad; /* father node in Huffman tree */
+ ush len; /* length of bit string */
+ } dl;
+} FAR ct_data;
+
+#define Freq fc.freq
+#define Code fc.code
+#define Dad dl.dad
+#define Len dl.len
+
+typedef struct static_tree_desc_s static_tree_desc;
+
+typedef struct tree_desc_s {
+ ct_data *dyn_tree; /* the dynamic tree */
+ int max_code; /* largest code with non zero frequency */
+ static_tree_desc *stat_desc; /* the corresponding static tree */
+} FAR tree_desc;
+
+typedef ush Pos;
+typedef Pos FAR Posf;
+typedef unsigned IPos;
+
+/* A Pos is an index in the character window. We use short instead of int to
+ * save space in the various tables. IPos is used only for parameter passing.
+ */
+
+typedef struct internal_state {
+ z_streamp strm; /* pointer back to this zlib stream */
+ int status; /* as the name implies */
+ Bytef *pending_buf; /* output still pending */
+ ulg pending_buf_size; /* size of pending_buf */
+ Bytef *pending_out; /* next pending byte to output to the stream */
+ int pending; /* nb of bytes in the pending buffer */
+ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
+ Byte method; /* STORED (for zip only) or DEFLATED */
+ int last_flush; /* value of flush param for previous deflate call */
+
+ /* used by deflate.c: */
+
+ uInt w_size; /* LZ77 window size (32K by default) */
+ uInt w_bits; /* log2(w_size) (8..16) */
+ uInt w_mask; /* w_size - 1 */
+
+ Bytef *window;
+ /* Sliding window. Input bytes are read into the second half of the window,
+ * and move to the first half later to keep a dictionary of at least wSize
+ * bytes. With this organization, matches are limited to a distance of
+ * wSize-MAX_MATCH bytes, but this ensures that IO is always
+ * performed with a length multiple of the block size. Also, it limits
+ * the window size to 64K, which is quite useful on MSDOS.
+ * To do: use the user input buffer as sliding window.
+ */
+
+ ulg window_size;
+ /* Actual size of window: 2*wSize, except when the user input buffer
+ * is directly used as sliding window.
+ */
+
+ Posf *prev;
+ /* Link to older string with same hash index. To limit the size of this
+ * array to 64K, this link is maintained only for the last 32K strings.
+ * An index in this array is thus a window index modulo 32K.
+ */
+
+ Posf *head; /* Heads of the hash chains or NIL. */
+
+ uInt ins_h; /* hash index of string to be inserted */
+ uInt hash_size; /* number of elements in hash table */
+ uInt hash_bits; /* log2(hash_size) */
+ uInt hash_mask; /* hash_size-1 */
+
+ uInt hash_shift;
+ /* Number of bits by which ins_h must be shifted at each input
+ * step. It must be such that after MIN_MATCH steps, the oldest
+ * byte no longer takes part in the hash key, that is:
+ * hash_shift * MIN_MATCH >= hash_bits
+ */
+
+ long block_start;
+ /* Window position at the beginning of the current output block. Gets
+ * negative when the window is moved backwards.
+ */
+
+ uInt match_length; /* length of best match */
+ IPos prev_match; /* previous match */
+ int match_available; /* set if previous match exists */
+ uInt strstart; /* start of string to insert */
+ uInt match_start; /* start of matching string */
+ uInt lookahead; /* number of valid bytes ahead in window */
+
+ uInt prev_length;
+ /* Length of the best match at previous step. Matches not greater than this
+ * are discarded. This is used in the lazy match evaluation.
+ */
+
+ uInt max_chain_length;
+ /* To speed up deflation, hash chains are never searched beyond this
+ * length. A higher limit improves compression ratio but degrades the
+ * speed.
+ */
+
+ uInt max_lazy_match;
+ /* Attempt to find a better match only when the current match is strictly
+ * smaller than this value. This mechanism is used only for compression
+ * levels >= 4.
+ */
+# define max_insert_length max_lazy_match
+ /* Insert new strings in the hash table only if the match length is not
+ * greater than this length. This saves time but degrades compression.
+ * max_insert_length is used only for compression levels <= 3.
+ */
+
+ int level; /* compression level (1..9) */
+ int strategy; /* favor or force Huffman coding*/
+
+ uInt good_match;
+ /* Use a faster search when the previous match is longer than this */
+
+ int nice_match; /* Stop searching when current match exceeds this */
+
+ /* used by trees.c: */
+ /* Didn't use ct_data typedef below to supress compiler warning */
+ struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
+ struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+ struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
+
+ struct tree_desc_s l_desc; /* desc. for literal tree */
+ struct tree_desc_s d_desc; /* desc. for distance tree */
+ struct tree_desc_s bl_desc; /* desc. for bit length tree */
+
+ ush bl_count[MAX_BITS+1];
+ /* number of codes at each bit length for an optimal tree */
+
+ int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
+ int heap_len; /* number of elements in the heap */
+ int heap_max; /* element of largest frequency */
+ /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
+ * The same heap array is used to build all trees.
+ */
+
+ uch depth[2*L_CODES+1];
+ /* Depth of each subtree used as tie breaker for trees of equal frequency
+ */
+
+ uchf *l_buf; /* buffer for literals or lengths */
+
+ uInt lit_bufsize;
+ /* Size of match buffer for literals/lengths. There are 4 reasons for
+ * limiting lit_bufsize to 64K:
+ * - frequencies can be kept in 16 bit counters
+ * - if compression is not successful for the first block, all input
+ * data is still in the window so we can still emit a stored block even
+ * when input comes from standard input. (This can also be done for
+ * all blocks if lit_bufsize is not greater than 32K.)
+ * - if compression is not successful for a file smaller than 64K, we can
+ * even emit a stored file instead of a stored block (saving 5 bytes).
+ * This is applicable only for zip (not gzip or zlib).
+ * - creating new Huffman trees less frequently may not provide fast
+ * adaptation to changes in the input data statistics. (Take for
+ * example a binary file with poorly compressible code followed by
+ * a highly compressible string table.) Smaller buffer sizes give
+ * fast adaptation but have of course the overhead of transmitting
+ * trees more frequently.
+ * - I can't count above 4
+ */
+
+ uInt last_lit; /* running index in l_buf */
+
+ ushf *d_buf;
+ /* Buffer for distances. To simplify the code, d_buf and l_buf have
+ * the same number of elements. To use different lengths, an extra flag
+ * array would be necessary.
+ */
+
+ ulg opt_len; /* bit length of current block with optimal trees */
+ ulg static_len; /* bit length of current block with static trees */
+ uInt matches; /* number of string matches in current block */
+ int last_eob_len; /* bit length of EOB code for last block */
+
+#ifdef DEBUG
+ ulg compressed_len; /* total bit length of compressed file mod 2^32 */
+ ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
+#endif
+
+ ush bi_buf;
+ /* Output buffer. bits are inserted starting at the bottom (least
+ * significant bits).
+ */
+ int bi_valid;
+ /* Number of valid bits in bi_buf. All bits above the last valid bit
+ * are always zero.
+ */
+
+} FAR deflate_state;
+
+/* Output a byte on the stream.
+ * IN assertion: there is enough room in pending_buf.
+ */
+#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
+
+
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+/* Minimum amount of lookahead, except at the end of the input file.
+ * See deflate.c for comments about the MIN_MATCH+1.
+ */
+
+#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
+/* In order to simplify the code, particularly on 16 bit machines, match
+ * distances are limited to MAX_DIST instead of WSIZE.
+ */
+
+ /* in trees.c */
+void _tr_init OF((deflate_state *s));
+int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
+void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
+ int eof));
+void _tr_align OF((deflate_state *s));
+void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
+ int eof));
+
+#define d_code(dist) \
+ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
+/* Mapping from a distance to a distance code. dist is the distance - 1 and
+ * must not have side effects. _dist_code[256] and _dist_code[257] are never
+ * used.
+ */
+
+#ifndef DEBUG
+/* Inline versions of _tr_tally for speed: */
+
+#if defined(GEN_TREES_H) || !defined(STDC)
+ extern uch _length_code[];
+ extern uch _dist_code[];
+#else
+ extern const uch _length_code[];
+ extern const uch _dist_code[];
+#endif
+
+# define _tr_tally_lit(s, c, flush) \
+ { uch cc = (c); \
+ s->d_buf[s->last_lit] = 0; \
+ s->l_buf[s->last_lit++] = cc; \
+ s->dyn_ltree[cc].Freq++; \
+ flush = (s->last_lit == s->lit_bufsize-1); \
+ }
+# define _tr_tally_dist(s, distance, length, flush) \
+ { uch len = (length); \
+ ush dist = (distance); \
+ s->d_buf[s->last_lit] = dist; \
+ s->l_buf[s->last_lit++] = len; \
+ dist--; \
+ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
+ s->dyn_dtree[d_code(dist)].Freq++; \
+ flush = (s->last_lit == s->lit_bufsize-1); \
+ }
+#else
+# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
+# define _tr_tally_dist(s, distance, length, flush) \
+ flush = _tr_tally(s, distance, length)
+#endif
+
+#endif /* DEFLATE_H */
diff --git a/src/zlib/inffast.c b/src/zlib/inffast.c
new file mode 100644
index 000000000..8c02a178d
--- /dev/null
+++ b/src/zlib/inffast.c
@@ -0,0 +1,305 @@
+/* inffast.c -- fast decoding
+ * Copyright (C) 1995-2004 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "zutil.h"
+#include "inftrees.h"
+#include "inflate.h"
+#include "inffast.h"
+
+#ifndef ASMINF
+
+/* Allow machine dependent optimization for post-increment or pre-increment.
+ Based on testing to date,
+ Pre-increment preferred for:
+ - PowerPC G3 (Adler)
+ - MIPS R5000 (Randers-Pehrson)
+ Post-increment preferred for:
+ - none
+ No measurable difference:
+ - Pentium III (Anderson)
+ - M68060 (Nikl)
+ */
+#ifdef POSTINC
+# define OFF 0
+# define PUP(a) *(a)++
+#else
+# define OFF 1
+# define PUP(a) *++(a)
+#endif
+
+/*
+ Decode literal, length, and distance codes and write out the resulting
+ literal and match bytes until either not enough input or output is
+ available, an end-of-block is encountered, or a data error is encountered.
+ When large enough input and output buffers are supplied to inflate(), for
+ example, a 16K input buffer and a 64K output buffer, more than 95% of the
+ inflate execution time is spent in this routine.
+
+ Entry assumptions:
+
+ state->mode == LEN
+ strm->avail_in >= 6
+ strm->avail_out >= 258
+ start >= strm->avail_out
+ state->bits < 8
+
+ On return, state->mode is one of:
+
+ LEN -- ran out of enough output space or enough available input
+ TYPE -- reached end of block code, inflate() to interpret next block
+ BAD -- error in block data
+
+ Notes:
+
+ - The maximum input bits used by a length/distance pair is 15 bits for the
+ length code, 5 bits for the length extra, 15 bits for the distance code,
+ and 13 bits for the distance extra. This totals 48 bits, or six bytes.
+ Therefore if strm->avail_in >= 6, then there is enough input to avoid
+ checking for available input while decoding.
+
+ - The maximum bytes that a single length/distance pair can output is 258
+ bytes, which is the maximum length that can be coded. inflate_fast()
+ requires strm->avail_out >= 258 for each loop to avoid checking for
+ output space.
+ */
+void inflate_fast(strm, start)
+z_streamp strm;
+unsigned start; /* inflate()'s starting value for strm->avail_out */
+{
+ struct inflate_state FAR *state;
+ unsigned char FAR *in; /* local strm->next_in */
+ unsigned char FAR *last; /* while in < last, enough input available */
+ unsigned char FAR *out; /* local strm->next_out */
+ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
+ unsigned char FAR *end; /* while out < end, enough space available */
+ unsigned wsize; /* window size or zero if not using window */
+ unsigned whave; /* valid bytes in the window */
+ unsigned write; /* window write index */
+ unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
+ unsigned long hold; /* local strm->hold */
+ unsigned bits; /* local strm->bits */
+ code const FAR *lcode; /* local strm->lencode */
+ code const FAR *dcode; /* local strm->distcode */
+ unsigned lmask; /* mask for first level of length codes */
+ unsigned dmask; /* mask for first level of distance codes */
+ code this; /* retrieved table entry */
+ unsigned op; /* code bits, operation, extra bits, or */
+ /* window position, window bytes to copy */
+ unsigned len; /* match length, unused bytes */
+ unsigned dist; /* match distance */
+ unsigned char FAR *from; /* where to copy match from */
+
+ /* copy state to local variables */
+ state = (struct inflate_state FAR *)strm->state;
+ in = strm->next_in - OFF;
+ last = in + (strm->avail_in - 5);
+ out = strm->next_out - OFF;
+ beg = out - (start - strm->avail_out);
+ end = out + (strm->avail_out - 257);
+ wsize = state->wsize;
+ whave = state->whave;
+ write = state->write;
+ window = state->window;
+ hold = state->hold;
+ bits = state->bits;
+ lcode = state->lencode;
+ dcode = state->distcode;
+ lmask = (1U << state->lenbits) - 1;
+ dmask = (1U << state->distbits) - 1;
+
+ /* decode literals and length/distances until end-of-block or not enough
+ input data or output space */
+ do {
+ if (bits < 15) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ this = lcode[hold & lmask];
+ dolen:
+ op = (unsigned)(this.bits);
+ hold >>= op;
+ bits -= op;
+ op = (unsigned)(this.op);
+ if (op == 0) { /* literal */
+ Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ "inflate: literal '%c'\n" :
+ "inflate: literal 0x%02x\n", this.val));
+ PUP(out) = (unsigned char)(this.val);
+ }
+ else if (op & 16) { /* length base */
+ len = (unsigned)(this.val);
+ op &= 15; /* number of extra bits */
+ if (op) {
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ len += (unsigned)hold & ((1U << op) - 1);
+ hold >>= op;
+ bits -= op;
+ }
+ Tracevv((stderr, "inflate: length %u\n", len));
+ if (bits < 15) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ this = dcode[hold & dmask];
+ dodist:
+ op = (unsigned)(this.bits);
+ hold >>= op;
+ bits -= op;
+ op = (unsigned)(this.op);
+ if (op & 16) { /* distance base */
+ dist = (unsigned)(this.val);
+ op &= 15; /* number of extra bits */
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ }
+ dist += (unsigned)hold & ((1U << op) - 1);
+ hold >>= op;
+ bits -= op;
+ Tracevv((stderr, "inflate: distance %u\n", dist));
+ op = (unsigned)(out - beg); /* max distance in output */
+ if (dist > op) { /* see if copy from window */
+ op = dist - op; /* distance back in window */
+ if (op > whave) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+ from = window - OFF;
+ if (write == 0) { /* very common case */
+ from += wsize - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ else if (write < op) { /* wrap around window */
+ from += wsize + write - op;
+ op -= write;
+ if (op < len) { /* some from end of window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = window - OFF;
+ if (write < len) { /* some from start of window */
+ op = write;
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ }
+ else { /* contiguous in window */
+ from += write - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ while (len > 2) {
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ len -= 3;
+ }
+ if (len) {
+ PUP(out) = PUP(from);
+ if (len > 1)
+ PUP(out) = PUP(from);
+ }
+ }
+ else {
+ from = out - dist; /* copy direct from output */
+ do { /* minimum length is three */
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ len -= 3;
+ } while (len > 2);
+ if (len) {
+ PUP(out) = PUP(from);
+ if (len > 1)
+ PUP(out) = PUP(from);
+ }
+ }
+ }
+ else if ((op & 64) == 0) { /* 2nd level distance code */
+ this = dcode[this.val + (hold & ((1U << op) - 1))];
+ goto dodist;
+ }
+ else {
+ strm->msg = (char *)"invalid distance code";
+ state->mode = BAD;
+ break;
+ }
+ }
+ else if ((op & 64) == 0) { /* 2nd level length code */
+ this = lcode[this.val + (hold & ((1U << op) - 1))];
+ goto dolen;
+ }
+ else if (op & 32) { /* end-of-block */
+ Tracevv((stderr, "inflate: end of block\n"));
+ state->mode = TYPE;
+ break;
+ }
+ else {
+ strm->msg = (char *)"invalid literal/length code";
+ state->mode = BAD;
+ break;
+ }
+ } while (in < last && out < end);
+
+ /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+ len = bits >> 3;
+ in -= len;
+ bits -= len << 3;
+ hold &= (1U << bits) - 1;
+
+ /* update state and return */
+ strm->next_in = in + OFF;
+ strm->next_out = out + OFF;
+ strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
+ strm->avail_out = (unsigned)(out < end ?
+ 257 + (end - out) : 257 - (out - end));
+ state->hold = hold;
+ state->bits = bits;
+ return;
+}
+
+/*
+ inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
+ - Using bit fields for code structure
+ - Different op definition to avoid & for extra bits (do & for table bits)
+ - Three separate decoding do-loops for direct, window, and write == 0
+ - Special case for distance > 1 copies to do overlapped load and store copy
+ - Explicit branch predictions (based on measured branch probabilities)
+ - Deferring match copy and interspersed it with decoding subsequent codes
+ - Swapping literal/length else
+ - Swapping window/direct else
+ - Larger unrolled copy loops (three is about right)
+ - Moving len -= 3 statement into middle of loop
+ */
+
+#endif /* !ASMINF */
diff --git a/src/zlib/inffast.h b/src/zlib/inffast.h
new file mode 100644
index 000000000..1e88d2d97
--- /dev/null
+++ b/src/zlib/inffast.h
@@ -0,0 +1,11 @@
+/* inffast.h -- header to use inffast.c
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+void inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/src/zlib/inffixed.h b/src/zlib/inffixed.h
new file mode 100644
index 000000000..75ed4b597
--- /dev/null
+++ b/src/zlib/inffixed.h
@@ -0,0 +1,94 @@
+ /* inffixed.h -- table for decoding fixed codes
+ * Generated automatically by makefixed().
+ */
+
+ /* WARNING: this file should *not* be used by applications. It
+ is part of the implementation of the compression library and
+ is subject to change. Applications should only use zlib.h.
+ */
+
+ static const code lenfix[512] = {
+ {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
+ {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
+ {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
+ {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
+ {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
+ {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
+ {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
+ {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
+ {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
+ {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
+ {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
+ {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
+ {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
+ {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
+ {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
+ {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
+ {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
+ {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
+ {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
+ {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
+ {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
+ {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
+ {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
+ {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
+ {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
+ {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
+ {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
+ {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
+ {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
+ {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
+ {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
+ {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
+ {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
+ {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
+ {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
+ {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
+ {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
+ {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
+ {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
+ {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
+ {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
+ {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
+ {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
+ {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
+ {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
+ {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
+ {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
+ {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
+ {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
+ {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
+ {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
+ {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
+ {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
+ {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
+ {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
+ {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
+ {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
+ {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
+ {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
+ {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
+ {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
+ {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
+ {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
+ {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
+ {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
+ {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
+ {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
+ {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
+ {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
+ {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
+ {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
+ {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
+ {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
+ {0,9,255}
+ };
+
+ static const code distfix[32] = {
+ {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
+ {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
+ {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
+ {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
+ {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
+ {22,5,193},{64,5,0}
+ };
diff --git a/src/zlib/inflate.c b/src/zlib/inflate.c
new file mode 100644
index 000000000..c6d38266d
--- /dev/null
+++ b/src/zlib/inflate.c
@@ -0,0 +1,1274 @@
+/* inflate.c -- zlib decompression
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/*
+ * Change history:
+ *
+ * 1.2.beta0 24 Nov 2002
+ * - First version -- complete rewrite of inflate to simplify code, avoid
+ * creation of window when not needed, minimize use of window when it is
+ * needed, make inffast.c even faster, implement gzip decoding, and to
+ * improve code readability and style over the previous zlib inflate code
+ *
+ * 1.2.beta1 25 Nov 2002
+ * - Use pointers for available input and output checking in inffast.c
+ * - Remove input and output counters in inffast.c
+ * - Change inffast.c entry and loop from avail_in >= 7 to >= 6
+ * - Remove unnecessary second byte pull from length extra in inffast.c
+ * - Unroll direct copy to three copies per loop in inffast.c
+ *
+ * 1.2.beta2 4 Dec 2002
+ * - Change external routine names to reduce potential conflicts
+ * - Correct filename to inffixed.h for fixed tables in inflate.c
+ * - Make hbuf[] unsigned char to match parameter type in inflate.c
+ * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
+ * to avoid negation problem on Alphas (64 bit) in inflate.c
+ *
+ * 1.2.beta3 22 Dec 2002
+ * - Add comments on state->bits assertion in inffast.c
+ * - Add comments on op field in inftrees.h
+ * - Fix bug in reuse of allocated window after inflateReset()
+ * - Remove bit fields--back to byte structure for speed
+ * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
+ * - Change post-increments to pre-increments in inflate_fast(), PPC biased?
+ * - Add compile time option, POSTINC, to use post-increments instead (Intel?)
+ * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
+ * - Use local copies of stream next and avail values, as well as local bit
+ * buffer and bit count in inflate()--for speed when inflate_fast() not used
+ *
+ * 1.2.beta4 1 Jan 2003
+ * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings
+ * - Move a comment on output buffer sizes from inffast.c to inflate.c
+ * - Add comments in inffast.c to introduce the inflate_fast() routine
+ * - Rearrange window copies in inflate_fast() for speed and simplification
+ * - Unroll last copy for window match in inflate_fast()
+ * - Use local copies of window variables in inflate_fast() for speed
+ * - Pull out common write == 0 case for speed in inflate_fast()
+ * - Make op and len in inflate_fast() unsigned for consistency
+ * - Add FAR to lcode and dcode declarations in inflate_fast()
+ * - Simplified bad distance check in inflate_fast()
+ * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new
+ * source file infback.c to provide a call-back interface to inflate for
+ * programs like gzip and unzip -- uses window as output buffer to avoid
+ * window copying
+ *
+ * 1.2.beta5 1 Jan 2003
+ * - Improved inflateBack() interface to allow the caller to provide initial
+ * input in strm.
+ * - Fixed stored blocks bug in inflateBack()
+ *
+ * 1.2.beta6 4 Jan 2003
+ * - Added comments in inffast.c on effectiveness of POSTINC
+ * - Typecasting all around to reduce compiler warnings
+ * - Changed loops from while (1) or do {} while (1) to for (;;), again to
+ * make compilers happy
+ * - Changed type of window in inflateBackInit() to unsigned char *
+ *
+ * 1.2.beta7 27 Jan 2003
+ * - Changed many types to unsigned or unsigned short to avoid warnings
+ * - Added inflateCopy() function
+ *
+ * 1.2.0 9 Mar 2003
+ * - Changed inflateBack() interface to provide separate opaque descriptors
+ * for the in() and out() functions
+ * - Changed inflateBack() argument and in_func typedef to swap the length
+ * and buffer address return values for the input function
+ * - Check next_in and next_out for Z_NULL on entry to inflate()
+ *
+ * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
+ */
+
+#include "zutil.h"
+#include "inftrees.h"
+#include "inflate.h"
+#include "inffast.h"
+
+#ifdef MAKEFIXED
+# ifndef BUILDFIXED
+# define BUILDFIXED
+# endif
+#endif
+
+/* function prototypes */
+local void fixedtables OF((struct inflate_state FAR *state));
+local int updatewindow OF((z_streamp strm, unsigned out));
+#ifdef BUILDFIXED
+ void makefixed OF((void));
+#endif
+local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
+ unsigned len));
+
+int ZEXPORT inflateReset(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ strm->total_in = strm->total_out = state->total = 0;
+ strm->msg = Z_NULL;
+ strm->adler = 1; /* to support ill-conceived Java test suite */
+ state->mode = HEAD;
+ state->last = 0;
+ state->havedict = 0;
+ state->wsize = 0;
+ state->whave = 0;
+ state->hold = 0;
+ state->bits = 0;
+ state->lencode = state->distcode = state->next = state->codes;
+ Tracev((stderr, "inflate: reset\n"));
+ return Z_OK;
+}
+
+int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
+z_streamp strm;
+int windowBits;
+const char *version;
+int stream_size;
+{
+ struct inflate_state FAR *state;
+
+ if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
+ stream_size != (int)(sizeof(z_stream)))
+ return Z_VERSION_ERROR;
+ if (strm == Z_NULL) return Z_STREAM_ERROR;
+ strm->msg = Z_NULL; /* in case we return an error */
+ if (strm->zalloc == (alloc_func)0) {
+ strm->zalloc = zcalloc;
+ strm->opaque = (voidpf)0;
+ }
+ if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ state = (struct inflate_state FAR *)
+ ZALLOC(strm, 1, sizeof(struct inflate_state));
+ if (state == Z_NULL) return Z_MEM_ERROR;
+ Tracev((stderr, "inflate: allocated\n"));
+ strm->state = (voidpf)state;
+ if (windowBits < 0) {
+ state->wrap = 0;
+ windowBits = -windowBits;
+ }
+ else {
+ state->wrap = (windowBits >> 4) + 1;
+#ifdef GUNZIP
+ if (windowBits < 48) windowBits &= 15;
+#endif
+ }
+ if (windowBits < 8 || windowBits > 15) {
+ ZFREE(strm, state);
+ strm->state = Z_NULL;
+ return Z_STREAM_ERROR;
+ }
+ state->wbits = (unsigned)windowBits;
+ state->window = Z_NULL;
+ return inflateReset(strm);
+}
+
+int ZEXPORT inflateInit_(strm, version, stream_size)
+z_streamp strm;
+const char *version;
+int stream_size;
+{
+ return inflateInit2_(strm, DEF_WBITS, version, stream_size);
+}
+
+/*
+ Return state with length and distance decoding tables and index sizes set to
+ fixed code decoding. Normally this returns fixed tables from inffixed.h.
+ If BUILDFIXED is defined, then instead this routine builds the tables the
+ first time it's called, and returns those tables the first time and
+ thereafter. This reduces the size of the code by about 2K bytes, in
+ exchange for a little execution time. However, BUILDFIXED should not be
+ used for threaded applications, since the rewriting of the tables and virgin
+ may not be thread-safe.
+ */
+local void fixedtables(state)
+struct inflate_state FAR *state;
+{
+#ifdef BUILDFIXED
+ static int virgin = 1;
+ static code *lenfix, *distfix;
+ static code fixed[544];
+
+ /* build fixed huffman tables if first call (may not be thread safe) */
+ if (virgin) {
+ unsigned sym, bits;
+ static code *next;
+
+ /* literal/length table */
+ sym = 0;
+ while (sym < 144) state->lens[sym++] = 8;
+ while (sym < 256) state->lens[sym++] = 9;
+ while (sym < 280) state->lens[sym++] = 7;
+ while (sym < 288) state->lens[sym++] = 8;
+ next = fixed;
+ lenfix = next;
+ bits = 9;
+ inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
+
+ /* distance table */
+ sym = 0;
+ while (sym < 32) state->lens[sym++] = 5;
+ distfix = next;
+ bits = 5;
+ inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
+
+ /* do this just once */
+ virgin = 0;
+ }
+#else /* !BUILDFIXED */
+# include "inffixed.h"
+#endif /* BUILDFIXED */
+ state->lencode = lenfix;
+ state->lenbits = 9;
+ state->distcode = distfix;
+ state->distbits = 5;
+}
+
+#ifdef MAKEFIXED
+#include <stdio.h>
+
+/*
+ Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also
+ defines BUILDFIXED, so the tables are built on the fly. makefixed() writes
+ those tables to stdout, which would be piped to inffixed.h. A small program
+ can simply call makefixed to do this:
+
+ void makefixed(void);
+
+ int main(void)
+ {
+ makefixed();
+ return 0;
+ }
+
+ Then that can be linked with zlib built with MAKEFIXED defined and run:
+
+ a.out > inffixed.h
+ */
+void makefixed()
+{
+ unsigned low, size;
+ struct inflate_state state;
+
+ fixedtables(&state);
+ puts(" /* inffixed.h -- table for decoding fixed codes");
+ puts(" * Generated automatically by makefixed().");
+ puts(" */");
+ puts("");
+ puts(" /* WARNING: this file should *not* be used by applications.");
+ puts(" It is part of the implementation of this library and is");
+ puts(" subject to change. Applications should only use zlib.h.");
+ puts(" */");
+ puts("");
+ size = 1U << 9;
+ printf(" static const code lenfix[%u] = {", size);
+ low = 0;
+ for (;;) {
+ if ((low % 7) == 0) printf("\n ");
+ printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
+ state.lencode[low].val);
+ if (++low == size) break;
+ putchar(',');
+ }
+ puts("\n };");
+ size = 1U << 5;
+ printf("\n static const code distfix[%u] = {", size);
+ low = 0;
+ for (;;) {
+ if ((low % 6) == 0) printf("\n ");
+ printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
+ state.distcode[low].val);
+ if (++low == size) break;
+ putchar(',');
+ }
+ puts("\n };");
+}
+#endif /* MAKEFIXED */
+
+/*
+ Update the window with the last wsize (normally 32K) bytes written before
+ returning. If window does not exist yet, create it. This is only called
+ when a window is already in use, or when output has been written during this
+ inflate call, but the end of the deflate stream has not been reached yet.
+ It is also called to create a window for dictionary data when a dictionary
+ is loaded.
+
+ Providing output buffers larger than 32K to inflate() should provide a speed
+ advantage, since only the last 32K of output is copied to the sliding window
+ upon return from inflate(), and since all distances after the first 32K of
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+local int updatewindow(strm, out)
+z_streamp strm;
+unsigned out;
+{
+ struct inflate_state FAR *state;
+ unsigned copy, dist;
+
+ state = (struct inflate_state FAR *)strm->state;
+
+ /* if it hasn't been done already, allocate space for the window */
+ if (state->window == Z_NULL) {
+ state->window = (unsigned char FAR *)
+ ZALLOC(strm, 1U << state->wbits,
+ sizeof(unsigned char));
+ if (state->window == Z_NULL) return 1;
+ }
+
+ /* if window not in use yet, initialize */
+ if (state->wsize == 0) {
+ state->wsize = 1U << state->wbits;
+ state->write = 0;
+ state->whave = 0;
+ }
+
+ /* copy state->wsize or less output bytes into the circular window */
+ copy = out - strm->avail_out;
+ if (copy >= state->wsize) {
+ zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
+ state->write = 0;
+ state->whave = state->wsize;
+ }
+ else {
+ dist = state->wsize - state->write;
+ if (dist > copy) dist = copy;
+ zmemcpy(state->window + state->write, strm->next_out - copy, dist);
+ copy -= dist;
+ if (copy) {
+ zmemcpy(state->window, strm->next_out - copy, copy);
+ state->write = copy;
+ state->whave = state->wsize;
+ }
+ else {
+ state->write += dist;
+ if (state->write == state->wsize) state->write = 0;
+ if (state->whave < state->wsize) state->whave += dist;
+ }
+ }
+ return 0;
+}
+
+/* Macros for inflate(): */
+
+/* check function to use adler32() for zlib or crc32() for gzip */
+#ifdef GUNZIP
+# define UPDATE(check, buf, len) \
+ (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
+#else
+# define UPDATE(check, buf, len) adler32(check, buf, len)
+#endif
+
+/* check macros for header crc */
+#ifdef GUNZIP
+# define CRC2(check, word) \
+ do { \
+ hbuf[0] = (unsigned char)(word); \
+ hbuf[1] = (unsigned char)((word) >> 8); \
+ check = crc32(check, hbuf, 2); \
+ } while (0)
+
+# define CRC4(check, word) \
+ do { \
+ hbuf[0] = (unsigned char)(word); \
+ hbuf[1] = (unsigned char)((word) >> 8); \
+ hbuf[2] = (unsigned char)((word) >> 16); \
+ hbuf[3] = (unsigned char)((word) >> 24); \
+ check = crc32(check, hbuf, 4); \
+ } while (0)
+#endif
+
+/* Load registers with state in inflate() for speed */
+#define LOAD() \
+ do { \
+ put = strm->next_out; \
+ left = strm->avail_out; \
+ next = strm->next_in; \
+ have = strm->avail_in; \
+ hold = state->hold; \
+ bits = state->bits; \
+ } while (0)
+
+/* Restore state from registers in inflate() */
+#define RESTORE() \
+ do { \
+ strm->next_out = put; \
+ strm->avail_out = left; \
+ strm->next_in = next; \
+ strm->avail_in = have; \
+ state->hold = hold; \
+ state->bits = bits; \
+ } while (0)
+
+/* Clear the input bit accumulator */
+#define INITBITS() \
+ do { \
+ hold = 0; \
+ bits = 0; \
+ } while (0)
+
+/* Get a byte of input into the bit accumulator, or return from inflate()
+ if there is no input available. */
+#define PULLBYTE() \
+ do { \
+ if (have == 0) goto inf_leave; \
+ have--; \
+ hold += (unsigned long)(*next++) << bits; \
+ bits += 8; \
+ } while (0)
+
+/* Assure that there are at least n bits in the bit accumulator. If there is
+ not enough available input to do that, then return from inflate(). */
+#define NEEDBITS(n) \
+ do { \
+ while (bits < (unsigned)(n)) \
+ PULLBYTE(); \
+ } while (0)
+
+/* Return the low n bits of the bit accumulator (n < 16) */
+#define BITS(n) \
+ ((unsigned)hold & ((1U << (n)) - 1))
+
+/* Remove n bits from the bit accumulator */
+#define DROPBITS(n) \
+ do { \
+ hold >>= (n); \
+ bits -= (unsigned)(n); \
+ } while (0)
+
+/* Remove zero to seven bits as needed to go to a byte boundary */
+#define BYTEBITS() \
+ do { \
+ hold >>= bits & 7; \
+ bits -= bits & 7; \
+ } while (0)
+
+/* Reverse the bytes in a 32-bit value */
+#define REVERSE(q) \
+ ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
+ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
+
+/*
+ inflate() uses a state machine to process as much input data and generate as
+ much output data as possible before returning. The state machine is
+ structured roughly as follows:
+
+ for (;;) switch (state) {
+ ...
+ case STATEn:
+ if (not enough input data or output space to make progress)
+ return;
+ ... make progress ...
+ state = STATEm;
+ break;
+ ...
+ }
+
+ so when inflate() is called again, the same case is attempted again, and
+ if the appropriate resources are provided, the machine proceeds to the
+ next state. The NEEDBITS() macro is usually the way the state evaluates
+ whether it can proceed or should return. NEEDBITS() does the return if
+ the requested bits are not available. The typical use of the BITS macros
+ is:
+
+ NEEDBITS(n);
+ ... do something with BITS(n) ...
+ DROPBITS(n);
+
+ where NEEDBITS(n) either returns from inflate() if there isn't enough
+ input left to load n bits into the accumulator, or it continues. BITS(n)
+ gives the low n bits in the accumulator. When done, DROPBITS(n) drops
+ the low n bits off the accumulator. INITBITS() clears the accumulator
+ and sets the number of available bits to zero. BYTEBITS() discards just
+ enough bits to put the accumulator on a byte boundary. After BYTEBITS()
+ and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
+
+ NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
+ if there is no input available. The decoding of variable length codes uses
+ PULLBYTE() directly in order to pull just enough bytes to decode the next
+ code, and no more.
+
+ Some states loop until they get enough input, making sure that enough
+ state information is maintained to continue the loop where it left off
+ if NEEDBITS() returns in the loop. For example, want, need, and keep
+ would all have to actually be part of the saved state in case NEEDBITS()
+ returns:
+
+ case STATEw:
+ while (want < need) {
+ NEEDBITS(n);
+ keep[want++] = BITS(n);
+ DROPBITS(n);
+ }
+ state = STATEx;
+ case STATEx:
+
+ As shown above, if the next state is also the next case, then the break
+ is omitted.
+
+ A state may also return if there is not enough output space available to
+ complete that state. Those states are copying stored data, writing a
+ literal byte, and copying a matching string.
+
+ When returning, a "goto inf_leave" is used to update the total counters,
+ update the check value, and determine whether any progress has been made
+ during that inflate() call in order to return the proper return code.
+ Progress is defined as a change in either strm->avail_in or strm->avail_out.
+ When there is a window, goto inf_leave will update the window with the last
+ output written. If a goto inf_leave occurs in the middle of decompression
+ and there is no window currently, goto inf_leave will create one and copy
+ output to the window for the next call of inflate().
+
+ In this implementation, the flush parameter of inflate() only affects the
+ return code (per zlib.h). inflate() always writes as much as possible to
+ strm->next_out, given the space available and the provided input--the effect
+ documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers
+ the allocation of and copying into a sliding window until necessary, which
+ provides the effect documented in zlib.h for Z_FINISH when the entire input
+ stream available. So the only thing the flush parameter actually does is:
+ when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it
+ will return Z_BUF_ERROR if it has not reached the end of the stream.
+ */
+
+int ZEXPORT inflate(strm, flush)
+z_streamp strm;
+int flush;
+{
+ struct inflate_state FAR *state;
+ unsigned char FAR *next; /* next input */
+ unsigned char FAR *put; /* next output */
+ unsigned have, left; /* available input and output */
+ unsigned long hold; /* bit buffer */
+ unsigned bits; /* bits in bit buffer */
+ unsigned in, out; /* save starting available input and output */
+ unsigned copy; /* number of stored or match bytes to copy */
+ unsigned char FAR *from; /* where to copy match bytes from */
+ code this; /* current decoding table entry */
+ code last; /* parent table entry */
+ unsigned len; /* length to copy for repeats, bits to drop */
+ int ret; /* return code */
+#ifdef GUNZIP
+ unsigned char hbuf[4]; /* buffer for gzip header crc calculation */
+#endif
+ static const unsigned short order[19] = /* permutation of code lengths */
+ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
+
+ if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
+ (strm->next_in == Z_NULL && strm->avail_in != 0))
+ return Z_STREAM_ERROR;
+
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
+ LOAD();
+ in = have;
+ out = left;
+ ret = Z_OK;
+ for (;;)
+ switch (state->mode) {
+ case HEAD:
+ if (state->wrap == 0) {
+ state->mode = TYPEDO;
+ break;
+ }
+ NEEDBITS(16);
+#ifdef GUNZIP
+ if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */
+ state->check = crc32(0L, Z_NULL, 0);
+ CRC2(state->check, hold);
+ INITBITS();
+ state->mode = FLAGS;
+ break;
+ }
+ state->flags = 0; /* expect zlib header */
+ if (!(state->wrap & 1) || /* check if zlib header allowed */
+#else
+ if (
+#endif
+ ((BITS(8) << 8) + (hold >> 8)) % 31) {
+ strm->msg = (char *)"incorrect header check";
+ state->mode = BAD;
+ break;
+ }
+ if (BITS(4) != Z_DEFLATED) {
+ strm->msg = (char *)"unknown compression method";
+ state->mode = BAD;
+ break;
+ }
+ DROPBITS(4);
+ if (BITS(4) + 8 > state->wbits) {
+ strm->msg = (char *)"invalid window size";
+ state->mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: zlib header ok\n"));
+ strm->adler = state->check = adler32(0L, Z_NULL, 0);
+ state->mode = hold & 0x200 ? DICTID : TYPE;
+ INITBITS();
+ break;
+#ifdef GUNZIP
+ case FLAGS:
+ NEEDBITS(16);
+ state->flags = (int)(hold);
+ if ((state->flags & 0xff) != Z_DEFLATED) {
+ strm->msg = (char *)"unknown compression method";
+ state->mode = BAD;
+ break;
+ }
+ if (state->flags & 0xe000) {
+ strm->msg = (char *)"unknown header flags set";
+ state->mode = BAD;
+ break;
+ }
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ state->mode = TIME;
+ case TIME:
+ NEEDBITS(32);
+ if (state->flags & 0x0200) CRC4(state->check, hold);
+ INITBITS();
+ state->mode = OS;
+ case OS:
+ NEEDBITS(16);
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ state->mode = EXLEN;
+ case EXLEN:
+ if (state->flags & 0x0400) {
+ NEEDBITS(16);
+ state->length = (unsigned)(hold);
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ }
+ state->mode = EXTRA;
+ case EXTRA:
+ if (state->flags & 0x0400) {
+ copy = state->length;
+ if (copy > have) copy = have;
+ if (copy) {
+ if (state->flags & 0x0200)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ state->length -= copy;
+ }
+ if (state->length) goto inf_leave;
+ }
+ state->mode = NAME;
+ case NAME:
+ if (state->flags & 0x0800) {
+ if (have == 0) goto inf_leave;
+ copy = 0;
+ do {
+ len = (unsigned)(next[copy++]);
+ } while (len && copy < have);
+ if (state->flags & 0x02000)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ if (len) goto inf_leave;
+ }
+ state->mode = COMMENT;
+ case COMMENT:
+ if (state->flags & 0x1000) {
+ if (have == 0) goto inf_leave;
+ copy = 0;
+ do {
+ len = (unsigned)(next[copy++]);
+ } while (len && copy < have);
+ if (state->flags & 0x02000)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ if (len) goto inf_leave;
+ }
+ state->mode = HCRC;
+ case HCRC:
+ if (state->flags & 0x0200) {
+ NEEDBITS(16);
+ if (hold != (state->check & 0xffff)) {
+ strm->msg = (char *)"header crc mismatch";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ }
+ strm->adler = state->check = crc32(0L, Z_NULL, 0);
+ state->mode = TYPE;
+ break;
+#endif
+ case DICTID:
+ NEEDBITS(32);
+ strm->adler = state->check = REVERSE(hold);
+ INITBITS();
+ state->mode = DICT;
+ case DICT:
+ if (state->havedict == 0) {
+ RESTORE();
+ return Z_NEED_DICT;
+ }
+ strm->adler = state->check = adler32(0L, Z_NULL, 0);
+ state->mode = TYPE;
+ case TYPE:
+ if (flush == Z_BLOCK) goto inf_leave;
+ case TYPEDO:
+ if (state->last) {
+ BYTEBITS();
+ state->mode = CHECK;
+ break;
+ }
+ NEEDBITS(3);
+ state->last = BITS(1);
+ DROPBITS(1);
+ switch (BITS(2)) {
+ case 0: /* stored block */
+ Tracev((stderr, "inflate: stored block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = STORED;
+ break;
+ case 1: /* fixed block */
+ fixedtables(state);
+ Tracev((stderr, "inflate: fixed codes block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = LEN; /* decode codes */
+ break;
+ case 2: /* dynamic block */
+ Tracev((stderr, "inflate: dynamic codes block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = TABLE;
+ break;
+ case 3:
+ strm->msg = (char *)"invalid block type";
+ state->mode = BAD;
+ }
+ DROPBITS(2);
+ break;
+ case STORED:
+ BYTEBITS(); /* go to byte boundary */
+ NEEDBITS(32);
+ if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
+ strm->msg = (char *)"invalid stored block lengths";
+ state->mode = BAD;
+ break;
+ }
+ state->length = (unsigned)hold & 0xffff;
+ Tracev((stderr, "inflate: stored length %u\n",
+ state->length));
+ INITBITS();
+ state->mode = COPY;
+ case COPY:
+ copy = state->length;
+ if (copy) {
+ if (copy > have) copy = have;
+ if (copy > left) copy = left;
+ if (copy == 0) goto inf_leave;
+ zmemcpy(put, next, copy);
+ have -= copy;
+ next += copy;
+ left -= copy;
+ put += copy;
+ state->length -= copy;
+ break;
+ }
+ Tracev((stderr, "inflate: stored end\n"));
+ state->mode = TYPE;
+ break;
+ case TABLE:
+ NEEDBITS(14);
+ state->nlen = BITS(5) + 257;
+ DROPBITS(5);
+ state->ndist = BITS(5) + 1;
+ DROPBITS(5);
+ state->ncode = BITS(4) + 4;
+ DROPBITS(4);
+#ifndef PKZIP_BUG_WORKAROUND
+ if (state->nlen > 286 || state->ndist > 30) {
+ strm->msg = (char *)"too many length or distance symbols";
+ state->mode = BAD;
+ break;
+ }
+#endif
+ Tracev((stderr, "inflate: table sizes ok\n"));
+ state->have = 0;
+ state->mode = LENLENS;
+ case LENLENS:
+ while (state->have < state->ncode) {
+ NEEDBITS(3);
+ state->lens[order[state->have++]] = (unsigned short)BITS(3);
+ DROPBITS(3);
+ }
+ while (state->have < 19)
+ state->lens[order[state->have++]] = 0;
+ state->next = state->codes;
+ state->lencode = (code const FAR *)(state->next);
+ state->lenbits = 7;
+ ret = inflate_table(CODES, state->lens, 19, &(state->next),
+ &(state->lenbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid code lengths set";
+ state->mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: code lengths ok\n"));
+ state->have = 0;
+ state->mode = CODELENS;
+ case CODELENS:
+ while (state->have < state->nlen + state->ndist) {
+ for (;;) {
+ this = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if (this.val < 16) {
+ NEEDBITS(this.bits);
+ DROPBITS(this.bits);
+ state->lens[state->have++] = this.val;
+ }
+ else {
+ if (this.val == 16) {
+ NEEDBITS(this.bits + 2);
+ DROPBITS(this.bits);
+ if (state->have == 0) {
+ strm->msg = (char *)"invalid bit length repeat";
+ state->mode = BAD;
+ break;
+ }
+ len = state->lens[state->have - 1];
+ copy = 3 + BITS(2);
+ DROPBITS(2);
+ }
+ else if (this.val == 17) {
+ NEEDBITS(this.bits + 3);
+ DROPBITS(this.bits);
+ len = 0;
+ copy = 3 + BITS(3);
+ DROPBITS(3);
+ }
+ else {
+ NEEDBITS(this.bits + 7);
+ DROPBITS(this.bits);
+ len = 0;
+ copy = 11 + BITS(7);
+ DROPBITS(7);
+ }
+ if (state->have + copy > state->nlen + state->ndist) {
+ strm->msg = (char *)"invalid bit length repeat";
+ state->mode = BAD;
+ break;
+ }
+ while (copy--)
+ state->lens[state->have++] = (unsigned short)len;
+ }
+ }
+
+ /* handle error breaks in while */
+ if (state->mode == BAD) break;
+
+ /* build code tables */
+ state->next = state->codes;
+ state->lencode = (code const FAR *)(state->next);
+ state->lenbits = 9;
+ ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
+ &(state->lenbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid literal/lengths set";
+ state->mode = BAD;
+ break;
+ }
+ state->distcode = (code const FAR *)(state->next);
+ state->distbits = 6;
+ ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
+ &(state->next), &(state->distbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid distances set";
+ state->mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: codes ok\n"));
+ state->mode = LEN;
+ case LEN:
+ if (have >= 6 && left >= 258) {
+ RESTORE();
+ inflate_fast(strm, out);
+ LOAD();
+ break;
+ }
+ for (;;) {
+ this = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if (this.op && (this.op & 0xf0) == 0) {
+ last = this;
+ for (;;) {
+ this = state->lencode[last.val +
+ (BITS(last.bits + last.op) >> last.bits)];
+ if ((unsigned)(last.bits + this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ DROPBITS(last.bits);
+ }
+ DROPBITS(this.bits);
+ state->length = (unsigned)this.val;
+ if ((int)(this.op) == 0) {
+ Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ "inflate: literal '%c'\n" :
+ "inflate: literal 0x%02x\n", this.val));
+ state->mode = LIT;
+ break;
+ }
+ if (this.op & 32) {
+ Tracevv((stderr, "inflate: end of block\n"));
+ state->mode = TYPE;
+ break;
+ }
+ if (this.op & 64) {
+ strm->msg = (char *)"invalid literal/length code";
+ state->mode = BAD;
+ break;
+ }
+ state->extra = (unsigned)(this.op) & 15;
+ state->mode = LENEXT;
+ case LENEXT:
+ if (state->extra) {
+ NEEDBITS(state->extra);
+ state->length += BITS(state->extra);
+ DROPBITS(state->extra);
+ }
+ Tracevv((stderr, "inflate: length %u\n", state->length));
+ state->mode = DIST;
+ case DIST:
+ for (;;) {
+ this = state->distcode[BITS(state->distbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if ((this.op & 0xf0) == 0) {
+ last = this;
+ for (;;) {
+ this = state->distcode[last.val +
+ (BITS(last.bits + last.op) >> last.bits)];
+ if ((unsigned)(last.bits + this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ DROPBITS(last.bits);
+ }
+ DROPBITS(this.bits);
+ if (this.op & 64) {
+ strm->msg = (char *)"invalid distance code";
+ state->mode = BAD;
+ break;
+ }
+ state->offset = (unsigned)this.val;
+ state->extra = (unsigned)(this.op) & 15;
+ state->mode = DISTEXT;
+ case DISTEXT:
+ if (state->extra) {
+ NEEDBITS(state->extra);
+ state->offset += BITS(state->extra);
+ DROPBITS(state->extra);
+ }
+ if (state->offset > state->whave + out - left) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+ Tracevv((stderr, "inflate: distance %u\n", state->offset));
+ state->mode = MATCH;
+ case MATCH:
+ if (left == 0) goto inf_leave;
+ copy = out - left;
+ if (state->offset > copy) { /* copy from window */
+ copy = state->offset - copy;
+ if (copy > state->write) {
+ copy -= state->write;
+ from = state->window + (state->wsize - copy);
+ }
+ else
+ from = state->window + (state->write - copy);
+ if (copy > state->length) copy = state->length;
+ }
+ else { /* copy from output */
+ from = put - state->offset;
+ copy = state->length;
+ }
+ if (copy > left) copy = left;
+ left -= copy;
+ state->length -= copy;
+ do {
+ *put++ = *from++;
+ } while (--copy);
+ if (state->length == 0) state->mode = LEN;
+ break;
+ case LIT:
+ if (left == 0) goto inf_leave;
+ *put++ = (unsigned char)(state->length);
+ left--;
+ state->mode = LEN;
+ break;
+ case CHECK:
+ if (state->wrap) {
+ NEEDBITS(32);
+ out -= left;
+ strm->total_out += out;
+ state->total += out;
+ if (out)
+ strm->adler = state->check =
+ UPDATE(state->check, put - out, out);
+ out = left;
+ if ((
+#ifdef GUNZIP
+ state->flags ? hold :
+#endif
+ REVERSE(hold)) != state->check) {
+ strm->msg = (char *)"incorrect data check";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ Tracev((stderr, "inflate: check matches trailer\n"));
+ }
+#ifdef GUNZIP
+ state->mode = LENGTH;
+ case LENGTH:
+ if (state->wrap && state->flags) {
+ NEEDBITS(32);
+ if (hold != (state->total & 0xffffffffUL)) {
+ strm->msg = (char *)"incorrect length check";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ Tracev((stderr, "inflate: length matches trailer\n"));
+ }
+#endif
+ state->mode = DONE;
+ case DONE:
+ ret = Z_STREAM_END;
+ goto inf_leave;
+ case BAD:
+ ret = Z_DATA_ERROR;
+ goto inf_leave;
+ case MEM:
+ return Z_MEM_ERROR;
+ case SYNC:
+ default:
+ return Z_STREAM_ERROR;
+ }
+
+ /*
+ Return from inflate(), updating the total counts and the check value.
+ If there was no progress during the inflate() call, return a buffer
+ error. Call updatewindow() to create and/or update the window state.
+ Note: a memory error from inflate() is non-recoverable.
+ */
+ inf_leave:
+ RESTORE();
+ if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
+ if (updatewindow(strm, out)) {
+ state->mode = MEM;
+ return Z_MEM_ERROR;
+ }
+ in -= strm->avail_in;
+ out -= strm->avail_out;
+ strm->total_in += in;
+ strm->total_out += out;
+ state->total += out;
+ if (state->wrap && out)
+ strm->adler = state->check =
+ UPDATE(state->check, strm->next_out - out, out);
+ strm->data_type = state->bits + (state->last ? 64 : 0) +
+ (state->mode == TYPE ? 128 : 0);
+ if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
+ ret = Z_BUF_ERROR;
+ return ret;
+}
+
+int ZEXPORT inflateEnd(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+ if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
+ return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->window != Z_NULL) ZFREE(strm, state->window);
+ ZFREE(strm, strm->state);
+ strm->state = Z_NULL;
+ Tracev((stderr, "inflate: end\n"));
+ return Z_OK;
+}
+
+int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
+z_streamp strm;
+const Bytef *dictionary;
+uInt dictLength;
+{
+ struct inflate_state FAR *state;
+ unsigned long id;
+
+ /* check state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->mode != DICT) return Z_STREAM_ERROR;
+
+ /* check for correct dictionary id */
+ id = adler32(0L, Z_NULL, 0);
+ id = adler32(id, dictionary, dictLength);
+ if (id != state->check) return Z_DATA_ERROR;
+
+ /* copy dictionary to window */
+ if (updatewindow(strm, strm->avail_out)) {
+ state->mode = MEM;
+ return Z_MEM_ERROR;
+ }
+ if (dictLength > state->wsize) {
+ zmemcpy(state->window, dictionary + dictLength - state->wsize,
+ state->wsize);
+ state->whave = state->wsize;
+ }
+ else {
+ zmemcpy(state->window + state->wsize - dictLength, dictionary,
+ dictLength);
+ state->whave = dictLength;
+ }
+ state->havedict = 1;
+ Tracev((stderr, "inflate: dictionary set\n"));
+ return Z_OK;
+}
+
+/*
+ Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found
+ or when out of input. When called, *have is the number of pattern bytes
+ found in order so far, in 0..3. On return *have is updated to the new
+ state. If on return *have equals four, then the pattern was found and the
+ return value is how many bytes were read including the last byte of the
+ pattern. If *have is less than four, then the pattern has not been found
+ yet and the return value is len. In the latter case, syncsearch() can be
+ called again with more data and the *have state. *have is initialized to
+ zero for the first call.
+ */
+local unsigned syncsearch(have, buf, len)
+unsigned FAR *have;
+unsigned char FAR *buf;
+unsigned len;
+{
+ unsigned got;
+ unsigned next;
+
+ got = *have;
+ next = 0;
+ while (next < len && got < 4) {
+ if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
+ got++;
+ else if (buf[next])
+ got = 0;
+ else
+ got = 4 - got;
+ next++;
+ }
+ *have = got;
+ return next;
+}
+
+int ZEXPORT inflateSync(strm)
+z_streamp strm;
+{
+ unsigned len; /* number of bytes to look at or looked at */
+ unsigned long in, out; /* temporary to save total_in and total_out */
+ unsigned char buf[4]; /* to restore bit buffer to byte string */
+ struct inflate_state FAR *state;
+
+ /* check parameters */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
+
+ /* if first time, start search in bit buffer */
+ if (state->mode != SYNC) {
+ state->mode = SYNC;
+ state->hold <<= state->bits & 7;
+ state->bits -= state->bits & 7;
+ len = 0;
+ while (state->bits >= 8) {
+ buf[len++] = (unsigned char)(state->hold);
+ state->hold >>= 8;
+ state->bits -= 8;
+ }
+ state->have = 0;
+ syncsearch(&(state->have), buf, len);
+ }
+
+ /* search available input */
+ len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
+ strm->avail_in -= len;
+ strm->next_in += len;
+ strm->total_in += len;
+
+ /* return no joy or set up to restart inflate() on a new block */
+ if (state->have != 4) return Z_DATA_ERROR;
+ in = strm->total_in; out = strm->total_out;
+ inflateReset(strm);
+ strm->total_in = in; strm->total_out = out;
+ state->mode = TYPE;
+ return Z_OK;
+}
+
+/*
+ Returns true if inflate is currently at the end of a block generated by
+ Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
+ implementation to provide an additional safety check. PPP uses
+ Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
+ block. When decompressing, PPP checks that at the end of input packet,
+ inflate is waiting for these length bytes.
+ */
+int ZEXPORT inflateSyncPoint(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ return state->mode == STORED && state->bits == 0;
+}
+
+int ZEXPORT inflateCopy(dest, source)
+z_streamp dest;
+z_streamp source;
+{
+ struct inflate_state FAR *state;
+ struct inflate_state FAR *copy;
+ unsigned char FAR *window;
+
+ /* check input */
+ if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
+ source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
+ return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)source->state;
+
+ /* allocate space */
+ copy = (struct inflate_state FAR *)
+ ZALLOC(source, 1, sizeof(struct inflate_state));
+ if (copy == Z_NULL) return Z_MEM_ERROR;
+ window = Z_NULL;
+ if (state->window != Z_NULL) {
+ window = (unsigned char FAR *)
+ ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
+ if (window == Z_NULL) {
+ ZFREE(source, copy);
+ return Z_MEM_ERROR;
+ }
+ }
+
+ /* copy state */
+ *dest = *source;
+ *copy = *state;
+ copy->lencode = copy->codes + (state->lencode - state->codes);
+ copy->distcode = copy->codes + (state->distcode - state->codes);
+ copy->next = copy->codes + (state->next - state->codes);
+ if (window != Z_NULL)
+ zmemcpy(window, state->window, 1U << state->wbits);
+ copy->window = window;
+ dest->state = (voidpf)copy;
+ return Z_OK;
+}
diff --git a/src/zlib/inflate.h b/src/zlib/inflate.h
new file mode 100644
index 000000000..9a12c8fd2
--- /dev/null
+++ b/src/zlib/inflate.h
@@ -0,0 +1,117 @@
+/* inflate.h -- internal inflate state definition
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* define NO_GZIP when compiling if you want to disable gzip header and
+ trailer decoding by inflate(). NO_GZIP would be used to avoid linking in
+ the crc code when it is not needed. For shared libraries, gzip decoding
+ should be left enabled. */
+#ifndef NO_GZIP
+# define GUNZIP
+#endif
+
+/* Possible inflate modes between inflate() calls */
+typedef enum {
+ HEAD, /* i: waiting for magic header */
+#ifdef GUNZIP
+ FLAGS, /* i: waiting for method and flags (gzip) */
+ TIME, /* i: waiting for modification time (gzip) */
+ OS, /* i: waiting for extra flags and operating system (gzip) */
+ EXLEN, /* i: waiting for extra length (gzip) */
+ EXTRA, /* i: waiting for extra bytes (gzip) */
+ NAME, /* i: waiting for end of file name (gzip) */
+ COMMENT, /* i: waiting for end of comment (gzip) */
+ HCRC, /* i: waiting for header crc (gzip) */
+#endif
+ DICTID, /* i: waiting for dictionary check value */
+ DICT, /* waiting for inflateSetDictionary() call */
+ TYPE, /* i: waiting for type bits, including last-flag bit */
+ TYPEDO, /* i: same, but skip check to exit inflate on new block */
+ STORED, /* i: waiting for stored size (length and complement) */
+ COPY, /* i/o: waiting for input or output to copy stored block */
+ TABLE, /* i: waiting for dynamic block table lengths */
+ LENLENS, /* i: waiting for code length code lengths */
+ CODELENS, /* i: waiting for length/lit and distance code lengths */
+ LEN, /* i: waiting for length/lit code */
+ LENEXT, /* i: waiting for length extra bits */
+ DIST, /* i: waiting for distance code */
+ DISTEXT, /* i: waiting for distance extra bits */
+ MATCH, /* o: waiting for output space to copy string */
+ LIT, /* o: waiting for output space to write literal */
+ CHECK, /* i: waiting for 32-bit check value */
+#ifdef GUNZIP
+ LENGTH, /* i: waiting for 32-bit length (gzip) */
+#endif
+ DONE, /* finished check, done -- remain here until reset */
+ BAD, /* got a data error -- remain here until reset */
+ MEM, /* got an inflate() memory error -- remain here until reset */
+ SYNC /* looking for synchronization bytes to restart inflate() */
+} inflate_mode;
+
+/*
+ State transitions between above modes -
+
+ (most modes can go to the BAD or MEM mode -- not shown for clarity)
+
+ Process header:
+ HEAD -> (gzip) or (zlib)
+ (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
+ NAME -> COMMENT -> HCRC -> TYPE
+ (zlib) -> DICTID or TYPE
+ DICTID -> DICT -> TYPE
+ Read deflate blocks:
+ TYPE -> STORED or TABLE or LEN or CHECK
+ STORED -> COPY -> TYPE
+ TABLE -> LENLENS -> CODELENS -> LEN
+ Read deflate codes:
+ LEN -> LENEXT or LIT or TYPE
+ LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
+ LIT -> LEN
+ Process trailer:
+ CHECK -> LENGTH -> DONE
+ */
+
+/* state maintained between inflate() calls. Approximately 7K bytes. */
+struct inflate_state {
+ inflate_mode mode; /* current inflate mode */
+ int last; /* true if processing last block */
+ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
+ int havedict; /* true if dictionary provided */
+ int flags; /* gzip header method and flags (0 if zlib) */
+ unsigned long check; /* protected copy of check value */
+ unsigned long total; /* protected copy of output count */
+ /* sliding window */
+ unsigned wbits; /* log base 2 of requested window size */
+ unsigned wsize; /* window size or zero if not using window */
+ unsigned whave; /* valid bytes in the window */
+ unsigned write; /* window write index */
+ unsigned char FAR *window; /* allocated sliding window, if needed */
+ /* bit accumulator */
+ unsigned long hold; /* input bit accumulator */
+ unsigned bits; /* number of bits in "in" */
+ /* for string and stored block copying */
+ unsigned length; /* literal or length of data to copy */
+ unsigned offset; /* distance back to copy string from */
+ /* for table and code decoding */
+ unsigned extra; /* extra bits needed */
+ /* fixed and dynamic code tables */
+ code const FAR *lencode; /* starting table for length/literal codes */
+ code const FAR *distcode; /* starting table for distance codes */
+ unsigned lenbits; /* index bits for lencode */
+ unsigned distbits; /* index bits for distcode */
+ /* dynamic table building */
+ unsigned ncode; /* number of code length code lengths */
+ unsigned nlen; /* number of length code lengths */
+ unsigned ndist; /* number of distance code lengths */
+ unsigned have; /* number of code lengths in lens[] */
+ code FAR *next; /* next available space in codes[] */
+ unsigned short lens[320]; /* temporary storage for code lengths */
+ unsigned short work[288]; /* work area for code table building */
+ code codes[ENOUGH]; /* space for code tables */
+};
diff --git a/src/zlib/inftrees.c b/src/zlib/inftrees.c
new file mode 100644
index 000000000..8a896b287
--- /dev/null
+++ b/src/zlib/inftrees.c
@@ -0,0 +1,328 @@
+/* inftrees.c -- generate Huffman trees for efficient decoding
+ * Copyright (C) 1995-2004 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "zutil.h"
+#include "inftrees.h"
+
+#define MAXBITS 15
+
+const char inflate_copyright[] =
+ " inflate 1.2.2 Copyright 1995-2004 Mark Adler ";
+/*
+ If you use the zlib library in a product, an acknowledgment is welcome
+ in the documentation of your product. If for some reason you cannot
+ include such an acknowledgment, I would appreciate that you keep this
+ copyright string in the executable of your product.
+ */
+
+/*
+ Build a set of tables to decode the provided canonical Huffman code.
+ The code lengths are lens[0..codes-1]. The result starts at *table,
+ whose indices are 0..2^bits-1. work is a writable array of at least
+ lens shorts, which is used as a work area. type is the type of code
+ to be generated, CODES, LENS, or DISTS. On return, zero is success,
+ -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
+ on return points to the next available entry's address. bits is the
+ requested root table index bits, and on return it is the actual root
+ table index bits. It will differ if the request is greater than the
+ longest code or if it is less than the shortest code.
+ */
+int inflate_table(type, lens, codes, table, bits, work)
+codetype type;
+unsigned short FAR *lens;
+unsigned codes;
+code FAR * FAR *table;
+unsigned FAR *bits;
+unsigned short FAR *work;
+{
+ unsigned len; /* a code's length in bits */
+ unsigned sym; /* index of code symbols */
+ unsigned min, max; /* minimum and maximum code lengths */
+ unsigned root; /* number of index bits for root table */
+ unsigned curr; /* number of index bits for current table */
+ unsigned drop; /* code bits to drop for sub-table */
+ int left; /* number of prefix codes available */
+ unsigned used; /* code entries in table used */
+ unsigned huff; /* Huffman code */
+ unsigned incr; /* for incrementing code, index */
+ unsigned fill; /* index for replicating entries */
+ unsigned low; /* low bits for current root entry */
+ unsigned mask; /* mask for low root bits */
+ code this; /* table entry for duplication */
+ code FAR *next; /* next available space in table */
+ const unsigned short FAR *base; /* base value table to use */
+ const unsigned short FAR *extra; /* extra bits table to use */
+ int end; /* use base and extra for symbol > end */
+ unsigned short count[MAXBITS+1]; /* number of codes of each length */
+ unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
+ static const unsigned short lbase[31] = { /* Length codes 257..285 base */
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
+ static const unsigned short lext[31] = { /* Length codes 257..285 extra */
+ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 198};
+ static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+ 8193, 12289, 16385, 24577, 0, 0};
+ static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
+ 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
+ 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
+ 28, 28, 29, 29, 64, 64};
+
+ /*
+ Process a set of code lengths to create a canonical Huffman code. The
+ code lengths are lens[0..codes-1]. Each length corresponds to the
+ symbols 0..codes-1. The Huffman code is generated by first sorting the
+ symbols by length from short to long, and retaining the symbol order
+ for codes with equal lengths. Then the code starts with all zero bits
+ for the first code of the shortest length, and the codes are integer
+ increments for the same length, and zeros are appended as the length
+ increases. For the deflate format, these bits are stored backwards
+ from their more natural integer increment ordering, and so when the
+ decoding tables are built in the large loop below, the integer codes
+ are incremented backwards.
+
+ This routine assumes, but does not check, that all of the entries in
+ lens[] are in the range 0..MAXBITS. The caller must assure this.
+ 1..MAXBITS is interpreted as that code length. zero means that that
+ symbol does not occur in this code.
+
+ The codes are sorted by computing a count of codes for each length,
+ creating from that a table of starting indices for each length in the
+ sorted table, and then entering the symbols in order in the sorted
+ table. The sorted table is work[], with that space being provided by
+ the caller.
+
+ The length counts are used for other purposes as well, i.e. finding
+ the minimum and maximum length codes, determining if there are any
+ codes at all, checking for a valid set of lengths, and looking ahead
+ at length counts to determine sub-table sizes when building the
+ decoding tables.
+ */
+
+ /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
+ for (len = 0; len <= MAXBITS; len++)
+ count[len] = 0;
+ for (sym = 0; sym < codes; sym++)
+ count[lens[sym]]++;
+
+ /* bound code lengths, force root to be within code lengths */
+ root = *bits;
+ for (max = MAXBITS; max >= 1; max--)
+ if (count[max] != 0) break;
+ if (root > max) root = max;
+ if (max == 0) { /* no symbols to code at all */
+ this.op = (unsigned char)64; /* invalid code marker */
+ this.bits = (unsigned char)1;
+ this.val = (unsigned short)0;
+ *(*table)++ = this; /* make a table to force an error */
+ *(*table)++ = this;
+ *bits = 1;
+ return 0; /* no symbols, but wait for decoding to report error */
+ }
+ for (min = 1; min <= MAXBITS; min++)
+ if (count[min] != 0) break;
+ if (root < min) root = min;
+
+ /* check for an over-subscribed or incomplete set of lengths */
+ left = 1;
+ for (len = 1; len <= MAXBITS; len++) {
+ left <<= 1;
+ left -= count[len];
+ if (left < 0) return -1; /* over-subscribed */
+ }
+ if (left > 0 && (type == CODES || (codes - count[0] != 1)))
+ return -1; /* incomplete set */
+
+ /* generate offsets into symbol table for each length for sorting */
+ offs[1] = 0;
+ for (len = 1; len < MAXBITS; len++)
+ offs[len + 1] = offs[len] + count[len];
+
+ /* sort symbols by length, by symbol order within each length */
+ for (sym = 0; sym < codes; sym++)
+ if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
+
+ /*
+ Create and fill in decoding tables. In this loop, the table being
+ filled is at next and has curr index bits. The code being used is huff
+ with length len. That code is converted to an index by dropping drop
+ bits off of the bottom. For codes where len is less than drop + curr,
+ those top drop + curr - len bits are incremented through all values to
+ fill the table with replicated entries.
+
+ root is the number of index bits for the root table. When len exceeds
+ root, sub-tables are created pointed to by the root entry with an index
+ of the low root bits of huff. This is saved in low to check for when a
+ new sub-table should be started. drop is zero when the root table is
+ being filled, and drop is root when sub-tables are being filled.
+
+ When a new sub-table is needed, it is necessary to look ahead in the
+ code lengths to determine what size sub-table is needed. The length
+ counts are used for this, and so count[] is decremented as codes are
+ entered in the tables.
+
+ used keeps track of how many table entries have been allocated from the
+ provided *table space. It is checked when a LENS table is being made
+ against the space in *table, ENOUGH, minus the maximum space needed by
+ the worst case distance code, MAXD. This should never happen, but the
+ sufficiency of ENOUGH has not been proven exhaustively, hence the check.
+ This assumes that when type == LENS, bits == 9.
+
+ sym increments through all symbols, and the loop terminates when
+ all codes of length max, i.e. all codes, have been processed. This
+ routine permits incomplete codes, so another loop after this one fills
+ in the rest of the decoding tables with invalid code markers.
+ */
+
+ /* set up for code type */
+ switch (type) {
+ case CODES:
+ base = extra = work; /* dummy value--not used */
+ end = 19;
+ break;
+ case LENS:
+ base = lbase;
+ base -= 257;
+ extra = lext;
+ extra -= 257;
+ end = 256;
+ break;
+ default: /* DISTS */
+ base = dbase;
+ extra = dext;
+ end = -1;
+ }
+
+ /* initialize state for loop */
+ huff = 0; /* starting code */
+ sym = 0; /* starting code symbol */
+ len = min; /* starting code length */
+ next = *table; /* current table to fill in */
+ curr = root; /* current table index bits */
+ drop = 0; /* current bits to drop from code for index */
+ low = (unsigned)(-1); /* trigger new sub-table when len > root */
+ used = 1U << root; /* use root table entries */
+ mask = used - 1; /* mask for comparing low */
+
+ /* check available table space */
+ if (type == LENS && used >= ENOUGH - MAXD)
+ return 1;
+
+ /* process all codes and make table entries */
+ for (;;) {
+ /* create table entry */
+ this.bits = (unsigned char)(len - drop);
+ if ((int)(work[sym]) < end) {
+ this.op = (unsigned char)0;
+ this.val = work[sym];
+ }
+ else if ((int)(work[sym]) > end) {
+ this.op = (unsigned char)(extra[work[sym]]);
+ this.val = base[work[sym]];
+ }
+ else {
+ this.op = (unsigned char)(32 + 64); /* end of block */
+ this.val = 0;
+ }
+
+ /* replicate for those indices with low len bits equal to huff */
+ incr = 1U << (len - drop);
+ fill = 1U << curr;
+ do {
+ fill -= incr;
+ next[(huff >> drop) + fill] = this;
+ } while (fill != 0);
+
+ /* backwards increment the len-bit code huff */
+ incr = 1U << (len - 1);
+ while (huff & incr)
+ incr >>= 1;
+ if (incr != 0) {
+ huff &= incr - 1;
+ huff += incr;
+ }
+ else
+ huff = 0;
+
+ /* go to next symbol, update count, len */
+ sym++;
+ if (--(count[len]) == 0) {
+ if (len == max) break;
+ len = lens[work[sym]];
+ }
+
+ /* create new sub-table if needed */
+ if (len > root && (huff & mask) != low) {
+ /* if first time, transition to sub-tables */
+ if (drop == 0)
+ drop = root;
+
+ /* increment past last table */
+ next += 1U << curr;
+
+ /* determine length of next table */
+ curr = len - drop;
+ left = (int)(1 << curr);
+ while (curr + drop < max) {
+ left -= count[curr + drop];
+ if (left <= 0) break;
+ curr++;
+ left <<= 1;
+ }
+
+ /* check for enough space */
+ used += 1U << curr;
+ if (type == LENS && used >= ENOUGH - MAXD)
+ return 1;
+
+ /* point entry in root table to sub-table */
+ low = huff & mask;
+ (*table)[low].op = (unsigned char)curr;
+ (*table)[low].bits = (unsigned char)root;
+ (*table)[low].val = (unsigned short)(next - *table);
+ }
+ }
+
+ /*
+ Fill in rest of table for incomplete codes. This loop is similar to the
+ loop above in incrementing huff for table indices. It is assumed that
+ len is equal to curr + drop, so there is no loop needed to increment
+ through high index bits. When the current sub-table is filled, the loop
+ drops back to the root table to fill in any remaining entries there.
+ */
+ this.op = (unsigned char)64; /* invalid code marker */
+ this.bits = (unsigned char)(len - drop);
+ this.val = (unsigned short)0;
+ while (huff != 0) {
+ /* when done with sub-table, drop back to root table */
+ if (drop != 0 && (huff & mask) != low) {
+ drop = 0;
+ len = root;
+ next = *table;
+ this.bits = (unsigned char)len;
+ }
+
+ /* put invalid code marker in table */
+ next[huff >> drop] = this;
+
+ /* backwards increment the len-bit code huff */
+ incr = 1U << (len - 1);
+ while (huff & incr)
+ incr >>= 1;
+ if (incr != 0) {
+ huff &= incr - 1;
+ huff += incr;
+ }
+ else
+ huff = 0;
+ }
+
+ /* set return parameters */
+ *table += used;
+ *bits = root;
+ return 0;
+}
diff --git a/src/zlib/inftrees.h b/src/zlib/inftrees.h
new file mode 100644
index 000000000..82d365a7e
--- /dev/null
+++ b/src/zlib/inftrees.h
@@ -0,0 +1,55 @@
+/* inftrees.h -- header to use inftrees.c
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* Structure for decoding tables. Each entry provides either the
+ information needed to do the operation requested by the code that
+ indexed that table entry, or it provides a pointer to another
+ table that indexes more bits of the code. op indicates whether
+ the entry is a pointer to another table, a literal, a length or
+ distance, an end-of-block, or an invalid code. For a table
+ pointer, the low four bits of op is the number of index bits of
+ that table. For a length or distance, the low four bits of op
+ is the number of extra bits to get after the code. bits is
+ the number of bits in this code or part of the code to drop off
+ of the bit buffer. val is the actual byte to output in the case
+ of a literal, the base length or distance, or the offset from
+ the current table to the next table. Each entry is four bytes. */
+typedef struct {
+ unsigned char op; /* operation, extra bits, table bits */
+ unsigned char bits; /* bits in this part of the code */
+ unsigned short val; /* offset in table or code value */
+} code;
+
+/* op values as set by inflate_table():
+ 00000000 - literal
+ 0000tttt - table link, tttt != 0 is the number of table index bits
+ 0001eeee - length or distance, eeee is the number of extra bits
+ 01100000 - end of block
+ 01000000 - invalid code
+ */
+
+/* Maximum size of dynamic tree. The maximum found in a long but non-
+ exhaustive search was 1004 code structures (850 for length/literals
+ and 154 for distances, the latter actually the result of an
+ exhaustive search). The true maximum is not known, but the value
+ below is more than safe. */
+#define ENOUGH 1440
+#define MAXD 154
+
+/* Type of code to build for inftable() */
+typedef enum {
+ CODES,
+ LENS,
+ DISTS
+} codetype;
+
+extern int inflate_table OF((codetype type, unsigned short FAR *lens,
+ unsigned codes, code FAR * FAR *table,
+ unsigned FAR *bits, unsigned short FAR *work));
diff --git a/src/zlib/trees.c b/src/zlib/trees.c
new file mode 100644
index 000000000..52c820fa2
--- /dev/null
+++ b/src/zlib/trees.c
@@ -0,0 +1,1215 @@
+/* trees.c -- output deflated data using Huffman coding
+ * Copyright (C) 1995-2003 Jean-loup Gailly
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/*
+ * ALGORITHM
+ *
+ * The "deflation" process uses several Huffman trees. The more
+ * common source values are represented by shorter bit sequences.
+ *
+ * Each code tree is stored in a compressed form which is itself
+ * a Huffman encoding of the lengths of all the code strings (in
+ * ascending order by source values). The actual code strings are
+ * reconstructed from the lengths in the inflate process, as described
+ * in the deflate specification.
+ *
+ * REFERENCES
+ *
+ * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
+ * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
+ *
+ * Storer, James A.
+ * Data Compression: Methods and Theory, pp. 49-50.
+ * Computer Science Press, 1988. ISBN 0-7167-8156-5.
+ *
+ * Sedgewick, R.
+ * Algorithms, p290.
+ * Addison-Wesley, 1983. ISBN 0-201-06672-6.
+ */
+
+/* @(#) $Id$ */
+
+/* #define GEN_TREES_H */
+
+#include "deflate.h"
+
+#ifdef DEBUG
+# include <ctype.h>
+#endif
+
+/* ===========================================================================
+ * Constants
+ */
+
+#define MAX_BL_BITS 7
+/* Bit length codes must not exceed MAX_BL_BITS bits */
+
+#define END_BLOCK 256
+/* end of block literal code */
+
+#define REP_3_6 16
+/* repeat previous bit length 3-6 times (2 bits of repeat count) */
+
+#define REPZ_3_10 17
+/* repeat a zero length 3-10 times (3 bits of repeat count) */
+
+#define REPZ_11_138 18
+/* repeat a zero length 11-138 times (7 bits of repeat count) */
+
+local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
+ = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
+
+local const int extra_dbits[D_CODES] /* extra bits for each distance code */
+ = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
+
+local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
+ = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
+
+local const uch bl_order[BL_CODES]
+ = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
+/* The lengths of the bit length codes are sent in order of decreasing
+ * probability, to avoid transmitting the lengths for unused bit length codes.
+ */
+
+#define Buf_size (8 * 2*sizeof(char))
+/* Number of bits used within bi_buf. (bi_buf might be implemented on
+ * more than 16 bits on some systems.)
+ */
+
+/* ===========================================================================
+ * Local data. These are initialized only once.
+ */
+
+#define DIST_CODE_LEN 512 /* see definition of array dist_code below */
+
+#if defined(GEN_TREES_H) || !defined(STDC)
+/* non ANSI compilers may not accept trees.h */
+
+local ct_data static_ltree[L_CODES+2];
+/* The static literal tree. Since the bit lengths are imposed, there is no
+ * need for the L_CODES extra codes used during heap construction. However
+ * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
+ * below).
+ */
+
+local ct_data static_dtree[D_CODES];
+/* The static distance tree. (Actually a trivial tree since all codes use
+ * 5 bits.)
+ */
+
+uch _dist_code[DIST_CODE_LEN];
+/* Distance codes. The first 256 values correspond to the distances
+ * 3 .. 258, the last 256 values correspond to the top 8 bits of
+ * the 15 bit distances.
+ */
+
+uch _length_code[MAX_MATCH-MIN_MATCH+1];
+/* length code for each normalized match length (0 == MIN_MATCH) */
+
+local int base_length[LENGTH_CODES];
+/* First normalized length for each code (0 = MIN_MATCH) */
+
+local int base_dist[D_CODES];
+/* First normalized distance for each code (0 = distance of 1) */
+
+#else
+# include "trees.h"
+#endif /* GEN_TREES_H */
+
+struct static_tree_desc_s {
+ const ct_data *static_tree; /* static tree or NULL */
+ const intf *extra_bits; /* extra bits for each code or NULL */
+ int extra_base; /* base index for extra_bits */
+ int elems; /* max number of elements in the tree */
+ int max_length; /* max bit length for the codes */
+};
+
+local static_tree_desc static_l_desc =
+{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
+
+local static_tree_desc static_d_desc =
+{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
+
+local static_tree_desc static_bl_desc =
+{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
+
+/* ===========================================================================
+ * Local (static) routines in this file.
+ */
+
+local void tr_static_init OF((void));
+local void init_block OF((deflate_state *s));
+local void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
+local void gen_bitlen OF((deflate_state *s, tree_desc *desc));
+local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
+local void build_tree OF((deflate_state *s, tree_desc *desc));
+local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
+local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
+local int build_bl_tree OF((deflate_state *s));
+local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
+ int blcodes));
+local void compress_block OF((deflate_state *s, ct_data *ltree,
+ ct_data *dtree));
+local void set_data_type OF((deflate_state *s));
+local unsigned bi_reverse OF((unsigned value, int length));
+local void bi_windup OF((deflate_state *s));
+local void bi_flush OF((deflate_state *s));
+local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
+ int header));
+
+#ifdef GEN_TREES_H
+local void gen_trees_header OF((void));
+#endif
+
+#ifndef DEBUG
+# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
+ /* Send a code of the given tree. c and tree must not have side effects */
+
+#else /* DEBUG */
+# define send_code(s, c, tree) \
+ { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
+ send_bits(s, tree[c].Code, tree[c].Len); }
+#endif
+
+/* ===========================================================================
+ * Output a short LSB first on the stream.
+ * IN assertion: there is enough room in pendingBuf.
+ */
+#define put_short(s, w) { \
+ put_byte(s, (uch)((w) & 0xff)); \
+ put_byte(s, (uch)((ush)(w) >> 8)); \
+}
+
+/* ===========================================================================
+ * Send a value on a given number of bits.
+ * IN assertion: length <= 16 and value fits in length bits.
+ */
+#ifdef DEBUG
+local void send_bits OF((deflate_state *s, int value, int length));
+
+local void send_bits(s, value, length)
+ deflate_state *s;
+ int value; /* value to send */
+ int length; /* number of bits */
+{
+ Tracevv((stderr," l %2d v %4x ", length, value));
+ Assert(length > 0 && length <= 15, "invalid length");
+ s->bits_sent += (ulg)length;
+
+ /* If not enough room in bi_buf, use (valid) bits from bi_buf and
+ * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
+ * unused bits in value.
+ */
+ if (s->bi_valid > (int)Buf_size - length) {
+ s->bi_buf |= (value << s->bi_valid);
+ put_short(s, s->bi_buf);
+ s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
+ s->bi_valid += length - Buf_size;
+ } else {
+ s->bi_buf |= value << s->bi_valid;
+ s->bi_valid += length;
+ }
+}
+#else /* !DEBUG */
+
+#define send_bits(s, value, length) \
+{ int len = length;\
+ if (s->bi_valid > (int)Buf_size - len) {\
+ int val = value;\
+ s->bi_buf |= (val << s->bi_valid);\
+ put_short(s, s->bi_buf);\
+ s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
+ s->bi_valid += len - Buf_size;\
+ } else {\
+ s->bi_buf |= (value) << s->bi_valid;\
+ s->bi_valid += len;\
+ }\
+}
+#endif /* DEBUG */
+
+
+/* the arguments must not have side effects */
+
+/* ===========================================================================
+ * Initialize the various 'constant' tables.
+ */
+local void tr_static_init()
+{
+#if defined(GEN_TREES_H) || !defined(STDC)
+ static int static_init_done = 0;
+ int n; /* iterates over tree elements */
+ int bits; /* bit counter */
+ int length; /* length value */
+ int code; /* code value */
+ int dist; /* distance index */
+ ush bl_count[MAX_BITS+1];
+ /* number of codes at each bit length for an optimal tree */
+
+ if (static_init_done) return;
+
+ /* For some embedded targets, global variables are not initialized: */
+ static_l_desc.static_tree = static_ltree;
+ static_l_desc.extra_bits = extra_lbits;
+ static_d_desc.static_tree = static_dtree;
+ static_d_desc.extra_bits = extra_dbits;
+ static_bl_desc.extra_bits = extra_blbits;
+
+ /* Initialize the mapping length (0..255) -> length code (0..28) */
+ length = 0;
+ for (code = 0; code < LENGTH_CODES-1; code++) {
+ base_length[code] = length;
+ for (n = 0; n < (1<<extra_lbits[code]); n++) {
+ _length_code[length++] = (uch)code;
+ }
+ }
+ Assert (length == 256, "tr_static_init: length != 256");
+ /* Note that the length 255 (match length 258) can be represented
+ * in two different ways: code 284 + 5 bits or code 285, so we
+ * overwrite length_code[255] to use the best encoding:
+ */
+ _length_code[length-1] = (uch)code;
+
+ /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
+ dist = 0;
+ for (code = 0 ; code < 16; code++) {
+ base_dist[code] = dist;
+ for (n = 0; n < (1<<extra_dbits[code]); n++) {
+ _dist_code[dist++] = (uch)code;
+ }
+ }
+ Assert (dist == 256, "tr_static_init: dist != 256");
+ dist >>= 7; /* from now on, all distances are divided by 128 */
+ for ( ; code < D_CODES; code++) {
+ base_dist[code] = dist << 7;
+ for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
+ _dist_code[256 + dist++] = (uch)code;
+ }
+ }
+ Assert (dist == 256, "tr_static_init: 256+dist != 512");
+
+ /* Construct the codes of the static literal tree */
+ for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
+ n = 0;
+ while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
+ while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
+ while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
+ while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
+ /* Codes 286 and 287 do not exist, but we must include them in the
+ * tree construction to get a canonical Huffman tree (longest code
+ * all ones)
+ */
+ gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
+
+ /* The static distance tree is trivial: */
+ for (n = 0; n < D_CODES; n++) {
+ static_dtree[n].Len = 5;
+ static_dtree[n].Code = bi_reverse((unsigned)n, 5);
+ }
+ static_init_done = 1;
+
+# ifdef GEN_TREES_H
+ gen_trees_header();
+# endif
+#endif /* defined(GEN_TREES_H) || !defined(STDC) */
+}
+
+/* ===========================================================================
+ * Genererate the file trees.h describing the static trees.
+ */
+#ifdef GEN_TREES_H
+# ifndef DEBUG
+# include <stdio.h>
+# endif
+
+# define SEPARATOR(i, last, width) \
+ ((i) == (last)? "\n};\n\n" : \
+ ((i) % (width) == (width)-1 ? ",\n" : ", "))
+
+void gen_trees_header()
+{
+ FILE *header = fopen("trees.h", "w");
+ int i;
+
+ Assert (header != NULL, "Can't open trees.h");
+ fprintf(header,
+ "/* header created automatically with -DGEN_TREES_H */\n\n");
+
+ fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
+ for (i = 0; i < L_CODES+2; i++) {
+ fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
+ static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
+ }
+
+ fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
+ for (i = 0; i < D_CODES; i++) {
+ fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
+ static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
+ }
+
+ fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
+ for (i = 0; i < DIST_CODE_LEN; i++) {
+ fprintf(header, "%2u%s", _dist_code[i],
+ SEPARATOR(i, DIST_CODE_LEN-1, 20));
+ }
+
+ fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
+ for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
+ fprintf(header, "%2u%s", _length_code[i],
+ SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
+ }
+
+ fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
+ for (i = 0; i < LENGTH_CODES; i++) {
+ fprintf(header, "%1u%s", base_length[i],
+ SEPARATOR(i, LENGTH_CODES-1, 20));
+ }
+
+ fprintf(header, "local const int base_dist[D_CODES] = {\n");
+ for (i = 0; i < D_CODES; i++) {
+ fprintf(header, "%5u%s", base_dist[i],
+ SEPARATOR(i, D_CODES-1, 10));
+ }
+
+ fclose(header);
+}
+#endif /* GEN_TREES_H */
+
+/* ===========================================================================
+ * Initialize the tree data structures for a new zlib stream.
+ */
+void _tr_init(s)
+ deflate_state *s;
+{
+ tr_static_init();
+
+ s->l_desc.dyn_tree = s->dyn_ltree;
+ s->l_desc.stat_desc = &static_l_desc;
+
+ s->d_desc.dyn_tree = s->dyn_dtree;
+ s->d_desc.stat_desc = &static_d_desc;
+
+ s->bl_desc.dyn_tree = s->bl_tree;
+ s->bl_desc.stat_desc = &static_bl_desc;
+
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+ s->last_eob_len = 8; /* enough lookahead for inflate */
+#ifdef DEBUG
+ s->compressed_len = 0L;
+ s->bits_sent = 0L;
+#endif
+
+ /* Initialize the first block of the first file: */
+ init_block(s);
+}
+
+/* ===========================================================================
+ * Initialize a new block.
+ */
+local void init_block(s)
+ deflate_state *s;
+{
+ int n; /* iterates over tree elements */
+
+ /* Initialize the trees. */
+ for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
+ for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
+ for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
+
+ s->dyn_ltree[END_BLOCK].Freq = 1;
+ s->opt_len = s->static_len = 0L;
+ s->last_lit = s->matches = 0;
+}
+
+#define SMALLEST 1
+/* Index within the heap array of least frequent node in the Huffman tree */
+
+
+/* ===========================================================================
+ * Remove the smallest element from the heap and recreate the heap with
+ * one less element. Updates heap and heap_len.
+ */
+#define pqremove(s, tree, top) \
+{\
+ top = s->heap[SMALLEST]; \
+ s->heap[SMALLEST] = s->heap[s->heap_len--]; \
+ pqdownheap(s, tree, SMALLEST); \
+}
+
+/* ===========================================================================
+ * Compares to subtrees, using the tree depth as tie breaker when
+ * the subtrees have equal frequency. This minimizes the worst case length.
+ */
+#define smaller(tree, n, m, depth) \
+ (tree[n].Freq < tree[m].Freq || \
+ (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
+
+/* ===========================================================================
+ * Restore the heap property by moving down the tree starting at node k,
+ * exchanging a node with the smallest of its two sons if necessary, stopping
+ * when the heap property is re-established (each father smaller than its
+ * two sons).
+ */
+local void pqdownheap(s, tree, k)
+ deflate_state *s;
+ ct_data *tree; /* the tree to restore */
+ int k; /* node to move down */
+{
+ int v = s->heap[k];
+ int j = k << 1; /* left son of k */
+ while (j <= s->heap_len) {
+ /* Set j to the smallest of the two sons: */
+ if (j < s->heap_len &&
+ smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
+ j++;
+ }
+ /* Exit if v is smaller than both sons */
+ if (smaller(tree, v, s->heap[j], s->depth)) break;
+
+ /* Exchange v with the smallest son */
+ s->heap[k] = s->heap[j]; k = j;
+
+ /* And continue down the tree, setting j to the left son of k */
+ j <<= 1;
+ }
+ s->heap[k] = v;
+}
+
+/* ===========================================================================
+ * Compute the optimal bit lengths for a tree and update the total bit length
+ * for the current block.
+ * IN assertion: the fields freq and dad are set, heap[heap_max] and
+ * above are the tree nodes sorted by increasing frequency.
+ * OUT assertions: the field len is set to the optimal bit length, the
+ * array bl_count contains the frequencies for each bit length.
+ * The length opt_len is updated; static_len is also updated if stree is
+ * not null.
+ */
+local void gen_bitlen(s, desc)
+ deflate_state *s;
+ tree_desc *desc; /* the tree descriptor */
+{
+ ct_data *tree = desc->dyn_tree;
+ int max_code = desc->max_code;
+ const ct_data *stree = desc->stat_desc->static_tree;
+ const intf *extra = desc->stat_desc->extra_bits;
+ int base = desc->stat_desc->extra_base;
+ int max_length = desc->stat_desc->max_length;
+ int h; /* heap index */
+ int n, m; /* iterate over the tree elements */
+ int bits; /* bit length */
+ int xbits; /* extra bits */
+ ush f; /* frequency */
+ int overflow = 0; /* number of elements with bit length too large */
+
+ for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
+
+ /* In a first pass, compute the optimal bit lengths (which may
+ * overflow in the case of the bit length tree).
+ */
+ tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
+
+ for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
+ n = s->heap[h];
+ bits = tree[tree[n].Dad].Len + 1;
+ if (bits > max_length) bits = max_length, overflow++;
+ tree[n].Len = (ush)bits;
+ /* We overwrite tree[n].Dad which is no longer needed */
+
+ if (n > max_code) continue; /* not a leaf node */
+
+ s->bl_count[bits]++;
+ xbits = 0;
+ if (n >= base) xbits = extra[n-base];
+ f = tree[n].Freq;
+ s->opt_len += (ulg)f * (bits + xbits);
+ if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
+ }
+ if (overflow == 0) return;
+
+ Trace((stderr,"\nbit length overflow\n"));
+ /* This happens for example on obj2 and pic of the Calgary corpus */
+
+ /* Find the first bit length which could increase: */
+ do {
+ bits = max_length-1;
+ while (s->bl_count[bits] == 0) bits--;
+ s->bl_count[bits]--; /* move one leaf down the tree */
+ s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
+ s->bl_count[max_length]--;
+ /* The brother of the overflow item also moves one step up,
+ * but this does not affect bl_count[max_length]
+ */
+ overflow -= 2;
+ } while (overflow > 0);
+
+ /* Now recompute all bit lengths, scanning in increasing frequency.
+ * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
+ * lengths instead of fixing only the wrong ones. This idea is taken
+ * from 'ar' written by Haruhiko Okumura.)
+ */
+ for (bits = max_length; bits != 0; bits--) {
+ n = s->bl_count[bits];
+ while (n != 0) {
+ m = s->heap[--h];
+ if (m > max_code) continue;
+ if (tree[m].Len != (unsigned) bits) {
+ Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+ s->opt_len += ((long)bits - (long)tree[m].Len)
+ *(long)tree[m].Freq;
+ tree[m].Len = (ush)bits;
+ }
+ n--;
+ }
+ }
+}
+
+/* ===========================================================================
+ * Generate the codes for a given tree and bit counts (which need not be
+ * optimal).
+ * IN assertion: the array bl_count contains the bit length statistics for
+ * the given tree and the field len is set for all tree elements.
+ * OUT assertion: the field code is set for all tree elements of non
+ * zero code length.
+ */
+local void gen_codes (tree, max_code, bl_count)
+ ct_data *tree; /* the tree to decorate */
+ int max_code; /* largest code with non zero frequency */
+ ushf *bl_count; /* number of codes at each bit length */
+{
+ ush next_code[MAX_BITS+1]; /* next code value for each bit length */
+ ush code = 0; /* running code value */
+ int bits; /* bit index */
+ int n; /* code index */
+
+ /* The distribution counts are first used to generate the code values
+ * without bit reversal.
+ */
+ for (bits = 1; bits <= MAX_BITS; bits++) {
+ next_code[bits] = code = (code + bl_count[bits-1]) << 1;
+ }
+ /* Check that the bit counts in bl_count are consistent. The last code
+ * must be all ones.
+ */
+ Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
+ "inconsistent bit counts");
+ Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
+
+ for (n = 0; n <= max_code; n++) {
+ int len = tree[n].Len;
+ if (len == 0) continue;
+ /* Now reverse the bits */
+ tree[n].Code = bi_reverse(next_code[len]++, len);
+
+ Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
+ n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
+ }
+}
+
+/* ===========================================================================
+ * Construct one Huffman tree and assigns the code bit strings and lengths.
+ * Update the total bit length for the current block.
+ * IN assertion: the field freq is set for all tree elements.
+ * OUT assertions: the fields len and code are set to the optimal bit length
+ * and corresponding code. The length opt_len is updated; static_len is
+ * also updated if stree is not null. The field max_code is set.
+ */
+local void build_tree(s, desc)
+ deflate_state *s;
+ tree_desc *desc; /* the tree descriptor */
+{
+ ct_data *tree = desc->dyn_tree;
+ const ct_data *stree = desc->stat_desc->static_tree;
+ int elems = desc->stat_desc->elems;
+ int n, m; /* iterate over heap elements */
+ int max_code = -1; /* largest code with non zero frequency */
+ int node; /* new node being created */
+
+ /* Construct the initial heap, with least frequent element in
+ * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
+ * heap[0] is not used.
+ */
+ s->heap_len = 0, s->heap_max = HEAP_SIZE;
+
+ for (n = 0; n < elems; n++) {
+ if (tree[n].Freq != 0) {
+ s->heap[++(s->heap_len)] = max_code = n;
+ s->depth[n] = 0;
+ } else {
+ tree[n].Len = 0;
+ }
+ }
+
+ /* The pkzip format requires that at least one distance code exists,
+ * and that at least one bit should be sent even if there is only one
+ * possible code. So to avoid special checks later on we force at least
+ * two codes of non zero frequency.
+ */
+ while (s->heap_len < 2) {
+ node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
+ tree[node].Freq = 1;
+ s->depth[node] = 0;
+ s->opt_len--; if (stree) s->static_len -= stree[node].Len;
+ /* node is 0 or 1 so it does not have extra bits */
+ }
+ desc->max_code = max_code;
+
+ /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
+ * establish sub-heaps of increasing lengths:
+ */
+ for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
+
+ /* Construct the Huffman tree by repeatedly combining the least two
+ * frequent nodes.
+ */
+ node = elems; /* next internal node of the tree */
+ do {
+ pqremove(s, tree, n); /* n = node of least frequency */
+ m = s->heap[SMALLEST]; /* m = node of next least frequency */
+
+ s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
+ s->heap[--(s->heap_max)] = m;
+
+ /* Create a new node father of n and m */
+ tree[node].Freq = tree[n].Freq + tree[m].Freq;
+ s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
+ s->depth[n] : s->depth[m]) + 1);
+ tree[n].Dad = tree[m].Dad = (ush)node;
+#ifdef DUMP_BL_TREE
+ if (tree == s->bl_tree) {
+ fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
+ node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
+ }
+#endif
+ /* and insert the new node in the heap */
+ s->heap[SMALLEST] = node++;
+ pqdownheap(s, tree, SMALLEST);
+
+ } while (s->heap_len >= 2);
+
+ s->heap[--(s->heap_max)] = s->heap[SMALLEST];
+
+ /* At this point, the fields freq and dad are set. We can now
+ * generate the bit lengths.
+ */
+ gen_bitlen(s, (tree_desc *)desc);
+
+ /* The field len is now set, we can generate the bit codes */
+ gen_codes ((ct_data *)tree, max_code, s->bl_count);
+}
+
+/* ===========================================================================
+ * Scan a literal or distance tree to determine the frequencies of the codes
+ * in the bit length tree.
+ */
+local void scan_tree (s, tree, max_code)
+ deflate_state *s;
+ ct_data *tree; /* the tree to be scanned */
+ int max_code; /* and its largest code of non zero frequency */
+{
+ int n; /* iterates over all tree elements */
+ int prevlen = -1; /* last emitted length */
+ int curlen; /* length of current code */
+ int nextlen = tree[0].Len; /* length of next code */
+ int count = 0; /* repeat count of the current code */
+ int max_count = 7; /* max repeat count */
+ int min_count = 4; /* min repeat count */
+
+ if (nextlen == 0) max_count = 138, min_count = 3;
+ tree[max_code+1].Len = (ush)0xffff; /* guard */
+
+ for (n = 0; n <= max_code; n++) {
+ curlen = nextlen; nextlen = tree[n+1].Len;
+ if (++count < max_count && curlen == nextlen) {
+ continue;
+ } else if (count < min_count) {
+ s->bl_tree[curlen].Freq += count;
+ } else if (curlen != 0) {
+ if (curlen != prevlen) s->bl_tree[curlen].Freq++;
+ s->bl_tree[REP_3_6].Freq++;
+ } else if (count <= 10) {
+ s->bl_tree[REPZ_3_10].Freq++;
+ } else {
+ s->bl_tree[REPZ_11_138].Freq++;
+ }
+ count = 0; prevlen = curlen;
+ if (nextlen == 0) {
+ max_count = 138, min_count = 3;
+ } else if (curlen == nextlen) {
+ max_count = 6, min_count = 3;
+ } else {
+ max_count = 7, min_count = 4;
+ }
+ }
+}
+
+/* ===========================================================================
+ * Send a literal or distance tree in compressed form, using the codes in
+ * bl_tree.
+ */
+local void send_tree (s, tree, max_code)
+ deflate_state *s;
+ ct_data *tree; /* the tree to be scanned */
+ int max_code; /* and its largest code of non zero frequency */
+{
+ int n; /* iterates over all tree elements */
+ int prevlen = -1; /* last emitted length */
+ int curlen; /* length of current code */
+ int nextlen = tree[0].Len; /* length of next code */
+ int count = 0; /* repeat count of the current code */
+ int max_count = 7; /* max repeat count */
+ int min_count = 4; /* min repeat count */
+
+ /* tree[max_code+1].Len = -1; */ /* guard already set */
+ if (nextlen == 0) max_count = 138, min_count = 3;
+
+ for (n = 0; n <= max_code; n++) {
+ curlen = nextlen; nextlen = tree[n+1].Len;
+ if (++count < max_count && curlen == nextlen) {
+ continue;
+ } else if (count < min_count) {
+ do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
+
+ } else if (curlen != 0) {
+ if (curlen != prevlen) {
+ send_code(s, curlen, s->bl_tree); count--;
+ }
+ Assert(count >= 3 && count <= 6, " 3_6?");
+ send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
+
+ } else if (count <= 10) {
+ send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
+
+ } else {
+ send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
+ }
+ count = 0; prevlen = curlen;
+ if (nextlen == 0) {
+ max_count = 138, min_count = 3;
+ } else if (curlen == nextlen) {
+ max_count = 6, min_count = 3;
+ } else {
+ max_count = 7, min_count = 4;
+ }
+ }
+}
+
+/* ===========================================================================
+ * Construct the Huffman tree for the bit lengths and return the index in
+ * bl_order of the last bit length code to send.
+ */
+local int build_bl_tree(s)
+ deflate_state *s;
+{
+ int max_blindex; /* index of last bit length code of non zero freq */
+
+ /* Determine the bit length frequencies for literal and distance trees */
+ scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
+ scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
+
+ /* Build the bit length tree: */
+ build_tree(s, (tree_desc *)(&(s->bl_desc)));
+ /* opt_len now includes the length of the tree representations, except
+ * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
+ */
+
+ /* Determine the number of bit length codes to send. The pkzip format
+ * requires that at least 4 bit length codes be sent. (appnote.txt says
+ * 3 but the actual value used is 4.)
+ */
+ for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
+ if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
+ }
+ /* Update opt_len to include the bit length tree and counts */
+ s->opt_len += 3*(max_blindex+1) + 5+5+4;
+ Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
+ s->opt_len, s->static_len));
+
+ return max_blindex;
+}
+
+/* ===========================================================================
+ * Send the header for a block using dynamic Huffman trees: the counts, the
+ * lengths of the bit length codes, the literal tree and the distance tree.
+ * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
+ */
+local void send_all_trees(s, lcodes, dcodes, blcodes)
+ deflate_state *s;
+ int lcodes, dcodes, blcodes; /* number of codes for each tree */
+{
+ int rank; /* index in bl_order */
+
+ Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
+ Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
+ "too many codes");
+ Tracev((stderr, "\nbl counts: "));
+ send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
+ send_bits(s, dcodes-1, 5);
+ send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */
+ for (rank = 0; rank < blcodes; rank++) {
+ Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
+ send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
+ }
+ Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
+
+ send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
+ Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
+
+ send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
+ Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
+}
+
+/* ===========================================================================
+ * Send a stored block
+ */
+void _tr_stored_block(s, buf, stored_len, eof)
+ deflate_state *s;
+ charf *buf; /* input block */
+ ulg stored_len; /* length of input block */
+ int eof; /* true if this is the last block for a file */
+{
+ send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
+#ifdef DEBUG
+ s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
+ s->compressed_len += (stored_len + 4) << 3;
+#endif
+ copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
+}
+
+/* ===========================================================================
+ * Send one empty static block to give enough lookahead for inflate.
+ * This takes 10 bits, of which 7 may remain in the bit buffer.
+ * The current inflate code requires 9 bits of lookahead. If the
+ * last two codes for the previous block (real code plus EOB) were coded
+ * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
+ * the last real code. In this case we send two empty static blocks instead
+ * of one. (There are no problems if the previous block is stored or fixed.)
+ * To simplify the code, we assume the worst case of last real code encoded
+ * on one bit only.
+ */
+void _tr_align(s)
+ deflate_state *s;
+{
+ send_bits(s, STATIC_TREES<<1, 3);
+ send_code(s, END_BLOCK, static_ltree);
+#ifdef DEBUG
+ s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
+#endif
+ bi_flush(s);
+ /* Of the 10 bits for the empty block, we have already sent
+ * (10 - bi_valid) bits. The lookahead for the last real code (before
+ * the EOB of the previous block) was thus at least one plus the length
+ * of the EOB plus what we have just sent of the empty static block.
+ */
+ if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
+ send_bits(s, STATIC_TREES<<1, 3);
+ send_code(s, END_BLOCK, static_ltree);
+#ifdef DEBUG
+ s->compressed_len += 10L;
+#endif
+ bi_flush(s);
+ }
+ s->last_eob_len = 7;
+}
+
+/* ===========================================================================
+ * Determine the best encoding for the current block: dynamic trees, static
+ * trees or store, and output the encoded block to the zip file.
+ */
+void _tr_flush_block(s, buf, stored_len, eof)
+ deflate_state *s;
+ charf *buf; /* input block, or NULL if too old */
+ ulg stored_len; /* length of input block */
+ int eof; /* true if this is the last block for a file */
+{
+ ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
+ int max_blindex = 0; /* index of last bit length code of non zero freq */
+
+ /* Build the Huffman trees unless a stored block is forced */
+ if (s->level > 0) {
+
+ /* Check if the file is ascii or binary */
+ if (s->strm->data_type == Z_UNKNOWN) set_data_type(s);
+
+ /* Construct the literal and distance trees */
+ build_tree(s, (tree_desc *)(&(s->l_desc)));
+ Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
+ s->static_len));
+
+ build_tree(s, (tree_desc *)(&(s->d_desc)));
+ Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
+ s->static_len));
+ /* At this point, opt_len and static_len are the total bit lengths of
+ * the compressed block data, excluding the tree representations.
+ */
+
+ /* Build the bit length tree for the above two trees, and get the index
+ * in bl_order of the last bit length code to send.
+ */
+ max_blindex = build_bl_tree(s);
+
+ /* Determine the best encoding. Compute the block lengths in bytes. */
+ opt_lenb = (s->opt_len+3+7)>>3;
+ static_lenb = (s->static_len+3+7)>>3;
+
+ Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
+ opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
+ s->last_lit));
+
+ if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
+
+ } else {
+ Assert(buf != (char*)0, "lost buf");
+ opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
+ }
+
+#ifdef FORCE_STORED
+ if (buf != (char*)0) { /* force stored block */
+#else
+ if (stored_len+4 <= opt_lenb && buf != (char*)0) {
+ /* 4: two words for the lengths */
+#endif
+ /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
+ * Otherwise we can't have processed more than WSIZE input bytes since
+ * the last block flush, because compression would have been
+ * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
+ * transform a block into a stored block.
+ */
+ _tr_stored_block(s, buf, stored_len, eof);
+
+#ifdef FORCE_STATIC
+ } else if (static_lenb >= 0) { /* force static trees */
+#else
+ } else if (static_lenb == opt_lenb) {
+#endif
+ send_bits(s, (STATIC_TREES<<1)+eof, 3);
+ compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
+#ifdef DEBUG
+ s->compressed_len += 3 + s->static_len;
+#endif
+ } else {
+ send_bits(s, (DYN_TREES<<1)+eof, 3);
+ send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
+ max_blindex+1);
+ compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
+#ifdef DEBUG
+ s->compressed_len += 3 + s->opt_len;
+#endif
+ }
+ Assert (s->compressed_len == s->bits_sent, "bad compressed size");
+ /* The above check is made mod 2^32, for files larger than 512 MB
+ * and uLong implemented on 32 bits.
+ */
+ init_block(s);
+
+ if (eof) {
+ bi_windup(s);
+#ifdef DEBUG
+ s->compressed_len += 7; /* align on byte boundary */
+#endif
+ }
+ Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
+ s->compressed_len-7*eof));
+}
+
+/* ===========================================================================
+ * Save the match info and tally the frequency counts. Return true if
+ * the current block must be flushed.
+ */
+int _tr_tally (s, dist, lc)
+ deflate_state *s;
+ unsigned dist; /* distance of matched string */
+ unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
+{
+ s->d_buf[s->last_lit] = (ush)dist;
+ s->l_buf[s->last_lit++] = (uch)lc;
+ if (dist == 0) {
+ /* lc is the unmatched char */
+ s->dyn_ltree[lc].Freq++;
+ } else {
+ s->matches++;
+ /* Here, lc is the match length - MIN_MATCH */
+ dist--; /* dist = match distance - 1 */
+ Assert((ush)dist < (ush)MAX_DIST(s) &&
+ (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
+ (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
+
+ s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
+ s->dyn_dtree[d_code(dist)].Freq++;
+ }
+
+#ifdef TRUNCATE_BLOCK
+ /* Try to guess if it is profitable to stop the current block here */
+ if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
+ /* Compute an upper bound for the compressed length */
+ ulg out_length = (ulg)s->last_lit*8L;
+ ulg in_length = (ulg)((long)s->strstart - s->block_start);
+ int dcode;
+ for (dcode = 0; dcode < D_CODES; dcode++) {
+ out_length += (ulg)s->dyn_dtree[dcode].Freq *
+ (5L+extra_dbits[dcode]);
+ }
+ out_length >>= 3;
+ Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
+ s->last_lit, in_length, out_length,
+ 100L - out_length*100L/in_length));
+ if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
+ }
+#endif
+ return (s->last_lit == s->lit_bufsize-1);
+ /* We avoid equality with lit_bufsize because of wraparound at 64K
+ * on 16 bit machines and because stored blocks are restricted to
+ * 64K-1 bytes.
+ */
+}
+
+/* ===========================================================================
+ * Send the block data compressed using the given Huffman trees
+ */
+local void compress_block(s, ltree, dtree)
+ deflate_state *s;
+ ct_data *ltree; /* literal tree */
+ ct_data *dtree; /* distance tree */
+{
+ unsigned dist; /* distance of matched string */
+ int lc; /* match length or unmatched char (if dist == 0) */
+ unsigned lx = 0; /* running index in l_buf */
+ unsigned code; /* the code to send */
+ int extra; /* number of extra bits to send */
+
+ if (s->last_lit != 0) do {
+ dist = s->d_buf[lx];
+ lc = s->l_buf[lx++];
+ if (dist == 0) {
+ send_code(s, lc, ltree); /* send a literal byte */
+ Tracecv(isgraph(lc), (stderr," '%c' ", lc));
+ } else {
+ /* Here, lc is the match length - MIN_MATCH */
+ code = _length_code[lc];
+ send_code(s, code+LITERALS+1, ltree); /* send the length code */
+ extra = extra_lbits[code];
+ if (extra != 0) {
+ lc -= base_length[code];
+ send_bits(s, lc, extra); /* send the extra length bits */
+ }
+ dist--; /* dist is now the match distance - 1 */
+ code = d_code(dist);
+ Assert (code < D_CODES, "bad d_code");
+
+ send_code(s, code, dtree); /* send the distance code */
+ extra = extra_dbits[code];
+ if (extra != 0) {
+ dist -= base_dist[code];
+ send_bits(s, dist, extra); /* send the extra distance bits */
+ }
+ } /* literal or match pair ? */
+
+ /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
+ Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
+ "pendingBuf overflow");
+
+ } while (lx < s->last_lit);
+
+ send_code(s, END_BLOCK, ltree);
+ s->last_eob_len = ltree[END_BLOCK].Len;
+}
+
+/* ===========================================================================
+ * Set the data type to ASCII or BINARY, using a crude approximation:
+ * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise.
+ * IN assertion: the fields freq of dyn_ltree are set and the total of all
+ * frequencies does not exceed 64K (to fit in an int on 16 bit machines).
+ */
+local void set_data_type(s)
+ deflate_state *s;
+{
+ int n = 0;
+ unsigned ascii_freq = 0;
+ unsigned bin_freq = 0;
+ while (n < 7) bin_freq += s->dyn_ltree[n++].Freq;
+ while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq;
+ while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq;
+ s->strm->data_type = bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII;
+}
+
+/* ===========================================================================
+ * Reverse the first len bits of a code, using straightforward code (a faster
+ * method would use a table)
+ * IN assertion: 1 <= len <= 15
+ */
+local unsigned bi_reverse(code, len)
+ unsigned code; /* the value to invert */
+ int len; /* its bit length */
+{
+ register unsigned res = 0;
+ do {
+ res |= code & 1;
+ code >>= 1, res <<= 1;
+ } while (--len > 0);
+ return res >> 1;
+}
+
+/* ===========================================================================
+ * Flush the bit buffer, keeping at most 7 bits in it.
+ */
+local void bi_flush(s)
+ deflate_state *s;
+{
+ if (s->bi_valid == 16) {
+ put_short(s, s->bi_buf);
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+ } else if (s->bi_valid >= 8) {
+ put_byte(s, (Byte)s->bi_buf);
+ s->bi_buf >>= 8;
+ s->bi_valid -= 8;
+ }
+}
+
+/* ===========================================================================
+ * Flush the bit buffer and align the output on a byte boundary
+ */
+local void bi_windup(s)
+ deflate_state *s;
+{
+ if (s->bi_valid > 8) {
+ put_short(s, s->bi_buf);
+ } else if (s->bi_valid > 0) {
+ put_byte(s, (Byte)s->bi_buf);
+ }
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+#ifdef DEBUG
+ s->bits_sent = (s->bits_sent+7) & ~7;
+#endif
+}
+
+/* ===========================================================================
+ * Copy a stored block, storing first the length and its
+ * one's complement if requested.
+ */
+local void copy_block(s, buf, len, header)
+ deflate_state *s;
+ charf *buf; /* the input data */
+ unsigned len; /* its length */
+ int header; /* true if block header must be written */
+{
+ bi_windup(s); /* align on byte boundary */
+ s->last_eob_len = 8; /* enough lookahead for inflate */
+
+ if (header) {
+ put_short(s, (ush)len);
+ put_short(s, (ush)~len);
+#ifdef DEBUG
+ s->bits_sent += 2*16;
+#endif
+ }
+#ifdef DEBUG
+ s->bits_sent += (ulg)len<<3;
+#endif
+ while (len--) {
+ put_byte(s, *buf++);
+ }
+}
diff --git a/src/zlib/trees.h b/src/zlib/trees.h
new file mode 100644
index 000000000..72facf900
--- /dev/null
+++ b/src/zlib/trees.h
@@ -0,0 +1,128 @@
+/* header created automatically with -DGEN_TREES_H */
+
+local const ct_data static_ltree[L_CODES+2] = {
+{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}},
+{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}},
+{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}},
+{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}},
+{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}},
+{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}},
+{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}},
+{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}},
+{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}},
+{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}},
+{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}},
+{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}},
+{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}},
+{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}},
+{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}},
+{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}},
+{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}},
+{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}},
+{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}},
+{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}},
+{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}},
+{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}},
+{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}},
+{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}},
+{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}},
+{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}},
+{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}},
+{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}},
+{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}},
+{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}},
+{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}},
+{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}},
+{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}},
+{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}},
+{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}},
+{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}},
+{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}},
+{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}},
+{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}},
+{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}},
+{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}},
+{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}},
+{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}},
+{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}},
+{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}},
+{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}},
+{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}},
+{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}},
+{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}},
+{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}},
+{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}},
+{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}},
+{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}},
+{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}},
+{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}},
+{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}},
+{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}},
+{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}}
+};
+
+local const ct_data static_dtree[D_CODES] = {
+{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
+{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
+{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
+{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
+{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
+{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
+};
+
+const uch _dist_code[DIST_CODE_LEN] = {
+ 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
+ 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
+10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
+13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17,
+18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
+23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
+};
+
+const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12,
+13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
+17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
+19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
+22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
+23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
+};
+
+local const int base_length[LENGTH_CODES] = {
+0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
+64, 80, 96, 112, 128, 160, 192, 224, 0
+};
+
+local const int base_dist[D_CODES] = {
+ 0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
+ 32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
+ 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576
+};
+
diff --git a/src/zlib/zconf.h b/src/zlib/zconf.h
new file mode 100644
index 000000000..3c21403fc
--- /dev/null
+++ b/src/zlib/zconf.h
@@ -0,0 +1,326 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2004 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 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__)) && !defined(WIN32)
+# define WIN32
+#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.h b/src/zlib/zlib.h
new file mode 100644
index 000000000..b4ddd3439
--- /dev/null
+++ b/src/zlib/zlib.h
@@ -0,0 +1,1200 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.2.2, October 3rd, 2004
+
+ Copyright (C) 1995-2004 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.2"
+#define ZLIB_VERNUM 0x1220
+
+/*
+ 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: ascii or binary */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ 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_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_ASCII 1
+#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.
+
+ 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
+ the 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 data_type if it can make a good guess about
+ the input data type (Z_ASCII or Z_BINARY). 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 get 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.
+
+ 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.
+
+ 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 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 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 negative
+ memLevel). 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 this call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the adler32 value returned by this call of
+ inflate. The compressor and decompressor must use exactly the same
+ dictionary (see deflateSetDictionary).
+
+ 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 inflateBackInit OF((z_stream FAR *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_stream FAR *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_stream FAR *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 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 crc32 OF((uLong crc, const Bytef *buf, uInt len));
+/*
+ Update a running crc with the bytes buf[0..len-1] and return the updated
+ crc. If buf is NULL, this function returns the required initial value
+ 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();
+*/
+
+
+ /* 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_stream FAR *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/src/zlib/zutil.c b/src/zlib/zutil.c
new file mode 100644
index 000000000..0ef4f99f5
--- /dev/null
+++ b/src/zlib/zutil.c
@@ -0,0 +1,319 @@
+/* zutil.c -- target dependent utility functions for the compression library
+ * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#include "zutil.h"
+
+#ifndef NO_DUMMY_DECL
+struct internal_state {int dummy;}; /* for buggy compilers */
+#endif
+
+#ifndef STDC
+extern void exit OF((int));
+#endif
+
+const char * const z_errmsg[10] = {
+"need dictionary", /* Z_NEED_DICT 2 */
+"stream end", /* Z_STREAM_END 1 */
+"", /* Z_OK 0 */
+"file error", /* Z_ERRNO (-1) */
+"stream error", /* Z_STREAM_ERROR (-2) */
+"data error", /* Z_DATA_ERROR (-3) */
+"insufficient memory", /* Z_MEM_ERROR (-4) */
+"buffer error", /* Z_BUF_ERROR (-5) */
+"incompatible version",/* Z_VERSION_ERROR (-6) */
+""};
+
+
+const char * ZEXPORT zlibVersion()
+{
+ return ZLIB_VERSION;
+}
+
+uLong ZEXPORT zlibCompileFlags()
+{
+ uLong flags;
+
+ flags = 0;
+ switch (sizeof(uInt)) {
+ case 2: break;
+ case 4: flags += 1; break;
+ case 8: flags += 2; break;
+ default: flags += 3;
+ }
+ switch (sizeof(uLong)) {
+ case 2: break;
+ case 4: flags += 1 << 2; break;
+ case 8: flags += 2 << 2; break;
+ default: flags += 3 << 2;
+ }
+ switch (sizeof(voidpf)) {
+ case 2: break;
+ case 4: flags += 1 << 4; break;
+ case 8: flags += 2 << 4; break;
+ default: flags += 3 << 4;
+ }
+ switch (sizeof(z_off_t)) {
+ case 2: break;
+ case 4: flags += 1 << 6; break;
+ case 8: flags += 2 << 6; break;
+ default: flags += 3 << 6;
+ }
+#ifdef DEBUG
+ flags += 1 << 8;
+#endif
+#if defined(ASMV) || defined(ASMINF)
+ flags += 1 << 9;
+#endif
+#ifdef ZLIB_WINAPI
+ flags += 1 << 10;
+#endif
+#ifdef BUILDFIXED
+ flags += 1 << 12;
+#endif
+#ifdef DYNAMIC_CRC_TABLE
+ flags += 1 << 13;
+#endif
+#ifdef NO_GZCOMPRESS
+ flags += 1 << 16;
+#endif
+#ifdef NO_GZIP
+ flags += 1 << 17;
+#endif
+#ifdef PKZIP_BUG_WORKAROUND
+ flags += 1 << 20;
+#endif
+#ifdef FASTEST
+ flags += 1 << 21;
+#endif
+#ifdef STDC
+# ifdef NO_vsnprintf
+ flags += 1 << 25;
+# ifdef HAS_vsprintf_void
+ flags += 1 << 26;
+# endif
+# else
+# ifdef HAS_vsnprintf_void
+ flags += 1 << 26;
+# endif
+# endif
+#else
+ flags += 1 << 24;
+# ifdef NO_snprintf
+ flags += 1 << 25;
+# ifdef HAS_sprintf_void
+ flags += 1 << 26;
+# endif
+# else
+# ifdef HAS_snprintf_void
+ flags += 1 << 26;
+# endif
+# endif
+#endif
+ return flags;
+}
+
+#ifdef DEBUG
+
+# ifndef verbose
+# define verbose 0
+# endif
+int z_verbose = verbose;
+
+void z_error (m)
+ char *m;
+{
+ fprintf(stderr, "%s\n", m);
+ exit(1);
+}
+#endif
+
+/* exported to allow conversion of error code to string for compress() and
+ * uncompress()
+ */
+const char * ZEXPORT zError(err)
+ int err;
+{
+ return ERR_MSG(err);
+}
+
+#if defined(_WIN32_WCE)
+ /* does not exist on WCE */
+ int errno = 0;
+#endif
+
+#ifndef HAVE_MEMCPY
+
+void zmemcpy(dest, source, len)
+ Bytef* dest;
+ const Bytef* source;
+ uInt len;
+{
+ if (len == 0) return;
+ do {
+ *dest++ = *source++; /* ??? to be unrolled */
+ } while (--len != 0);
+}
+
+int zmemcmp(s1, s2, len)
+ const Bytef* s1;
+ const Bytef* s2;
+ uInt len;
+{
+ uInt j;
+
+ for (j = 0; j < len; j++) {
+ if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
+ }
+ return 0;
+}
+
+void zmemzero(dest, len)
+ Bytef* dest;
+ uInt len;
+{
+ if (len == 0) return;
+ do {
+ *dest++ = 0; /* ??? to be unrolled */
+ } while (--len != 0);
+}
+#endif
+
+
+#ifdef SYS16BIT
+
+#ifdef __TURBOC__
+/* Turbo C in 16-bit mode */
+
+# define MY_ZCALLOC
+
+/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
+ * and farmalloc(64K) returns a pointer with an offset of 8, so we
+ * must fix the pointer. Warning: the pointer must be put back to its
+ * original form in order to free it, use zcfree().
+ */
+
+#define MAX_PTR 10
+/* 10*64K = 640K */
+
+local int next_ptr = 0;
+
+typedef struct ptr_table_s {
+ voidpf org_ptr;
+ voidpf new_ptr;
+} ptr_table;
+
+local ptr_table table[MAX_PTR];
+/* This table is used to remember the original form of pointers
+ * to large buffers (64K). Such pointers are normalized with a zero offset.
+ * Since MSDOS is not a preemptive multitasking OS, this table is not
+ * protected from concurrent access. This hack doesn't work anyway on
+ * a protected system like OS/2. Use Microsoft C instead.
+ */
+
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+{
+ voidpf buf = opaque; /* just to make some compilers happy */
+ ulg bsize = (ulg)items*size;
+
+ /* If we allocate less than 65520 bytes, we assume that farmalloc
+ * will return a usable pointer which doesn't have to be normalized.
+ */
+ if (bsize < 65520L) {
+ buf = farmalloc(bsize);
+ if (*(ush*)&buf != 0) return buf;
+ } else {
+ buf = farmalloc(bsize + 16L);
+ }
+ if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
+ table[next_ptr].org_ptr = buf;
+
+ /* Normalize the pointer to seg:0 */
+ *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
+ *(ush*)&buf = 0;
+ table[next_ptr++].new_ptr = buf;
+ return buf;
+}
+
+void zcfree (voidpf opaque, voidpf ptr)
+{
+ int n;
+ if (*(ush*)&ptr != 0) { /* object < 64K */
+ farfree(ptr);
+ return;
+ }
+ /* Find the original pointer */
+ for (n = 0; n < next_ptr; n++) {
+ if (ptr != table[n].new_ptr) continue;
+
+ farfree(table[n].org_ptr);
+ while (++n < next_ptr) {
+ table[n-1] = table[n];
+ }
+ next_ptr--;
+ return;
+ }
+ ptr = opaque; /* just to make some compilers happy */
+ Assert(0, "zcfree: ptr not found");
+}
+
+#endif /* __TURBOC__ */
+
+
+#ifdef M_I86
+/* Microsoft C in 16-bit mode */
+
+# define MY_ZCALLOC
+
+#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
+# define _halloc halloc
+# define _hfree hfree
+#endif
+
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+{
+ if (opaque) opaque = 0; /* to make compiler happy */
+ return _halloc((long)items, size);
+}
+
+void zcfree (voidpf opaque, voidpf ptr)
+{
+ if (opaque) opaque = 0; /* to make compiler happy */
+ _hfree(ptr);
+}
+
+#endif /* M_I86 */
+
+#endif /* SYS16BIT */
+
+
+#ifndef MY_ZCALLOC /* Any system without a special alloc function */
+
+#ifndef STDC
+extern voidp malloc OF((uInt size));
+extern voidp calloc OF((uInt items, uInt size));
+extern void free OF((voidpf ptr));
+#endif
+
+voidpf zcalloc (opaque, items, size)
+ voidpf opaque;
+ unsigned items;
+ unsigned size;
+{
+ if (opaque) items += size - size; /* make compiler happy */
+ return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
+ (voidpf)calloc(items, size);
+}
+
+void zcfree (opaque, ptr)
+ voidpf opaque;
+ voidpf ptr;
+{
+ free(ptr);
+ if (opaque) return; /* make compiler happy */
+}
+
+#endif /* MY_ZCALLOC */
diff --git a/src/zlib/zutil.h b/src/zlib/zutil.h
new file mode 100644
index 000000000..7b42edcaa
--- /dev/null
+++ b/src/zlib/zutil.h
@@ -0,0 +1,263 @@
+/* zutil.h -- internal interface and configuration of the compression library
+ * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZUTIL_H
+#define ZUTIL_H
+
+#define ZLIB_INTERNAL
+#include "zlib.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 */
+
+typedef unsigned char uch;
+typedef uch FAR uchf;
+typedef unsigned short ush;
+typedef ush FAR ushf;
+typedef unsigned long ulg;
+
+extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+/* (size given to avoid silly warnings with Visual C++) */
+
+#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
+
+#define ERR_RETURN(strm,err) \
+ return (strm->msg = (char*)ERR_MSG(err), (err))
+/* To be used only when the state is known to be valid */
+
+ /* common constants */
+
+#ifndef DEF_WBITS
+# define DEF_WBITS MAX_WBITS
+#endif
+/* default windowBits for decompression. MAX_WBITS is for compression only */
+
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+/* default memLevel */
+
+#define STORED_BLOCK 0
+#define STATIC_TREES 1
+#define DYN_TREES 2
+/* The three kinds of block type */
+
+#define MIN_MATCH 3
+#define MAX_MATCH 258
+/* The minimum and maximum match lengths */
+
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+
+ /* target dependencies */
+
+#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
+# define OS_CODE 0x00
+# if defined(__TURBOC__) || defined(__BORLANDC__)
+# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+ /* Allow compilation with ANSI keywords only enabled */
+ void _Cdecl farfree( void *block );
+ void *_Cdecl farmalloc( unsigned long nbytes );
+# else
+# include <alloc.h>
+# endif
+# else /* MSC or DJGPP */
+# include <malloc.h>
+# endif
+#endif
+
+#ifdef AMIGA
+# define OS_CODE 0x01
+#endif
+
+#if defined(VAXC) || defined(VMS)
+# define OS_CODE 0x02
+# define F_OPEN(name, mode) \
+ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
+#endif
+
+#if defined(ATARI) || defined(atarist)
+# define OS_CODE 0x05
+#endif
+
+#ifdef OS2
+# define OS_CODE 0x06
+#endif
+
+#if defined(MACOS) || defined(TARGET_OS_MAC)
+# define OS_CODE 0x07
+# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+# include <unix.h> /* for fdopen */
+# else
+# ifndef fdopen
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# endif
+# endif
+#endif
+
+#ifdef TOPS20
+# define OS_CODE 0x0a
+#endif
+
+#ifdef WIN32
+# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
+# define OS_CODE 0x0b
+# endif
+#endif
+
+#ifdef __50SERIES /* Prime/PRIMOS */
+# define OS_CODE 0x0f
+#endif
+
+#if defined(_BEOS_) || defined(RISCOS)
+# define fdopen(fd,mode) NULL /* No fdopen() */
+#endif
+
+#if (defined(_MSC_VER) && (_MSC_VER > 600))
+# if defined(_WIN32_WCE)
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# ifndef _PTRDIFF_T_DEFINED
+ typedef int ptrdiff_t;
+# define _PTRDIFF_T_DEFINED
+# endif
+# else
+# define fdopen(fd,type) _fdopen(fd,type)
+# endif
+#endif
+
+ /* common defaults */
+
+#ifndef OS_CODE
+# define OS_CODE 0x03 /* assume Unix */
+#endif
+
+#ifndef F_OPEN
+# define F_OPEN(name, mode) fopen((name), (mode))
+#endif
+
+ /* functions */
+
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#if defined(__CYGWIN__)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#ifndef HAVE_VSNPRINTF
+# ifdef MSDOS
+ /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
+ but for now we just assume it doesn't. */
+# define NO_vsnprintf
+# endif
+# ifdef __TURBOC__
+# define NO_vsnprintf
+# endif
+# ifdef WIN32
+ /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
+# if !defined(vsnprintf) && !defined(NO_vsnprintf)
+# define vsnprintf _vsnprintf
+# endif
+# endif
+# ifdef __SASC
+# define NO_vsnprintf
+# endif
+#endif
+#ifdef VMS
+# define NO_vsnprintf
+#endif
+
+#ifdef HAVE_STRERROR
+# ifndef VMS
+ extern char *strerror OF((int));
+# endif
+# define zstrerror(errnum) strerror(errnum)
+#else
+# define zstrerror(errnum) ""
+#endif
+
+#if defined(pyr)
+# define NO_MEMCPY
+#endif
+#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
+ /* Use our own functions for small and medium model with MSC <= 5.0.
+ * You may have to use the same strategy for Borland C (untested).
+ * The __SC__ check is for Symantec.
+ */
+# define NO_MEMCPY
+#endif
+#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
+# define HAVE_MEMCPY
+#endif
+#ifdef HAVE_MEMCPY
+# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
+# define zmemcpy _fmemcpy
+# define zmemcmp _fmemcmp
+# define zmemzero(dest, len) _fmemset(dest, 0, len)
+# else
+# define zmemcpy memcpy
+# define zmemcmp memcmp
+# define zmemzero(dest, len) memset(dest, 0, len)
+# endif
+#else
+ extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+ extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+ extern void zmemzero OF((Bytef* dest, uInt len));
+#endif
+
+/* Diagnostic functions */
+#ifdef DEBUG
+# include <stdio.h>
+ extern int z_verbose;
+ extern void z_error OF((char *m));
+# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
+# define Trace(x) {if (z_verbose>=0) fprintf x ;}
+# define Tracev(x) {if (z_verbose>0) fprintf x ;}
+# define Tracevv(x) {if (z_verbose>1) fprintf x ;}
+# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
+# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
+#else
+# define Assert(cond,msg)
+# define Trace(x)
+# define Tracev(x)
+# define Tracevv(x)
+# define Tracec(c,x)
+# define Tracecv(c,x)
+#endif
+
+
+voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
+void zcfree OF((voidpf opaque, voidpf ptr));
+
+#define ZALLOC(strm, items, size) \
+ (*((strm)->zalloc))((strm)->opaque, (items), (size))
+#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
+#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+
+#endif /* ZUTIL_H */
diff --git a/vcproj/char-server_sql.vcproj b/vcproj/char-server_sql.vcproj
new file mode 100644
index 000000000..f2ba8781d
--- /dev/null
+++ b/vcproj/char-server_sql.vcproj
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="char-server_sql"
+ ProjectGUID="{D356871D-58E1-450B-967A-E4E9646175AF}"
+ 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;C:\Program Files\MySQL\MySQL Server 4.1\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ OutputFile="../char-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="C:\Program Files\MySQL\MySQL Server 4.1\lib\debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/eAthena.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">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\src\common;;src\zlib;C:\Program Files\MySQL\MySQL Server 4.1\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ AdditionalLibraryDirectories="C:\Program Files\MySQL\MySQL Server 4.1\lib\debug"
+ OutputFile="../char-server_sql.exe"
+ LinkIncremental="1"
+ 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\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_storage.c">
+ </File>
+ <File
+ RelativePath="..\src\char\inter.c">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.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\common\utils.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj/char-server_txt.vcproj b/vcproj/char-server_txt.vcproj
new file mode 100644
index 000000000..26319cd9e
--- /dev/null
+++ b/vcproj/char-server_txt.vcproj
@@ -0,0 +1,182 @@
+<?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"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib"
+ OutputFile="..\char-server.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/eAthena.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">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\src\common;;src\zlib"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB"
+
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib"
+ OutputFile="..\char-server.exe"
+ LinkIncremental="1"
+ 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\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_storage.c">
+ </File>
+ <File
+ RelativePath="..\src\char\inter.c">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.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\common\utils.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj/login-server_sql.vcproj b/vcproj/login-server_sql.vcproj
new file mode 100644
index 000000000..dcf4fc108
--- /dev/null
+++ b/vcproj/login-server_sql.vcproj
@@ -0,0 +1,170 @@
+<?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\map;src\zlib;C:\Program Files\MySQL\MySQL Server 4.1\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ OutputFile="..\login-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="C:\Program Files\MySQL\MySQL Server 4.1\lib\debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/eAthena.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">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="src\common;src\map;src\zlib;C:\Program Files\MySQL\MySQL Server 4.1\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalLibraryDirectories="C:\Program Files\MySQL\MySQL Server 4.1\lib\debug"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib" OutputFile="..\login-server_sql.exe"
+ LinkIncremental="1"
+ 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\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\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\common\utils.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj/login-server_txt.vcproj b/vcproj/login-server_txt.vcproj
new file mode 100644
index 000000000..84766b3af
--- /dev/null
+++ b/vcproj/login-server_txt.vcproj
@@ -0,0 +1,169 @@
+<?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\map;src\zlib"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib"
+ OutputFile="..\login-server.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/eAthena.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">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="src\common;src\map;src\zlib"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib"
+ OutputFile="..\login-server.exe"
+ LinkIncremental="1"
+ 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\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\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\common\utils.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj/map-server_sql.vcproj b/vcproj/map-server_sql.vcproj
new file mode 100644
index 000000000..f1dc809ce
--- /dev/null
+++ b/vcproj/map-server_sql.vcproj
@@ -0,0 +1,382 @@
+<?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\map;..\src\zlib;C:\Program Files\MySQL\MySQL Server 4.1\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ OutputFile="..\map-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="C:\Program Files\MySQL\MySQL Server 4.1\lib\debug"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="..\map-server_sql.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">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\src\common;..\src\map;..\src\zlib;C:\Program Files\MySQL\MySQL Server 4.1\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ AdditionalLibraryDirectories="C:\Program Files\MySQL\MySQL Server 4.1\lib\debug"
+ OutputFile="..\map-server_sql.exe"
+ LinkIncremental="1"
+ 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\zlib\adler32.c">
+ </File>
+ <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\chat.c">
+ </File>
+ <File
+ RelativePath="..\src\map\chrif.c">
+ </File>
+ <File
+ RelativePath="..\src\map\clif.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\compress.c">
+ </File>
+ <File
+ RelativePath="..\src\common\core.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\crc32.c">
+ </File>
+ <File
+ RelativePath="..\src\common\db.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\deflate.c">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c">
+ </File>
+ <File
+ RelativePath="..\src\map\guild.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\inffast.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\inflate.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\inftrees.c">
+ </File>
+ <File
+ RelativePath="..\src\map\intif.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\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\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\trees.c">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c">
+ </File>
+ <File
+ RelativePath="..\src\map\vending.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\zutil.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath="..\src\map\atcommand.h">
+ </File>
+ <File
+ RelativePath="..\src\map\battle.h">
+ </File>
+ <File
+ RelativePath="..\src\common\buffer.h">
+ </File>
+ <File
+ RelativePath="..\src\map\charcommand.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\common\db.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\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\pet.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>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj/map-server_txt.vcproj b/vcproj/map-server_txt.vcproj
new file mode 100644
index 000000000..aa8a75578
--- /dev/null
+++ b/vcproj/map-server_txt.vcproj
@@ -0,0 +1,381 @@
+<?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\map;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB"
+ MinimalRebuild="TRUE"
+ ExceptionHandling="FALSE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="WSOCK32.lib"
+ OutputFile="..\map-server.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/eAthena.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">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\src\common;..\src\map;..\src\zlib"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib"
+ OutputFile="..\map-server.exe"
+ LinkIncremental="1"
+ 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\zlib\adler32.c">
+ </File>
+ <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\chat.c">
+ </File>
+ <File
+ RelativePath="..\src\map\chrif.c">
+ </File>
+ <File
+ RelativePath="..\src\map\clif.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\compress.c">
+ </File>
+ <File
+ RelativePath="..\src\common\core.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\crc32.c">
+ </File>
+ <File
+ RelativePath="..\src\common\db.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\deflate.c">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c">
+ </File>
+ <File
+ RelativePath="..\src\map\guild.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\inffast.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\inflate.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\inftrees.c">
+ </File>
+ <File
+ RelativePath="..\src\map\intif.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\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\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\trees.c">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c">
+ </File>
+ <File
+ RelativePath="..\src\map\vending.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\zutil.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath="..\src\map\atcommand.h">
+ </File>
+ <File
+ RelativePath="..\src\map\battle.h">
+ </File>
+ <File
+ RelativePath="..\src\common\buffer.h">
+ </File>
+ <File
+ RelativePath="..\src\map\charcommand.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\common\db.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\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\pet.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>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/webserver/Makefile b/webserver/Makefile
deleted file mode 100644
index 065c1ffc8..000000000
--- a/webserver/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-cc = gcc
-
-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/webserver/main.c b/webserver/main.c
deleted file mode 100644
index 59362558e..000000000
--- a/webserver/main.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/***************************************************************************
- 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;
-}