Mostrar mensagens com a etiqueta Clone. Mostrar todas as mensagens
Mostrar mensagens com a etiqueta Clone. Mostrar todas as mensagens

quinta-feira, 8 de agosto de 2013

Clone Recommended Item Builds Update

type='html'>I updated this for Howling Abyss and figured I'd repost.  Enjoy!

Link to OP. 

# A Python script to allow you to 'clone' a customized set of recommended items.
# Written by RheingoldRiver.  Feel free to modify and share it but please don't
# claim you wrote it yourself if you do so.

# This code is intended to work with Enigma's Recommended Items Changer.  I am
# in no way affiliated with Enigma and any errors here are entirely my own.
# If you have League installed in a different directory, edit the variables
# dirOrig and dirNew accordingly.

# The inputs are (1) a string of the champion whose build you want to clone;
# (2) a vector of strings of the champions to which you want to clone the build;
# (3) a string denoting which mode you want to take the build from; and (4)
# a string denoting which mode you want to copy the build to.  Mode strings are
# "sr" for Summoner's Rift"; "dom" for Dominion; "ha" for Howling Abyss;
# and "tt" for Twisted Treeline.

# Example inputs:
#    cloneBuild("Sona",["Janna","Nami","Lulu"],"sr","sr")
# will copy your Summoner's Rift Sona build to Janna, Nami, and Lulu on
# Summoner's Rift.
#    cloneBuild("Irelia",["Irelia"],"sr","dom")
# will copy your Summoner's Rift Irelia build to Irelia on Dominion.

# If one of your builds contains items not available on a particular map then
# the program will still work; those items will just not appear in your
# recommended items on that map.

ADC = ["Ashe", "Caitlyn", "Corki", "Draven", "Ezreal", "Graves", "Kayle",
       "Kogmaw", "MissFortune", "Quinn", "Sivir", "Tristana", "Twitch", "Urgot",
       "Varus", "Vayne"]
SUPPORT = ["Alistar", "Blitzcrank", "Fiddlesticks", "Janna", "Leona", "Lulu",
            "Lux", "Nami", "Nidalee", "Nunu", "Sona", "Soraka", "Taric",
            "Thresh", "Zilean", "Zyra"]
APMANA = ["Ahri", "Anivia", "Annie", "Brand", "Cassiopeia", "ChoGath", "Diana",
          "Elise", "Evelynn", "Fizz", "Galio", "Gragas", "Heimerdinger",
          "Karma", "Karthus", "Kassadin", "LeBlanc", "Lissandra", "Malzahar",
          "Morgana", "Orianna", "Ryze", "Sion", "Swain", "Syndra", "Teemo",
          "TwistedFate", "Veigar", "Viktor", "Xerath", "Ziggs"]
APMANALESS = ["Akali", "Katarina", "Kennen", "Mordekaiser", "Rumble",
              "Vladimir"]
ADBRUISER = ["Darius", "DrMundo", "Fiora", "Gangplank", "Garen", "Hecarim",
             "Irelia", "JarvanIV", "Jax", "Jayce", "Khazix", "LeeSin",
             "MasterYi", "Nasus", "Nocturne", "Olaf", "Pantheon", "Poppy",
             "Rammus", "Renekton", "Rengar", "Riven", "Shaco", "Shen",
             "Shyvana", "Skarner", "Talon", "Trundle", "Tryndamere", "Udyr",
             "Vi", "MonkeyKing", "XinZhao", "Yorick", "Zac", "Zed"]
APBRUISER = ["Amumu", "Malphite", "Maokai", "Nautilus", "Sejuani", "Singed",
             "Volibear", "Warwick"]
ALL = ADC + SUPPORT + APMANA + APMANALESS + ADBRUISER + APBRUISER


import os
def cloneBuild(orig,new,mode1,mode2):
    d1 = {"dom":"8", "sr":"1", "tt":"10", "pg": "3", "ha":"12"}
    d2 = {"sr":"CLASSIC", "dom":"ODIN", "tt":"CLASSIC", "pg":"any", "ha":"any"}
    fileOrig = "EnigmaItem_" + d1[mode1] + "_" + d2[mode1] + "-0.json"
    dirOrig = 'C:/Riot Games/League of Legends/Config/Champions/' + orig + '/Recommended/'
    fOrig = dirOrig + fileOrig
    f1 = open(fOrig,'r')
    s = f1.readline()
    f1.close()
    for champ in new:
        fileNew = "EnigmaItem_" + d1[mode2] + "_" + d2[mode2] + "-0.json"
        dirNew = 'C:/Riot Games/League of Legends/Config/Champions/' + champ + '/Recommended/'
        if not os.path.exists(dirNew):
            os.makedirs(dirNew)
        fNew = dirNew + fileNew  
        f2 = open(fNew,'w')
        s = s.replace(orig,champ)
        s = s.replace(d2[mode1],d2[mode2])
        s = s.replace("\"map\":\""+d1[mode1]+"\"","\"map\":\""+d1[mode2]+"\"")
        f2.write(s)
        f2.close()



This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

quinta-feira, 1 de agosto de 2013

Clone recomendado Item constrói atualização

