Convert din SQL in TXT

Închis
Avatar utilizator
HyPerPowa95
Nivel 1

Nivel 1
Mesaje: 100
Membru din: 08 Dec 2015, 20:49
Server: Rotex2
Regat: Chunjo
Aprecieri: 123  
Mulţumiri: 9  
Discord: Copiază ID
Medalii

Buna!
Caut si eu un converter din SQL in TXT
item_proto.sql --->>> item_proto.txt si item_names.txt
mob_proto.sql --->>> mob_proto.txt si mob_names.txt
Avatar utilizator
HyPerPowa95
Nivel 1

Nivel 1
Mesaje: 100
Membru din: 08 Dec 2015, 20:49
Server: Rotex2
Regat: Chunjo
Aprecieri: 123  
Mulţumiri: 9  
Discord: Copiază ID
Medalii

Rezolvat
Avatar utilizator
FRANCIS
Administrator Adjunct

Administrator Adjunct
Mesaje: 7879
Membru din: 06 Noi 2015, 19:52
Regat: Chunjo
Aprecieri: 334  
Mulţumiri: 54528  
Discord: Copiază ID
Medalii

Lasă și link sau resursa dar era postat pe forum de Ionuț
If you talk to a man in a language he understands, that goes to his head. If you talk to him in his own language, that goes to his heart.
Imagine
ENJOY
Imagine
Afișează semnătura
Avatar utilizator
HyPerPowa95
Nivel 1

Nivel 1
Mesaje: 100
Membru din: 08 Dec 2015, 20:49
Server: Rotex2
Regat: Chunjo
Aprecieri: 123  
Mulţumiri: 9  
Discord: Copiază ID
Medalii

SQL -> TXT
To convert item_proto sql to txt files, you need this script in python

http://pastebin.com/K5EDE4b6

Configuration:

You need MySQLdb on your freebsd

If you haven't it, just install it - it's a mysql library to python

Cod: Selectaţi tot

cd /usr/ports/databases/py-MySQLdb/ && make install clean
You need also change the connection properties in script

default it's:

Cod: Selectaţi tot

host_mysql = 'localhost'
user_mysql = 'mt2'
passwd_mysql = 'mt2!@#'
And if you want convert also mob_proto in this way, you need onlu change from

Cod: Selectaţi tot

#print mob_proto()
to

Cod: Selectaţi tot

print mob_proto()
in the end of file.

Scriptul python trebuie adaptat pentru propriul server, merge testat.
ABBC3_SPOILER_SHOW
Închis
Răspunsuri
1
Vizualizări
494
Răspunsuri
5
Vizualizări
1047
Răspunsuri
8
Vizualizări
1157
Răspunsuri
1
Vizualizări
755

Înapoi la “Cereri Rezolvate”

  • Informaţie