Jump to content
  • 0
ae5140

open Metin2 Python Sqlite3 Module

Question

Hi, I want to make a system where players can see their whisper chat history.
I want to use this in python of the sqlite3 module. But somehow I could not use sqlite3 for Metin2. Anybody know anything about this? Thank you from now. :)

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0

That requires proper python libs in your client.

I would suggest you do that in c++ and probably without SQLite, because there's no reason to.

Add them to a vector, save/load the vector data (encrypted), store pm's in separate files (subdirectory) for each character.

Share this post


Link to post
  • 0

you can take a look at guild messenger  ;)

Share this post


Link to post
  • 0

Are you sure that you want connect to db from client with put your credentials in py file?

  • Love 1

Share this post


Link to post
  • 0

No, it isn't like that. It's a local database inside the client only.

Anyway, I don't recommend to use that lib either , anytime when you use it, it generates a small freeze during it saves the database.
I'm using it for my accountboard but I will change it later.
Here is a small example to update the last used account to place it to the top of the list during the Connect method:

		con = sqlite3.connect("lib/sqlite3/db.cpd")
		cur = con.cursor()
		try:
			cur.execute("UPDATE accounts SET last_use=? WHERE login = ?;", (time.time(), id,))
		except sqlite3.Error, e:
			dbg.TraceError("An error occurred during updating the last_use field:" + e.args[0])
		con.commit()
		cur.close()
		con.close()

 

  • Love 4

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.