Advertisement
j7sx

create db with heroes character

Oct 21st, 2013
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.87 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. import sqlite3 as db
  5.  
  6. conn = db.connect('herostat.db')
  7. c = conn.cursor()
  8. c.execute('''CREATE TABLE warrior_stat
  9.  (con int, str int, wit int, _int int, dex int, mp int, pdef int, mdef int, patack int, matack int)''')
  10. c.execute("""INSERT INTO warrior_stat
  11.  VALUES (3000, 300, 9, 9, 5, 1500, 1700, 700, 200, 120)""")
  12. c.execute('''CREATE TABLE archer_stat
  13.  (con int, str int, wit int, _int int, dex int, mp int, pdef int, mdef int, patack int, matack int)''')
  14. c.execute("""INSERT INTO archer_stat
  15.  VALUES (2300, 250, 9, 9, 20, 1800, 1200, 800, 250, 120)""")
  16. c.execute('''CREATE TABLE wizard_stat
  17.  (con int, str int, wit int, _int int, dex int, mp int, pdef int, mdef int, patack int, matack int)''')
  18. c.execute("""INSERT INTO wizard_stat
  19.  VALUES (1800, 80, 750, 300, 20, 2300, 700, 1200, 120, 300)""")
  20. conn.commit()
  21. c.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement