Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
If You understad python, you can try following temp solution, I did not try
by myself. Only go over the code
1. Change re code
'maxSlots':re.compile(r"%s\s*([0-9]+)\s*%s\s*([0-9]+)" %
translations['maxFleets'],
translations['slash'], re.I),
2. Add "slash = sur" to language file
To Vash:
I am also update a Kovan's Mod Bot: ogrobot.googlecode.com, I think we can
learn from
each other, I am also new to PyQt :)
MSN: jetic@msn.com
Original comment by je...@sina.com
on 3 Feb 2009 at 6:39
nice to meet you! maybe we could merge the two branches
Original comment by brain...@gmail.com
on 3 Feb 2009 at 7:30
I'm sorry I don't understand python so I don't think that could help me.
Still, I tried to find the code you told me to change (I opened the .py file
with
WordPad) but I didn't find anything.
In fact, I thought the problem was this line :
'fleetSlots':re.compile(r"%s[\s]*([0-9]+) \/ ([0-9]+)"
%(translations['fleets']), re.I),
or this one : fleetSlots = self.REGEXPS['fleetSlots'].search(page)
player.totalFleetSlots = int(fleetSlots.group(2))
player.freeFleetSlots = player.totalFleetSlots - int(fleetSlots.group(1))
The last one is the damn line 602.
The two can be find in the WebAdapter.py file.
Remember that I don't understand python, so I don't really know what I am
touching
here, if I am doing something wrong or if I am missing the point, tell me ! :D
Even if I still have my issue, I appreciate your help.
I tried to go and see your bot though, but I found it very difficult and didn't
understand how it works at all. I've downloaded Python but I don't understand
what
does it do. This is the really first time I use this kind of software, I'm
sorry for
my ignorance. :-(
Original comment by maxime.p...@yahoo.fr
on 3 Feb 2009 at 7:33
the 2nd comment offers a temporary solution, and I will look for a long term
one when
I get some time.
Original comment by brain...@gmail.com
on 3 Feb 2009 at 7:33
Ok, but I just want to know how to do it.
Where do I find the line I have to change ?
I'm pretty sure I did well the second step : add the slash = sur line in the
language
file, but as I can't do the first step it's useless. So how do I do it ?
Original comment by maxime.p...@yahoo.fr
on 3 Feb 2009 at 7:50
[deleted comment]
For first step, just change code in WebAdapter.py from:
'fleetSlots':re.compile(r"%s[\s]*([0-9]+) \/ ([0-9]+)"
%(translations['fleets']), re.I),
to
'fleetSlots':re.compile(r"%s\s*([0-9]+)\s*%s\s*([0-9]+)" %
translations['fleets'],
translations['slash'], re.I),
please try :)
Original comment by je...@sina.com
on 3 Feb 2009 at 8:25
Sorry, when I do that, I get this message in the logfile :
Traceback (most recent call last):
File "src\OGBot.py", line 106, in run
File "src\OGBot.py", line 137, in _connect
File "src\WebAdapter.py", line 160, in __init__
File "src\WebAdapter.py", line 359, in generateRegexps
TypeError: not enough arguments for format string
New message, new error =/ ...
I already try in fact, but I didn't do the other changes as the "\s*%s\s*" or
the
"()" less.
Just to ask you, I'm trying my best to understand your bot but I still can't
get it.
I've downloaded the file you ask, but I don't get what to do (and one of the
link is
dead). Sorry to be away from the point but I really want to understand. If you
don't
mind I'll be happy to talk about it somewhere else.
I'm sure I'll be less such a pain if I could begin to understand how this whole
thing
work ! :D
Original comment by maxime.p...@yahoo.fr
on 3 Feb 2009 at 8:42
By the way, when I do the change you told me, the bot can't even log in my
account.
Original comment by maxime.p...@yahoo.fr
on 3 Feb 2009 at 8:44
[deleted comment]
please take care of indent and the code should be in one line.
or you can add my MSN: jetic@msn.com
Original comment by je...@sina.com
on 3 Feb 2009 at 9:05
I'm sorry but I'm really doing everything. It must be the tenth time that I'm
doing
it again. It is in one line. But I've always the same message.
File "src\WebAdapter.py", line 359, in generateRegexps
TypeError: not enough arguments for format string
This is the line, but it doesn't want to work. And I can swear I'm writing the
good
thing. You can check if you want.
Original comment by maxime.p...@yahoo.fr
on 3 Feb 2009 at 9:28
Attachments:
I put you on my list. My MSN is maxip91@hotmail.com
Original comment by maxime.p...@yahoo.fr
on 3 Feb 2009 at 9:36
Sorry, But forget "()"
'fleetSlots':re.compile(r"%s\s*([0-9]+)\s*%s\s*([0-9]+)" %
(translations['fleets'],
translations['slash']), re.I),
Original comment by je...@sina.com
on 3 Feb 2009 at 9:56
Thank you jetic
Original comment by King.Vash@gmail.com
on 3 Feb 2009 at 2:50
this is what I used
fleetSlots':re.compile(r"%s[\s]*([0-9]+).*?([0-9]+)" %(translations['fleets']),
re.I),
Original comment by King.Vash@gmail.com
on 3 Feb 2009 at 2:59
I think the final target should the bot could automaic find all translation by
it self,
I am now moving on that way.
Original comment by je...@sina.com
on 4 Feb 2009 at 1:47
Original comment by King.Vash@gmail.com
on 8 Feb 2009 at 8:34
looking for software to v 0.83 ogame.pt someone get me?
Original comment by armando....@gmail.com
on 22 Feb 2009 at 8:30
Original issue reported on code.google.com by
maxime.p...@yahoo.fr
on 3 Feb 2009 at 3:41