tipo = 'html' >eu updated isto para o abismo uivando e pensei que eu iria repost.  Desfrute de!

Link para o OP.

# Um script Python para permitir que você 'clonar' um conjunto personalizado de itens recomendados.
# Escrito por RheingoldRiver.  Sinta-se livre para modificar e compartilhá-lo, mas por favor não
# afirmam que você escreveu você mesmo se você fazer isso.

# Este código destina-se a trabalhar com trocador de itens recomendados do Enigma.  Eu sou
# em nenhuma maneira affiliated com o Enigma e quaisquer erros aqui são inteiramente minha.
# Se você tiver instalada em um diretório diferente de liga, editar as variáveis
dirOrig # e dirNew em conformidade.

# As entradas são (1) uma seqüência de caracteres do campeão cuja compilação que você deseja clonar;
# (2) um vetor de strings da Liga dos Campeões ao qual você deseja clonar a compilação;
# (3) uma string que indica qual modo você quer levar a compilação de; e (4)
# uma string que indica qual modo você quer copiar a compilação.  São seqüências de caracteres de modo
# "sr" para a fenda do Invocador"; "dom" de domínio; "ha" para Howling abismo;
# e "tt" para Treeline torcido.

# Entradas exemplo:
# cloneBuild("Sona",["Janna","Nami","Lulu"],"sr","sr")
# irá copiar a compilação de Rift Sona do seu Invocador Janna, Nami e Lulu na
Fenda do Invocador.
# cloneBuild("Irelia",["Irelia"],"sr","dom")
# irá copiar a compilação de Rift Irelia do seu Invocador para Irelia no Dominion.

# Se um dos suas compilações contém itens não disponíveis em um determinado mapa então
# o programa continuará a funcionar; Esses itens não aparecerá no seu
# recomendado itens no mapa.

ADC = ["Ashe", "Caitlyn", "Corki", "Vando", "Ezreal", "Túmulos", "Joana",
"Kogmaw", "MissFortune", "Quinn", "Sivir", "Tristana", "Twitch", "Urgot",
"Varo", "Vayne"]
SUPORTE = ["Alistar", "Blitzcrank", "Bobagem", "Inês", "Leona", "Lulu",
"Lux", "Nami", "Nidalee", "Edna", "Sona", "Soraka", "Taric",
"Debulhar", "Zilean", "Zyra"]
APMANA = ["Ahri", "Anivia", "Annie", "Marca", "Cassiopeia", "ChoGath", "Diana",
"Elise", "Evelynn", "Fizz", "Galio", "Gragas", "Heimerdinger",
"Karma", "Karthus", "Kassadin", "LeBlanc", "Lissandra", "Malzahar",
"Morgana", "Orianna", "Ryze", "Sion", "Swain", "Syndra", "Teemo",
"TwistedFate", "Veigar", "Viktor", "Xerath", "Ziggs"]
APMANALESS = ["Akali" "Katarina", "Kennen", "Mordekaiser", "Rumble",
"Vladimir"]
ADBRUISER = ["Darius", "DrMundo", "Fiora", "Prancha", "Gar", "Hecarim",
"Irelia", "JarvanIV", "Jax", "Jayce", "Khazix", "LeeSin",
"MasterYi", "Nasus", "Noturno", "Olaf", "Panteão", "Paizinho",
"Rammus", "Renekton", "Rengar", "Riven", "Gmand", "Shen",
"Shyvana", "Skarner", "Garra", "Rodízio", "Tryndamere", "Udyr",
"Vi", "MonkeyKing", "XinZhao", "Yorick", "Zac", "Zed"]
APBRUISER = ["Amumu", "Malphite", "Maokai", "Nautilus", "Sejuani", "Chamuscado",
"Volibear", "Warwick"]
TODOS = ADC + SUPORTE + APMANA + APMANALESS + ADBRUISER + APBRUISER


sistema operacional de importação
def cloneBuild(orig,new,mode1,mode2):
D1 = {"dom": "8", "sr": "1", "tt": "10", "pg": "3", "ha": "12"}
D2 = {"sr": "Clássico", "dom": "ODIN", "tt": "Clássico", o "pg": "qualquer", "ha": "qualquer"}
fileOrig = "EnigmaItem_" + d1 [mode1] + "_" + d2 [mode1] + "-0.json"
dirOrig = ' C: / Riot Games/Liga dos Campeões/lendas/Config /' + orig + '/ recomendado /'
fOrig = dirOrig + fileOrig
F1 = open(fOrig,'r')
s = f1.readline()
F1.Close()
para o campeão em novo:
ArquivoNovo = "EnigmaItem_" + d1 [mode2] + "_" + d2 [mode2] + "-0.json"
dirNew = ' C: / Riot Games/Liga dos Campeões/lendas/Config /' + campeão + '/ recomendado /'
Se não os.path.exists(dirNew):
os.makedirs(dirNew)
fNew = dirNew + fileNew
F2 = open(fNew,'w')
s = s.replace(orig,champ)
s = s.replace(d2[mode1],d2[mode2])
s = s.replace("\"map\":\""+d1[mode1]+"\"","\"map\":\""+d1[mode2]+"\"")
F2.Write(s)
F2.Close()