def create_script(typeclass=None, key=None, obj=None, player=None, locks=None, interval=None, start_delay=None, repeats=None, persistent=None, autostart=True, report_to=None, desc=None):
 global _ScriptDB
 if (not _ScriptDB):
  from evennia.scripts.models import ScriptDB as _ScriptDB
 typeclass = (typeclass if typeclass else settings.BASE_SCRIPT_TYPECLASS)
 if isinstance(typeclass, basestring):
  typeclass = class_from_module(typeclass, settings.TYPECLASS_PATHS)
 kwarg = {}
 if key:
  kwarg['db_key'] = key
 if player:
  kwarg['db_player'] = dbid_to_obj(player, _ScriptDB)
 if obj:
  kwarg['db_obj'] = dbid_to_obj(obj, _ScriptDB)
 if interval:
  kwarg['db_interval'] = interval
 if start_delay:
  kwarg['db_start_delay'] = start_delay
 if repeats:
  kwarg['db_repeats'] = repeats
 if persistent:
  kwarg['db_persistent'] = persistent
 if desc:
  kwarg['db_desc'] = desc
 new_script = typeclass(**kwarg)
 new_script._createdict = {'key': key, 'obj': obj, 'player': player, 'locks': locks, 'interval': interval, 'start_delay': start_delay, 'repeats': repeats, 'persistent': persistent, 'autostart': autostart, 'report_to': report_to}
 new_script.save()
 return new_script

def create_script ( typeclass = None , key = None , obj = None , player = None , locks = None , interval = None , start_delay = None , repeats = None , persistent = None , autostart = True , report_to = None , desc = None ) : global _ScriptDB if ( not _ScriptDB ) : from evennia . scripts . models import ScriptDB as _ScriptDB typeclass = ( typeclass if typeclass else settings . BASE_SCRIPT_TYPECLASS ) if isinstance ( typeclass , basestring ) : typeclass = class_from_module ( typeclass , settings . TYPECLASS_PATHS ) kwarg = { } if key : kwarg [ 'db_key' ] = key if player : kwarg [ 'db_player' ] = dbid_to_obj ( player , _ScriptDB ) if obj : kwarg [ 'db_obj' ] = dbid_to_obj ( obj , _ScriptDB ) if interval : kwarg [ 'db_interval' ] = interval if start_delay : kwarg [ 'db_start_delay' ] = start_delay if repeats : kwarg [ 'db_repeats' ] = repeats if persistent : kwarg [ 'db_persistent' ] = persistent if desc : kwarg [ 'db_desc' ] = desc new_script = typeclass ( ** kwarg ) new_script . _createdict = { 'key' : key , 'obj' : obj , 'player' : player , 'locks' : locks , 'interval' : interval , 'start_delay' : start_delay , 'repeats' : repeats , 'persistent' : persistent , 'autostart' : autostart , 'report_to' : report_to } new_script . save ( ) return new_script
write out a script onto a target .