[pyKoL-users] SF.net SVN: pykol: [21] bots/icypeak.py
Brought to you by:
scelis
From: <mi...@us...> - 2007-05-04 22:22:05
|
Revision: 21 http://pykol.svn.sourceforge.net/pykol/?rev=21&view=rev Author: misza13 Date: 2007-05-04 15:22:05 -0700 (Fri, 04 May 2007) Log Message: ----------- Creating a bot that automatically adventures on the Icy Peak. Added Paths: ----------- bots/icypeak.py Added: bots/icypeak.py =================================================================== --- bots/icypeak.py (rev 0) +++ bots/icypeak.py 2007-05-04 22:22:05 UTC (rev 21) @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# +# (C) Misza <mi...@mi...>, 2007 +# +# Distributed under the terms of the MIT license. +# + +import sys + +sys.path.append('.') +from kolsite import KoLSite +from campground import Campground +from adventure import AutoAdventurer + + +def main(): + if len(sys.argv) < 2: + print 'Please specify a config file!' + return + config = {} + execfile(sys.argv[1]) + if not config.has_key('nick') or not config.has_key('password'): + print 'Nick or password not specified in config!' + return + + Site = KoLSite() + Site.doLogin(config['nick'],config['password']) + + AutoAdv = AutoAdventurer(Site) + AutoAdv.adventure('110') + + +if __name__ == '__main__': + main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |