Where can i put this strategy?

Where can i put this strategy?

Postby Guest on Tue Apr 06, 2010 9:01 pm

I have a problem with strategy "cropfinder".
If I put it between the tags <village></village> this is the log:
[06 apr 2010 22:55:32]: - Logic error: this is a ServerStrategy and shouldn't b
e passed a village instance
[06 apr 2010 22:55:32]: - Aborting...
[06 apr 2010 22:55:32]: - VilloNanny terminated.
If I put it between the tags <server></server> nothing happens :?
Where should I put this strategy to make it work?
Guest
 

Re: Where can i put this strategy?

Postby Guest on Wed Apr 07, 2010 10:48 am

update:
there is an error in the wiki, the tags correct are <serverStrategy> not <strategy>:
<serverStrategy class="CropFinder" desc="Find 9 and 15 Croppers around given location"
enabled="true" maxRadius="20" minPauseMinutes="1" uid="sV1cf">
<start x="xxx" y="xxx" />
<output append="false" format="txt" />
</serverStrategy>
But now I get this error:
java.lang.IndexOutOfBoundsException: No group 8
at java.util.regex.Matcher.group(Unknown Source)
at net.villonanny.entity.SevenBySeven.search(SevenBySeven.java:420)
at net.villonanny.strategy.CropFinder.execute(CropFinder.java:183)
at net.villonanny.entity.Server.processServerStrategies(Server.java:214)
at net.villonanny.entity.Server.run(Server.java:121)
Guest
 

Re: Where can i put this strategy?

Postby gac on Mon Apr 26, 2010 10:44 pm

Apologies for delay but have been trying to work out what happened, it seems to be a mismatch between code changes and pattern and I have been working on a code fix.

However the following patternFix should work on its own:

Code: Select all
sevenBySeven.main = \\[{1\\,3}(-?${DIGITS})\\,(-?${DIGITS})\\,(${DIGITS})\\,(${DIGITS})\\,"d=(${DIGITS})&c=(\\w+)"\\,"(\\w+)"(?:\\,"([^"]*)"\\,"([^"]*)"\\,"([^"]*)"\\,"([^"]*)")?\\]{0\\,3}


If running the latest alpha version the strategy is now a serverStrategy that is run outside all the villages, on earlier versions it is still a village strategy.
gac
 
Posts: 260
Joined: Sat May 02, 2009 2:35 pm
Location: UK

Re: Where can i put this strategy?

Postby forrest on Tue May 11, 2010 4:52 pm

It works, thank you very much :D
forrest
 
Posts: 5
Joined: Wed Apr 07, 2010 6:39 pm


Return to CropFinder

Who is online

Users browsing this forum: No registered users and 1 guest


cron
VilloNanny Travian Bot VilloFetch Web Proxy - Unblock Travian Cristian Ghezzi Web Site SourceForge.net Logo