Jump to content

Deucalion

Inactive Member
  • Posts

    76
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Deucalion

  1. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hi.
    I wanna to show you how can you convert item_proto to sql and later to txt files.
    XML -> SQL
    First we need this program:

    This is the hidden content, please

    scan:

    This is the hidden content, please

    Ther is something, but i haven't better program so you download it for your own responsibility

    With it, we can convert our xml proto to sql
    But first, from our xml file, we need to delete all <!--AddonType="0"--> and <!--AddonType="99"--> easy with notepad++ and ctrl+h :)

    and now we run our program and select file to convert.

    After moment we'll have a sql file, but if we have a locale_name column in item_proto we need to change also with ctr+h all gb2312name to locale_name, and now we can upload file with "execute sql file" or simpy with query to our database
     
    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

    cd /usr/ports/databases/py-MySQLdb/ && make install clean

    You need also change the connection properties in script

    default it's:

    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

    #print mob_proto()

    to

    print mob_proto()

    in the end of file.

     

    Now script should generate our protos in his directory .

     

    These programs are not mine. The python script i found somewhere and just modified it to 40k version

    I think that it's all, if you have any better program or any better way or idea you can show it :D

    Maybe in the future I will write to that one big script, but now I have no time for this ;/

    If there are any problems, I'll try to help :)

     

    #Updated python script

     

    Regards

    Deucalion

    • Metin2 Dev 97
    • Eyes 1
    • Dislove 8
    • Not Good 1
    • Sad 2
    • Think 2
    • Confused 1
    • Scream 2
    • Lmao 1
    • Good 39
    • Love 5
    • Love 73
  2. Hi. Maybe it's easy but, i have problem with that ;/ I have a MySQL 5.6 and Vanilla core 2.3 with db.

    When I use a game.mysql_query in quest with "SELECT", and put it into chat I have a empty chat, and nothing in sysser, but when I put query into e.g "chat("something"..query.." ") i have this error in sysser:

    SYSERR: Apr 26 11:31:02 :: RunState: LUA_ERROR: [string "test_quest"]:3: attempt to concatenate local `query' (a table value)
    SYSERR: Apr 26 11:31:02 :: WriteRunningStateToSyserr: LUA_ERROR: quest test_quest.start click

    Part of e.g quest

    local query = game.mysql_query('SELECT name FROM player.player WHERE id = 70984')
    	chat("something"..query.." ")

    But when I use this query in navicat everything is ok.

    I'll be grateful for the help :)

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.