From c2ccb14ffff0e45398365e19dfd2874307ddb943 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 23 Oct 2022 23:45:19 -0300 Subject: Initial commit --- .gitignore | 89 + Rules/castle_indoor/rule_castle_001.tmx | 176 ++ Rules/castle_indoor/rule_castle_002.tmx | 77 + Rules/castle_indoor/rule_castle_003.tmx | 68 + Rules/castle_indoor/rule_castle_009.tmx | 106 + Rules/castle_indoor/rule_castle_010.tmx | 113 ++ Rules/castle_indoor/rule_castle_indoor.txt | 23 + Rules/cave/rule_cave.txt | 41 + Rules/cave/rule_cave_001.tmx | 169 ++ Rules/cave/rule_cave_002.tmx | 75 + Rules/cave/rule_cave_003.tmx | 47 + Rules/cave/rule_cave_004.tmx | 70 + Rules/cave/rule_cave_005.tmx | 70 + Rules/cave/rule_cave_006.tmx | 135 ++ Rules/cave/rule_cave_007.tmx | 147 ++ Rules/cave/rule_cave_008.tmx | 144 ++ Rules/cave/rule_cave_009.tmx | 75 + Rules/cave/rule_cave_010.tmx | 92 + Rules/cave/rule_cave_050.tmx | 129 ++ Rules/cave/rule_cave_100.tmx | 53 + Rules/cave/rule_cave_110.tmx | 47 + Rules/caverules.txt | 6 + Rules/desertcliffs/rule_cave.txt | 32 + Rules/desertcliffs/rule_cave_001.tmx | 166 ++ Rules/desertcliffs/rule_cave_002.tmx | 75 + Rules/desertcliffs/rule_cave_003.tmx | 47 + Rules/desertcliffs/rule_cave_004.tmx | 93 + Rules/desertcliffs/rule_cave_005.tmx | 70 + Rules/desertcliffs/rule_cave_006.tmx | 135 ++ Rules/desertcliffs/rule_cave_007.tmx | 147 ++ Rules/desertcliffs/rule_cave_008.tmx | 144 ++ Rules/desertcliffs/rule_cave_03.tmx | 85 + Rules/desertcliffs/rule_cave_050.tmx | 39 + Rules/desertcliffs/rule_cave_100.tmx | 33 + Rules/icecave/rule_icecave.txt | 34 + Rules/icecave/rule_icecave_001.tmx | 54 + Rules/icecave/rule_icecave_002.tmx | 45 + Rules/icecave/rule_icecave_003.tmx | 35 + Rules/icecave/rule_icecave_004.tmx | 40 + Rules/icecave/rule_icecave_005.tmx | 40 + Rules/icecave/rule_icecave_006.tmx | 40 + Rules/icecave/rule_icecave_007.tmx | 40 + Rules/icecave/rule_icecave_009.tmx | 55 + Rules/icecave/rule_icecave_010.tmx | 55 + Rules/icecave/rule_icecave_020.tmx | 40 + Rules/icecave/rule_icecave_100.tmx | 40 + Rules/rule_cave.tmx | 375 ++++ Rules/rules.txt | 17 + Rules/tilesets/set_castle_indoor.png | Bin 0 -> 36121 bytes Rules/tilesets/set_cave.png | Bin 0 -> 27678 bytes Rules/tilesets/set_desertcliff.png | Bin 0 -> 28082 bytes Rules/tilesets/set_hlw.png | Bin 0 -> 13104 bytes Rules/tilesets/set_icecave.png | Bin 0 -> 4742 bytes Rules/tilesets/set_icemountain.png | Bin 0 -> 1632 bytes Rules/tilesets/set_rules.png | Bin 0 -> 563 bytes Rules/tilesets/set_woodland.png | Bin 0 -> 4636 bytes adler32/Makefile | 16 + adler32/adler32 | Bin 0 -> 9216 bytes adler32/adler32.c | 68 + client/aurora.py | 37 + client/dailylogin.py | 86 + client/magicacademy.py | 60 + client/minimap-dyecmd.py | 17 + client/minimap-dyecmd.sh | 0 client/minimap-override/none.png | Bin 0 -> 280 bytes client/minimap-render.py | 171 ++ client/skills.py | 137 ++ client/tmxrasterizer | Bin 0 -> 1525440 bytes client/weapons.py | 89 + hercules/.gitignore | 12 + hercules/code/__init__.py | 0 hercules/code/clienttoserver/__init__.py | 0 hercules/code/clienttoserver/maps.py | 190 ++ hercules/code/configutils.py | 51 + hercules/code/fileutils.py | 86 + hercules/code/server/__init__.py | 0 hercules/code/server/account.py | 63 + hercules/code/server/accreg.py | 52 + hercules/code/server/db/__init__.py | 0 hercules/code/server/db/char.py | 187 ++ hercules/code/server/db/charregnumdb.py | 34 + hercules/code/server/db/inventory.py | 44 + hercules/code/server/db/skill.py | 31 + hercules/code/server/dbitem.py | 7 + hercules/code/server/dbskill.py | 7 + hercules/code/server/dbuser.py | 7 + hercules/code/server/evol/__init__.py | 0 hercules/code/server/evol/athena.py | 207 ++ hercules/code/server/evol/consts.py | 49 + hercules/code/server/evol/itemdb.py | 104 + hercules/code/server/evol/main.py | 43 + hercules/code/server/evol/mobdb.py | 89 + hercules/code/server/evol/mobskilldb.py | 50 + hercules/code/server/evol/npcs.py | 281 +++ hercules/code/server/maps.py | 43 + hercules/code/server/party.py | 80 + hercules/code/server/questsdb.py | 33 + hercules/code/server/storage.py | 81 + hercules/code/server/tmw/__init__.py | 0 hercules/code/server/tmw/athena.py | 207 ++ hercules/code/server/tmw/consts.py | 129 ++ hercules/code/server/tmw/itemdb.py | 264 +++ hercules/code/server/tmw/main.py | 49 + hercules/code/server/tmw/mobdb.py | 170 ++ hercules/code/server/tmw/mobskilldb.py | 55 + hercules/code/server/tmw/npcs.py | 878 ++++++++ hercules/code/server/utils.py | 12 + hercules/code/servertoclient/__init__.py | 0 hercules/code/servertoclient/homunculuses.py | 31 + hercules/code/servertoclient/items.py | 138 ++ hercules/code/servertoclient/luas.py | 51 + hercules/code/servertoclient/maps.py | 48 + hercules/code/servertoclient/mercenaries.py | 31 + hercules/code/servertoclient/monsters.py | 43 + hercules/code/servertoclient/npcs.py | 29 + hercules/code/servertoclient/pets.py | 31 + hercules/code/servertoclient/quests.py | 39 + hercules/code/servertoclient/skills.py | 33 + hercules/code/servertoclient/sprites.py | 467 +++++ hercules/code/serverutils.py | 12 + hercules/code/stringutils.py | 62 + hercules/code/tileutils.py | 48 + hercules/convert_mapcache_to_tmx.py | 24 + hercules/convert_tmx_to_mapcache.py | 9 + hercules/extract_mapcache.py | 24 + hercules/import_newdb.sh | 24 + hercules/list_mapcache.py | 24 + hercules/templates/acc_reg_num_db.sql | 11 + hercules/templates/char.sql | 72 + hercules/templates/char_reg_num_db.sql | 11 + hercules/templates/collision.png | Bin 0 -> 275 bytes hercules/templates/constants.tpl | 45 + hercules/templates/group.tpl | 11 + hercules/templates/homunculus.tpl | 3 + hercules/templates/homunculuses.xml | 6 + hercules/templates/inventory.sql | 23 + hercules/templates/item.tpl | 7 + hercules/templates/item_db.tpl | 63 + hercules/templates/items.xml | 148 ++ hercules/templates/login.sql | 25 + hercules/templates/mercenaries.xml | 6 + hercules/templates/mercenary.tpl | 3 + hercules/templates/mob_db.tpl | 101 + hercules/templates/mob_skill_db.tpl | 56 + hercules/templates/monster.tpl | 3 + hercules/templates/monsters.xml | 11 + hercules/templates/npc.tpl | 3 + hercules/templates/npcs.xml | 11 + hercules/templates/party.sql | 12 + hercules/templates/pet.tpl | 3 + hercules/templates/pets.xml | 6 + hercules/templates/quest.tpl | 5 + hercules/templates/quest_db.tpl | 5 + hercules/templates/quests.xml | 6 + hercules/templates/skill.sql | 10 + hercules/templates/skill.tpl | 1 + hercules/templates/skills.xml | 15 + hercules/templates/sprite.xml | 21 + hercules/templates/storage.sql | 22 + hercules/templates/template.tmx | 25 + hercules/templates/tileset.png | Bin 0 -> 3550 bytes hercules/tmx_converter.py | 659 ++++++ herculeswrapper/char.sh | 7 + herculeswrapper/herc-map-wrapper-config.example | 77 + herculeswrapper/include.sh | 56 + herculeswrapper/login.sh | 7 + herculeswrapper/map.sh | 52 + imagescheck/icccheck.sh | 5 + imagescheck/icccheckfile.sh | 9 + licensecheck/checkfile.sh | 12 + licensecheck/clientdata.sh | 9 + licensecheck/serverdata.py | 71 + localserver/.gitignore | 1 + localserver/README | 14 + localserver/applicator.py | 45 + localserver/build.sh | 8 + localserver/buildasan.sh | 6 + localserver/checktime.sh | 9 + localserver/clean.sh | 6 + localserver/conf/battle.conf | 32 + localserver/conf/char-server.conf | 31 + localserver/conf/constants.conf | 30 + localserver/conf/inter-server.conf | 32 + localserver/conf/login-server.conf | 32 + localserver/conf/logs.conf | 32 + localserver/conf/map-server.conf | 32 + localserver/conf/msg_conf.txt | 0 localserver/conf/ports.conf | 8 + localserver/conf/script.conf | 32 + localserver/conf/socket.conf | 32 + localserver/conf/sql_connection.conf | 52 + localserver/givegm.sh | 8 + localserver/initdb.sh | 26 + localserver/installconfigs.sh | 20 + localserver/npc/006-10_blackbox.txt | 12 + localserver/npc/015-8_blackbox.txt | 27 + localserver/npc/017-1_stranger_blackbox.txt | 40 + localserver/npc/018-7-1_demure_blackbox.txt | 12 + localserver/npc/023-4_blackbox.txt | 36 + localserver/npc/025-2-4_aegis_blackbox.txt | 33 + localserver/npc/botcheck_blackbox.txt | 35 + localserver/npc/easteregg_blackbox.txt | 16 + localserver/npc/magic_blackbox.txt | 13 + localserver/reapply.patch3 | 5 + localserver/reapply.patch4 | 47 + localserver/rebuild.sh | 9 + localserver/updateconfigs.sh | 30 + localserver/updatedb.sh | 103 + localserver/updater.sh | 44 + manaplus/connect_local_server.sh | 13 + manaplus/evol.manaplus | 18 + manaplus/force_localmanaplus.sh | 5 + manaplus/loginwallpaper_800x600.png | Bin 0 -> 988427 bytes manaplus/tmw2.manaplus | 18 + testxml/testxml.py | 2439 +++++++++++++++++++++++ testxml/xsd/XMLSchema.xsd | 2262 +++++++++++++++++++++ testxml/xsd/checkfile.sh | 5 + testxml/xsd/its.xsd | 926 +++++++++ testxml/xsd/tmw.xsd | 2117 ++++++++++++++++++++ testxml/xsd/xlink.xsd | 79 + testxml/xsd/xml.xsd | 287 +++ testxml/xsdcheck.sh | 52 + update/TMW2org.zip | Bin 0 -> 42988466 bytes update/addmods.sh | 35 + update/adler32.c | 79 + update/commit.txt | 1 + update/commit_old.txt | 1 + update/create_music.sh | 31 + update/createnew.sh | 40 + update/deploy.sh | 7 + update/musiccommit.txt | 1 + update/musiccommit_old.txt | 1 + update/news.txt | 40 + update/pseudo_update.sh | 31 + update/update.sh | 42 + update/update_music.sh | 42 + web/all_news.bin | 1 + web/backupcopy | 129 ++ web/deploy.sh | 4 + web/feed.xml | 1 + web/fetch.py | 62 + web/gameinfo.sh | 22 + web/index.bin | 1 + web/langs.txt | 5 + web/legacy | 51 + web/news.html | 1 + web/news_to_html.py | 91 + web/newsfeed.py | 101 + web/nf_main.xml | 1 + web/oldupdatelang.py | 164 ++ web/original.po | 170 ++ web/template.po | 84 + web/updatelang.py | 190 ++ wiki/elegen.py | 426 ++++ wiki/lanalysis.py | 394 ++++ wiki/redesign.py | 1050 ++++++++++ wiki/sedesign.py | 515 +++++ wiki/tmp-arm | 247 +++ wiki/tmp-dec | 8 + wiki/tmp-etc | 25 + wiki/tmp-wpn | 59 + wiki/webwikigen.py | 758 +++++++ wiki/wikigen.py | 898 +++++++++ 263 files changed, 26066 insertions(+) create mode 100644 .gitignore create mode 100644 Rules/castle_indoor/rule_castle_001.tmx create mode 100644 Rules/castle_indoor/rule_castle_002.tmx create mode 100644 Rules/castle_indoor/rule_castle_003.tmx create mode 100644 Rules/castle_indoor/rule_castle_009.tmx create mode 100644 Rules/castle_indoor/rule_castle_010.tmx create mode 100644 Rules/castle_indoor/rule_castle_indoor.txt create mode 100644 Rules/cave/rule_cave.txt create mode 100644 Rules/cave/rule_cave_001.tmx create mode 100644 Rules/cave/rule_cave_002.tmx create mode 100644 Rules/cave/rule_cave_003.tmx create mode 100644 Rules/cave/rule_cave_004.tmx create mode 100644 Rules/cave/rule_cave_005.tmx create mode 100644 Rules/cave/rule_cave_006.tmx create mode 100644 Rules/cave/rule_cave_007.tmx create mode 100644 Rules/cave/rule_cave_008.tmx create mode 100644 Rules/cave/rule_cave_009.tmx create mode 100644 Rules/cave/rule_cave_010.tmx create mode 100644 Rules/cave/rule_cave_050.tmx create mode 100644 Rules/cave/rule_cave_100.tmx create mode 100644 Rules/cave/rule_cave_110.tmx create mode 100644 Rules/caverules.txt create mode 100644 Rules/desertcliffs/rule_cave.txt create mode 100644 Rules/desertcliffs/rule_cave_001.tmx create mode 100644 Rules/desertcliffs/rule_cave_002.tmx create mode 100644 Rules/desertcliffs/rule_cave_003.tmx create mode 100644 Rules/desertcliffs/rule_cave_004.tmx create mode 100644 Rules/desertcliffs/rule_cave_005.tmx create mode 100644 Rules/desertcliffs/rule_cave_006.tmx create mode 100644 Rules/desertcliffs/rule_cave_007.tmx create mode 100644 Rules/desertcliffs/rule_cave_008.tmx create mode 100644 Rules/desertcliffs/rule_cave_03.tmx create mode 100644 Rules/desertcliffs/rule_cave_050.tmx create mode 100644 Rules/desertcliffs/rule_cave_100.tmx create mode 100644 Rules/icecave/rule_icecave.txt create mode 100644 Rules/icecave/rule_icecave_001.tmx create mode 100644 Rules/icecave/rule_icecave_002.tmx create mode 100644 Rules/icecave/rule_icecave_003.tmx create mode 100644 Rules/icecave/rule_icecave_004.tmx create mode 100644 Rules/icecave/rule_icecave_005.tmx create mode 100644 Rules/icecave/rule_icecave_006.tmx create mode 100644 Rules/icecave/rule_icecave_007.tmx create mode 100644 Rules/icecave/rule_icecave_009.tmx create mode 100644 Rules/icecave/rule_icecave_010.tmx create mode 100644 Rules/icecave/rule_icecave_020.tmx create mode 100644 Rules/icecave/rule_icecave_100.tmx create mode 100644 Rules/rule_cave.tmx create mode 100644 Rules/rules.txt create mode 100644 Rules/tilesets/set_castle_indoor.png create mode 100644 Rules/tilesets/set_cave.png create mode 100644 Rules/tilesets/set_desertcliff.png create mode 100644 Rules/tilesets/set_hlw.png create mode 100644 Rules/tilesets/set_icecave.png create mode 100644 Rules/tilesets/set_icemountain.png create mode 100644 Rules/tilesets/set_rules.png create mode 100644 Rules/tilesets/set_woodland.png create mode 100644 adler32/Makefile create mode 100755 adler32/adler32 create mode 100644 adler32/adler32.c create mode 100755 client/aurora.py create mode 100755 client/dailylogin.py create mode 100755 client/magicacademy.py create mode 100755 client/minimap-dyecmd.py create mode 100755 client/minimap-dyecmd.sh create mode 100644 client/minimap-override/none.png create mode 100755 client/minimap-render.py create mode 100755 client/skills.py create mode 100755 client/tmxrasterizer create mode 100755 client/weapons.py create mode 100644 hercules/.gitignore create mode 100644 hercules/code/__init__.py create mode 100644 hercules/code/clienttoserver/__init__.py create mode 100644 hercules/code/clienttoserver/maps.py create mode 100644 hercules/code/configutils.py create mode 100644 hercules/code/fileutils.py create mode 100644 hercules/code/server/__init__.py create mode 100644 hercules/code/server/account.py create mode 100644 hercules/code/server/accreg.py create mode 100644 hercules/code/server/db/__init__.py create mode 100644 hercules/code/server/db/char.py create mode 100644 hercules/code/server/db/charregnumdb.py create mode 100644 hercules/code/server/db/inventory.py create mode 100644 hercules/code/server/db/skill.py create mode 100644 hercules/code/server/dbitem.py create mode 100644 hercules/code/server/dbskill.py create mode 100644 hercules/code/server/dbuser.py create mode 100644 hercules/code/server/evol/__init__.py create mode 100644 hercules/code/server/evol/athena.py create mode 100644 hercules/code/server/evol/consts.py create mode 100644 hercules/code/server/evol/itemdb.py create mode 100644 hercules/code/server/evol/main.py create mode 100644 hercules/code/server/evol/mobdb.py create mode 100644 hercules/code/server/evol/mobskilldb.py create mode 100644 hercules/code/server/evol/npcs.py create mode 100644 hercules/code/server/maps.py create mode 100644 hercules/code/server/party.py create mode 100644 hercules/code/server/questsdb.py create mode 100644 hercules/code/server/storage.py create mode 100644 hercules/code/server/tmw/__init__.py create mode 100644 hercules/code/server/tmw/athena.py create mode 100644 hercules/code/server/tmw/consts.py create mode 100644 hercules/code/server/tmw/itemdb.py create mode 100644 hercules/code/server/tmw/main.py create mode 100644 hercules/code/server/tmw/mobdb.py create mode 100644 hercules/code/server/tmw/mobskilldb.py create mode 100644 hercules/code/server/tmw/npcs.py create mode 100644 hercules/code/server/utils.py create mode 100644 hercules/code/servertoclient/__init__.py create mode 100644 hercules/code/servertoclient/homunculuses.py create mode 100644 hercules/code/servertoclient/items.py create mode 100644 hercules/code/servertoclient/luas.py create mode 100644 hercules/code/servertoclient/maps.py create mode 100644 hercules/code/servertoclient/mercenaries.py create mode 100644 hercules/code/servertoclient/monsters.py create mode 100644 hercules/code/servertoclient/npcs.py create mode 100644 hercules/code/servertoclient/pets.py create mode 100644 hercules/code/servertoclient/quests.py create mode 100644 hercules/code/servertoclient/skills.py create mode 100644 hercules/code/servertoclient/sprites.py create mode 100644 hercules/code/serverutils.py create mode 100644 hercules/code/stringutils.py create mode 100644 hercules/code/tileutils.py create mode 100755 hercules/convert_mapcache_to_tmx.py create mode 100755 hercules/convert_tmx_to_mapcache.py create mode 100755 hercules/extract_mapcache.py create mode 100755 hercules/import_newdb.sh create mode 100755 hercules/list_mapcache.py create mode 100644 hercules/templates/acc_reg_num_db.sql create mode 100644 hercules/templates/char.sql create mode 100644 hercules/templates/char_reg_num_db.sql create mode 100644 hercules/templates/collision.png create mode 100644 hercules/templates/constants.tpl create mode 100644 hercules/templates/group.tpl create mode 100644 hercules/templates/homunculus.tpl create mode 100644 hercules/templates/homunculuses.xml create mode 100644 hercules/templates/inventory.sql create mode 100644 hercules/templates/item.tpl create mode 100644 hercules/templates/item_db.tpl create mode 100644 hercules/templates/items.xml create mode 100644 hercules/templates/login.sql create mode 100644 hercules/templates/mercenaries.xml create mode 100644 hercules/templates/mercenary.tpl create mode 100644 hercules/templates/mob_db.tpl create mode 100644 hercules/templates/mob_skill_db.tpl create mode 100644 hercules/templates/monster.tpl create mode 100644 hercules/templates/monsters.xml create mode 100644 hercules/templates/npc.tpl create mode 100644 hercules/templates/npcs.xml create mode 100644 hercules/templates/party.sql create mode 100644 hercules/templates/pet.tpl create mode 100644 hercules/templates/pets.xml create mode 100644 hercules/templates/quest.tpl create mode 100644 hercules/templates/quest_db.tpl create mode 100644 hercules/templates/quests.xml create mode 100644 hercules/templates/skill.sql create mode 100644 hercules/templates/skill.tpl create mode 100644 hercules/templates/skills.xml create mode 100644 hercules/templates/sprite.xml create mode 100644 hercules/templates/storage.sql create mode 100644 hercules/templates/template.tmx create mode 100644 hercules/templates/tileset.png create mode 100755 hercules/tmx_converter.py create mode 100755 herculeswrapper/char.sh create mode 100644 herculeswrapper/herc-map-wrapper-config.example create mode 100644 herculeswrapper/include.sh create mode 100755 herculeswrapper/login.sh create mode 100755 herculeswrapper/map.sh create mode 100755 imagescheck/icccheck.sh create mode 100755 imagescheck/icccheckfile.sh create mode 100755 licensecheck/checkfile.sh create mode 100755 licensecheck/clientdata.sh create mode 100755 licensecheck/serverdata.py create mode 100644 localserver/.gitignore create mode 100644 localserver/README create mode 100644 localserver/applicator.py create mode 100755 localserver/build.sh create mode 100755 localserver/buildasan.sh create mode 100755 localserver/checktime.sh create mode 100755 localserver/clean.sh create mode 100644 localserver/conf/battle.conf create mode 100644 localserver/conf/char-server.conf create mode 100644 localserver/conf/constants.conf create mode 100644 localserver/conf/inter-server.conf create mode 100644 localserver/conf/login-server.conf create mode 100644 localserver/conf/logs.conf create mode 100644 localserver/conf/map-server.conf create mode 100644 localserver/conf/msg_conf.txt create mode 100644 localserver/conf/ports.conf create mode 100644 localserver/conf/script.conf create mode 100644 localserver/conf/socket.conf create mode 100644 localserver/conf/sql_connection.conf create mode 100755 localserver/givegm.sh create mode 100755 localserver/initdb.sh create mode 100755 localserver/installconfigs.sh create mode 100644 localserver/npc/006-10_blackbox.txt create mode 100644 localserver/npc/015-8_blackbox.txt create mode 100644 localserver/npc/017-1_stranger_blackbox.txt create mode 100644 localserver/npc/018-7-1_demure_blackbox.txt create mode 100644 localserver/npc/023-4_blackbox.txt create mode 100644 localserver/npc/025-2-4_aegis_blackbox.txt create mode 100644 localserver/npc/botcheck_blackbox.txt create mode 100644 localserver/npc/easteregg_blackbox.txt create mode 100644 localserver/npc/magic_blackbox.txt create mode 100644 localserver/reapply.patch3 create mode 100644 localserver/reapply.patch4 create mode 100755 localserver/rebuild.sh create mode 100755 localserver/updateconfigs.sh create mode 100755 localserver/updatedb.sh create mode 100755 localserver/updater.sh create mode 100755 manaplus/connect_local_server.sh create mode 100644 manaplus/evol.manaplus create mode 100755 manaplus/force_localmanaplus.sh create mode 100644 manaplus/loginwallpaper_800x600.png create mode 100644 manaplus/tmw2.manaplus create mode 100755 testxml/testxml.py create mode 100644 testxml/xsd/XMLSchema.xsd create mode 100755 testxml/xsd/checkfile.sh create mode 100644 testxml/xsd/its.xsd create mode 100644 testxml/xsd/tmw.xsd create mode 100644 testxml/xsd/xlink.xsd create mode 100644 testxml/xsd/xml.xsd create mode 100755 testxml/xsdcheck.sh create mode 100644 update/TMW2org.zip create mode 100755 update/addmods.sh create mode 100644 update/adler32.c create mode 100644 update/commit.txt create mode 100644 update/commit_old.txt create mode 100755 update/create_music.sh create mode 100755 update/createnew.sh create mode 100755 update/deploy.sh create mode 100644 update/musiccommit.txt create mode 100644 update/musiccommit_old.txt create mode 100644 update/news.txt create mode 100755 update/pseudo_update.sh create mode 100755 update/update.sh create mode 100755 update/update_music.sh create mode 100644 web/all_news.bin create mode 100755 web/backupcopy create mode 100755 web/deploy.sh create mode 100644 web/feed.xml create mode 100755 web/fetch.py create mode 100755 web/gameinfo.sh create mode 100644 web/index.bin create mode 100644 web/langs.txt create mode 100755 web/legacy create mode 100644 web/news.html create mode 100755 web/news_to_html.py create mode 100755 web/newsfeed.py create mode 100644 web/nf_main.xml create mode 100755 web/oldupdatelang.py create mode 100644 web/original.po create mode 100644 web/template.po create mode 100755 web/updatelang.py create mode 100755 wiki/elegen.py create mode 100755 wiki/lanalysis.py create mode 100755 wiki/redesign.py create mode 100755 wiki/sedesign.py create mode 100644 wiki/tmp-arm create mode 100644 wiki/tmp-dec create mode 100644 wiki/tmp-etc create mode 100644 wiki/tmp-wpn create mode 100755 wiki/webwikigen.py create mode 100755 wiki/wikigen.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1e538c --- /dev/null +++ b/.gitignore @@ -0,0 +1,89 @@ +# temp files +*.xml~ +*.py~ +*.txt~ +*.conf~ +*~ +._* + +# updates +update/files +update/upload +!update/adler32.c +update/adler32 +update/files/Bugfix-* +update/save* + +hercules_update/files +hercules_update/upload +!hercules_update/adler32.c +hercules_update/adler32 + +# saedit +saedit/saedit +saedit/make.log + +# langs +lang/tx +lang/new +login.txt +password.txt + +# lang client +lang_client/tmp +lang_client/pot +lang_client/dict + +# tx +tx + +# temp files +*.o +localserver/.~* + +# dyecmd +dyecmd/dyecmd +dyecmd/src/dyecmd +dyecmd/src/CMakeFiles/ +dyecmd/src/Makefile +dyecmd/src/cmake_install.cmake + +# testxml +testxml/errors.txt + +# gitlab merger +herculeswrapper/herc-map-wrapper-config + +# license check +licensecheck/npcs.txt + +# wiki +wiki/Items.md +wiki/Monsters.md +wiki/*.html +wiki/*.txt + +# web +1index.bin +backup.bin +web/po/* + +# Proccessed other server data +hercules/data* +hercules/osd* +hercules/old* + +# Diffs and Patches related files +*.diff +*.patch +*.orig +*.rej + +# Jesusalva's personal stuff +misc/* +update/*back* +lang/in/JSave + +# Beta Server +localserver/beta.patch +localserver/beta.patch2 diff --git a/Rules/castle_indoor/rule_castle_001.tmx b/Rules/castle_indoor/rule_castle_001.tmx new file mode 100644 index 0000000..6f4af55 --- /dev/null +++ b/Rules/castle_indoor/rule_castle_001.tmx @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,74,0,74,0,74,0,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,74,0,74,0,74,0,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,0,0,74,0,74,0,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,0,0,0,0,74,0,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/castle_indoor/rule_castle_002.tmx b/Rules/castle_indoor/rule_castle_002.tmx new file mode 100644 index 0000000..a98bc77 --- /dev/null +++ b/Rules/castle_indoor/rule_castle_002.tmx @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,74,74,0, +0,74,0,74,0,0,0,0, +0,74,0,74,0,74,74,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,14,0, +0,14,0,0,0,0,0,0, +0,0,0,14,0,14,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,14,0,0, +0,0,0,14,0,0,0,0, +0,14,0,0,0,0,14,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,240,0, +0,370,0,0,0,0,0,0, +0,0,0,370,0,238,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0 + + + diff --git a/Rules/castle_indoor/rule_castle_003.tmx b/Rules/castle_indoor/rule_castle_003.tmx new file mode 100644 index 0000000..a534afb --- /dev/null +++ b/Rules/castle_indoor/rule_castle_003.tmx @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0, +0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0, +0,0,0,0,0,0,0,0,0, +0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0, +0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,14,0,14,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,14,0,14,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0, +0,0,0,14,0,14,0,0,0, +0,0,0,14,0,14,0,0,0, +0,14,14,0,0,0,14,14,0, +0,0,0,0,0,0,0,0,0, +0,14,14,0,0,0,14,14,0, +0,0,0,14,0,14,0,0,0, +0,0,0,14,0,14,0,0,0, +0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,209,0,210,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,338,0,339,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/castle_indoor/rule_castle_009.tmx b/Rules/castle_indoor/rule_castle_009.tmx new file mode 100644 index 0000000..680d64c --- /dev/null +++ b/Rules/castle_indoor/rule_castle_009.tmx @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,74,0,74,0,74,74,0, +0,74,0,0,0,0,74,0,0,0,0, +0,0,0,0,74,0,0,0,0,74,0, +0,74,74,0,74,0,74,74,0,74,0, +0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,74,0,0,0,0,0,0, +0,74,0,0,0,0,0,0,0,0,0, +0,0,0,0,74,0,0,0,0,0,0, +0,74,74,0,74,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,74,0,0,0,0,0,0, +0,74,0,0,0,0,0,0,0,0,0, +0,0,0,0,74,0,0,0,0,0,0, +0,74,74,0,74,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0, +0,10,0,42,10,0,0,0,44,0,0, +0,42,0,0,0,0,44,0,0,0,0, +0,0,0,0,42,0,0,0,0,44,0, +0,10,42,0,10,0,0,44,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,11,0,42,11,0,0,0,0,0,0, +0,42,0,0,0,0,0,0,0,0,0, +0,0,0,0,42,0,0,0,0,0,0, +0,11,42,0,11,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,19,0,42,19,0,0,0,0,0,0, +0,42,0,0,0,0,0,0,0,0,0, +0,0,0,0,42,0,0,0,0,0,0, +0,19,42,0,19,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,10,0,0,0,0,0,0,0, +0,10,0,0,0,0,0,0,0,0,0, +0,0,0,0,10,0,0,0,0,0,0, +0,0,10,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,11,0,0,0,0,0,0,0, +0,11,0,0,0,0,0,0,0,0,0, +0,0,0,0,11,0,0,0,0,0,0, +0,0,11,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,19,0,0,0,0,0,0,0, +0,19,0,0,0,0,0,0,0,0,0, +0,0,0,0,19,0,0,0,0,0,0, +0,0,19,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,810,0,0,0,0,304,0,0, +0,793,0,0,0,0,287,0,0,0,0, +0,0,0,0,825,0,0,0,0,319,0, +0,0,808,0,0,0,0,302,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,810,0,0,0,0,0,0,0, +0,793,0,0,0,0,0,0,0,0,0, +0,0,0,0,825,0,0,0,0,0,0, +0,0,808,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,810,0,0,0,0,0,0,0, +0,793,0,0,0,0,0,0,0,0,0, +0,0,0,0,825,0,0,0,0,0,0, +0,0,808,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/castle_indoor/rule_castle_010.tmx b/Rules/castle_indoor/rule_castle_010.tmx new file mode 100644 index 0000000..5629a23 --- /dev/null +++ b/Rules/castle_indoor/rule_castle_010.tmx @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,74,74,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,11,11,0,11,11,0,42,42,0,42,42,0,44,44,0,44,44,0,0, +0,11,42,0,42,11,0,42,11,0,11,42,0,44,0,0,0,44,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,11,42,0,42,11,0,42,11,0,11,42,0,44,0,0,0,44,0,0, +0,11,11,0,11,11,0,42,42,0,42,42,0,44,44,0,44,44,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,10,10,0,10,10,0,42,42,0,42,42,0,0,0,0,0,0,0,0, +0,10,42,0,42,10,0,42,10,0,10,42,0,0,44,0,44,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,10,42,0,42,10,0,42,10,0,10,42,0,0,44,0,44,0,0,0, +0,10,10,0,10,10,0,42,42,0,42,42,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,19,19,0,19,19,0,42,42,0,42,42,0,0,0,0,0,0,0,0, +0,19,42,0,42,19,0,42,19,0,19,42,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,19,42,0,42,19,0,42,19,0,19,42,0,0,0,0,0,0,0,0, +0,19,19,0,19,19,0,42,42,0,42,42,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,11,11,0,11,11,0,11,11,0,11,11,0,0,0,0,0,0,0,0, +0,11,11,0,11,11,0,11,11,0,11,11,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,11,11,0,11,11,0,11,11,0,11,11,0,0,0,0,0,0,0,0, +0,11,11,0,11,11,0,11,11,0,11,11,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,10,10,0,10,10,0,10,10,0,10,10,0,0,0,0,0,0,0,0, +0,10,10,0,10,10,0,10,10,0,10,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,10,10,0,10,10,0,10,10,0,10,10,0,0,0,0,0,0,0,0, +0,10,10,0,10,10,0,10,10,0,10,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,19,19,0,19,19,0,19,19,0,19,19,0,0,0,0,0,0,0,0, +0,19,19,0,19,19,0,19,19,0,19,19,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,19,19,0,19,19,0,19,19,0,19,19,0,0,0,0,0,0,0,0, +0,19,19,0,19,19,0,19,19,0,19,19,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,294,0,0,0,295,0,654,0,0,0,655,0,0, +0,0,280,0,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,312,0,314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,310,0,0,0,311,0,670,0,0,0,671,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,294,0,0,0,295,0,0,0,0,0,0,0,0, +0,0,280,0,282,0,0,0,0,0,0,0,0,0,606,0,608,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,312,0,314,0,0,0,0,0,0,0,0,0,638,0,640,0,0,0, +0,0,0,0,0,0,0,310,0,0,0,311,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,294,0,0,0,295,0,0,0,0,0,0,0,0, +0,0,280,0,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,312,0,314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,310,0,0,0,311,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/castle_indoor/rule_castle_indoor.txt b/Rules/castle_indoor/rule_castle_indoor.txt new file mode 100644 index 0000000..4ce7553 --- /dev/null +++ b/Rules/castle_indoor/rule_castle_indoor.txt @@ -0,0 +1,23 @@ +// lines starting with // or // are comments +// all other lines will be parsed and treated as filenames. + +// Rules for castles indoors + +// basic stuff: each rule-tile gets a default tile +// here is a map attribute set: "DeleteTiles := true" This means to delete all +// tiles in all touched tileslayers first. +./rule_castle_001.tmx + +// straight walls: +./rule_castle_002.tmx + +// corners at walls +./rule_castle_003.tmx + +// Carpets are bad in overall, so do not place one near the other +// straight carpets +./rule_castle_009.tmx + +// corners in carpets +./rule_castle_010.tmx + diff --git a/Rules/cave/rule_cave.txt b/Rules/cave/rule_cave.txt new file mode 100644 index 0000000..080ae6b --- /dev/null +++ b/Rules/cave/rule_cave.txt @@ -0,0 +1,41 @@ +// lines starting with // or // are comments +// all other lines will be parsed and treated as filenames. + +// Rules for caves + +// basic stuff: each rule-tile gets a default tile +// here is a map attribute set: "DeleteTiles := true" This means to delete all +// tiles in all touched tileslayers first. +./rule_cave_001.tmx + +// straight walls: +./rule_cave_002.tmx + +// corners at walls +./rule_cave_003.tmx +./rule_cave_004.tmx +./rule_cave_005.tmx + +// water in caves: +./rule_cave_006.tmx +./rule_cave_007.tmx + +// rules for entrances, has bad exception handling, +// so mind where to put entrances. (So avoid putting them near corners) +./rule_cave_008.tmx + +// straight carpets +./rule_cave_009.tmx + +// corners in carpets +./rule_cave_010.tmx + +// all tiles, which are walkable, but have unwalkable neighbors, +// should be unwalkable +// example: a decorative stone in a sea + +./rule_cave_050.tmx + +// error handling: some situations cannot be handled properly with this ruleset: +// so indicate these situations with the error-tile +./rule_cave_100.tmx diff --git a/Rules/cave/rule_cave_001.tmx b/Rules/cave/rule_cave_001.tmx new file mode 100644 index 0000000..065ccce --- /dev/null +++ b/Rules/cave/rule_cave_001.tmx @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,74,0,74,0,74,0,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,74,0,74,0,74,0,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,0,0,74,0,74,0,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,0,0,0,0,74,0,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,74,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,10,0,11,0,12,0,13,0,14,0,15,0,0,0,17,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,18,0,19,0,20,0,21,0,22,0,23,0,0,0,25,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,26,0,27,0,0,0,29,0,30,0,31,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,34,0,35,0,0,0,0,0,38,0,39,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,42,0,43,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_002.tmx b/Rules/cave/rule_cave_002.tmx new file mode 100644 index 0000000..74feece --- /dev/null +++ b/Rules/cave/rule_cave_002.tmx @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0, +0,74,0,0,0,0,0,0, +0,74,0,0,0,74,74,0, +0,74,0,74,0,0,0,0, +0,74,0,74,0,74,74,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,14,0, +0,14,0,0,0,0,0,0, +0,0,0,14,0,14,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,14,0,0, +0,0,0,14,0,0,0,0, +0,14,0,0,0,0,14,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,114,0,0,0,0,0,0, +0,130,0,0,0,0,97,0, +0,146,0,0,0,0,0,0, +0,0,0,0,0,99,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,101,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,2,0,0,0,0,0,0, +0,2,0,0,0,0,2,0, +0,2,0,0,0,0,0,0, +0,0,0,2,0,2,0,0, +0,0,0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_003.tmx b/Rules/cave/rule_cave_003.tmx new file mode 100644 index 0000000..6656ef6 --- /dev/null +++ b/Rules/cave/rule_cave_003.tmx @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,14,0,0,0,14,0,0,0,0,0,0,0, +0,14,14,0,14,14,0,0,14,0,14,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,14,0,14,0,0,14,14,0,14,14,0, +0,0,0,0,0,0,0,14,0,0,0,14,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,86,0,0,0,87,0,0,100,0,102,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_004.tmx b/Rules/cave/rule_cave_004.tmx new file mode 100644 index 0000000..3238bc7 --- /dev/null +++ b/Rules/cave/rule_cave_004.tmx @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0, +0,74,74,0,74,74,0, +0,74,74,0,74,74,0, +0,74,74,0,74,74,0, +0,74,74,0,74,74,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0, +0,14,14,0,14,14,0, +0,0,14,0,14,0,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0, +0,14,0,0,0,14,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0, +0,0,118,0,116,0,0, +0,0,134,0,132,0,0, +0,0,150,0,148,0,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0, +0,2,2,0,2,2,0, +0,2,2,0,2,2,0, +0,2,2,0,2,2,0, +0,0,2,0,2,0,0, +0,0,0,0,0,0,0, +0,0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_005.tmx b/Rules/cave/rule_cave_005.tmx new file mode 100644 index 0000000..a325b0a --- /dev/null +++ b/Rules/cave/rule_cave_005.tmx @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,74,0,74,0,0,0,0,0,0,0,0, +0,0,74,0,74,0,0,0,74,0,74,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,14,0,14,0,0, +0,14,14,0,14,14,0,0,14,0,14,0,0, +0,0,14,0,14,0,0,0,14,0,14,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,14,0,0,0,14,0, +0,14,0,0,0,14,0,14,0,0,0,14,0, +0,14,14,0,14,14,0,14,14,0,14,14,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,95,0,96,0,0,0,0,0,0,0,0, +0,0,111,0,112,0,0,0,113,0,115,0,0, +0,0,127,0,128,0,0,0,129,0,131,0,0, +0,0,143,0,144,0,0,0,145,0,147,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,2,0,2,0,0,0,0,0,0,0,0, +0,0,2,0,2,0,0,0,2,0,2,0,0, +0,0,2,0,2,0,0,0,2,0,2,0,0, +0,0,2,0,2,0,0,0,2,0,2,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_006.tmx b/Rules/cave/rule_cave_006.tmx new file mode 100644 index 0000000..622082d --- /dev/null +++ b/Rules/cave/rule_cave_006.tmx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0, +0,74,0,74,74,0, +0,74,0,0,0,0, +0,0,0,0,74,0, +0,74,74,0,74,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,29,0,0, +0,29,0,0,0,0, +0,0,0,0,29,0, +0,0,29,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,21,0,0, +0,21,0,0,0,0, +0,0,0,0,21,0, +0,0,21,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,13,0,0, +0,13,0,0,0,0, +0,0,0,0,13,0, +0,0,13,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,20,0,0, +0,20,0,0,0,0, +0,0,0,0,20,0, +0,0,20,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,12,0,0, +0,12,0,0,0,0, +0,0,0,0,12,0, +0,0,12,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,29,0,0,29,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,29,0,0,29,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,21,0,0,21,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,21,0,0,21,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,13,0,0,13,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,13,0,0,13,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,20,0,0,20,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,20,0,0,20,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,12,0,0,12,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,12,0,0,12,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,189,0,0, +0,172,0,0,0,0, +0,0,0,0,204,0, +0,0,187,0,0,0, +0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_007.tmx b/Rules/cave/rule_cave_007.tmx new file mode 100644 index 0000000..aeeae3c --- /dev/null +++ b/Rules/cave/rule_cave_007.tmx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,29,29,0,29,29,0, +0,0,29,0,29,0,0,29,0,0,0,29,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,29,0,29,0,0,29,0,0,0,29,0, +0,0,0,0,0,0,0,29,29,0,29,29,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,21,21,0,21,21,0, +0,0,21,0,21,0,0,21,0,0,0,21,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,21,0,21,0,0,21,0,0,0,21,0, +0,0,0,0,0,0,0,21,21,0,21,21,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,13,13,0,13,13,0, +0,0,13,0,13,0,0,13,0,0,0,13,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,13,0,13,0,0,13,0,0,0,13,0, +0,0,0,0,0,0,0,13,13,0,13,13,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,20,20,0,20,20,0, +0,0,20,0,20,0,0,20,0,0,0,20,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,20,0,20,0,0,20,0,0,0,20,0, +0,0,0,0,0,0,0,20,20,0,20,20,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,12,12,0,12,12,0, +0,0,12,0,12,0,0,12,0,0,0,12,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,12,0,12,0,0,12,0,0,0,12,0, +0,0,0,0,0,0,0,12,12,0,12,12,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,29,29,0,29,29,0,0,0,0,0,0,0, +0,29,0,0,0,29,0,0,29,0,29,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,29,0,0,0,29,0,0,29,0,29,0,0, +0,29,29,0,29,29,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,21,21,0,21,21,0,0,0,0,0,0,0, +0,21,0,0,0,21,0,0,21,0,21,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,21,0,0,0,21,0,0,21,0,21,0,0, +0,21,21,0,21,21,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,13,13,0,13,13,0,0,0,0,0,0,0, +0,13,0,0,0,13,0,0,13,0,13,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,13,0,0,0,13,0,0,13,0,13,0,0, +0,13,13,0,13,13,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,20,20,0,20,20,0,0,0,0,0,0,0, +0,20,0,0,0,20,0,0,20,0,20,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,20,0,0,0,20,0,0,20,0,20,0,0, +0,20,20,0,20,20,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,12,12,0,12,12,0,0,0,0,0,0,0, +0,12,0,0,0,12,0,0,12,0,12,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,12,0,0,0,12,0,0,12,0,12,0,0, +0,12,12,0,12,12,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,169,0,0,0,170,0, +0,0,171,0,173,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,203,0,205,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,185,0,0,0,186,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_008.tmx b/Rules/cave/rule_cave_008.tmx new file mode 100644 index 0000000..00a7a06 --- /dev/null +++ b/Rules/cave/rule_cave_008.tmx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,74,74,74,0,0,0,0,0, +0,0,0,0,0,74,74,74,0,0,0,0,0, +0,0,0,0,0,74,74,74,0,0,0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,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,14,14,14,0,14,14,14,0,14,14,14,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,14,14,14,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,98,98,98,0,98,98,98,0,98,98,98,0, +0,114,114,114,0,114,114,114,0,114,114,114,0, +0,164,165,166,0,139,140,141,0,91,92,93,0, +0,180,181,182,0,155,156,157,0,107,108,109,0, +0,0,0,0,0,0,0,0,0,123,124,125,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,82,82,82,0,0,0,0,0, +0,0,0,0,0,82,82,82,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,101,101,101,0,0,0,0,0, +0,0,0,0,0,195,195,195,0,0,0,0,0, +0,0,0,0,0,210,211,212,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_009.tmx b/Rules/cave/rule_cave_009.tmx new file mode 100644 index 0000000..bb1e8ec --- /dev/null +++ b/Rules/cave/rule_cave_009.tmx @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0, +0,74,0,74,74,0, +0,74,0,0,0,0, +0,0,0,0,74,0, +0,74,74,0,74,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,43,0,0, +0,43,0,0,0,0, +0,0,0,0,43,0, +0,0,43,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,42,0,0, +0,42,0,0,0,0, +0,0,0,0,42,0, +0,0,42,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,43,0,0,43,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,43,0,0,43,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,42,0,0,42,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,42,0,0,42,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,106,0,0, +0,89,0,0,0,0, +0,0,0,0,121,0, +0,0,104,0,0,0, +0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_010.tmx b/Rules/cave/rule_cave_010.tmx new file mode 100644 index 0000000..3c9256b --- /dev/null +++ b/Rules/cave/rule_cave_010.tmx @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,43,43,0,43,43,0, +0,0,43,0,43,0,0,43,0,0,0,43,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,43,0,43,0,0,43,0,0,0,43,0, +0,0,0,0,0,0,0,43,43,0,43,43,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,42,42,0,42,42,0, +0,0,42,0,42,0,0,42,0,0,0,42,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,42,0,42,0,0,42,0,0,0,42,0, +0,0,0,0,0,0,0,42,42,0,42,42,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,43,0,43,0,0,0,0,0,0,0,0, +0,43,0,0,0,43,0,0,43,0,43,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,43,0,0,0,43,0,0,43,0,43,0,0, +0,0,43,0,43,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,42,0,42,0,0,0,0,0,0,0,0, +0,42,0,0,0,42,0,0,42,0,42,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,42,0,0,0,42,0,0,42,0,42,0,0, +0,0,42,0,42,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,137,0,0,0,138,0, +0,0,88,0,90,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,120,0,122,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,153,0,0,0,154,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_050.tmx b/Rules/cave/rule_cave_050.tmx new file mode 100644 index 0000000..ff04f7f --- /dev/null +++ b/Rules/cave/rule_cave_050.tmx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + +0,0,0,0,0, +0,0,74,0,0, +0,74,74,74,0, +0,0,74,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,18,0,0, +0,18,0,18,0, +0,0,18,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,26,0,0, +0,26,0,26,0, +0,0,26,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,27,0,0, +0,27,0,27,0, +0,0,27,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,35,0,0, +0,35,0,35,0, +0,0,35,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,43,0,0, +0,43,0,43,0, +0,0,43,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,12,0,0, +0,12,0,12,0, +0,0,12,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,14,0,0, +0,14,0,14,0, +0,0,14,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,30,0,0, +0,30,0,30,0, +0,0,30,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,38,0,0, +0,38,0,38,0, +0,0,38,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,31,0,0, +0,31,0,31,0, +0,0,31,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,39,0,0, +0,39,0,39,0, +0,0,39,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,0,0,0, +0,0,2,0,0, +0,0,0,0,0, +0,0,0,0,0 + + + diff --git a/Rules/cave/rule_cave_100.tmx b/Rules/cave/rule_cave_100.tmx new file mode 100644 index 0000000..b115cf8 --- /dev/null +++ b/Rules/cave/rule_cave_100.tmx @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIA84kyiOLOeMhPGJk2sPIfupbR42d1PTHlIBAHq5GFfUAQAA + + + + + H4sIAAAAAAAAA2NgoB9gxcFmx8HGB4hVR0ugjIM90AAA6DCU7NQBAAA= + + + + + H4sIAAAAAAAAA2NgoB/gxcEeqkAFB3ugAQAsLTFH1AEAAA== + + + + + H4sIAAAAAAAAA2NgoB9gw8EeBdQFAM2+xmvUAQAA + + + + + H4sIAAAAAAAAA2NgoB/gw8EeBdQFAEag6ZXUAQAA + + + + + H4sIAAAAAAAAA2NgoB8Qw8EeBdQFAJqF6UzUAQAA + + + + + H4sIAAAAAAAAA2NgoB9wIZFNrFkDBchxNz0AAJUJJNPUAQAA + + + diff --git a/Rules/cave/rule_cave_110.tmx b/Rules/cave/rule_cave_110.tmx new file mode 100644 index 0000000..6656ef6 --- /dev/null +++ b/Rules/cave/rule_cave_110.tmx @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,14,0,0,0,14,0,0,0,0,0,0,0, +0,14,14,0,14,14,0,0,14,0,14,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,14,0,14,0,0,14,14,0,14,14,0, +0,0,0,0,0,0,0,14,0,0,0,14,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,86,0,0,0,87,0,0,100,0,102,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/caverules.txt b/Rules/caverules.txt new file mode 100644 index 0000000..d25355b --- /dev/null +++ b/Rules/caverules.txt @@ -0,0 +1,6 @@ +rule_cave.tmx + +// NOTE: Map with Ground only, black - base ground - water. Automap after done. +// AFTERMAP: Remove grey over tiles, fix narrow transistions (especially wall-water). +// RANDOMIZE: By adding randomization to rule_cave.tmx AFTER first automap. +// Add details manually. diff --git a/Rules/desertcliffs/rule_cave.txt b/Rules/desertcliffs/rule_cave.txt new file mode 100644 index 0000000..8695922 --- /dev/null +++ b/Rules/desertcliffs/rule_cave.txt @@ -0,0 +1,32 @@ +// lines starting with // or // are comments +// all other lines will be parsed and treated as filenames. + +// Rules for desert cliffs + +// basic stuff: each rule-tile gets a default tile +// here is a map attribute set: "DeleteTiles := true" This means to delete all +// tiles in all touched tileslayers first. +./rule_cave_001.tmx + +// straight walls: +./rule_cave_002.tmx + +// corners at walls +./rule_cave_003.tmx +./rule_cave_03.tmx +//./rule_cave_004.tmx +//./rule_cave_005.tmx + +// rules for entrances, has bad exception handling, +// so mind where to put entrances. (So avoid putting them near corners) +//./rule_cave_008.tmx + +// all tiles, which are walkable, but have unwalkable neighbors, +// should be unwalkable +// example: a decorative stone in a sea + +./rule_cave_050.tmx + +// error handling: some situations cannot be handled properly with this ruleset: +// so indicate these situations with the error-tile +//./rule_cave_100.tmx diff --git a/Rules/desertcliffs/rule_cave_001.tmx b/Rules/desertcliffs/rule_cave_001.tmx new file mode 100644 index 0000000..403a7a4 --- /dev/null +++ b/Rules/desertcliffs/rule_cave_001.tmx @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,10,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,14,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0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0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_002.tmx b/Rules/desertcliffs/rule_cave_002.tmx new file mode 100644 index 0000000..e7c1140 --- /dev/null +++ b/Rules/desertcliffs/rule_cave_002.tmx @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,74,0,0,0,74,74,0, +0,74,0,74,0,0,0,0, +0,0,0,74,0,74,74,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,10,0, +0,10,0,10,0,0,0,0, +0,0,0,0,0,10,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,10,0,0,0,10,0,0, +0,0,0,0,0,0,0,0, +0,0,0,10,0,0,10,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,176,0, +0,161,0,113,0,0,0,0, +0,0,0,129,0,181,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_003.tmx b/Rules/desertcliffs/rule_cave_003.tmx new file mode 100644 index 0000000..27e52d8 --- /dev/null +++ b/Rules/desertcliffs/rule_cave_003.tmx @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,10,0,10,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,10,0,10,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,10,0,0,0,10,0,10,10,0,10,10,0, +0,10,10,0,10,10,0,10,0,0,0,10,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,112,0,114,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,96,0,98,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_004.tmx b/Rules/desertcliffs/rule_cave_004.tmx new file mode 100644 index 0000000..f4616ee --- /dev/null +++ b/Rules/desertcliffs/rule_cave_004.tmx @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,74,74,0,0,0,74,74,74,74,0, +0,74,74,74,74,0,0,0,74,74,74,74,0, +0,74,74,74,74,0,0,0,74,74,74,74,0, +0,74,74,74,74,0,0,0,74,74,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,74,74,0,0,0,74,74,74,74,0, +0,74,74,74,74,0,0,0,74,74,74,74,0, +0,74,74,74,74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0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_005.tmx b/Rules/desertcliffs/rule_cave_005.tmx new file mode 100644 index 0000000..97cf76d --- /dev/null +++ b/Rules/desertcliffs/rule_cave_005.tmx @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,74,0,74,0,0,0,0,0,0,0,0, +0,0,74,0,74,0,0,0,74,0,74,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,14,0,14,0,0, +0,14,14,0,14,14,0,0,14,0,14,0,0, +0,0,14,0,14,0,0,0,14,0,14,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,14,0,0,0,14,0, +0,14,0,0,0,14,0,14,0,0,0,14,0, +0,14,14,0,14,14,0,14,14,0,14,14,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,95,0,96,0,0,0,0,0,0,0,0, +0,0,111,0,112,0,0,0,113,0,115,0,0, +0,0,127,0,128,0,0,0,129,0,131,0,0, +0,0,143,0,144,0,0,0,145,0,147,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,2,0,2,0,0,0,0,0,0,0,0, +0,0,2,0,2,0,0,0,2,0,2,0,0, +0,0,2,0,2,0,0,0,2,0,2,0,0, +0,0,2,0,2,0,0,0,2,0,2,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_006.tmx b/Rules/desertcliffs/rule_cave_006.tmx new file mode 100644 index 0000000..9b1cf57 --- /dev/null +++ b/Rules/desertcliffs/rule_cave_006.tmx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0, +0,74,0,74,74,0, +0,74,0,0,0,0, +0,0,0,0,74,0, +0,74,74,0,74,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,29,0,0, +0,29,0,0,0,0, +0,0,0,0,29,0, +0,0,29,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,21,0,0, +0,21,0,0,0,0, +0,0,0,0,21,0, +0,0,21,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,13,0,0, +0,13,0,0,0,0, +0,0,0,0,13,0, +0,0,13,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,20,0,0, +0,20,0,0,0,0, +0,0,0,0,20,0, +0,0,20,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,12,0,0, +0,12,0,0,0,0, +0,0,0,0,12,0, +0,0,12,0,0,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,29,0,0,29,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,29,0,0,29,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,21,0,0,21,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,21,0,0,21,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,13,0,0,13,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,13,0,0,13,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,20,0,0,20,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,20,0,0,20,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,12,0,0,12,0, +0,0,0,0,0,0, +0,0,0,0,0,0, +0,12,0,0,12,0, +0,0,0,0,0,0 + + + + +0,0,0,0,0,0, +0,0,0,189,0,0, +0,172,0,0,0,0, +0,0,0,0,204,0, +0,0,187,0,0,0, +0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_007.tmx b/Rules/desertcliffs/rule_cave_007.tmx new file mode 100644 index 0000000..9171718 --- /dev/null +++ b/Rules/desertcliffs/rule_cave_007.tmx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,74,74,0,74,74,0,74,74,0,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,29,29,0,29,29,0, +0,0,29,0,29,0,0,29,0,0,0,29,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,29,0,29,0,0,29,0,0,0,29,0, +0,0,0,0,0,0,0,29,29,0,29,29,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,21,21,0,21,21,0, +0,0,21,0,21,0,0,21,0,0,0,21,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,21,0,21,0,0,21,0,0,0,21,0, +0,0,0,0,0,0,0,21,21,0,21,21,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,13,13,0,13,13,0, +0,0,13,0,13,0,0,13,0,0,0,13,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,13,0,13,0,0,13,0,0,0,13,0, +0,0,0,0,0,0,0,13,13,0,13,13,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,20,20,0,20,20,0, +0,0,20,0,20,0,0,20,0,0,0,20,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,20,0,20,0,0,20,0,0,0,20,0, +0,0,0,0,0,0,0,20,20,0,20,20,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,12,12,0,12,12,0, +0,0,12,0,12,0,0,12,0,0,0,12,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,12,0,12,0,0,12,0,0,0,12,0, +0,0,0,0,0,0,0,12,12,0,12,12,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,29,29,0,29,29,0,0,0,0,0,0,0, +0,29,0,0,0,29,0,0,29,0,29,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,29,0,0,0,29,0,0,29,0,29,0,0, +0,29,29,0,29,29,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,21,21,0,21,21,0,0,0,0,0,0,0, +0,21,0,0,0,21,0,0,21,0,21,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,21,0,0,0,21,0,0,21,0,21,0,0, +0,21,21,0,21,21,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,13,13,0,13,13,0,0,0,0,0,0,0, +0,13,0,0,0,13,0,0,13,0,13,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,13,0,0,0,13,0,0,13,0,13,0,0, +0,13,13,0,13,13,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,20,20,0,20,20,0,0,0,0,0,0,0, +0,20,0,0,0,20,0,0,20,0,20,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,20,0,0,0,20,0,0,20,0,20,0,0, +0,20,20,0,20,20,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,12,12,0,12,12,0,0,0,0,0,0,0, +0,12,0,0,0,12,0,0,12,0,12,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,12,0,0,0,12,0,0,12,0,12,0,0, +0,12,12,0,12,12,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,169,0,0,0,170,0, +0,0,171,0,173,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,203,0,205,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,185,0,0,0,186,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_008.tmx b/Rules/desertcliffs/rule_cave_008.tmx new file mode 100644 index 0000000..14a69e3 --- /dev/null +++ b/Rules/desertcliffs/rule_cave_008.tmx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,74,74,74,0,74,74,74,0,74,74,74,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,74,74,74,0,0,0,0,0, +0,0,0,0,0,74,74,74,0,0,0,0,0, +0,0,0,0,0,74,74,74,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,14,14,14,0,14,14,14,0,14,14,14,0, +0,14,14,14,0,14,14,14,0,14,14,14,0, +0,14,14,14,0,14,14,14,0,14,14,14,0, +0,14,31,14,0,14,38,14,0,14,30,14,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,14,22,14,0,0,0,0,0, +0,0,0,0,0,14,14,14,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,23,0,0,0,15,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,14,14,14,0,14,14,14,0,14,14,14,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,14,14,14,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,98,98,98,0,98,98,98,0,98,98,98,0, +0,114,114,114,0,114,114,114,0,114,114,114,0, +0,164,165,166,0,139,140,141,0,91,92,93,0, +0,180,181,182,0,155,156,157,0,107,108,109,0, +0,0,0,0,0,0,0,0,0,123,124,125,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,82,82,82,0,0,0,0,0, +0,0,0,0,0,82,82,82,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,101,101,101,0,0,0,0,0, +0,0,0,0,0,78,78,78,0,0,0,0,0, +0,0,0,0,0,210,211,212,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_03.tmx b/Rules/desertcliffs/rule_cave_03.tmx new file mode 100644 index 0000000..b7ddb3a --- /dev/null +++ b/Rules/desertcliffs/rule_cave_03.tmx @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,74,0,0,74,74,0,74,74,0,0,0,0, +0,74,0,0,74,74,0,74,74,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,14,0,0,14,0,0,0,14,0,0,0,0, +0,14,0,0,14,0,0,0,14,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,14,0,14,0,0,0,0,0, +0,0,0,0,0,14,0,14,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,78,0,0,0,78,0,0,0,0, +0,0,0,0,78,0,0,0,78,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,129,0,0,130,0,0,0,128,0,0,0,0, +0,129,0,0,130,0,0,0,128,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,2,0,0,2,0,0,0,2,0,0,0,0, +0,2,0,0,2,0,0,0,2,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_050.tmx b/Rules/desertcliffs/rule_cave_050.tmx new file mode 100644 index 0000000..aabf7fe --- /dev/null +++ b/Rules/desertcliffs/rule_cave_050.tmx @@ -0,0 +1,39 @@ + + + + + + + + + + + + + +0,0,0,0,0, +0,0,74,0,0, +0,74,74,74,0, +0,0,74,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,14,0,0, +0,14,0,14,0, +0,0,14,0,0, +0,0,0,0,0 + + + + +0,0,0,0,0, +0,0,0,0,0, +0,0,2,0,0, +0,0,0,0,0, +0,0,0,0,0 + + + diff --git a/Rules/desertcliffs/rule_cave_100.tmx b/Rules/desertcliffs/rule_cave_100.tmx new file mode 100644 index 0000000..bd25bb0 --- /dev/null +++ b/Rules/desertcliffs/rule_cave_100.tmx @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgoC7wokCPFxKmpT3DHQAAJSFKadQBAAA= + + + + + H4sIAAAAAAAAA2NgGHjAh4NNrJ5RgAoA0841FdQBAAA= + + + + + H4sIAAAAAAAAA2NgGHjgjYNNrJ5RgAoAKzmZutQBAAA= + + + diff --git a/Rules/icecave/rule_icecave.txt b/Rules/icecave/rule_icecave.txt new file mode 100644 index 0000000..c4580a9 --- /dev/null +++ b/Rules/icecave/rule_icecave.txt @@ -0,0 +1,34 @@ +# lines starting with # or // are comments +# all other lines will be parsed and treated as filenames. + +# ice caves... similar to usual caves + +# basic stuff: each rule-tile gets a default tile +./rule_icecave_001.tmx + +# straight walls: +./rule_icecave_002.tmx + +# corners at walls +./rule_icecave_003.tmx +./rule_icecave_004.tmx +./rule_icecave_005.tmx + +# frozen water straight waterside +./rule_icecave_006.tmx + +# frozen water: corners at waterside +./rule_icecave_007.tmx + +# carpet straight +./rule_icecave_009.tmx + +# carpet corners +./rule_icecave_010.tmx + +# entrances and exits +./rule_icecave_020.tmx + +# error handling: some situations cannot be handled properly with this ruleset: +# so indicate these situations with the error-tile +./rule_icecave_100.tmx diff --git a/Rules/icecave/rule_icecave_001.tmx b/Rules/icecave/rule_icecave_001.tmx new file mode 100644 index 0000000..c7c31f9 --- /dev/null +++ b/Rules/icecave/rule_icecave_001.tmx @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIA4IE6CJBbj0DRZzyPEXALXctVNEAQAA + + + + + H4sIAAAAAAAAA2NgIA4wQ2kWKM0KpdmI1A8D7FCaA02ci0RzuKE0D5o4H4nm8ENpASgtCKWFSDADALg2bV1EAQAA + + + + + H4sIAAAAAAAAA2NgIA5oQ2lpNLqVSP0wYASlJdDEyTVHkkrmwPwjgkYTAwCSHrZpRAEAAA== + + + + + H4sIAAAAAAAAA2NgIA4wEeBTCkg1D5d6cs2hxD8ARG/fIUQBAAA= + + + + + H4sIAAAAAAAAA2NgIA8YkKmPWubhUh9AojkBaDQ5AACqeTmWRAEAAA== + + + + + H4sIAAAAAAAAA2NgGAWUAgAV+RUNRAEAAA== + + + + + H4sIAAAAAAAAA2NgGAWUAgAV+RUNRAEAAA== + + + diff --git a/Rules/icecave/rule_icecave_002.tmx b/Rules/icecave/rule_icecave_002.tmx new file mode 100644 index 0000000..0df731d --- /dev/null +++ b/Rules/icecave/rule_icecave_002.tmx @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIA4Ik6FGGAmjq8FnHroabOYQAgAtyHRU2AAAAA== + + + + + H4sIAAAAAAAAA2NgIA4wk6mGGU2cGHPQ1aKbQQwAAE/ZWtvYAAAA + + + + + H4sIAAAAAAAAA2NgoB1gprIcPj3oAAAVANpz2AAAAA== + + + + + H4sIAAAAAAAAA2NgIA5YE6HGG4uYFho/mkj70IEOieoBwW8e8tgAAAA= + + + + + H4sIAAAAAAAAA2NgGBigR2PzAWLr5ITYAAAA + + + + + H4sIAAAAAAAAA2NgIA4wkamGCU2cGHPQ1aKbQQwAAFG7H+7YAAAA + + + diff --git a/Rules/icecave/rule_icecave_003.tmx b/Rules/icecave/rule_icecave_003.tmx new file mode 100644 index 0000000..3dda319 --- /dev/null +++ b/Rules/icecave/rule_icecave_003.tmx @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIA8IQzGxbHL1kAoA+YlsANAAAAA= + + + + + H4sIAAAAAAAAA2NgIA8wE+Dj0sOMhc2AJk4JAAB87igk0AAAAA== + + + + + H4sIAAAAAAAAA2NgIB8wo9EwNjMWNjHm4OKTAgA8hSQr0AAAAA== + + + + + H4sIAAAAAAAAA2NgIA/Io/EVkNi6UFqfTLMpAQCgAAh70AAAAA== + + + diff --git a/Rules/icecave/rule_icecave_004.tmx b/Rules/icecave/rule_icecave_004.tmx new file mode 100644 index 0000000..d7c406b --- /dev/null +++ b/Rules/icecave/rule_icecave_004.tmx @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgwA+EoRidTSs5XAAAY11lnagAAAA= + + + + + H4sIAAAAAAAAA2NgwA+YoRidTYkcA5ocMQAANSMN1qgAAAA= + + + + + H4sIAAAAAAAAA2NgoD9gJsDHBgB9Q1zQqAAAAA== + + + + + H4sIAAAAAAAAA2NgIAzsobQtFjl/KO2LRS4eSscSYQchAAB9+9lsqAAAAA== + + + + + H4sIAAAAAAAAA2NgwA+YoBidTYkcA5ocMQAAqilRnqgAAAA= + + + diff --git a/Rules/icecave/rule_icecave_005.tmx b/Rules/icecave/rule_icecave_005.tmx new file mode 100644 index 0000000..b365906 --- /dev/null +++ b/Rules/icecave/rule_icecave_005.tmx @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIB8Io9GU6MEnLkwCm556SAUAWbn4FWwBAAA= + + + + + H4sIAAAAAAAAA2NgIB8wo9GU6MEnzoyFTch+Uu2hBwAAZhB9h2wBAAA= + + + + + H4sIAAAAAAAAA2NgGJqAGQ8flxwhPcwksMkBAHO5eppsAQAA + + + + + H4sIAAAAAAAAA2NgIB9oQGlNEvRYQGlLNHErKG2DRY8HlPZEE/eC0j5Y9ERA6Ug08SgoHYPHjbQCAKQ1RdVsAQAA + + + + + H4sIAAAAAAAAA2NgIB8wodGU6MFnFr300BoAAErWG9FsAQAA + + + diff --git a/Rules/icecave/rule_icecave_006.tmx b/Rules/icecave/rule_icecave_006.tmx new file mode 100644 index 0000000..d796ca3 --- /dev/null +++ b/Rules/icecave/rule_icecave_006.tmx @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgwA2EkWhhLOL4ALp6YSzi2AAALrUFg5AAAAA= + + + + + H4sIAAAAAAAAA2NgIAzYCPCppQcEAItPfPCQAAAA + + + + + H4sIAAAAAAAAA2NgIAy4CPCppQcEAOTd4SuQAAAA + + + + + H4sIAAAAAAAAA2NgIAz4CPCppQcEAMFTlWKQAAAA + + + + + H4sIAAAAAAAAA2NgIAza0PilROiZisZvIUIPCAAASt1u8JAAAAA= + + + diff --git a/Rules/icecave/rule_icecave_007.tmx b/Rules/icecave/rule_icecave_007.tmx new file mode 100644 index 0000000..a1670d4 --- /dev/null +++ b/Rules/icecave/rule_icecave_007.tmx @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIA8IQzGxbHL1DCe3AQDj6TXRbAEAAA== + + + + + H4sIAAAAAAAAA2NgoC5gg2J0NrI8A5o4LjWUuoMa9hDyDykAANyNKXlsAQAA + + + + + H4sIAAAAAAAAA2NgoC7ggmJ0NrI8A5o4LjWUuoMa9hDyDykAAN2upiFsAQAA + + + + + H4sIAAAAAAAAA2NgoC7gg2J0NrI8A5o4LjWUuoMa9hDyDykAACKwIxZsAQAA + + + + + H4sIAAAAAAAAA2NgoC4oQuMXo/FLoHQZle1FB1Og9DQKzWlC4zdTYBYAacXSPGwBAAA= + + + diff --git a/Rules/icecave/rule_icecave_009.tmx b/Rules/icecave/rule_icecave_009.tmx new file mode 100644 index 0000000..31c7132 --- /dev/null +++ b/Rules/icecave/rule_icecave_009.tmx @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgwA2EkWhhLOL4ALp6YSzi2AAALrUFg5AAAAA= + + + + + H4sIAAAAAAAAA2NgIAzYCfCppQcEAJIt/ZSQAAAA + + + + + H4sIAAAAAAAAA2NgIAy4CfCppQcEAP2/YE+QAAAA + + + + + H4sIAAAAAAAAA2NgIAz4CfCppQcEANgxFAaQAAAA + + + + + H4sIAAAAAAAAA2NgwA3YcbBJBaSYAwA8zLY9kAAAAA== + + + + + H4sIAAAAAAAAA2NgwA24cbBJBaSYAwCnbhfQkAAAAA== + + + + + H4sIAAAAAAAAA2NgwA34cbBJBaSYAwARDac9kAAAAA== + + + + + H4sIAAAAAAAAA2NgIAyM0fhKROhxQuMbEqEHBABmYFlZkAAAAA== + + + diff --git a/Rules/icecave/rule_icecave_010.tmx b/Rules/icecave/rule_icecave_010.tmx new file mode 100644 index 0000000..13b9120 --- /dev/null +++ b/Rules/icecave/rule_icecave_010.tmx @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIA8IQzGxbHL1DCe3AQDj6TXRbAEAAA== + + + + + H4sIAAAAAAAAA2NgoC5gh2J0NrI8A5o4LjWUuoMa9hDyDykAANMIrO9sAQAA + + + + + H4sIAAAAAAAAA2NgoC7ghmJ0NrI8A5o4LjWUuoMa9hDyDykAANIrI7dsAQAA + + + + + H4sIAAAAAAAAA2NgoC7gh2J0NrI8A5o4LjWUuoMa9hDyDykAAC01poBsAQAA + + + + + H4sIAAAAAAAAA2NgIA+wQzE6m5AeXHx2HGrIAeTYQ45/SAUAzKE5fmwBAAA= + + + + + H4sIAAAAAAAAA2NgIA9wQzE6m5AeXHxuHGrIAeTYQ45/SAUATchkcWwBAAA= + + + + + H4sIAAAAAAAAA2NgIA/wQzE6m5AeXHx+HGrIAeTYQ45/SAUADe2AwmwBAAA= + + + + + H4sIAAAAAAAAA2NgoC4IQuMHo/EVobQyle1FB45Q2plCc5LQ+MkUmAUA1eCGkGwBAAA= + + + diff --git a/Rules/icecave/rule_icecave_020.tmx b/Rules/icecave/rule_icecave_020.tmx new file mode 100644 index 0000000..ff74b40 --- /dev/null +++ b/Rules/icecave/rule_icecave_020.tmx @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIA4II2F6q8Gmhxg1hAAAKDCfLPwAAAA= + + + + + H4sIAAAAAAAAA2NgIA4wI2F6qBEkoAabHiES9QAA7GlTvPwAAAA= + + + + + H4sIAAAAAAAAA2NgIA5oI2FcwBaI7YDYHo+aECAOBeIwPGpSgDgViNOIdBsISCNhYgEAc8NUGPwAAAA= + + + + + H4sIAAAAAAAAA2NgGPxAH4gTgFgXjxp5INYDYgUSzAUA1uf1CPwAAAA= + + + + + H4sIAAAAAAAAA2NgoC9gQsL41DAQUEMNPQBW4FMC/AAAAA== + + + diff --git a/Rules/icecave/rule_icecave_100.tmx b/Rules/icecave/rule_icecave_100.tmx new file mode 100644 index 0000000..a7c9936 --- /dev/null +++ b/Rules/icecave/rule_icecave_100.tmx @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + H4sIAAAAAAAAA2NgIA4IEyEujEQLo/FJMQdZDJc5hAAAgNct+9gAAAA= + + + + + H4sIAAAAAAAAA2NgoB5gw8FmJkIvLjXE6MUGAC5qS5vYAAAA + + + + + H4sIAAAAAAAAA2NgoB7gwsFmJkIvLjXE6MUGAFQuCaTYAAAA + + + + + H4sIAAAAAAAAA2NgoB7gw8FmJkIvLjXE6MUGAL3v5wfYAAAA + + + + + H4sIAAAAAAAAA2NgoB4QIYJNjF5ixAkBAOvVVsfYAAAA + + + diff --git a/Rules/rule_cave.tmx b/Rules/rule_cave.tmx new file mode 100644 index 0000000..e134398 --- /dev/null +++ b/Rules/rule_cave.tmx @@ -0,0 +1,375 @@ + + + + + + + + + + + + + + + + +31,31,0,31,31,0,31,31,0,31,31,0,31,31,0,31,31,0,0,31,0,31,0,0,0,0,0,0,0,0,0,0, +31,31,0,31,31,0,31,31,0,31,31,0,31,31,0,31,31,0,31,31,0,31,70,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,31,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,70,0,0,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +75,0,0,0,0,0,0,0,70,70,0,70,70,0,0,0,0,0,0,70,70,70,0,0,70,70,0,0,0,0,0,0, +75,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,70,70,0,0,70,70,0,0,0,0,0,0, +75,0,70,70,0,70,70,0,70,0,0,70,70,0,0,0,0,0,0,70,0,0,0,0,70,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,70,70,0,0,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,70,70,0,0,70,70,0,0,0,0,0,0, +70,0,70,0,70,70,0,70,70,0,0,0,0,0,0,0,0,0,0,70,70,70,0,0,70,70,0,0,0,0,0,0, +70,0,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,0,0,0,70,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +70,70,0,70,70,0,70,70,0,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +70,70,0,70,70,0,70,70,0,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +70,70,0,70,70,0,70,70,0,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +70,70,0,70,70,0,70,70,0,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0, +2,146,0,146,2,0,146,146,0,146,146,0,146,146,0,146,146,0,146,2,0,2,146,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,11,0,0,146,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +146,0,0,0,0,0,0,0,146,50,0,146,11,0,0,0,0,0,0,146,146,146,0,0,146,2,0,0,0,0,0,0, +146,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,146,11,11,0,0,11,2,0,0,0,0,0,0, +2,0,50,2,0,2,50,0,11,0,0,2,146,0,0,0,0,0,0,11,0,0,0,0,11,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,50,146,0,0,11,146,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,146,146,146,0,0,2,146,0,0,0,0,0,0, +2,0,114,0,114,2,0,2,114,0,0,0,0,0,0,0,0,0,0,11,11,146,0,0,2,11,0,0,0,0,0,0, +114,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,11,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,113,0,115,2,0,130,114,0,114,130,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +98,114,0,114,98,0,2,113,0,115,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +130,2,0,2,113,0,2,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,2,0,2,2,0,115,2,0,2,98,0,0,0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,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,514,0,514,0,0,0,514,0,514,0,0,0,0,0,0,0,0,0,0, +0,514,0,514,0,0,514,514,0,514,514,0,514,514,0,514,514,0,514,514,0,514,514,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,514,0,514,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,514,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +514,0,0,514,0,514,0,0,0,514,0,0,514,0,0,0,0,0,0,514,514,514,0,0,514,514,0,0,0,0,0,0, +514,0,0,514,0,514,0,0,0,0,0,0,0,0,0,0,0,0,0,514,514,514,0,0,514,514,0,0,0,0,0,0, +514,0,514,514,0,514,514,0,514,0,0,0,0,0,0,0,0,0,0,514,0,0,0,0,514,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,514,0,0,0,514,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,514,514,514,0,0,514,514,0,0,0,0,0,0, +0,0,0,0,516,0,0,0,516,0,0,0,0,0,0,0,0,0,0,514,514,514,0,0,514,514,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,514,0,0,0,514,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,516,0,516,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,516,0,0,514,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/Rules/rules.txt b/Rules/rules.txt new file mode 100644 index 0000000..4bd5986 --- /dev/null +++ b/Rules/rules.txt @@ -0,0 +1,17 @@ +# Comment the rules which are not in use + +# Micksha Cave +#caverules.txt + +# Cave Rules +cave/rule_cave.txt + +# Castle Rules (bad tileset) +#castle_indoor/rule_castle_indoor.txt + +# Ice Cave Rules +#icecave/rule_icecave.txt + +# Desert Cliffs Rules +#desertcliffs/rule_cave.txt + diff --git a/Rules/tilesets/set_castle_indoor.png b/Rules/tilesets/set_castle_indoor.png new file mode 100644 index 0000000..7f02def Binary files /dev/null and b/Rules/tilesets/set_castle_indoor.png differ diff --git a/Rules/tilesets/set_cave.png b/Rules/tilesets/set_cave.png new file mode 100644 index 0000000..aa6e1bf Binary files /dev/null and b/Rules/tilesets/set_cave.png differ diff --git a/Rules/tilesets/set_desertcliff.png b/Rules/tilesets/set_desertcliff.png new file mode 100644 index 0000000..3ead83d Binary files /dev/null and b/Rules/tilesets/set_desertcliff.png differ diff --git a/Rules/tilesets/set_hlw.png b/Rules/tilesets/set_hlw.png new file mode 100644 index 0000000..ec17f1e Binary files /dev/null and b/Rules/tilesets/set_hlw.png differ diff --git a/Rules/tilesets/set_icecave.png b/Rules/tilesets/set_icecave.png new file mode 100644 index 0000000..8a1319b Binary files /dev/null and b/Rules/tilesets/set_icecave.png differ diff --git a/Rules/tilesets/set_icemountain.png b/Rules/tilesets/set_icemountain.png new file mode 100644 index 0000000..7a8613e Binary files /dev/null and b/Rules/tilesets/set_icemountain.png differ diff --git a/Rules/tilesets/set_rules.png b/Rules/tilesets/set_rules.png new file mode 100644 index 0000000..bf7f93c Binary files /dev/null and b/Rules/tilesets/set_rules.png differ diff --git a/Rules/tilesets/set_woodland.png b/Rules/tilesets/set_woodland.png new file mode 100644 index 0000000..9661f07 Binary files /dev/null and b/Rules/tilesets/set_woodland.png differ diff --git a/adler32/Makefile b/adler32/Makefile new file mode 100644 index 0000000..42f101a --- /dev/null +++ b/adler32/Makefile @@ -0,0 +1,16 @@ +prefix=/usr/local +bindir=${prefix}/bin + +LDLIBS=-lz + +all: adler32 + +adler32: adler32.c + +clean: + rm -f adler32 + +install: + install -D adler32 ${bindir}/ + +.PHONY: clean install diff --git a/adler32/adler32 b/adler32/adler32 new file mode 100755 index 0000000..a934ff7 Binary files /dev/null and b/adler32/adler32 differ diff --git a/adler32/adler32.c b/adler32/adler32.c new file mode 100644 index 0000000..5dd7e4c --- /dev/null +++ b/adler32/adler32.c @@ -0,0 +1,68 @@ +/* + * adler32.c (c) 2006 Bjorn Lindeijer + * License: GPL, v2 or later + * + * Calculates Adler-32 checksums for all files passed as argument. + * + * Usage: adler32 [file]... + */ + +#include +#include +#include + +/** + * Calculates the Adler-32 checksum for the given file. + */ +unsigned long fadler32(FILE *file) +{ + // Obtain file size + fseek(file, 0, SEEK_END); + long fileSize = ftell(file); + rewind(file); + + // Calculate Adler-32 checksum + char *buffer = (char*) malloc(fileSize); + fread(buffer, 1, fileSize, file); + unsigned long adler = adler32(0L, Z_NULL, 0); + adler = adler32(adler, (Bytef*) buffer, fileSize); + free(buffer); + + return adler; +} + +/** + * Prints out usage and exists. + */ +void print_usage() +{ + printf("Usage: adler32 [file]...\n"); + exit(0); +} + +int main(int argc, char *argv[]) +{ + int i; /**< Loops through arguments. */ + + if (argc == 1) + { + print_usage(); + } + + for (i = 1; i < argc; ++i) + { + FILE *file = fopen(argv[i], "r"); + + if (!file) + { + printf("Error while opening '%s' for reading!\n", argv[i]); + exit(1); + } + + unsigned long adler = fadler32(file); + printf("%s %lx\n", argv[i], adler); + fclose(file); + } + + return 0; +} diff --git a/client/aurora.py b/client/aurora.py new file mode 100755 index 0000000..38ed174 --- /dev/null +++ b/client/aurora.py @@ -0,0 +1,37 @@ +#!/usr/bin/python2.7 + +# Setup +events=["Expo", "Fishing", "Kamelot", "Regnum", "Raid", "Tower", "Mining", + "Anniversary", "Christmas", "Easter", "Patrick", "Thanksgiving", "Valentine", + "Olympics", "Candor", "Worker"] + +# Functions +def headers(val): + return '\n\t\n\t\t\n' % val + +def navigation(): + nav="" + nav+='\t\t\t\n\t\n' + +def data(val): + bf='\t\t\t\n' % val + return bf + +# Begin +f=open("aurora.tmp", "w") + +f.write('\n\n') + +for evtc in sorted(events): + f.write(headers(evtc)) + f.write(data(evtc)) + f.write(navigation()) + f.write(tail()) + +f.write('\n') +f.close() + diff --git a/client/dailylogin.py b/client/dailylogin.py new file mode 100755 index 0000000..52c945d --- /dev/null +++ b/client/dailylogin.py @@ -0,0 +1,86 @@ +#!/usr/bin/python2.7 + +# Setup +x=y=0 +i=j=0 + +# Functions +def headers(val): + return '\n\t\n\t\t\n\t\t\t\n \n\t\n' + +def override_check(vl, over, text1, text2): + global j + if not over: + j=0 + return '\t\t\t\n' % (text1, text2) + else: + j+=1 + if (j == vl): + return '\t\t\t\n' % (text1) + elif (j < vl): + return '\t\t\t\n' % (text1) + else: + return "" + +def spammer(val, override=False): + bf="" + + bf+=override_check(val, override, 'x="35" y="35"', 'jexp') + bf+=override_check(val, override, 'x="70" y="35"', 'bexp') + bf+=override_check(val, override, 'x="105" y="35"', 'sc') + bf+=override_check(val, override, 'x="140" y="35"', 'jexp') + bf+=override_check(val, override, 'x="175" y="35"', 'bexp') + + bf+=override_check(val, override, 'x="35" y="70"', 'gp') + bf+=override_check(val, override, 'x="70" y="70"', 'sc') + bf+=override_check(val, override, 'x="105" y="70"', 'bexp') + bf+=override_check(val, override, 'x="140" y="70"', 'gp') + bf+=override_check(val, override, 'x="175" y="70"', 'jexp') + + bf+=override_check(val, override, 'x="35" y="105"', 'bexp') + bf+=override_check(val, override, 'x="70" y="105"', 'gp') + bf+=override_check(val, override, 'x="105" y="105"', 'jexp') + bf+=override_check(val, override, 'x="140" y="105"', 'gift') + bf+=override_check(val, override, 'x="175" y="105"', 'gp') + + bf+=override_check(val, override, 'x="35" y="140"', 'jexp') + bf+=override_check(val, override, 'x="70" y="140"', 'bexp') + bf+=override_check(val, override, 'x="105" y="140"', 'gp') + bf+=override_check(val, override, 'x="140" y="140"', 'jexp') + bf+=override_check(val, override, 'x="175" y="140"', 'bexp') + + bf+=override_check(val, override, 'x="35" y="175"', 'gift') + bf+=override_check(val, override, 'x="70" y="175"', 'jexp') + bf+=override_check(val, override, 'x="105" y="175"', 'bexp') + bf+=override_check(val, override, 'x="140" y="175"', 'gp') + bf+=override_check(val, override, 'x="175" y="175"', 'jexp') + + bf+=override_check(val, override, 'x="35" y="210"', 'bexp') + bf+=override_check(val, override, 'x="70" y="210"', 'last') + bf+=override_check(val, override, 'x="105" y="210"', 'sc') + bf+=override_check(val, override, 'x="140" y="210"', 'sc') + bf+=override_check(val, override, 'x="175" y="210"', 'sc') + + bf+=override_check(val, override, 'x="35" y="245"', 'sc') + + return bf + +# Begin +f=open("daily.tmp", "w") + +f.write('\n\n') + +while (i < 31): + i+=1 + f.write(headers(i)) + f.write(spammer(i, False)) + f.write('\n\t\t\t\n\n\t\t\t\n') + f.write(spammer(i, True)) + f.write(tail()) + +f.write('\n') +f.close() + diff --git a/client/magicacademy.py b/client/magicacademy.py new file mode 100755 index 0000000..c6ee44c --- /dev/null +++ b/client/magicacademy.py @@ -0,0 +1,60 @@ +#!/usr/bin/python2.7 + +# Setup +class dlist(list): + def __setitem__(self, index, value): + size = len(self) + if index >= size: + self.extend(None for _ in range(size, index + 1)) + list.__setitem__(self, index, value) + +class Skill: + def __init__(self, ID, NAME, DESC): + self.id=ID + self.name=NAME + self.desc=DESC + +def skill_tree(sk1=None, sk2=None, sk3=None, sk4=None, sk5=None): + return [sk1, sk2, sk3, sk4, sk5] + +academy={} + +# Skill shortcuts +SK_HEAL=Skill("heal", "Healing", "Heals target") +SK_ABHEAL=Skill("abheal", "High Healing", "Supremely heals target") + +# Scholarship +academy["scholarship"]=dlist() +academy["scholarship"].append(skill_tree(SK_HEAL, None, SK_ABHEAL, None, None)) + + +# Functions +def headers(classe, val): + return '\n\t\n\t\t\n' % (classe, val) + +def navigation(): + nav="" + nav+='\t\t\t\n\t\n' + +def data(val): + bf='\t\t\t\n' % val + return bf + +# Begin +f=open("aurora.tmp", "w") + +f.write('\n\n') + +for evtc in sorted(events): + f.write(headers("none", evtc)) + f.write(data(evtc)) + f.write(navigation()) + f.write(tail()) + +f.write('\n') +f.close() + diff --git a/client/minimap-dyecmd.py b/client/minimap-dyecmd.py new file mode 100755 index 0000000..c43a4e4 --- /dev/null +++ b/client/minimap-dyecmd.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +f=open("minimap-dyecmd.sh", "w"); +CLIENT_DATA_ROOT="../../clientdata" + +map_names = sorted([os.path.splitext(p)[0] for p in os.listdir(os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps'))]) + +f.write('cd '+os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps')+'\n') +for c in map_names: + if os.path.exists(os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps', c+u'.png')): + i=c+u'.png' + f.write("dyecmd %s tmp ; mv tmp %s\n" % (i, i)) + f.write("echo \"Converted "+i+" successfully.\"\n") + +f.close() diff --git a/client/minimap-dyecmd.sh b/client/minimap-dyecmd.sh new file mode 100755 index 0000000..e69de29 diff --git a/client/minimap-override/none.png b/client/minimap-override/none.png new file mode 100644 index 0000000..539e992 Binary files /dev/null and b/client/minimap-override/none.png differ diff --git a/client/minimap-render.py b/client/minimap-render.py new file mode 100755 index 0000000..9d4bac1 --- /dev/null +++ b/client/minimap-render.py @@ -0,0 +1,171 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import sys +import os +import subprocess +import tempfile + +CLIENT_DATA_ROOT = os.path.realpath( + os.path.join( + os.path.dirname(__file__), + u'../../clientdata', + ) +) + +SKIP_DOMAIN="030-" + +class MinimapRenderer(object): + + PROGRAMS = { + 'default': { + 'tmxrasterizer': 'tmxrasterizer', + 'im_convert': 'convert', + }, + 'win32': { + 'tmxrasterizer': 'tmxrasterizer.exe', + 'im_convert': 'convert.exe', + }, + } + + def __init__(self, map_name, tilesize, useAntiAliasing): + self.map_name = map_name + self.tilesize = tilesize + self.useAntiAliasing = useAntiAliasing + + def render(self): + """ + Processes a map + """ + if not os.path.exists(os.path.join(CLIENT_DATA_ROOT, u'maps', self.map_name+u'.tmx')): + sys.stderr.write(u'Invalid map name: %s. Skipping.\n' % self.map_name) + return 1 + if not self.map_name.endswith(u'.tmx'): + self.map_name = self.map_name+u'.tmx' + if SKIP_DOMAIN in self.map_name: + print(u'Skipping %s (regex)...\n' % self.map_name) + return 0 + + map_number = os.path.splitext(os.path.basename(self.map_name))[0] + tmx_file = os.path.join(CLIENT_DATA_ROOT, u'maps', self.map_name) + minimap_file = os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps', map_number+u'.png') + + prefix = os.path.commonprefix((tmx_file, minimap_file)) + sys.stdout.write(u'%s -> %s\n' % (os.path.relpath(tmx_file, prefix), os.path.relpath(minimap_file, prefix))) + + try: + self.do_render(tmx_file, minimap_file) + except Exception as e: + sys.stderr.write(u'\x1b[31m\x1b[1mError while rendering %s: %s\x1b[0m\n' % (self.map_name, e)) + return 1 + else: + return 0 + + def do_render(self, tmx_file, bitmap_file): + """ + The map rendering implementation + """ + platform_programs = MinimapRenderer.PROGRAMS.get(sys.platform, MinimapRenderer.PROGRAMS.get('default')) + # tmx rasterize + mrf, map_raster = tempfile.mkstemp(suffix='.png') + tmxrasterizer_cmd = [ + #platform_programs.get('tmxrasterizer'), + '../../tiled/default/install-root/usr/local/bin/tmxrasterizer', + '--tilesize', str(self.tilesize), '--hide-layer', 'Collision','--hide-layer', 'Height','--hide-layer', 'Collisions','--hide-layer', 'collision','--hide-layer', 'height','--hide-layer', 'Heights', '--hide-layer', 'height', '--ignore-visibility', '--hide-object-layers', + ] + if self.useAntiAliasing: + tmxrasterizer_cmd.append('--anti-aliasing') + tmxrasterizer_cmd += [tmx_file, map_raster] + subprocess.check_call(tmxrasterizer_cmd) + if os.stat(map_raster).st_size == 0: + raise Exception('A problem was encountered when rendering a map') + # add cell-shading to the minimap to improve readability + ebf, edges_bitmap = tempfile.mkstemp(suffix='.png') + subprocess.check_call([ + platform_programs.get('im_convert'), map_raster, + '-set', 'option:convolve:scale', '-1!', + '-morphology', 'Convolve', 'Laplacian:0', + '-colorspace', 'gray', + '-auto-level', + '-threshold', '2.8%', + '-negate', + '-transparent', 'white', + edges_bitmap + ]) + subprocess.check_call([ + platform_programs.get('im_convert'), map_raster, edges_bitmap, + '-compose', 'Dissolve', + '-define', 'compose:args=35', + '-composite', + bitmap_file + ]) + os.unlink(map_raster) + os.unlink(edges_bitmap) + + @staticmethod + def check_programs(): + """ + Checks the require programs are available + """ + def which(program): + import os + def is_exe(fpath): + return os.path.isfile(fpath) and os.access(fpath, os.X_OK) + fpath, fname = os.path.split(program) + if fpath: + if is_exe(program): + return program + else: + for path in os.environ["PATH"].split(os.pathsep): + exe_file = os.path.join(path, program) + if is_exe(exe_file): + return exe_file + return None + + platform_programs = MinimapRenderer.PROGRAMS.get(sys.platform, MinimapRenderer.PROGRAMS.get('default')) + for program in platform_programs.values(): + if not which(program): + raise Exception('The required "%s" program is missing from your PATH.' % program) + +def usage(): + sys.stderr.write(u'''Usage: %s MAP_NAME... + + Example: + $ ./minimap-render.py 007-1 + will render the map at maps/007-1.tmx in the graphics/minimaps directory. + $ ./minimap-render.py all + will render all existing maps found in the maps directory. + $ ./minimap-render.py update + will update all existing minimaps found in the graphics/minimaps directory. + + For convenience, + $ ./minimap-render.py 007-1.tmx + is also accepted. + \n''' % sys.argv[0]) + +def main(): + if not len(sys.argv) > 1: + usage() + return 127 + try: + MinimapRenderer.check_programs() + except Exception as e: + sys.stderr.write(u'%s\n' % e) + return 126 + + status = 0 + if sys.argv[1].lower() == 'all': + map_names = sorted([os.path.splitext(p)[0] for p in os.listdir(os.path.join(CLIENT_DATA_ROOT, u'maps'))]) + elif sys.argv[1].lower() == 'update': + map_names = sorted([os.path.splitext(p)[0] for p in os.listdir(os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps'))]) + else: + map_names = sys.argv[1:] + + for map_name in map_names: + # Render tiles at 1 pixel size + map_renderer = MinimapRenderer(map_name, 1, True) + status += map_renderer.render() + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/client/skills.py b/client/skills.py new file mode 100755 index 0000000..bfe59f3 --- /dev/null +++ b/client/skills.py @@ -0,0 +1,137 @@ +#!/usr/bin/python2.7 + +# Setup +x=y=0 +i=j=0 + +skills=[] + +class Skill: + def __init__(self, sid, name, icon, desc, bmp, amp, cmd, maxlv): + self.id=sid + self.lv=maxlv + self.name=name + self.icon=icon + self.cmd=cmd + + self.desc=desc + self.bmp=bmp + self.amp=amp + +def fillskill(sk, lv): + sid=sk.id + name=sk.name + icon=sk.icon + desc=sk.desc + bmp=sk.bmp + amp=sk.amp + cmd=sk.cmd + + if lv > 0: + lvstr='\t\t\tlevel="%d"\n' % lv + mpstr='%d MP. ' % int(bmp+(amp*(lv-1))) + cmdstr='\t\t\tinvokeCmd="@sk-%s"\n' % cmd + else: + lvstr='' + lv=1 + mpstr='' + cmdstr='' + + msg='\ +\t\t\n' % (sid, name, icon, mpstr, desc, cmdstr, lvstr) + return msg + + + + + + + + + + + +# Declare the skills + +######################### +### Transmutation Skills +######################### +#skills.append(Skill(20024, "Parum", "other/parum", "Transmutate wood into stuff.", +#50, 0, "parum", 0)) +#skills.append(Skill(20027, "Transmutation", "transmutation", "Transmute stuff into other stuff.", +#215, -5, "trans", 10)) + +######################### +### Summon Skills +######################### +skills.append(Skill(20025, "Summon Maggots", "other/kalmurk", "2x Maggot Slime.", +40, 5, "kalmurk", 0)) +skills.append(Skill(20029, "Summon Dragon", "none", "4x Dragon Scale.", +50, 4, "dragokin", 0)) +skills.append(Skill(20030, "Summon Slimes", "none", "15x Maggot Slime.", +30, 3, "limerizer", 0)) +skills.append(Skill(20043, "Summon Fluffies", "none", "1x White Fur.", +25, 4, "cuteheart", 0)) +skills.append(Skill(20042, "Summon Spiky", "none", "1x Mushroom Spores.", +25, 5, "kalspike", 0)) +skills.append(Skill(20041, "Summon Mouboo", "none", "1x Mouboo Figurine.", +25, 5, "kalboo", 0)) +skills.append(Skill(20036, "Summon Snakes", "none", "1x Snake Egg.", +35, 6, "halhiss", 0)) +skills.append(Skill(20037, "Summon Wolverns", "none", "5x White Fur.", +45, 5, "kalwulf", 0)) +skills.append(Skill(20038, "Summon Fairies", "none", "1x Fluo Powder.", +40, 4, "fairykingdom", 0)) +skills.append(Skill(20039, "Summon Yetis", "none", "1x Frozen Yeti Tear.", +37, 5, "frozenheart", 0)) +skills.append(Skill(20040, "Summon Terranite", "none", "1x Terranite Ore.", +47, 5, "stoneheart", 0)) +skills.append(Skill(20044, "Summon Plants", "none", "2x Root.", +30, 3, "plantkingdom", 5)) +skills.append(Skill(20047, "Summon Ducks", "none", "1x Cherry Cake. Req. Rubber Ducky.", +40, 7, "ducky", 0)) +skills.append(Skill(20049, "Summon Pixies", "none", "3x Fluo Powder.", +40, 4, "fairyempire", 0)) + +skills.append(Skill(20023, "Summon Cave Maggot", "none", "Req. Zarkor Scroll.", +40, 7, "zarkor", 0)) + + + + + + + + + + + + +# Begin +f=open("skills.tmp", "w") + +f.write('\n\n\n\t\n') + +for sk in skills: + i=0 + while (i < sk.lv): + i+=1 + f.write(fillskill(sk, i)) + + # Fill the fallback + if (int(sk.lv)): + sk.desc="MP + "+str(sk.amp)+"/lv. "+sk.desc + f.write(fillskill(sk, -1)) + f.write("\n") + +# We're done +f.write('\n\t\n') +f.close() + diff --git a/client/tmxrasterizer b/client/tmxrasterizer new file mode 100755 index 0000000..f079132 Binary files /dev/null and b/client/tmxrasterizer differ diff --git a/client/weapons.py b/client/weapons.py new file mode 100755 index 0000000..cc45d01 --- /dev/null +++ b/client/weapons.py @@ -0,0 +1,89 @@ +#!/usr/bin/python2.7 + +class Item: + def __init__(self, xid): + self.id=xid + self.lvl=0 + +a=open("../../clientdata/items.xml", "r") + +swords=[] +bows=[] +shields=[] + +gid="0" +rid=0 +ctx=Item(0) +mem=[] + +for l in a: + if "= 2700 and rid <= 2899: + shields.append(rid) + elif rid >= 3500 and rid <= 3999: + swords.append(rid) + elif rid >= 6000 and rid <= 6499: + bows.append(rid) + +a.close() + +#shields=sorted(shields, reverse=True) +#bows=sorted(bows, reverse=True) +#swords=sorted(swords, reverse=True) + +b=open("weapons.tmp", "w") + +b.write('\n\ +\n\ +\n\ +\n') + +b.write(' \n') + +for i in swords: + b.write(' \n' % i) + +b.write(' \n \n') + +for i in bows: + b.write(' \n' % i) + +b.write(' \n \n') + +for i in shields: + b.write(' \n' % i) + +b.write(' \n') + +b.close() diff --git a/hercules/.gitignore b/hercules/.gitignore new file mode 100644 index 0000000..7eeffc2 --- /dev/null +++ b/hercules/.gitignore @@ -0,0 +1,12 @@ +clientdata +maps +serverdata +oldserverdata +newserverdata +mapcache +olddb +newdb +rodata +tools/luadec + +*.pyc diff --git a/hercules/code/__init__.py b/hercules/code/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hercules/code/clienttoserver/__init__.py b/hercules/code/clienttoserver/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hercules/code/clienttoserver/maps.py b/hercules/code/clienttoserver/maps.py new file mode 100644 index 0000000..69ef4ef --- /dev/null +++ b/hercules/code/clienttoserver/maps.py @@ -0,0 +1,190 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import array +import csv +import hashlib +import os +import zlib +import struct +import StringIO +from xml.dom import minidom + +from code.fileutils import makeDir, writeInt16, writeInt32, writeData, removeDir + +def getTmxFiles(srcDir): + names = [] + for name in os.listdir(srcDir): + names.append(name) + names.sort() + for name in names: + fileName = srcDir + name + if os.path.isfile(fileName) == False: + continue + if name.endswith(".tmx") == False: + continue + yield (fileName, name) + +def findFirstGid(tilesets, tile): + found = -1 + for t in tilesets: + if t <= tile: + found = t + break + return found + +# client +# 0 - walkable ground +# 1 - non walkable wall +# 2 - air allowed shootable too +# 3 - water allowed water, shootable too +# 4 - sit, walkable ground +# 5 - player walk not allowed +# 6 - monster walk not allowed + +# server +# 0 - walkable ground +# 1 - non walkable wall +# 2 - air allowed shootable too +# 3 - water allowed water, shootable too +# 4 - sit, walkable ground +# 5 - none +# 6 - monster walk not allowed +def convertTileType(tile, idx, width, height): + if tile == 5: + tile = 0; + if tile > 6 or tile < 0: + y = int(idx / width) + x = idx - y * width + print "Error: wrong tile: ({0}, {1}) = {2}".format(x, y, tile) + tile = 1 + return tile + +# map file format +# +# int16 version; +# uint8 md5_checksum[16]; +# int16 xs; +# int16 ys; +# int32 len; +# ...data... + +def recreateMap(names): + collisionLayerName = "collision" + destDir = "../../serverdata/maps/re/" + tmxName = names[0] + mCaheName = destDir + names[1][:-3] + "mcache" + with open(mCaheName, "wb") as w: + print tmxName + dom = minidom.parse(tmxName) + root = dom.documentElement + tilesets = [] + for tileset in root.getElementsByTagName("tileset"): + tilesets.append(int(tileset.attributes["firstgid"].value)) + tilesets.sort(reverse = True) + found = False + for layer in root.getElementsByTagName("layer"): + if layer.attributes["name"].value.lower() == collisionLayerName: + data = layer.getElementsByTagName("data") + if data is None or len(data) != 1: + continue + data = data[0] + width = int(layer.attributes["width"].value) + height = int(layer.attributes["height"].value) + encoding = data.attributes["encoding"].value + try: + compression = data.attributes["compression"].value + except: + compression = "" + + tiles = [] + if encoding == "base64": + binData = data.childNodes[0].data.strip() + binData = binData.decode('base64') + if compression == "gzip": + dc = zlib.decompressobj(16 + zlib.MAX_WBITS) + else: + dc = zlib.decompressobj() + layerData = dc.decompress(binData) + arr = array.array("I") + arr.fromstring(layerData) + idx = 0 + for tile in arr: + if tile == 0: + tileType = 0 + else: + firstgid = findFirstGid(tilesets, tile) + tileType = convertTileType(tile - firstgid, idx, width, height); + tiles.append(tileType) + idx = idx + 1 + elif encoding == "csv": + binData = data.childNodes[0].data.strip() + f = StringIO.StringIO(binData) + arr = list(csv.reader(f, delimiter=',', quotechar='|')) + idx = 0 + for row in arr: + for item in row: + if item != "": + tile = int(item) + if tile == 0: + tileType = 0 + else: + firstgid = findFirstGid(tilesets, tile) + tileType = convertTileType(tile - firstgid, idx, width, height); + # tmx collision format + # 0 - walkable ground + # 1 - non walkable wall + # 2 - air allowed shootable too + # 3 - water allowed water, shootable too + # 4 - sit, walkable ground + # 5 - none + + # server collision format + # 000 0 - walkable, shootable + # 001 1 - wall + # 010 2 - same with 0 + # 011 3 - walkable, shootable, water + # 100 4 - same with 0 + # 101 5 - shootable + # 110 6 - same with 0 + # 111 7 - none + if tileType > 128 or tileType < 0: + tileType = 1 + tiles.append(tileType) + idx = idx + 1 + f.close() + else: + print "map format not supported: " + tmxName + continue + + #comp = zlib.compressobj() + binData = struct.pack(str(len(tiles))+"B", *tiles) + binData = zlib.compress(binData) + writeInt16(w, 1) + writeData(w, hashlib.md5(binData).digest()) # 16 bytes + writeInt16(w, width) + writeInt16(w, height) + writeInt32(w, len(binData)) + writeData(w, binData) + print tmxName + found = True + break + if found == False: + print "Error: missing collision layer in file: {0}".format(tmxName) + return + return + with open(mCaheName + ".debug", "wb") as w: + writeInt16(w, width) + writeInt16(w, height) + writeData(w, struct.pack(str(len(tiles))+"B", *tiles)) + + +def recreateMapCache(): + destDir = "../../serverdata/maps/re/" + srcDir = "../../clientdata/maps/" + removeDir(destDir) + makeDir(destDir) + for names in getTmxFiles(srcDir): + recreateMap(names) diff --git a/hercules/code/configutils.py b/hercules/code/configutils.py new file mode 100644 index 0000000..6d9ddb2 --- /dev/null +++ b/hercules/code/configutils.py @@ -0,0 +1,51 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +def writeIntField(w, name, value): + if value == "": + value = "0" + w.write(" {0}: {1}\n".format(name, value)) + +def writeIntField2(w, name, value): + if value == "": + value = "0" + w.write(" {0}: {1}\n".format(name, value)) + +def writeStrField(w, name, value): + w.write(" {0}: \"{1}\"\n".format(name, value)) + +def writeCondField2(w, cond, name): + if cond != 0: + w.write(" {0}: true\n".format(name)) + +def writeSubField(w, name, value): + w.write(" {0}: {1}\n".format(name, value)) + +def writeFieldArr(w, name, value, value2): + w.write(" {0}: [{1}, {2}]\n".format(name, value, value2)) + +def writeFieldList(w, name, value, value2): + w.write(" {0}: ({1}, {2})\n".format(name, value, value2)) + +def writeStartBlock(w, text): + w.write(" {0}: {{\n".format(text)) + +def writeEndBlock(w): + w.write(" }\n") + +def writeStartScript(w, name): + w.write(" {0}: <\"\n".format(name)) + +def writeEndScript(w): + w.write(" \">\n") + +def isHaveData(fields, start, cnt): + for f in range(0, cnt): + value = fields[start + f * 2] + chance = fields[start + f * 2] + if value == "" or value == "0" or chance == "" or chance == "0": + continue + return True + return False diff --git a/hercules/code/fileutils.py b/hercules/code/fileutils.py new file mode 100644 index 0000000..a0635d4 --- /dev/null +++ b/hercules/code/fileutils.py @@ -0,0 +1,86 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import array +import os +import struct +import shutil + +def readInt32(f): + data = f.read(4) + arr = array.array("I") + arr.fromstring(data) + return arr[0] + +def readInt16(f): + data = f.read(2) + arr = array.array("H") + arr.fromstring(data) + return arr[0] + +def readInt8(f): + data = f.read(1) + arr = array.array("B") + arr.fromstring(data) + return arr[0] + +def readMapName(f): + data = f.read(12) + data = str(data) + while data[-1] == '\x00': + data = data[:-1] + return data + +def skipData(f, sz): + f.read(sz) + +def readData(f, sz): + return f.read(sz) + +def readFile(path): + with open(path, "r") as f: + return f.read() + +def writeInt32(f, i): + f.write(struct.pack("I", i)) + +def writeInt16(f, i): + f.write(struct.pack("H", i)) + +def writeMapName(f, name): + if len(name) > 12: + name = name[:12] + while len(name) < 12: + name = name + '\x00' + f.write(struct.pack("12s", name)) + +def writeData(f, data): + f.write(data) + +def copyFile(src, dst, name): + shutil.copyfile(src + name, dst + name) + +def saveFile(fileName, data): + with open(fileName, "w") as w: + w.write(data) + +def makeDir(path): + if not os.path.exists(path): + os.makedirs(path) + +def removeDir(path): + if os.path.exists(path): + shutil.rmtree(path) + +def removeAllFiles(path): + if os.path.exists(path): + shutil.rmtree(path) + +def findFileIn(names, dirs): + for name in names: + for path in dirs: + if os.path.exists(path + name): + return path + return None diff --git a/hercules/code/server/__init__.py b/hercules/code/server/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hercules/code/server/account.py b/hercules/code/server/account.py new file mode 100644 index 0000000..7763766 --- /dev/null +++ b/hercules/code/server/account.py @@ -0,0 +1,63 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.fileutils import readFile +from code.stringutils import stripNewLine, escapeSqlStr + +def convertSex(sex): + if sex == "M" or sex == "F" or sex == "S": + return sex + return "M" + +def convertAccount(): + srcFile = "olddb/account.txt" + dstFile = "newdb/login.sql" + fieldsSplit = re.compile("\t") + tpl = readFile("templates/login.sql") + firstLine = True + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `login` VALUES ") + with open(srcFile, "r") as r: + for line in r: + if line[:2] == "//": + continue + rows = fieldsSplit.split(line) + if len(rows) == 2: + continue + if len(rows) != 14: + print "wrong account.txt line: " + stripNewLine(line) + continue + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + w.write(("({account_id},'{userid}','{user_pass}','{sex}'," + + "'{email}',{group_id},{state},{unban_time}," + + "{expiration_time},{logincount},'{lastlogin}'," + + "'{last_ip}','{birthdate}',{character_slots}," + + "'{pincode}',{pincode_change})").format( + account_id = rows[0], + userid = escapeSqlStr(rows[1]), + user_pass = escapeSqlStr(rows[2]), + sex = convertSex(rows[4]), + email = escapeSqlStr(rows[7]), + group_id = 0, + state = 0, + unban_time = rows[12], + expiration_time = rows[9], + logincount = rows[5], + lastlogin = rows[3], + last_ip = rows[10], + birthdate = '0000-00-00', + character_slots = 0, + pincode = '', + pincode_change = 0 + )) + w.write("\n") diff --git a/hercules/code/server/accreg.py b/hercules/code/server/accreg.py new file mode 100644 index 0000000..b69910f --- /dev/null +++ b/hercules/code/server/accreg.py @@ -0,0 +1,52 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.fileutils import readFile +from code.stringutils import stripNewLine + +def convertAccReg(): + srcFile = "olddb/accreg.txt" + dstFile = "newdb/acc_reg_num_db.sql" + fieldsSplit = re.compile("\t") + comaSplit = re.compile(",") + spaceSplit = re.compile(" ") + tpl = readFile("templates/acc_reg_num_db.sql") + firstLine = True + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `acc_reg_num_db` VALUES ") + with open(srcFile, "r") as r: + for line in r: + if line[:2] == "//": + continue + line = stripNewLine(line) + rows = fieldsSplit.split(line) + if len(rows) != 2: + print "wrong accreg.txt line: " + line + continue + + accountId = rows[0] + + data = spaceSplit.split(rows[1]) + for varStr in data: + if varStr == "": + continue + + tmp = comaSplit.split(varStr) + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + w.write(("({account_id},'{key}',{index},{value})").format( + account_id = accountId, + key = tmp[0], + index = "0", + value = tmp[1] + )) + w.write("\n") diff --git a/hercules/code/server/db/__init__.py b/hercules/code/server/db/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hercules/code/server/db/char.py b/hercules/code/server/db/char.py new file mode 100644 index 0000000..cd8e0cc --- /dev/null +++ b/hercules/code/server/db/char.py @@ -0,0 +1,187 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +from code.fileutils import readFile +from code.stringutils import escapeSqlStr + +def saveCharTable(users): + dstFile = "newdb/char.sql" + firstLine = True + tpl = readFile("templates/char.sql") + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `char` VALUES ") + for userId in users: + user = users[userId] + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + w.write(("({char_id},{account_id},{char_num},'{name}',{CLASS}," + + "{base_level},{job_level},{base_exp},{job_exp},{zeny}," + + "{str},{agi},{vit},{INT},{dex},{luk},{max_hp},{hp},{max_sp}," + + "{sp},{status_point},{skill_point},{option},{karma},{manner}," + + "{party_id},{guild_id},{pet_id},{homun_id},{elemental_id}," + + "{hair},{hair_color},{clothes_color},{body},{weapon},{shield}," + + "{head_top},{head_mid},{head_bottom},{robe}," + + "'{last_map}',{last_x},{last_y},'{save_map}',{save_x},{save_y}," + + "{partner_id},{online},{father},{mother},{child},{fame}," + + "{rename},{delete_date},{slotchange},{char_opt},{font}," + + "{unban_time},{uniqueitem_counter},'{sex}',{hotkey_rowshift})").format( + char_id = user.char_id, + account_id = user.account_id, + char_num = user.char_num, + name = escapeSqlStr(user.char_name), + CLASS = user.char_class, + base_level = user.base_level, + job_level = user.job_level, + base_exp = user.base_exp, + job_exp = user.job_exp, + zeny = user.zeny, + str = user.stat_str, + agi = user.stat_agi, + vit = user.stat_vit, + INT = user.stat_int, + dex = user.stat_dex, + luk = user.stat_luk, + max_hp = user.max_hp, + hp = user.hp, + max_sp = user.max_sp, + sp = user.sp, + status_point = user.status_point, + skill_point = user.skill_point, + option = user.option, + karma = user.karma, + manner = user.manner, + party_id = user.party_id, + guild_id = user.guild_id, + pet_id = user.pet_id, + homun_id = "0", + elemental_id = "0", + hair = user.hair, + hair_color = user.hair_color, + clothes_color = user.clothes_color, + body = 0, + weapon = user.weapon, + shield = user.shield, + head_top = user.head_top, + head_mid = user.head_mid, + head_bottom = user.head_bottom, + robe = "0", + last_map = escapeSqlStr(user.last_map), + last_x = user.last_x, + last_y = user.last_y, + save_map = escapeSqlStr(user.save_map), + save_x = user.save_x, + save_y = user.save_y, + partner_id = user.partner_id, + online = "0", + father = "0", + mother = "0", + child = "0", + fame = "0", + rename = "0", + delete_date = "0", + slotchange = "0", + char_opt = "0", + font = "0", + unban_time = "0", + uniqueitem_counter = len(user.inventory), + sex = "U", + hotkey_rowshift = 0 + )) + w.write("\n") + +def saveCharTableCustom(users): + dstFile = "newdb/char.sql" + firstLine = True + tpl = readFile("templates/char.sql") + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `char` VALUES ") + for userId in users: + user = users[userId] + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + w.write(("({char_id},{account_id},{char_num},'{name}',{CLASS}," + + "{base_level},{job_level},{base_exp},{job_exp},{zeny}," + + "{str},{agi},{vit},{INT},{dex},{luk},{max_hp},{hp},{max_sp}," + + "{sp},{status_point},{skill_point},{option},{karma},{manner}," + + "{party_id},{guild_id},{pet_id},{homun_id},{elemental_id}," + + "{hair},{hair_color},{clothes_color},{body},{weapon},{shield}," + + "{head_top},{head_mid},{head_bottom},{robe}," + + "'{last_map}',{last_x},{last_y},'{save_map}',{save_x},{save_y}," + + "{partner_id},{online},{father},{mother},{child},{fame}," + + "{rename},{delete_date},{slotchange},{char_opt},{font}," + + "{unban_time},{uniqueitem_counter},'{sex}',{hotkey_rowshift})").format( + char_id = user.char_id, + account_id = user.account_id, + char_num = user.char_num, + name = escapeSqlStr(user.char_name), + CLASS = 0, + base_level = user.base_level, + job_level = user.job_level, + base_exp = user.base_exp, + job_exp = user.job_exp, + zeny = user.zeny, + str = user.stat_str, + agi = user.stat_agi, + vit = user.stat_vit, + INT = user.stat_int, + dex = user.stat_dex, + luk = user.stat_luk, + max_hp = user.max_hp, + hp = user.hp, + max_sp = user.max_sp, + sp = user.sp, + status_point = user.status_point, + skill_point = user.skill_point, + option = user.option, + karma = user.karma, + manner = user.manner, + party_id = 0, + guild_id = 0, + pet_id = 0, + homun_id = "0", + elemental_id = "0", + hair = user.hair, + hair_color = user.hair_color, + clothes_color = user.clothes_color, + body = 0, + weapon = 0, + shield = 0, + head_top = 0, + head_mid = 0, + head_bottom = 0, + robe = "0", + last_map = "000-2-1", + last_x = 50, + last_y = 37, + save_map = "00-2-1", + save_x = 50, + save_y = 37, + partner_id = user.partner_id, + online = "0", + father = "0", + mother = "0", + child = "0", + fame = "0", + rename = "0", + delete_date = "0", + slotchange = "0", + char_opt = "0", + font = "0", + unban_time = "0", + uniqueitem_counter = len(user.inventory), + sex = "U", + hotkey_rowshift = 0 + )) + w.write("\n") diff --git a/hercules/code/server/db/charregnumdb.py b/hercules/code/server/db/charregnumdb.py new file mode 100644 index 0000000..1617c13 --- /dev/null +++ b/hercules/code/server/db/charregnumdb.py @@ -0,0 +1,34 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +from code.fileutils import readFile + +def saveCharRegNumDbTable(users): + dstFile = "newdb/char_reg_num_db.sql" + firstLine = True + tpl = readFile("templates/char_reg_num_db.sql") + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `char_reg_num_db` VALUES ") + for userId in users: + user = users[userId] + for varKey in user.variables: + if varKey == "ShipQuests": + continue + + varValue = user.variables[varKey] + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + w.write(("({char_id},'{key}',{index},{value})").format( + char_id = user.char_id, + key = varKey, + index = "0", + value = varValue + )) + w.write("\n") diff --git a/hercules/code/server/db/inventory.py b/hercules/code/server/db/inventory.py new file mode 100644 index 0000000..e5c1e6a --- /dev/null +++ b/hercules/code/server/db/inventory.py @@ -0,0 +1,44 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +from code.fileutils import readFile + +def saveInventoryTable(users): + dstFile = "newdb/inventory.sql" + firstLine = True + tpl = readFile("templates/inventory.sql") + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `inventory` VALUES ") + for userId in users: + user = users[userId] + for item in user.inventory: + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + w.write(("({id},{char_id},{nameid},{amount},{equip},{identify}," + + "{refine},{attribute},{card0},{card1},{card2},{card3}," + + "{expire_time},{favorite},{bound},{unique_id})").format( + id = 0, + char_id = user.char_id, + nameid = item.itemId, + amount = item.amount, + equip = item.equip, + identify = "1", + refine = item.refine, + attribute = item.attribute, + card0 = "0", + card1 = "0", + card2 = "0", + card3 = "0", + expire_time = "0", + favorite = "0", + bound = "0", + unique_id = "0" + )) + w.write("\n") diff --git a/hercules/code/server/db/skill.py b/hercules/code/server/db/skill.py new file mode 100644 index 0000000..d21eb3d --- /dev/null +++ b/hercules/code/server/db/skill.py @@ -0,0 +1,31 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +from code.fileutils import readFile + +def saveSkillTable(users): + dstFile = "newdb/skill.sql" + firstLine = True + tpl = readFile("templates/skill.sql") + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `skill` VALUES ") + for userId in users: + user = users[userId] + for skill in user.skills: + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + w.write(("({char_id},{id},{lv},{flag})").format( + char_id = user.char_id, + id = skill.skillId, + lv = skill.level, + flag = 0 +# flag = skill.flags + )) + w.write("\n") diff --git a/hercules/code/server/dbitem.py b/hercules/code/server/dbitem.py new file mode 100644 index 0000000..8534ad4 --- /dev/null +++ b/hercules/code/server/dbitem.py @@ -0,0 +1,7 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +class Item: + pass diff --git a/hercules/code/server/dbskill.py b/hercules/code/server/dbskill.py new file mode 100644 index 0000000..343f3af --- /dev/null +++ b/hercules/code/server/dbskill.py @@ -0,0 +1,7 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +class Skill: + pass diff --git a/hercules/code/server/dbuser.py b/hercules/code/server/dbuser.py new file mode 100644 index 0000000..95ad55d --- /dev/null +++ b/hercules/code/server/dbuser.py @@ -0,0 +1,7 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +class User: + pass diff --git a/hercules/code/server/evol/__init__.py b/hercules/code/server/evol/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hercules/code/server/evol/athena.py b/hercules/code/server/evol/athena.py new file mode 100644 index 0000000..bad35da --- /dev/null +++ b/hercules/code/server/evol/athena.py @@ -0,0 +1,207 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.stringutils import stripNewLine, removeGat +from code.server.dbitem import Item +from code.server.dbskill import Skill +from code.server.dbuser import User + +comaSplit = re.compile(",") +spaceSplit = re.compile(" ") + +def parseInventory(line, data): + items = [] + + if data == "": + return items + + rows = spaceSplit.split(data) + if len(rows) < 1: + return items + + for data2 in rows: + if data2 == "": + continue + + rows2 = comaSplit.split(data2) + + if len(rows2) != 12: + print "wrong inventory in account.txt line: " + stripNewLine(line) + continue + + item = Item() + + item.uknownId = rows2[0] + item.itemId = rows2[1] + item.amount = rows2[2] + item.equip = rows2[3] + item.color = rows2[4] + item.refine = rows2[5] + item.attribute = rows2[6] + item.card0 = rows2[7] + item.card1 = rows2[8] + item.card2 = rows2[9] + item.card3 = rows2[10] + item.broken = rows2[11] + + items.append(item) + + return items + +def parseSkills(line, data): + skills = [] + + if data == "": + return skills + + rows = spaceSplit.split(data) + if len(rows) < 1: + return skills + + for data2 in rows: + if data2 == "": + continue + + rows2 = comaSplit.split(data2) + + if len(rows2) != 2: + print "wrong skills in account.txt line: " + stripNewLine(line) + continue + + skill = Skill() + skill.skillId = rows2[0] + skill.level = int(rows2[1]) & 0xffff + skill.flags = (int(rows2[1]) * 0xffff) & 0xffff + + skills.append(skill) + + return skills + +def parseVars(line, data): + variables = {} + + if data == "": + return variables + + rows = spaceSplit.split(data) + if len(rows) < 1: + return variables + + for data2 in rows: + if data2 == "": + continue + + rows2 = comaSplit.split(data2) + + if len(rows2) != 2: + print "wrong variables in account.txt line: " + stripNewLine(line) + continue + + variables[rows2[0]] = rows2[1] + + return variables + +def readAthena(): + srcFile = "olddb/athena.txt" + fieldsSplit = re.compile("\t") + + users = {} + with open(srcFile, "r") as r: + for line in r: + if line[:2] == "//": + continue + rows = fieldsSplit.split(line) + if len(rows) == 2: + continue + if len(rows) != 20: + print "wrong account.txt line: " + stripNewLine(line) + continue + + user = User() + + user.char_id = rows[0] + tmp = comaSplit.split(rows[1]) + user.account_id = tmp[0] + user.char_num = tmp[1] + user.char_name = rows[2] + + tmp = comaSplit.split(rows[3]) + user.char_class = tmp[0] + user.base_level = tmp[1] + user.job_level = tmp[2] + + tmp = comaSplit.split(rows[4]) + user.base_exp = tmp[0] + user.job_exp = tmp[1] + user.zeny = tmp[2] + + tmp = comaSplit.split(rows[5]) + user.hp = tmp[0] + user.max_hp = tmp[1] + user.sp = tmp[2] + user.max_sp = tmp[3] + + tmp = comaSplit.split(rows[6]) + user.stat_str = tmp[0] + user.stat_agi = tmp[1] + user.stat_vit = tmp[2] + user.stat_int = tmp[3] + user.stat_dex = tmp[4] + user.stat_luk = tmp[5] + + tmp = comaSplit.split(rows[7]) + user.status_point = tmp[0] + user.skill_point = tmp[1] + + tmp = comaSplit.split(rows[8]) + user.option = tmp[0] + user.karma = tmp[1] + user.manner = tmp[2] + + tmp = comaSplit.split(rows[9]) + user.party_id = tmp[0] + user.guild_id = tmp[1] + user.pet_id = tmp[2] + + tmp = comaSplit.split(rows[10]) + user.hair = tmp[0] + user.hair_color = tmp[1] + user.clothes_color = tmp[2] + + tmp = comaSplit.split(rows[11]) + user.weapon = tmp[0] + user.shield = tmp[1] + user.head_top = tmp[2] + user.head_mid = tmp[3] + user.head_bottom = tmp[4] + + tmp = comaSplit.split(rows[12]) + user.last_map = removeGat(tmp[0]) + user.last_x = tmp[1] + user.last_y = tmp[2] + + tmp = comaSplit.split(rows[13]) + user.save_map = removeGat(tmp[0]) + user.save_x = tmp[1] + user.save_y = tmp[2] + user.partner_id = tmp[3] + user.language_id = tmp[4] + + # skip 14 + + user.inventory = parseInventory(line, rows[15]) + + # skip 16 + + user.skills = parseSkills(line, rows[17]) + + user.variables = parseVars(line, rows[18]) + user.variables["Lang"] = user.language_id + + users[user.char_id] = user + + return users diff --git a/hercules/code/server/evol/consts.py b/hercules/code/server/evol/consts.py new file mode 100644 index 0000000..c63f559 --- /dev/null +++ b/hercules/code/server/evol/consts.py @@ -0,0 +1,49 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +def convertConsts(quests): + dstFile = "newserverdata/db/const.txt" + fieldsSplit = re.compile("\t+") + fields = dict() + with open(dstFile, "w") as w: + srcFile = "serverdata/db/const.txt" + with open(srcFile, "r") as r: + for line in r: + if len(line) < 2 or line[0:2] == "//": + continue + line = line.replace(" ", "\t") + rows = fieldsSplit.split(line) + sz = len(rows) + if sz < 2 or sz > 3: + continue + + fields[rows[0]] = rows[1][:-1] + if sz == 2: + w.write("{0}\t{1}".format(rows[0], rows[1])) + else: + w.write("{0}\t{1}\t{2}".format(rows[0], rows[1], rows[2])) + # build in parameters + w.write("ClientVersion\t10000\t1\n"); + + srcFile = "oldserverdata/db/const.txt" + w.write("// evol constants\n") + with open(srcFile, "r") as r: + for line in r: + if len(line) < 2 or line[0:2] == "//": + continue + line = line.replace(" ", "\t") + rows = fieldsSplit.split(line) + if len(rows) != 2: + continue + + if rows[0] in quests: + rows[1] = str(quests[rows[0]]) + "\n" + if rows[0] in fields: + if fields[rows[0]] != rows[1][:-1]: + print "warning: different const values for {0} ({1}, {2})".format(rows[0], rows[1][:-1], fields[rows[0]]) + else: + w.write("{0}\t{1}".format(rows[0], rows[1])) diff --git a/hercules/code/server/evol/itemdb.py b/hercules/code/server/evol/itemdb.py new file mode 100644 index 0000000..a60e57d --- /dev/null +++ b/hercules/code/server/evol/itemdb.py @@ -0,0 +1,104 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.configutils import writeIntField, writeStartBlock, writeEndBlock, writeStartScript, writeEndScript, writeStrField, writeSubField +from code.fileutils import readFile + +def convertItemDb(): + srcFile = "oldserverdata/db/item_db.txt" + dstFile = "newserverdata/db/re/item_db.conf" + constsFile = "newserverdata/db/const.txt" + fieldsSplit = re.compile(",") + scriptsSplit = re.compile("{") + items = dict() + with open(srcFile, "r") as r: + with open(dstFile, "w") as w: + with open(constsFile, "a") as c: + c.write("// items\n"); + tpl = readFile("templates/item_db.tpl") + w.write(tpl) + for line in r: + if len(line) < 2 or line[0] == "#" or line[0:2] == "//": + continue + rows = fieldsSplit.split(line) + if len(rows) < 5 or rows[0] == "0": + continue + + sz = len(rows) + if sz > 19: + sz = 19 + for f in xrange(0, sz): + rows[f] = rows[f].strip() + if rows[4] == "2": + rows[4] = "0" + rows[3] = str(int(rows[3]) | 4) + + items[rows[1]] = rows[0] + w.write("{\n") + c.write("{0}\t{1}\n".format(rows[1], rows[0])) + writeIntField(w, "Id", rows[0]) + writeStrField(w, "AegisName", rows[1]) + writeStrField(w, "Name", rows[2]) + writeIntField(w, "Type", rows[4]) + writeIntField(w, "Buy", rows[5]) + writeIntField(w, "Sell", rows[6]) + writeIntField(w, "Weight", rows[7]) + writeIntField(w, "Atk", rows[8]) + writeIntField(w, "Matk", "0") + writeIntField(w, "Def", rows[9]) + writeIntField(w, "Range", rows[10]) + writeIntField(w, "Slots", "0") + writeIntField(w, "Job", "0xFFFFFFFF") + writeIntField(w, "Upper", "0x3F") + writeIntField(w, "Gender", rows[13]) + writeIntField(w, "Loc", rows[14]) + writeIntField(w, "WeaponLv", rows[15]) + writeIntField(w, "EquipLv", rows[16]) + writeIntField(w, "Refine", "false") + if rows[14] == "2": + writeIntField(w, "View", "1") + else: + writeIntField(w, "View", rows[0]) + writeIntField(w, "BindOnEquip", "false") + writeIntField(w, "BuyingStore", "false") + writeIntField(w, "Delay", "0") + trade = int(rows[3]) + if trade != 0: + writeStartBlock(w, "Trade") + if trade & 1 == 1: + writeSubField(w, "nodrop", "true") + if trade & 2 == 2: + writeSubField(w, "notrade", "true") + if trade & 4 == 4: + writeSubField(w, "nodelonuse", "true") + if trade & 8 == 8: + writeSubField(w, "nostorage", "true") + if trade & 256 == 256: + writeSubField(w, "nogstorage", "true") + if trade & 512 == 512: + writeSubField(w, "noselltonpc", "true") + if trade != 0: + writeEndBlock(w) + writeIntField(w, "Sprite", "0") + + scripts = "" + for f in xrange(sz, len(rows)): + scripts = scripts + ", " + rows[f] + rows = scriptsSplit.split(scripts) + cnt = len(rows) + if cnt > 1: + text = rows[1].strip() + if len(text) > 1: + text = text[:-2] + if text != "": + writeStartScript(w, "Script") + w.write(" {0}\n".format(text)) + writeEndScript(w) + + w.write("},\n") + w.write(")\n") + return items diff --git a/hercules/code/server/evol/main.py b/hercules/code/server/evol/main.py new file mode 100644 index 0000000..be9f0ab --- /dev/null +++ b/hercules/code/server/evol/main.py @@ -0,0 +1,43 @@ +#! /usr/bin/env python +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +from code.server.account import convertAccount +from code.server.accreg import convertAccReg +from code.server.party import convertParty +from code.server.storage import convertStorage +from code.server.db.char import saveCharTable +from code.server.db.charregnumdb import saveCharRegNumDbTable +from code.server.db.inventory import saveInventoryTable +from code.server.db.skill import saveSkillTable +from code.server.evol.athena import readAthena +from code.server.evol.consts import convertConsts +from code.server.evol.itemdb import convertItemDb +from code.server.evol.mobdb import convertMobDb +from code.server.evol.mobskilldb import convertMobSkillDb +from code.server.evol.npcs import createMainScript, convertNpcs +from code.server.questsdb import convertQuestsDb +from code.server.utils import cleanServerData + +def serverEvolMain(): + cleanServerData() + createMainScript() + items = convertItemDb() + convertNpcs(items) + convertMobDb() + quests = convertQuestsDb() + convertConsts(quests) + convertMobSkillDb() + +def dbEvolMain(): + convertAccount() + users = readAthena() + saveCharTable(users) + saveCharRegNumDbTable(users) + saveSkillTable(users) + saveInventoryTable(users) + convertStorage() + convertAccReg() + convertParty(users) \ No newline at end of file diff --git a/hercules/code/server/evol/mobdb.py b/hercules/code/server/evol/mobdb.py new file mode 100644 index 0000000..74eda04 --- /dev/null +++ b/hercules/code/server/evol/mobdb.py @@ -0,0 +1,89 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +def convertMobDb(): + srcFile = "oldserverdata/db/mob_db.txt" + dstFile = "newserverdata/db/re/mob_db.txt" + fieldsSplit = re.compile(",") + with open(srcFile, "r") as r: + with open(dstFile, "w") as w: + for line in r: +# if len(line) < 2 or line[0] == "#": + if len(line) < 2: + w.write(line) + continue + rows = fieldsSplit.split(line) + for f in xrange(0, len(rows)): + rows[f] = rows[f].strip() + w.write("{0:<5} {1:<15} {2:<16} {3:<16} {4:<5} {5:<5} {6:<5} " + "{7:<5} {8:<5} {9:<7} {10:<5} {11:<5} {12:<5} {13:<5} " + "{14:<5} {15:<5} {16:<5} {17:<5} {18:<5} {19:<5} {20:<7}" + " {21:<7} {22:<6} {23:<5} {24:<8} {25:<8} {26:<6} " + "{27:<8} {28:<9} {29:<8} {30:<5} {31:<7} {32:<8} {33:<7}" + " {34:<8} {35:<7} {36:<8} {37:<8} {38:<9} {39:<8} " + "{40:<9} {41:<8} {42:<9} {43:<8} {44:<9} {45:<8} {46:<9}" + " {47:<8} {48:<9} {49:<8} {50:<9} {51:<8} {52:<9} " + "{53:<8} {54:<9} {55:<8} {56:<8} \n".format( + rows[0] + ",", + rows[1] + ",", + rows[2] + ",", + rows[2] + ",", + rows[3] + ",", + rows[4] + ",", + rows[5] + ",", + rows[6] + ",", + rows[7] + ",", + rows[8] + ",", + rows[9] + ",", + rows[10] + ",", + rows[11] + ",", + rows[12] + ",", + rows[13] + ",", + rows[14] + ",", + rows[15] + ",", + rows[16] + ",", + rows[17] + ",", + rows[18] + ",", + rows[19] + ",", + rows[20] + ",", + rows[21] + ",", + rows[22] + ",", + rows[23] + ",", + rows[24] + ",", + rows[25] + ",", + rows[26] + ",", + rows[27] + ",", + rows[28] + ",", + rows[45] + ",", + rows[47] + ",", + rows[48] + ",", + rows[49] + ",", + rows[50] + ",", + rows[51] + ",", + rows[52] + ",", + rows[29] + ",", + rows[30] + ",", + rows[31] + ",", + rows[32] + ",", + rows[33] + ",", + rows[34] + ",", + rows[35] + ",", + rows[36] + ",", + rows[37] + ",", + rows[38] + ",", + rows[39] + ",", + rows[40] + ",", + rows[41] + ",", + rows[42] + ",", + rows[43] + ",", + rows[44] + ",", + "0,", + "0,", + "0,", + "0" + )) + diff --git a/hercules/code/server/evol/mobskilldb.py b/hercules/code/server/evol/mobskilldb.py new file mode 100644 index 0000000..a5a7d5f --- /dev/null +++ b/hercules/code/server/evol/mobskilldb.py @@ -0,0 +1,50 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.fileutils import readFile + +def convertMobSkillDb(): + srcFile = "oldserverdata/db/mob_skill_db.txt" + dstFile = "newserverdata/db/re/mob_skill_db.txt" + fieldsSplit = re.compile(",") + with open(srcFile, "r") as r: + with open(dstFile, "w") as w: + tpl = readFile("templates/mob_skill_db.tpl") + w.write(tpl) + for line in r: + if len(line) < 2: + w.write(line) + continue + rows = fieldsSplit.split(line) + if len(rows) < 10: + w.write(line) + continue + + for f in xrange(0, len(rows)): + rows[f] = rows[f].strip() + + w.write("{0},{1},{2},{3},{4},{5},{6}," + "{7},{8},{9},{10},{11},{12},{13}," + "{14},{15},,,\n".format( + rows[0], + rows[1], + rows[2], + rows[3], + rows[4], + rows[5], + rows[6], + rows[7], + rows[8], + rows[9], + rows[10], + rows[11], + rows[13], + rows[14], + rows[15], + rows[16] + )) + diff --git a/hercules/code/server/evol/npcs.py b/hercules/code/server/evol/npcs.py new file mode 100644 index 0000000..6efe811 --- /dev/null +++ b/hercules/code/server/evol/npcs.py @@ -0,0 +1,281 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import os +import re + +from code.fileutils import makeDir +from code.stringutils import stripWindows, stripNewLine + +mapsConfFile = "newserverdata/conf/maps.conf" +mapsIndexFile = "newserverdata/db/map_index.txt" +npcMainScript = "newserverdata/npc/re/scripts_main.conf" +mapsIndex = 1 +scriptRe = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)(|,(?P[\d]+))" + + "[\t](?Pscript)[\t](?P[\w#' ]+)[\t]" + "(?P[\d]+)((,((?P[\d]+),(?P[\d]+)))|)(|;(?P[\d]+))(|,|;){$") + +shopRe = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)(|,(?P[\d]+))" + + "[\t](?Pshop)[\t](?P[\w#' ]+)[\t]" + "(?P[\d]+),(?P(.+))$") + +mapFlagRe = re.compile("^(?P[^/](.+))[.]gat" + + "[ ](?Pmapflag)[ ](?P[\w#']+)(|[ ](?P.*))$") + +warpRe = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)[\t]" + "(?Pwarp)[\t](?P[^\t]+)[\t](?P[\d-]+),(?P[\d-]+),(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)$") + +monsterRe = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d-]+),(?P[\d-]+)\t" + "(?Pmonster)[\t](?P[\w#' ]+)[\t]" + "(?P[\d]+),(?P[\d]+),(?P[\d-]+),(?P[\d]+),(?P[\d]+)$") + +setRe = re.compile("^(?P[ ]+)set[ ](?P[^,]+),([ ]*)(?P[^;]+);$"); + +class ScriptTracker: + pass + +def createMainScript(): + with open(npcMainScript, "w") as w: + w.write("npc: npc/functions/main.txt\n") + w.write("import: npc/scripts.conf\n") + +def convertNpcs(items): + processNpcDir("oldserverdata/npc/", "newserverdata/npc/", items) + +def processNpcDir(srcDir, dstDir, items): + makeDir(dstDir) + files = os.listdir(srcDir) + for file1 in files: + if file1[0] == '.': + continue + srcPath = os.path.abspath(srcDir + os.path.sep + file1) + dstPath = os.path.abspath(dstDir + os.path.sep + file1) + if not os.path.isfile(srcPath): + processNpcDir(srcPath, dstPath, items) + else: + if file1[-5:] == ".conf" or file1[-4:] == ".txt": + processNpcFile(srcPath, dstPath, items) + +def processNpcFile(srcFile, dstFile, items): +# print "file: " + srcFile + tracker = ScriptTracker() + tracker.insideScript = False + tracker.items = items + with open(srcFile, "r") as r: + with open(dstFile, "w") as w: + tracker.w = w + for line in r: + tracker.line = stripWindows(line) + res = convertTextLine(tracker) + if res: + w.write(tracker.line) + +def convertTextLine(tracker): + line = tracker.line + if line[:5] == "map: ": + processScriptMapLine(line) + return False + + idx = line.find("\tscript\t") + if idx >= 0: + processScript(tracker) + return False + idx = line.find("\tshop\t") + if idx >= 0: + processShop(tracker) + return False + idx = line.find("\tmonster\t") + if idx >= 0: + processMonster(tracker) + return False + idx = line.find("\twarp\t") + if idx >= 0: + processWarp(tracker) + return False + idx = line.find(".gat mapflag ") + if idx >= 0: + processMapFlag(tracker) + return False + processStrReplace(tracker) + return False + +def processScriptMapLine(line): + global mapsIndex + line = stripNewLine(line) + if line[-4:] == ".gat": + line = line[:-4] + with open(mapsConfFile, "a") as w: + w.write(line + "\n") + + with open(mapsIndexFile, "a") as w: + w.write("{0} {1}\n".format(line[5:], mapsIndex)) + mapsIndex = mapsIndex + 1 + +def writeScript(w, m): + if m.group("gender") != None: + w.write("// Gender = {0}\n".format(m.group("gender"))); + + if m.group("x") == 0 and m.group("y") == 0: # float npc + w.write("-") + else: + w.write("{0},{1},{2},{3}".format(m.group("map"), m.group("x"), m.group("y"), m.group("dir"))) + class_ = m.group("class") + if class_ == "0": # hidden npc + class_ = "32767" + else: + class_ = int(class_) + if class_ > 125 and class_ <= 400: + class_ = class_ + 100 + w.write("\t{0}\t{1}\t{2}".format(m.group("tag"), m.group("name"), class_)); + +def processScript(tracker): + line = tracker.line + w = tracker.w + if line[:9] == "function\t": + tracker.w.write(line) + return + + m = scriptRe.search(line) + if m == None: + print "error in parsing: " + line + w.write("!!!error parsing line") + w.write(line) + return +# print "source=" + line[:-1] +# print "map={0} x={1} y={2} dir={3} gender={4} tag={5} name={6} class={7}, xs={8}, ys={9}, size={10}".format( +# m.group("map"), m.group("x"), m.group("y"), m.group("dir"), m.group("gender"), +# m.group("tag"), m.group("name"), m.group("class"), m.group("xs"), m.group("ys"), m.group("size")) + + if m.group("size") != None: + w.write("// Size = {0}\n".format(m.group("size"))); + writeScript(w, m) + if m.group("xs") != None: + w.write(",{0},{1}".format(m.group("xs"), m.group("ys"))); + w.write(",{\n"); + + +def itemsToShop(tracker, itemsStr): + itemsSplit = re.compile(",") + itemsSplit2 = re.compile(":") + itemsDict = tracker.items + outStr = "" + items = itemsSplit.split(itemsStr) + for str2 in items: + parts = itemsSplit2.split(str2) + if outStr != "": + outStr = outStr + "," + outStr = outStr + itemsDict[parts[0].strip()] + ":" + parts[1] + return outStr + +def processShop(tracker): + line = tracker.line + w = tracker.w + + m = shopRe.search(line) + if m == None: + print "error in parsing: " + line + w.write("!!!error parsing line") + w.write(line) + return +# print "source=" + line[:-1] +# print "map={0} x={1} y={2} dir={3} gender={4} tag={5} name={6} class={7} items={8}".format( +# m.group("map"), m.group("x"), m.group("y"), m.group("dir"), m.group("gender"), +# m.group("tag"), m.group("name"), m.group("class"), m.group("items")) + + writeScript(w, m) + w.write("," + itemsToShop(tracker, m.group("items")) + "\n") + +def processMapFlag(tracker): + line = tracker.line + w = tracker.w + + m = mapFlagRe.search(line) + if m == None: + print "error in parsing: " + line + w.write("!!!error parsing line") + w.write(line) + return +# print "source=" + line[:-1] +# print "map={0} tag={1} name={2} flag={3}".format( +# m.group("map"), m.group("tag"), m.group("name"), m.group("flag")) + + w.write("{0}\t{1}\t{2}".format(m.group("map"), m.group("tag"), m.group("name"))) + if m.group("flag") == None: + w.write("\n") + else: + w.write("\t{0}\n".format(m.group("flag"))) + +def processWarp(tracker): + line = tracker.line + w = tracker.w + m = warpRe.search(line) + if m == None: + print "error in parsing: " + line + w.write("!!!error parsing line") + w.write(line) + return + +# print "source=" + line[:-1] +# print "map={0} xy={1},{2} tag={3} name={4} xs={5} ys={6} target: map={7} xy={8},{9}".format( +# m.group("map"), m.group("x"), m.group("y"), m.group("tag"), m.group("name"), m.group("xs"), m.group("ys"), m.group("targetmap"), m.group("targetx"), m.group("targety")) + + xs = int(m.group("xs")) + ys = int(m.group("ys")) + if xs < 0: + xs = 0 + if ys < 0: + ys = 0 + w.write("{0},{1},{2},{3}\t{4}\t{5}\t{6},{7},{8},{9},{10}\n".format( + m.group("map"), m.group("x"), m.group("y"), "0", m.group("tag"), m.group("name"), + xs, ys, m.group("targetmap"), m.group("targetx"), m.group("targety"))) + + +def processMonster(tracker): + line = tracker.line + w = tracker.w + m = monsterRe.search(line) + if m == None: + print "error in parsing: " + line + w.write("!!!error parsing line") + w.write(line) + return + +# print "source=" + line[:-1] +# print ("map={0} xy={1},{2} xs={3} ys={4} tag={5} name={6} class={7} " + +# "num={8} look={9} delays={10},{11}").format( +# m.group("map"), m.group("x"), m.group("y"), m.group("xs"), m.group("ys"), +# m.group("tag"), m.group("name"), m.group("class"), +# m.group("num"), m.group("look"), m.group("delay1"), m.group("delay2")) + w.write("{0},{1},{2},{3},{4}\t{5}\t{6}\t{7},{8},{9},{10}\n".format(m.group("map"), + m.group("x"), m.group("y"), m.group("xs"), m.group("ys"), + m.group("tag"), m.group("name"), + m.group("class"), m.group("num"), m.group("delay1"), m.group("delay2"))) + + +def processStrReplace(tracker): + line = tracker.line + w = tracker.w + line = line.replace("setskill ", "addtoskill ") + line = line.replace("zeny", "Zeny") + line = line.replace("getclientversion(\"\")", "ClientVersion") + line = line.replace("getclientversion()", "ClientVersion") + line = line.replace("setlang @", "Lang = @") + line = re.sub("([^@^$])@([^@])", "\\1.@\\2", line) + line = line.replace(".@menu", "@menu") + idx = line.find("getmapmobs(") + if idx >= 0: + idx2 = line.find("\"", idx + len("getmapmobs(") + 1) + idx3 = line.find(")", idx + len("getmapmobs(") + 1) + if idx2 + 1 == idx3: + line = line[:idx2 + 1] + ",\"all\"" + line[idx2 + 1:] + + line = line.replace("getmapmobs(", "mobcount(") + + m = setRe.search(line); + if m != None: + line = "{0}{1} = {2};\n".format(m.group("space"), m.group("var"), m.group("val")) + + w.write(line) + diff --git a/hercules/code/server/maps.py b/hercules/code/server/maps.py new file mode 100644 index 0000000..2ef0173 --- /dev/null +++ b/hercules/code/server/maps.py @@ -0,0 +1,43 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import array +import struct +import zlib + +from code.fileutils import readMapName, readInt16, readInt32, readData, makeDir + +def listMapCache(f, mapsCount): + print "Known maps:" + print "{0:12} {1:<4}x {2:<4} {3:<10}".format("Map name", "sx", "sy", "compressed size") + for i in xrange(0, mapsCount): + name = readMapName(f) + sx = readInt16(f) + sy = readInt16(f) + sz = readInt32(f) + print "{0:12} {1:<4}x {2:<4} {3:<10}".format(name, sx, sy, sz) + f.seek(sz, 1) + +def extractMaps(f, mapsCount): + destDir = "maps/" + makeDir(destDir) + for i in xrange(0, mapsCount): + name = readMapName(f) + sx = readInt16(f) + sy = readInt16(f) + sz = readInt32(f) + data = readData(f, sz) + dc = zlib.decompressobj() + data = dc.decompress(data) + with open(destDir + name, "wb") as w: + w.write(struct.pack("H", sx)) + w.write(struct.pack("H", sy)) + w.write(data) + with open(destDir + name + ".txt", "wb") as w: + arr = array.array("B") + arr.fromstring(data) + for x in xrange(0, sx): + for y in xrange(0, sy): + w.write("{0},{1}:{2}\n".format(x, y, arr[x + y * sx])) diff --git a/hercules/code/server/party.py b/hercules/code/server/party.py new file mode 100644 index 0000000..c75a541 --- /dev/null +++ b/hercules/code/server/party.py @@ -0,0 +1,80 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.fileutils import readFile +from code.stringutils import stripNewLine, escapeSqlStr + +def findLeaderId(name, users): + for userId in users: + user = users[userId] + if user.char_name == name: + return user.char_id + return 0 + +def convertParty(users): + srcFile = "olddb/party.txt" + dstFile = "newdb/party.sql" + fieldsSplit = re.compile("\t") + comaSplit = re.compile(",") + tpl = readFile("templates/party.sql") + firstLine = True + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `party` VALUES ") + with open(srcFile, "r") as r: + for line in r: + if line[:2] == "//": + continue + line = stripNewLine(line) + rows = fieldsSplit.split(line) + if len(rows) == 2: + continue + if len(rows) < 3: + print "wrong party.txt line: " + line + continue + + partyId = rows[0] + partyName = rows[1] + + tmp = comaSplit.split(rows[2]) + partyExp = tmp[0] + partyItem = tmp[1] + + leaderId = 0 + leaderName = "" + accountId = "" + + for f in xrange(3, len(rows), 2): + + if rows[f] == "0,0" or rows[f] == "": + continue + + tmp = comaSplit.split(rows[f]) + accountId = tmp[0] + leader = tmp[1] + charName = rows[f + 1] + if leader == "1": + leaderId = accountId + leaderName = charName + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + leaderCharId = findLeaderId(leaderName, users) + + w.write(("({party_id},'{name}',{exp},{item}," + + "{leader_id},{leader_char})").format( + party_id = partyId, + name = escapeSqlStr(partyName), + exp = partyExp, + item = partyItem, + leader_id = leaderId, + leader_char = leaderCharId + )) + w.write("\n") diff --git a/hercules/code/server/questsdb.py b/hercules/code/server/questsdb.py new file mode 100644 index 0000000..880a7f9 --- /dev/null +++ b/hercules/code/server/questsdb.py @@ -0,0 +1,33 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +from code.fileutils import readFile + +def convertQuestsDb(): + srcFile = "oldserverdata/db/questvars.txt" + dstFile = "newserverdata/db/quest_db.txt" + quests = dict() + with open(srcFile, "r") as r: + with open(dstFile, "w") as w: + tpl = readFile("templates/quest_db.tpl") + w.write(tpl) + cnt = 0 + for line in r: + if len(line) < 2 or line[0:2] == "//": + continue + + idx = line.find("// ") + if idx < 3: + continue + line = line[idx + 3:] + idx = line.find(" ") + if idx < 3: + continue + line = line[:idx] + + w.write("{0},0,0,0,0,0,0,0,\"{1}\"\n".format(cnt, line)) + quests[line] = cnt + cnt = cnt + 1 + return quests diff --git a/hercules/code/server/storage.py b/hercules/code/server/storage.py new file mode 100644 index 0000000..6bddb52 --- /dev/null +++ b/hercules/code/server/storage.py @@ -0,0 +1,81 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.fileutils import readFile +from code.stringutils import stripNewLine +from code.server.dbitem import Item + +def convertStorage(): + srcFile = "olddb/storage.txt" + dstFile = "newdb/storage.sql" + fieldsSplit = re.compile("\t") + comaSplit = re.compile(",") + spaceSplit = re.compile(" ") + tpl = readFile("templates/storage.sql") + firstLine = True + with open(dstFile, "w") as w: + w.write(tpl) + w.write("INSERT INTO `storage` VALUES ") + with open(srcFile, "r") as r: + for line in r: + if line[:2] == "//": + continue + rows = fieldsSplit.split(line) + if len(rows) == 2: + continue + if len(rows) != 3: + print "wrong storage.txt line: " + stripNewLine(line) + continue + + tmp = comaSplit.split(rows[0]) + accountId = tmp[0] +# storage_amount = tmp[1] + + data = spaceSplit.split(rows[1]) + for itemStr in data: + if itemStr == "": + continue + + tmp = comaSplit.split(itemStr) + item = Item() + item.unknownId = tmp[0] + item.itemId = tmp[1] + item.amount = tmp[2] + item.equip = tmp[3] + item.color = tmp[4] + item.refine = tmp[5] + item.attribute = tmp[6] + item.card0 = tmp[7] + item.card1 = tmp[8] + item.card2 = tmp[9] + item.card3 = "0" + + if firstLine == False: + w.write(",\n") + else: + firstLine = False + + w.write(("({id},{account_id},{nameid},{amount},{equip},{identify}," + + "{refine},{attribute},{card0},{card1},{card2},{card3}," + + "{expire_time},{bound},{unique_id})").format( + id = 0, + account_id = accountId, + nameid = item.itemId, + amount = item.amount, + equip = item.equip, + identify = "1", + refine = item.refine, + attribute = item.attribute, + card0 = "0", + card1 = "0", + card2 = "0", + card3 = "0", + expire_time = "0", + bound = "0", + unique_id = "0" + )) + w.write("\n") diff --git a/hercules/code/server/tmw/__init__.py b/hercules/code/server/tmw/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hercules/code/server/tmw/athena.py b/hercules/code/server/tmw/athena.py new file mode 100644 index 0000000..6548b2e --- /dev/null +++ b/hercules/code/server/tmw/athena.py @@ -0,0 +1,207 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2015 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.stringutils import stripNewLine +from code.server.dbitem import Item +from code.server.dbskill import Skill +from code.server.dbuser import User + +comaSplit = re.compile(",") +spaceSplit = re.compile(" ") + +def parseInventory(line, data): + items = [] + + if data == "": + return items + + rows = spaceSplit.split(data) + if len(rows) < 1: + return items + + for data2 in rows: + if data2 == "": + continue + + rows2 = comaSplit.split(data2) + + if len(rows2) != 12: + print "wrong inventory in account.txt line: " + stripNewLine(line) + continue + + item = Item() + + item.uknownId = rows2[0] + item.itemId = rows2[1] + item.amount = rows2[2] + item.equip = rows2[3] + item.color = rows2[4] + item.refine = rows2[5] + item.attribute = rows2[6] + item.card0 = rows2[7] + item.card1 = rows2[8] + item.card2 = rows2[9] + item.card3 = rows2[10] + item.broken = rows2[11] + + items.append(item) + + return items + +def parseSkills(line, data): + skills = [] + + if data == "": + return skills + + rows = spaceSplit.split(data) + if len(rows) < 1: + return skills + + for data2 in rows: + if data2 == "": + continue + + rows2 = comaSplit.split(data2) + + if len(rows2) != 2: + print "wrong skills in account.txt line: " + stripNewLine(line) + continue + + skill = Skill() + skill.skillId = rows2[0] + skill.level = int(rows2[1]) & 0xffff + skill.flags = (int(rows2[1]) * 0xffff) & 0xffff + + skills.append(skill) + + return skills + +def parseVars(line, data): + variables = {} + + if data == "": + return variables + + rows = spaceSplit.split(data) + if len(rows) < 1: + return variables + + for data2 in rows: + if data2 == "": + continue + + rows2 = comaSplit.split(data2) + + if len(rows2) != 2: + print "wrong variables in account.txt line: " + stripNewLine(line) + continue + + variables[rows2[0]] = rows2[1] + + return variables + +def readAthena(): + srcFile = "olddb/athena.txt" + fieldsSplit = re.compile("\t") + + users = {} + with open(srcFile, "r") as r: + for line in r: + if line[:2] == "//": + continue + rows = fieldsSplit.split(line) + if len(rows) == 2: + continue + if len(rows) != 20: + print "wrong account.txt line: " + stripNewLine(line) + continue + + user = User() + + user.char_id = rows[0] + tmp = comaSplit.split(rows[1]) + user.account_id = tmp[0] + user.char_num = tmp[1] + user.char_name = rows[2] + + tmp = comaSplit.split(rows[3]) + user.char_class = tmp[0] + user.base_level = tmp[1] + user.job_level = tmp[2] + + tmp = comaSplit.split(rows[4]) + user.base_exp = tmp[0] + user.job_exp = tmp[1] + user.zeny = tmp[2] + + tmp = comaSplit.split(rows[5]) + user.hp = tmp[0] + user.max_hp = tmp[1] + user.sp = tmp[2] + user.max_sp = tmp[3] + + tmp = comaSplit.split(rows[6]) + user.stat_str = tmp[0] + user.stat_agi = tmp[1] + user.stat_vit = tmp[2] + user.stat_int = tmp[3] + user.stat_dex = tmp[4] + user.stat_luk = tmp[5] + + tmp = comaSplit.split(rows[7]) + user.status_point = tmp[0] + user.skill_point = tmp[1] + + tmp = comaSplit.split(rows[8]) + user.option = tmp[0] + user.karma = tmp[1] + user.manner = tmp[2] + + tmp = comaSplit.split(rows[9]) + user.party_id = tmp[0] + user.guild_id = tmp[1] + user.pet_id = tmp[2] + + tmp = comaSplit.split(rows[10]) + user.hair = tmp[0] + user.hair_color = tmp[1] + user.clothes_color = tmp[2] + + tmp = comaSplit.split(rows[11]) + user.weapon = tmp[0] + user.shield = tmp[1] + user.head_top = tmp[2] + user.head_mid = tmp[3] + user.head_bottom = tmp[4] + + tmp = comaSplit.split(rows[12]) + user.last_map = tmp[0] + user.last_x = tmp[1] + user.last_y = tmp[2] + + tmp = comaSplit.split(rows[13]) + user.save_map = tmp[0] + user.save_x = tmp[1] + user.save_y = tmp[2] + + user.partner_id = "0" + user.language_id = "0" + + # skip 14 + + user.inventory = parseInventory(line, rows[15]) + + # skip 16 + + user.skills = parseSkills(line, rows[17]) + + user.variables = parseVars(line, rows[18]) + + users[user.char_id] = user + + return users diff --git a/hercules/code/server/tmw/consts.py b/hercules/code/server/tmw/consts.py new file mode 100644 index 0000000..5b8403e --- /dev/null +++ b/hercules/code/server/tmw/consts.py @@ -0,0 +1,129 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import os +import re + +from code.fileutils import readFile +from code.stringutils import stripNewLine + +fieldsSplit = re.compile(":") + +def getConstsFile(srcDir): + files = os.listdir(srcDir) + for srcFile in files: + if srcFile.find("const") == 0 and srcFile[-4:] == ".txt": + yield srcDir + srcFile + +def readOneConst(r, line): + key = "" + val = "" + depr = 0 + if line.find(": {") > 0: + rows = fieldsSplit.split(line) + key = rows[0].strip() + line = r.next().strip() + rows = fieldsSplit.split(line) + if len(rows) != 2: + print "error" + return ("", "", 0) + if rows[0] == "Value": + val = rows[1] + line = r.next().strip() + rows = fieldsSplit.split(line) + if len(rows) != 2: + print "error" + return ("", "", 0) + rows[1] = rows[1].strip() + if rows[0] == "Deprecated" and rows[1].find("true") == 0: + depr = 1 + else: + rows = fieldsSplit.split(line) + if len(rows) != 2: + return ("", "", 0) + key = rows[0]; + val = rows[1] + return (key, val, depr) + +def writeConst(w, const): + if const[2] == 1: + w.write("\t{0}: {{\n\t\tValue:{1}\n\t\tDeprecated: true\n\t}}\n".format(const[0], const[1])) + else: + w.write("\t{0}:{1}\n".format(const[0], const[1])) + +def convertConsts(quests, npcIds): + dstFile = "newserverdata/db/constants.conf" + fields = dict() + vals = [("MF_NOTELEPORT", "mf_noteleport"), + ("MF_NORETURN", "mf_noreturn"), + ("MF_MONSTER_NOTELEPORT", "mf_monster_noteleport"), + ("MF_NOSAVE", "mf_nosave"), + ("MF_NOPENALTY", "mf_nopenalty"), + ("MF_PVP", "mf_pvp"), + ("MF_PVP_NOPARTY", "mf_pvp_noparty"), + ("MF_PVP_NOCALCRANK", "mf_pvp_nocalcrank"), + ("MF_NOWARP", "mf_nowarp"), + ("MF_NOWARPTO", "mf_nowarpto"), + ("MF_SNOW", "mf_snow"), + ("MF_FOG", "mf_fog"), + ("MF_SAKURA", "mf_sakura"), + ("MF_LEAVES", "mf_leaves"), + ("MF_TOWN", "mf_town"), + ("sc_poison", "SC_POISON"), + ("sc_slowpoison", "SC_SLOWPOISON"), + ("sc_adrenaline", "SC_ADRENALINE"), + ] + with open(dstFile, "w") as w: + tpl = readFile("templates/constants.tpl") + w.write(tpl); + srcFile = "serverdata/db/constants.conf" + with open(srcFile, "r") as r: + for line in r: + if line.find("**************************************************************************/") >= 0: + break + + for line in r: + line = line.strip() + if len(line) < 2 or line[0:2] == "//" or line[0:2] == "/*": + continue + const = readOneConst(r, line) + if const[0] == "comment__": + continue + fields[const[0]] = const[1].strip() + writeConst(w, const) + + srcDir = "oldserverdata/world/map/db/" + w.write("// tmw constants\n") + + fieldsSplit = re.compile("\t+") + + for srcFile in getConstsFile(srcDir): + with open(srcFile, "r") as r: + for line in r: + if len(line) < 2 or line[0:2] == "//": + continue + line = line.replace(" ", "\t") + rows = fieldsSplit.split(line) + if len(rows) != 2: + continue + + for val in vals: + if rows[0] == val[0]: + rows[0] = val[1] + if rows[0] in quests: + rows[1] = str(quests[rows[0]]) + "\n" + if rows[0] in fields: + if fields[rows[0]] != rows[1][:-1]: + print "warning: different const values for {0} ({1}, {2})".format(rows[0], rows[1][:-1], fields[rows[0]]) + else: + writeConst(w, (rows[0], stripNewLine(rows[1]), 0)) + w.write("// tmw npcs\n") + for npc in npcIds: + if npc == -1: + key = "MINUS1" + else: + key = str(npc) + writeConst(w, ("NPC" + key, npc, 0)) + w.write("}") diff --git a/hercules/code/server/tmw/itemdb.py b/hercules/code/server/tmw/itemdb.py new file mode 100644 index 0000000..beccd09 --- /dev/null +++ b/hercules/code/server/tmw/itemdb.py @@ -0,0 +1,264 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import os +import re + +from code.configutils import writeStartScript, writeEndScript, writeIntField, writeStrField +from code.fileutils import readFile + +def getItemDbFile(srcDir): + files = os.listdir(srcDir) + for srcFile in files: + if srcFile.find("item_db") >= 0: + yield srcFile + +def replaceStr(line): + vals = [ + ("setskill ", "addtoskill "), + ("zeny", "Zeny"), + ("sc_poison", "SC_POISON"), + ("sc_slowpoison", "SC_SLOWPOISON"), + ("sex", "Sex"), + ("SEX", "Sex"), + + (".gat", ""), + ("Bugleg", "BugLeg"), + ("set BugLeg, 0;", "//set BugLeg, 0;"), + ("set CaveSnakeLamp, 0;", "//set CaveSnakeLamp, 0;"), + ("set Class, @BaseClass;", "//set Class, @BaseClass;"), + ("goto_Exit;", "goto L_Exit;"), + ("if @spants_state < 7 goto", "if(@spants_state < 7) goto"), + ("isdead()", "ispcdead()"), + ("changeSex", "changecharsex()"), + ("getpartnerid2()", "getpartnerid()"), + + ("getmap()", "getmapname()"), + ("L_end", "L_End"), + ("gmcommand", "atcommand"), + ("MF_NOSAVE", "mf_nosave"), + ("S_update_var", "S_Update_Var"), + ("L_teach", "L_Teach"), + ("L_focus", "L_Focus"), + ("L_unfocus", "L_Unfocus"), + ("L_main", "L_Main"), + ("L_next", "L_Next"), + ("L_close", "L_Close"), + ("@NpcName$", "@npcname$"), + ("@cost", "@Cost"), + ("@TEMP", "@temp"), + ("L_Menuitems", "L_MenuItems"), + ("L_no_item", "L_No_Item"), + ("L_no_water", "L_No_Water"), + ("L_NOT_ENOUGH", "L_No_Water"), + ("L_bye", "L_Bye"), + ("L_NOHELP", "L_NoHelp"), + ("L_Eyepatch", "L_EyePatch"), + ("@PC_STAMINA", "@pc_stamina"), + ("L_magic", "L_Magic"), + ("L_cont", "L_Cont"), + ("L_accept", "L_Accept"), + ("L_no_event", "L_No_Event"), + ("L_event_done", "L_Event_Done"), + ("L_nobeer", "L_NoBeer"), + ("L_iron", "L_Iron"), + ("L_sulphur", "L_Sulphur"), + ("L_red", "L_Red"), + ("L_yellow", "L_Yellow"), + ("L_green", "L_Green"), + ("L_orange", "L_Orange"), + ("L_pink", "L_Pink"), + ("L_purple", "L_Purple"), + ("L_question", "L_Question"), + ("L_quest", "L_Quest"), + ("L_dead", "L_Dead"), + ("L_menu", "L_Menu"), + ("L_give", "L_Give"), + ("@Items$", "@items$"), + ("@menuItems$", "@menuitems$"), + ("L_Teach_initial", "L_Teach_Initial"), + ("L_finish", "L_Finish"), + ("L_No_ash", "L_No_Ash"), + ("L_No_water", "L_No_Water"), + ("L_cave", "L_Cave"), + ("L_farewell", "L_Farewell"), + ("@Q_forestbow_", "@Q_Forestbow_"), + ("L_game", "L_Game"), + ("L_good", "L_Good"), + ("L_abort", "L_Abort"), + ("@menuID", "@menuid"), + ("L_NO_ITEM", "L_No_Item"), + ("L_HELP", "L_Help"), + ("L_Noitem", "L_NoItem"), + ("L_No_fur", "L_No_Fur"), + ("@EXP", "@Exp"), + ("L_water", "L_Water"), + ("L_get", "L_Get"), + ("L_happy", "L_Happy"), + ("L_cheat", "L_Cheat"), + ("@Reward_EXP", "@Reward_Exp"), + ("@REWARD_EXP", "@Reward_Exp"), + ("L_no_money", "L_No_Money"), + ("@MinLevel", "@minLevel"), + ("L_return", "L_Return"), + ("L_intro", "L_Intro"), + ("L_full", "L_Full"), + ("@minlevel", "@minLevel"), + ("@MinLevel", "@minLevel"), + ("L_Cleanup", "L_CleanUp"), + ("L_Alreadystarted", "L_AlreadyStarted"), + ("@amount", "@Amount"), + ("L_again", "L_Again"), + ("L_no_potion", "L_No_Potion"), + ("L_wizard_hat", "L_Wizard_Hat"), + ("L_notenough", "L_NotEnough"), + ("L_offer", "L_Offer"), + ("L_giveup", "L_GiveUp"), + ("L_not_ready", "L_Not_Ready"), + ("@MobID", "@mobId"), + ("@mobID", "@mobId"), + ("L_naked", "L_Naked"), + ("L_shortcut", "L_Shortcut"), + ("L_shirt", "L_Shirt"), + ("L_goodjob", "L_GoodJob"), + ("L_kill", "L_Kill"), + ("L_nothing", "L_Nothing"), + ("L_lowlevel", "L_LowLevel"), + ("@mask", "@Mask"), + ("Foice", "FoiceItem"), + ("LanternaJack", "LanternaJackItem"), + # fix at same time usage with same name function and variable + ("\"DailyQuestPoints\"", "\"DailyQuestPointsFunc\""), + ("sc_adrenaline", "SC_ADRENALINE"), + ]; + + for val in vals: + line = line.replace(val[0], val[1]); + return line + +def convertItemDb(isNew): + srcDir = "oldserverdata/world/map/db/" + dstFile = "newserverdata/db/re/item_db.conf" + if os.path.isfile(dstFile): + os.remove(dstFile) + constsFile = "newserverdata/db/const.txt" + if os.path.isfile(constsFile): + os.remove(constsFile) + fieldsSplit = re.compile(",") + scriptsSplit = re.compile("},") + scriptsTextClean = re.compile('([{}])') + scriptsTextComma = re.compile('^,') + scriptsTextColon = re.compile('; ') + items = dict() + + tpl = readFile("templates/item_db.tpl") + with open(dstFile, "w") as w: + w.write(tpl) + with open(constsFile, "a") as c: + c.write("// items\n"); + for srcFile in getItemDbFile(srcDir): + with open(srcDir + srcFile, "r") as r: + for line in r: + if len(line) < 2 or line[0] == "#" or line[0:2] == "//": + continue + line = replaceStr(line) + rows = fieldsSplit.split(line) + if len(rows) < 5 or rows[0] == "0": + continue + + sz = len(rows) + if sz > 19: + sz = 19 + for f in xrange(0, sz): + rows[f] = rows[f].strip() + + items[rows[1]] = {'id':rows[0],'buy':rows[4],'name':rows[1]} + items[rows[0]] = {'id':rows[0],'buy':rows[4],'name':rows[1]} + items[int(rows[0])] = {'id':rows[0],'buy':rows[4],'name':rows[1]} + # set all values then write + w.write("{\n") + c.write("{0}\t{1}\n".format(rows[1], rows[0])) + writeIntField(w, "Id", rows[0]) + writeStrField(w, "AegisName", rows[1]) + if isNew == True: + offset = -1 + else: + offset = 0 + writeStrField(w, "Name", rows[offset + 2]) + if rows[offset + 3] == "0": + itemType = "2" + else: + itemType = rows[offset + 3] + writeIntField(w, "Type", itemType) + + writeIntField(w, "Buy", rows[offset + 4]) + if int(rows[offset + 4])*.75 <= int(rows[offset + 5])*1.24: + writeIntField(w, "Sell", str(int(rows[offset + 4])*.75)) + else: + writeIntField(w, "Sell", rows[offset + 5]) + writeIntField(w, "Weight", rows[offset + 6]) + writeIntField(w, "Atk", rows[offset + 7]) + writeIntField(w, "Matk", "0") + writeIntField(w, "Def", rows[offset + 8]) + writeIntField(w, "Range", rows[offset + 9]) + writeIntField(w, "Slots", "0") + writeIntField(w, "Job", "0xFFFFFFFF") + writeIntField(w, "Upper", "0x3F") + writeIntField(w, "Gender", rows[offset + 12]) + writeIntField(w, "Loc", rows[offset + 13]) + writeIntField(w, "WeaponLv", rows[offset + 14]) + writeIntField(w, "EquipLv", rows[offset + 15]) + writeIntField(w, "Refine", "false") + if isNew == True: + offset = 2 + else: + offset = 0 + if rows[offset + 13] == "2": + writeIntField(w, "View", "1") + elif rows[offset + 13] == "34": + writeIntField(w, "View", "11") + elif rows[offset + 13] == "32768": + writeIntField(w, "View", "1") + elif itemType == "4": # weapon + writeIntField(w, "View", "1") + else: + writeIntField(w, "View", rows[0]) + writeIntField(w, "BindOnEquip", "false") + writeIntField(w, "BuyingStore", "false") + writeIntField(w, "Delay", "0") + writeIntField(w, "Sprite", "0") + + scripts = "" + if isNew == True: + offset = -1 + else: + offset = 0 + for f in xrange(offset + 17, len(rows)): + scripts = scripts + ", " + rows[f] + rows = scriptsSplit.split(scripts) + # Needs .split(';') and \n each + if len(rows) > 1: + UseScript = scriptsTextColon.sub(';',scriptsTextComma.sub('', scriptsTextClean.sub('', rows[0]))).strip().split(';') + EquipScript = scriptsTextColon.sub(';',scriptsTextComma.sub('', scriptsTextClean.sub('', rows[1]))).strip().split(';') + else: + UseScript = "" + EquipScript = "" + # move to for stmt + if len(UseScript) > 1: + writeStartScript(w, "Script") + for uline in UseScript: + if len(uline) > 0: + w.write(" {0};\n".format(uline)) + writeEndScript(w) + if len(EquipScript) > 1: + writeStartScript(w, "OnEquipScript") + for eline in EquipScript: + if len(eline) > 0: + w.write(" {0};\n".format(eline)) + writeEndScript(w) + + w.write("},\n") + w.write(")\n") + return items diff --git a/hercules/code/server/tmw/main.py b/hercules/code/server/tmw/main.py new file mode 100644 index 0000000..bfbf5ef --- /dev/null +++ b/hercules/code/server/tmw/main.py @@ -0,0 +1,49 @@ +#! /usr/bin/env python +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +from sets import Set + +from code.server.account import convertAccount +from code.server.accreg import convertAccReg +from code.server.party import convertParty +from code.server.storage import convertStorage +from code.server.db.char import saveCharTableCustom +from code.server.db.charregnumdb import saveCharRegNumDbTable +from code.server.db.inventory import saveInventoryTable +from code.server.db.skill import saveSkillTable +from code.server.tmw.athena import readAthena +from code.server.tmw.consts import convertConsts +from code.server.tmw.itemdb import convertItemDb +from code.server.tmw.mobdb import convertMobDb +from code.server.tmw.mobskilldb import convertMobSkillDb +from code.server.tmw.npcs import createMainScript, convertNpcs +from code.server.utils import cleanServerData + +def serverTmwMain(isNew): + try: + cleanServerData() + except: + print "Updating server" + createMainScript() + items = convertItemDb(isNew) + npcIds = Set() + convertNpcs(items, npcIds) + convertMobDb(items) + quests = dict() + convertConsts(quests, npcIds) + convertMobSkillDb() + +def dbTmwMain(): + convertAccount() + users = readAthena() +# saveCharTable(users) + saveCharTableCustom(users) + saveCharRegNumDbTable(users) + saveSkillTable(users) + saveInventoryTable(users) + convertStorage() + convertAccReg() + convertParty(users) diff --git a/hercules/code/server/tmw/mobdb.py b/hercules/code/server/tmw/mobdb.py new file mode 100644 index 0000000..04d1fce --- /dev/null +++ b/hercules/code/server/tmw/mobdb.py @@ -0,0 +1,170 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import math +import os +import re + +from code.configutils import isHaveData, writeCondField2, writeStartBlock, writeEndBlock, writeIntField, writeStrField, writeFieldArr, writeIntField2, writeFieldList, writeSubField +from code.fileutils import readFile + +def getMobDbFile(srcDir): + files = os.listdir(srcDir) + for srcFile in files: + if srcFile.find("mob_db") >= 0: + yield srcFile + +def replaceStr(line): + vals = [ + ("lanternaJack", "LanternaJack"), + ("foice", "Foice"), + ("BlueFairy", "BlueFairyMob"), + ("RedFairy", "RedFairyMob"), + ("GreenFairy", "GreenFairyMob"), + ("Scorpion", "ScorpionMob"), + ("Tritan", "TritanMob"), + ("Ukar", "UkarMob"), + ]; + + for val in vals: + line = line.replace(val[0], val[1]); + return line + +def convertMobDb(items): + srcDir = "oldserverdata/world/map/db/" + dstFile = "newserverdata/db/re/mob_db.conf" + fieldsSplit = re.compile(",") + tpl = readFile("templates/mob_db.tpl") + with open(dstFile, "w") as w: + w.write(tpl) + for srcFile in getMobDbFile(srcDir): + with open(srcDir + srcFile, "r") as r: + for line in r: + if len(line) < 2 or line[:2] == "//" or line[:1] == "#": + w.write(line) + continue + line = replaceStr(line) + rows = fieldsSplit.split(line) + for f in xrange(0, len(rows)): + rows[f] = rows[f].strip() + try: + val = int(rows[23]) + if val < 20: + rows[23] = "20" + except: + None + + # Experience and Job experience, following *tmw-eathena*/src/map/mob.c + calc_exp = 0 + + if rows[6] == "0": + if int(rows[4]) <= 1: + calc_exp = 1 + + mod_def = 100 - int(rows[11]) + + if mod_def == 0: + mod_def = 1 + + effective_hp = ((50 - int(rows[18])) * int(rows[4]) / 50) + (2 * int(rows[18]) * int(rows[4]) / mod_def) + attack_factor = (int(rows[9]) + int(rows[10]) + int(rows[13]) / 3 + int(rows[17]) / 2 + int(rows[18])) * (1872 / int(rows[26])) / 4 + dodge_factor = (int(rows[3]) + int(rows[14]) + int(rows[18]) / 2)**(4 / 3) + persuit_factor = (3 + int(rows[8])) * (int(rows[24]) % 2) * 1000 / int(rows[25]) + aggression_factor = 1 + + if False: + aggression_factor = 10 / 9 + + base_exp_rate = 100 # From *tmw-eathena-data*/conf/battle_athena.conf + + calc_exp = int(math.floor(effective_hp * (math.sqrt(attack_factor) + math.sqrt(dodge_factor) + math.sqrt(persuit_factor) + 55)**3 * aggression_factor / 2000000 * base_exp_rate / 100)) + + if calc_exp < 1: + calc_exp = 1 + else: + calc_exp = rows[6] + + w.write("{\n") + writeIntField(w, "Id", rows[0]) + writeStrField(w, "SpriteName", rows[1]) + writeStrField(w, "Name", rows[2]) + writeIntField(w, "Lv", rows[3]) + writeIntField(w, "Hp", rows[4]) + writeIntField(w, "Sp", rows[5]) + writeIntField(w, "Exp", calc_exp) + writeIntField(w, "JExp", rows[7]) + writeIntField(w, "AttackRange", rows[8]) + writeFieldArr(w, "Attack", rows[9], rows[10]) + writeIntField(w, "Def", rows[11]) + writeIntField(w, "Mdef", rows[12]) + writeStartBlock(w, "Stats") + writeIntField2(w, "Str", rows[13]) + writeIntField2(w, "Agi", rows[14]) + writeIntField2(w, "Vit", rows[15]) + writeIntField2(w, "Int", rows[16]) + writeIntField2(w, "Dex", rows[17]) + writeIntField2(w, "Luk", rows[18]) + writeEndBlock(w) + writeIntField(w, "ViewRange", rows[19]) + writeIntField(w, "ChaseRange", 10) + writeIntField(w, "Size", rows[21]) + writeIntField(w, "Race", rows[22]) + writeFieldList(w, "Element", int(rows[23]) % 10, int(rows[23]) / 20) + mode = int(rows[24], 0) + if mode != 0: + writeStartBlock(w, "Mode") + writeCondField2(w, mode & 0x0001, "CanMove") + writeCondField2(w, mode & 0x0002, "Looter") + writeCondField2(w, mode & 0x0004, "Aggressive") + writeCondField2(w, mode & 0x0008, "Assist") + writeCondField2(w, mode & 0x0010, "CastSensorIdle") + writeCondField2(w, mode & 0x0020, "Boss") + writeCondField2(w, mode & 0x0040, "Plant") + writeCondField2(w, mode & 0x0080, "CanAttack") + writeCondField2(w, mode & 0x0100, "Detector") + writeCondField2(w, mode & 0x0200, "CastSensorChase") + writeCondField2(w, mode & 0x0400, "ChangeChase") + writeCondField2(w, mode & 0x0800, "Angry") + writeCondField2(w, mode & 0x1000, "ChangeTargetMelee") + writeCondField2(w, mode & 0x2000, "ChangeTargetChase") + writeCondField2(w, mode & 0x4000, "TargetWeak") + writeCondField2(w, mode & 0x8000, "LiveWithoutMaster") + writeEndBlock(w) + writeIntField(w, "MoveSpeed", rows[25]) + writeIntField(w, "AttackDelay", rows[26]) + writeIntField(w, "AttackMotion", rows[27]) + writeIntField(w, "DamageMotion", rows[28]) + writeIntField(w, "MvpExp", rows[45]) + + if isHaveData(rows, 47, 3): + writeStartBlock(w, "MvpDrops") + for f in range(0, 3): + value = rows[47 + f * 2] + chance = rows[47 + f * 2] + if value == "" or value == "0" or chance == "" or chance == "0": + continue + value = int(value) + if value not in items: + w.write("// Error: mvp drop with id {0} not found in item db\n".format(value)) + print("Error: mvp drop with id {0} not found in item db".format(value)) + else: + writeSubField(w, items[value]["name"], chance) + writeEndBlock(w) + if isHaveData(rows, 29, 10): + writeStartBlock(w, "Drops") + for f in range(0, 10): + value = rows[29 + f * 2] + chance = rows[30 + f * 2] + if value == "" or value == "0" or chance == "" or chance == "0": + continue + value = int(value) + if value not in items: + w.write("// Error: drop with id {0} not found in item db\n".format(value)) + print("Error: drop with id {0} not found in item db".format(value)) + else: + writeSubField(w, items[value]["name"], chance) + writeEndBlock(w) + w.write("},\n") + w.write(")\n") diff --git a/hercules/code/server/tmw/mobskilldb.py b/hercules/code/server/tmw/mobskilldb.py new file mode 100644 index 0000000..7188824 --- /dev/null +++ b/hercules/code/server/tmw/mobskilldb.py @@ -0,0 +1,55 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import re + +from code.fileutils import readFile + +def convertMobSkillDb(): + srcFile = "oldserverdata/world/map/db/mob_skill_db.txt" + dstFile = "newserverdata/db/re/mob_skill_db.txt" + fieldsSplit = re.compile(",") + notintown = re.compile("notintown") + notintownSub = re.compile("notintown,0") + with open(srcFile, "r") as r: + with open(dstFile, "w") as w: + tpl = readFile("templates/mob_skill_db.tpl") + w.write(tpl) + for line in r: + if notintown.search(line): + if line[0:2] == "//": + line = '' + line = notintownSub.sub("myhpltmaxrate,20",line) + if len(line) < 2 or line[0:2] == "//": + w.write(line) + continue + rows = fieldsSplit.split(line) + if len(rows) < 10: + w.write(line) + continue + + for f in xrange(0, len(rows)): + rows[f] = rows[f].strip() + + w.write("{0},{1},{2},{3},{4},{5},{6}," + "{7},{8},{9},{10},{11},{12},{13}," + "{14},,,,\n".format( + rows[0], + rows[1], + rows[2], + rows[3], + rows[4], + rows[5], + rows[6], + rows[7], + rows[8], + rows[9], + rows[10], + rows[11], + rows[12], + rows[13], + rows[14] + )) + diff --git a/hercules/code/server/tmw/npcs.py b/hercules/code/server/tmw/npcs.py new file mode 100644 index 0000000..c51da78 --- /dev/null +++ b/hercules/code/server/tmw/npcs.py @@ -0,0 +1,878 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 Evol Online +# Author: Andrei Karas (4144) + +import os +import re + +from code.fileutils import makeDir +from code.stringutils import stripWindows, stripNewLine + +mapsConfFile = "newserverdata/conf/maps.conf" +if os.path.isfile(mapsConfFile): + os.remove(mapsConfFile) +mapsIndexFile = "newserverdata/db/map_index.txt" +if os.path.isfile(mapsIndexFile): + os.remove(mapsIndexFile) +npcMainScript = "newserverdata/npc/re/scripts_main.conf" +mapsIndex = 1 +scriptRe = re.compile("^(((?P[^/](.+)),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+))|(?Pfunction)|-)" + + "[|](?Pscript)[|](?P[^|]+)([|]" + "(?P[\d-]+)((,((?P[\d]+),(?P[\d]+)))|)|)$") + +scriptRe2 = re.compile("^(((?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+))|(?Pfunction)|-)" + + "[\t](?Pscript)[\t](?P[\w#'\\[\\]_ äü.-]+)[\t]" + "(((?P[\d-]+)((,((?P[\d-]+),(?P[\d-]+)))|)(|,)(|[ \t]))|){(|[ ])$") + +shopRe = re.compile("^(?P[^/](.+)),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)(|,(?P[\d]+))" + + "[|](?Pshop)[|](?P[^|]+)[|]" + "(?P[\d-]+),(?P(.+))$") + +shopRe2 = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)" + + "[\t](?Pshop)[\t](?P[^\t]+)[\t]" + "(?P[\d]+),(?P(.+))$") + +mapFlagRe = re.compile("^(?P[^/](.+))" + + "[|](?Pmapflag)[|](?P[\w#']+)(|[|](?P.*))$") + +mapFlagRe2 = re.compile("^(?P[^/](.+))[.]gat" + + "[ ](?Pmapflag)[ ](?P[\w#']+)(|[ ](?P.*))$") + +warpRe = re.compile("^(?P[^/](.+)),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)[|]" + "(?Pwarp)[|](?P[^|]+)[|](?P[\d-]+),(?P[\d-]+),(?P[^/](.+)),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)$") +warpRe2 = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)([\t]+)" + "(?Pwarp)[\t](?P[^\t]+)([\t]+)(?P[\d-]+),(?P[\d-]+),(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)$") +warpRe3 = re.compile("^(?P[^/](.+)),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)[|]" + "(?Pwarp)[|](?P[\d-]+),(?P[\d-]+),(?P[^/](.+)),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)$") + +monsterRe = re.compile("^(?P[^/](.+)),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d-]+),(?P[\d-]+)[|]" + "(?Pmonster)[|](?P[^|]+)[|]" + "(?P[\d]+),(?P[\d]+),(?P[\d]+)ms,(?P[\d]+)ms(|,(?P