def main(): import time beginTime = time.time() ConfigureRoles() World.dropTable(ifExists=True) World.createTable() # create world World(name="TheWorld") import genesis.world.world CreateTables() import genesis.main DBDict.createRows( "SpellProto" ) # all effects used should be drug in (this is before itemproto, so scrolls are made) DBDict.createRows("ItemSetPower") DBDict.createRows("ItemSetProto") DBDict.createRows("ItemProto") DBDict.createRows("ClassSkill") DBDict.createRows("ClassProto") DBDict.createRows("Dialog") DBDict.createRows("Spawn") DBDict.createRows("SpawnInfo") DBDict.createRows("SpawnGroup") DBDict.createRows("SpawnGroupController", False) DBDict.createRows("Zone") DBDict.createRows("FactionRelation") DBDict.createRows("Recipe") # DBDict.createRows('DialogLine') #all used dialog lines should be created automatically # Get a cursor for the database connection. cur = conn.getConnection().cursor() # Maybe stuff some things into DB to speed up certain # gathering processes on world start here. # Commit the transaction. transaction.commit() # Clean up the database, make it as small as possible, # optimize for faster access. cur.execute("VACUUM") # Close the cursor. cur.close() print "Completed in %i seconds..." % int(time.time() - beginTime) print "\a"
from genesis.dbdict import DBDict from mud.world.defines import * ITEMS = [] for item in DBDict.getInstanceList('ItemProto'): if "COMMON" in item.itemType and "WEAPON" in item.itemType: ITEMS.append(item) if "COMMON" in item.itemType and "ARMOR" in item.itemType: ITEMS.append(item) if "COMMON" in item.itemType and "JEWELRY" in item.itemType: ITEMS.append(item) for item in ITEMS: item.rating = 1
def main(): import time beginTime = time.time() ConfigureRoles() World.dropTable(ifExists=True) World.createTable() #create world World(name="TheWorld") import genesis.world.world CreateTables() import genesis.main DBDict.createRows( 'SpellProto' ) #all effects used should be drug in (this is before itemproto, so scrolls are made) DBDict.createRows('ItemSetPower') DBDict.createRows('ItemSetProto') DBDict.createRows('ItemProto') DBDict.createRows('ClassSkill') DBDict.createRows('ClassProto') DBDict.createRows('Dialog') DBDict.createRows('Spawn') DBDict.createRows('SpawnInfo') DBDict.createRows('SpawnGroup') DBDict.createRows('SpawnGroupController', False) DBDict.createRows('Zone') DBDict.createRows('FactionRelation') DBDict.createRows('Recipe') #DBDict.createRows('DialogLine') #all used dialog lines should be created automatically # Get a cursor for the database connection. cur = conn.getConnection().cursor() # Maybe stuff some things into DB to speed up certain # gathering processes on world start here. # Commit the transaction. transaction.commit() # Clean up the database, make it as small as possible, # optimize for faster access. cur.execute("VACUUM") # Close the cursor. cur.close() print "Completed in %i seconds..." % int(time.time() - beginTime) print '\a'