diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-25 21:34:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-25 21:34:40 +0300 |
commit | 14ed8bf2db79eff1025c9092050a7b6c950e97a9 (patch) | |
tree | d830d93bc09a6f4dae8670b936edc03b9f401f03 /hercules | |
parent | 0cebfb951ef8a57fb488a4a87d3291372e0ce12a (diff) | |
download | evol-tools-14ed8bf2db79eff1025c9092050a7b6c950e97a9.tar.gz evol-tools-14ed8bf2db79eff1025c9092050a7b6c950e97a9.tar.bz2 evol-tools-14ed8bf2db79eff1025c9092050a7b6c950e97a9.tar.xz evol-tools-14ed8bf2db79eff1025c9092050a7b6c950e97a9.zip |
hercules: fix different case and syntax errors in tmw-br data.
Diffstat (limited to 'hercules')
-rw-r--r-- | hercules/code/server/tmw/itemdb.py | 5 | ||||
-rw-r--r-- | hercules/code/server/tmw/mobdb.py | 11 | ||||
-rw-r--r-- | hercules/code/server/tmw/npcs.py | 73 |
3 files changed, 42 insertions, 47 deletions
diff --git a/hercules/code/server/tmw/itemdb.py b/hercules/code/server/tmw/itemdb.py index 6e3145c..f45d4ee 100644 --- a/hercules/code/server/tmw/itemdb.py +++ b/hercules/code/server/tmw/itemdb.py @@ -127,6 +127,8 @@ def replaceStr(line): ("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\""), ]; @@ -160,6 +162,7 @@ def convertItemDb(isNew): 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 @@ -237,14 +240,12 @@ def convertItemDb(isNew): if len(UseScript) > 1: writeStartScript(w, "Script") for uline in UseScript: - uline = replaceStr(uline) if len(uline) > 0: w.write(" {0};\n".format(uline)) writeEndScript(w) if len(EquipScript) > 1: writeStartScript(w, "OnEquipScript") for eline in EquipScript: - eline = replaceStr(uline) if len(eline) > 0: w.write(" {0};\n".format(eline)) writeEndScript(w) diff --git a/hercules/code/server/tmw/mobdb.py b/hercules/code/server/tmw/mobdb.py index 3b3da62..ea4b4e7 100644 --- a/hercules/code/server/tmw/mobdb.py +++ b/hercules/code/server/tmw/mobdb.py @@ -15,6 +15,16 @@ def getMobDbFile(srcDir): if srcFile.find("mob_db") >= 0: yield srcFile +def replaceStr(line): + vals = [ + ("lanternaJack", "LanternaJack"), + ("foice", "Foice"), + ]; + + 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" @@ -28,6 +38,7 @@ def convertMobDb(items): if len(line) < 2 or line[:2] == "//": w.write(line) continue + line = replaceStr(line) rows = fieldsSplit.split(line) for f in xrange(0, len(rows)): rows[f] = rows[f].strip() diff --git a/hercules/code/server/tmw/npcs.py b/hercules/code/server/tmw/npcs.py index 2031bcf..7f0c513 100644 --- a/hercules/code/server/tmw/npcs.py +++ b/hercules/code/server/tmw/npcs.py @@ -565,6 +565,9 @@ def processStrReplace(tracker): ("@pelobranco", "@PeloBranco"), ("@raiz", "@Raiz"), ("@senha", "@Senha"), + ("@garrafaVazia", "@GarrafaVazia"), + ("@GAMBOGE", "@Gamboge"), + ("@FM$", "@fm$"), ("L_abrir", "L_Abrir"), ("L_Abrir", "L_Abrir"), ("L_acabou", "L_Acabou"), @@ -649,7 +652,7 @@ def processStrReplace(tracker): ("L_engana_player_novamente", "L_Engana2"), ("L_EQUIP", "L_Equip"), ("L_Equip", "L_Equip"), - ("L_ErrouPalavrasMagicas", "L_ErrouMagia"), + ("L_ErrouPalavrasMagicas", "L_ErrouMagia2"), ("L_explicacao", "L_Explicacao"), ("L_Explicacao", "L_Explicacao"), ("L_ExplicacaoCausaCrise", "L_ExplicacaoCrise"), @@ -703,8 +706,7 @@ def processStrReplace(tracker): ("L_knife_quest_missing_stingers_2", "L_Knife_MissSting2"), ("L_limpar", "L_Limpar"), ("L_Limpar", "L_Limpar"), - ("L_lista", "L_Lista"), - ("L_Lista", "L_Lista"), + ("L_lista", "L_Lista2"), ("L_listen_to_a_story_first", "L_ListenStory"), ("L_longe", "L_Longe"), ("L_LONGE", "L_Longe"), @@ -732,72 +734,51 @@ def processStrReplace(tracker): ("L_missaoPocaoQueimadura", "L_MissPotQueim"), ("L_missaoPresentesCompleta", "L_MissPresenteOk"), ("L_MOBS_queimaduraEscorpiao", "L_MOB_QueimEscorp"), - ("L_Nada", "L_Nada"), - ("L_nada", "L_Nada"), - ("L_Nao", "L_Nao"), - ("L_nao", "L_Nao"), + ("L_nada", "L_Nada2"), + ("L_nao", "L_Nao2"), ("L_naoPode", "L_NaoPode"), - ("L_NaoPode", "L_NaoPode"), - ("L_NaoSei", "L_NaoSei"), ("L_naoSei", "L_NaoSei"), ("L_naotenho", "L_NaoTenho"), ("L_Naotenho", "L_NaoTenho"), - ("L_NaoTenho", "L_NaoTenho"), ("L_naoTrouxe", "L_NaoTrouxe"), ("L_naotrouxe", "L_NaoTrouxe"), ("L_Naotrouxe", "L_NaoTrouxe"), - ("L_novaPartida", "L_NovaPartida"), + ("L_novaPartida", "L_NovaPartida2"), ("L_NovaPartida", "L_NovaPartida"), ("L_novorecordindividual", "L_NovoRecordSeu"), - ("L_obrigado", "L_Obrigado"), - ("L_Obrigado", "L_Obrigado"), + ("L_obrigado", "L_Obrigado2"), ("L_obsidian_spork_intro", "L_ObsidianSporkIntro"), - ("L_OK", "L_Ok"), - ("L_ok", "L_Ok"), + ("L_OK", "L_Ok2"), + ("L_ok", "L_Ok3"), ("L_onde", "L_Onde"), - ("L_Onde", "L_Onde"), ("L_opcaoFinalizarPartida", "L_opFimPart"), ("L_opcaoIniciaPartidaErro", "L_opIniPartErro"), ("L_opcaoParticipaJogoErro", "L_opPartJogoErro"), ("L_Participante_Invalido", "L_Partc_Invalido"), ("L_Participante_Perdedor", "L_Partc_Perde"), ("L_Participante_Vencedor", "L_partc_Vence"), - ("L_Pobre", "L_Pobre"), ("L_pobre", "L_Pobre"), ("L_porque", "L_Porque"), - ("L_Porque", "L_Porque"), - ("L_PossuiFragmento", "L_PossuiFragmento"), ("L_possuiFragmento", "L_PossuiFragmento"), - ("L_Preciso", "L_Preciso"), ("L_preciso", "L_Preciso"), ("L_PrecoPartyParticipar", "L_PrecoPartyPart"), - ("L_Presente", "L_Presente"), ("L_presente", "L_Presente"), ("L_PrometeVoltarComGRana", "L_VoltoComGp"), - ("L_Pronto", "L_Pronto"), ("L_pronto", "L_Pronto"), - ("L_Quem", "L_Quem"), ("L_quem", "L_Quem"), ("L_QueroArcoDeCurtoAlcance", "L_ArcoCurto"), ("L_ReexplicaApostaParaCobrir", "L_ExpApostaCobrir"), ("L_ReexplicaApostaParaIniciar", "L_ExpApostaIniciar"), ("L_ret_tudo", "L_Ret_Tudo"), ("L_ret_Tudo", "L_Ret_Tudo"), - ("L_Retirar", "L_Retirar"), ("L_retirar", "L_Retirar"), - ("L_Retorno", "L_Retorno"), ("L_retorno", "L_Retorno"), ("L_retorno_Doces_Escondidos", "L_Retorno_DoceHid"), ("L_Retorno_Segunda_Parte", "L_Retorno_Part2"), - ("L_Return", "L_Return"), ("L_return", "L_Return"), - ("L_Rever", "L_Rever"), ("L_rever", "L_Rever"), - ("L_Rico", "L_Rico"), ("L_rico", "L_Rico"), ("L_saia", "L_Saia"), - ("L_Saia", "L_Saia"), - ("L_Salvar", "L_Salvar"), ("L_salvar", "L_Salvar"), ("L_Segunda_Parte_MaisPirulitos", "L_P2_MaisPirulito"), ("L_Segunda_Parte_NaoPirulito", "L_P2_NaoPirulito"), @@ -806,51 +787,53 @@ def processStrReplace(tracker): ("L_selecionar_registro_AGE", "L_selreg_AGE"), ("L_selecionar_registro_GP", "L_selreg_GP"), ("L_selecionar_registro_LVL", "L_selreg_LVL"), - ("L_SemEspaco", "L_SemEspaco"), ("L_semEspaco", "L_SemEspaco"), - ("L_SemGrana", "L_SemGrana"), ("L_semGrana", "L_SemGrana"), ("L_semgrana", "L_SemGrana"), - ("L_SemGrana", "L_SemGrana"), ("L_semItem", "L_SemItem"), - ("L_SemItens", "L_SemItens"), ("L_semItens", "L_SemItens"), ("L_semLevel", "L_SemLevel"), - ("L_SemLevel", "L_SemLevel"), ("L_semlevel", "L_SemLevel"), ("L_semlugar", "L_SemLugar"), ("L_semLugar", "L_SemLugar"), ("L_semLvl", "L_SemLvl"), ("L_semLVL", "L_SemLvl"), ("L_SemLVL", "L_SemLvl"), - ("L_SemLvl", "L_SemLvl"), ("L_set", "L_Set"), ("L_SET", "L_Set"), ("L_ShieldNoLeatherPatch", "L_ShdNoLeathPatch"), ("L_sim2", "L_Sim2"), - ("L_Sim2", "L_Sim2"), ("L_sim3", "L_Sim3"), - ("L_Sim3", "L_Sim3"), - ("L_Sim", "L_Sim"), ("L_sim", "L_Sim"), + ("L_Nao2trouxe", "L_Nao2Trouxe"), ("L_snakeskins_completecheck", "L_snakeskin_okcheck"), ("L_SugerePesquisaDePreco", "L_PesquisePreco"), - ("L_Tchau2", "L_Tchau2"), ("L_tchau2", "L_Tchau2"), - ("L_Tchau", "L_Tchau"), ("L_tchau", "L_Tchau"), ("L_This_shouldn_t_happen", "L_NaoDeviaAcontecer"), ("L_too_lowlevel_for_stinger", "L_Stinger_LvlBaixo"), - ("L_Verde", "L_Verde"), ("L_verde", "L_Verde"), ("L_verificaMaisPresentes", "L_MaisPresenteCheck"), ("L_VOLTA", "L_Volta"), - ("L_Volta", "L_Volta"), ("L_voltaCheckIngredientes", "L_VoltaCheckItens"), ("L_voltaComIngredientes", "L_VoltaComItens"), - ("L_Warp", "L_Warp"), - ("L_warp", "L_Warp"), + ("L_warp", "L_Warp2"), + ("L_minissaia", "L_Minissaia"), + ("L_preMenu", "L_PreMenu"), + ("L_Regras", "L_regras"), ("S_MOBS_queimaduraEscorpiao", "S_MOBS_QueimEscorp"), + ("S_MOBS_queimaduraTartaruga", "S_MOBS_QueimTartaruga"), + ("Refinamento \\+\" + (@menu", "Refinamento \" + (@menu"), + ("Bom! \Aqui vou eu...", "Bom! Aqui vou eu..."), + ("\\:\";", ":\";"), + ("if BaseLevel <= 10, set", "if (BaseLevel <= 10) set"), + ("\\: Passando", ": Passando"), + ("\\o/", "o/"), + ("(getgmlevel ==", "(getgmlevel() =="), + ("foice", "Foice"), + ("lanternaJack", "LanternaJack"), + ("0), set @preco, ", "0) set @preco, "), + ("255), set @preco, ", "255) set @preco, "), ]; for val in vals: |