Th3C0rp0r4l
Utente Silver
Good.
Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
oki thanks ^^Più tardi faccio un video per farti capire come si fa ...
il mio problema persiste
il mio problema persiste

fatto funziona grandeAspèè forse ho capito! Fai in modo che nei files si veda l'estensione!![]()

Ti spiegheresti meglio,perchè anche a me fà lo stesso errore D:Aspèè forse ho capito! Fai in modo che nei files si veda l'estensione!![]()

[11:10:44]: Puoi postare
import os
class Metin2_Pack_Extension:
def PrintFile(self, text):
f=open("logs.txt", "a")
f.write("%s\n" % text)
f.close()
def Check_Directory(self):
Check=[0, 0, 0, 0, 0, 0, 0]
for i in os.listdir(os.getcwd()):
if i == "artpclnt.dll":
Check[0]=1
elif i == "devil.dll":
Check[1]=1
elif i == "msvcp60.dll":
Check[2]=1
elif i == "MSS32.DLL" or i == "mss32.dll":
Check[3]=1
elif i == "SpeedTreeRT.dll":
Check[4]=1
elif i == "python22.dll":
Check[5]=1
elif i == "granny2.dll":
Check[6]=1
if Check[0]==1 and Check[1]==1 and Check[2]==1 and Check[3]==1 and Check[4]==1 and Check[5]==1 and Check[6]==1:
return 1
else:
return 0
def Main(self):
print "\nCambio Estensioni ** By Revolution\n"
print "All rights reserved 2013**2014."
epk_o=raw_input("Old EPK Extension **> .")
eix_o=raw_input("Old EIX Extension **> .")
epk=raw_input("New EPK Extension **> .")
eix=raw_input("New EIX Extension **> .")
epack_directory="pack"
if len(epk_o)==3 and len(eix_o) and len(epk)==3 and len(eix)==3 and epk_o != epk and eix_o != eix and epk != eix and epk_o != eix_o:
if self.Check_Directory() == 0:
print "Controllo Directory Fallito...\n<< Posiziona il file sulla cartella principale del client >>"
self.Main()
print "Controllo Directory OK..."
print "Controllo Estensioni OK..."
files=[]
for i in os.listdir(epack_directory):
if i.endswith(".%s" % epk_o) or i.endswith(".%s" % eix_o):
files.append(i)
if len(files) > 0:
for i in files:
if i.endswith(".%s" % epk_o):
newfile=i.replace(".%s" % epk_o, ".%s" % epk)
self.PrintFile("[EPK] Changing extension of %s in %s..." % (i, newfile))
os.rename("%s/%s" % (epack_directory, i), "%s/%s" % (epack_directory, newfile))
self.PrintFile("[EPK] Extension of %s changed in %s successfully!" % (i, newfile))
elif i.endswith(".%s" % eix_o):
newfile=i.replace(".%s" % eix_o, ".%s" % eix)
self.PrintFile("[EIX] Changing extension of %s in %s" % (i, newfile))
os.rename("%s/%s" % (epack_directory, i), "%s/%s" % (epack_directory, newfile))
self.PrintFile("[EIX] Extension of %s changed in %s successfully!" % (i, newfile))
print "All of extensions are changed."
else:
print "E**Pack files not found."
exit=raw_input("Press [ENTER]")
self.Main()
else:
print "Le estensioni devono:\n1) Avere 3 caratteri.\n2) Non devono essere uguali."
self.Main()
def __init__(self):
self.Main()
Metin2_Pack_Extension()
def endswith(self, str, needle):
if (needle.__class__.__name__ == "list"):
for i in needle:
if (str[**len(i) : ] == i):
return 1
return 0
Troppo brutto come codiceas requested
******
Codice:if i == "artpclnt.dll": Check[0]=1 elif i == "devil.dll": Check[1]=1 elif i == "msvcp60.dll": Check[2]=1 elif i == "MSS32.DLL" or i == "mss32.dll": Check[3]=1 elif i == "SpeedTreeRT.dll": Check[4]=1 elif i == "python22.dll": Check[5]=1 elif i == "granny2.dll": Check[6]=1 if Check[0]==1 and Check[1]==1 and Check[2]==1 and Check[3]==1 and Check[4]==1 and Check[5]==1 and Check[6]==1: return 1 else: return 0
#schifo:
if Check[0]==1 and Check[1]==1 and Check[2]==1 and Check[3]==1 and Check[4]==1 and Check[5]==1 and Check[6]==1:
return 1
else:
return 0
#better way:
return (1 in Check)
#schifo:
if i == "artpclnt.dll":
Check[0]=1
elif i == "devil.dll":
Check[1]=1
elif i == "msvcp60.dll":
Check[2]=1
elif i == "MSS32.DLL" or i == "mss32.dll":
Check[3]=1
elif i == "SpeedTreeRT.dll":
Check[4]=1
elif i == "python22.dll":
Check[5]=1
elif i == "granny2.dll":
Check[6]=1
#better way:
tuplatime=("artpclnt.dll","devil.dll","msvcp60.dll","mss32.dll","speedtreert.dll","python22.dll","granny2.dll")
for idx1 in range(len(tuplatime)):
if(i.lower()==tuplatime[idx1]):
Check[idx1]=1
def Check_Directory(self):
tuplatime=("artpclnt.dll","devil.dll","msvcp60.dll","mss32.dll","speedtreert.dll","python22.dll","granny2.dll")
ret=0
for i in os.listdir(os.getcwd()):
if(i.lower() in tuplatime): ret=1 #e qua metterci anche un break
return ret
Voglio ricordare ancora una volta che le release e le guide funzionanti non vanno in necropost, occhio.occhio alle date![]()
Troppo brutto come codice
Codice:#schifo: if Check[0]==1 and Check[1]==1 and Check[2]==1 and Check[3]==1 and Check[4]==1 and Check[5]==1 and Check[6]==1: return 1 else: return 0 #better way: return (1 in Check)Ma, ancora meglio ancora: (se ho tempo, dopo accorcio ancora di più le righe)Codice:#schifo: if i == "artpclnt.dll": Check[0]=1 elif i == "devil.dll": Check[1]=1 elif i == "msvcp60.dll": Check[2]=1 elif i == "MSS32.DLL" or i == "mss32.dll": Check[3]=1 elif i == "SpeedTreeRT.dll": Check[4]=1 elif i == "python22.dll": Check[5]=1 elif i == "granny2.dll": Check[6]=1 #better way: tuplatime=("artpclnt.dll","devil.dll","msvcp60.dll","mss32.dll","speedtreert.dll","python22.dll","granny2.dll") for idx1 in range(len(tuplatime)): if(i.lower()==tuplatime[idx1]): Check[idx1]=1
Codice:def Check_Directory(self): tuplatime=("artpclnt.dll","devil.dll","msvcp60.dll","mss32.dll","speedtreert.dll","python22.dll","granny2.dll") ret=0 for i in os.listdir(os.getcwd()): if(i.lower() in tuplatime): ret=1 #e qua metterci anche un break return ret
ren *.eix *.estensione
ren *.epk *.estensione

@echo off
ren *.eix *.<nuovaext>
ren *.epk *.<nuovaext>
Se son solo cambiate le estensioni si
Ma comunque come detto sopra, bastava un bat con:
Codice:@echo off ren *.eix *.<nuovaext> ren *.epk *.<nuovaext>
senza interpreti e cagate varie!
