Grepolis resource optimizer

ld57

Phrourach
Hi !

Here it is : http://ldrolez.free.fr/software/grepolis/

That's a calculator to optimizer your trading with nearby villages, and to save hours to get new buildings or army. If you master this calc, you'll get better than your enemy !
1- You enter your current resource under "You have",
2- Then what you need under "You need"
3- Enter the Xchange rates with villages
4- click on optimize
5- And then do the 2 recommended sells to gain a few hours !

There are still small bugs, and i'm working on it !

Best regards,

Ld57
 

JKP3nt

Strategos
Okay, it seems good except for one thing, this:

It would make more sense if it asked for all of the farming villages, like this:

And now the calculator figures out the fastest way to get the resources with those farming villages, and also provides the way to get the resources by creating offers in the market.

Note: the HTML code for that table is this:
HTML:
<html>
<head>
<title>farming table</title>
</head>
<body>
<table border="1">
<tr>
<th rowspan="2">farm</th>
<th colspan="3">trading</th>
</tr>
<tr>
<td><strong>you give</strong></td>
<td><strong>you get</strong></td>
<td><strong>current trade ratio</strong></td>
</tr>
<tr>
<td>farm 1</td>
<td><select name="you give1">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><select name="you get1">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><input type="text" name="ratio1" size="15" maxlength="4" value="1.25"></td>
</tr>
<tr>
<td>farm 2</td>
<td><select name="you give2">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><select name="you get2">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><input type="text" name="ratio2" size="15" maxlength="4" value="1.25"></td>
</tr>
<tr>
<td>farm 3</td>
<td><select name="you give3">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><select name="you get3">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><input type="text" name="ratio3" size="15" maxlength="4" value="1.25"></td>
</tr>
<tr>
<td>farm 4</td>
<td><select name="you give4">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><select name="you get4">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><input type="text" name="ratio4" size="15" maxlength="4" value="1.25"></td>
</tr>
<tr>
<td>farm 5</td>
<td><select name="you give5">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><select name="you get5">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><input type="text" name="ratio5" size="15" maxlength="4" value="1.25"></td>
</tr>
<tr>
<td>farm 6</td>
<td><select name="you give6">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><select name="you get6">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><input type="text" name="ratio6" size="15" maxlength="4" value="1.25"></td>
</tr>
<tr>
<td>farm 7</td>
<td><select name="you give7">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><select name="you get7">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><input type="text" name="ratio7" size="15" maxlength="4" value="1.25"></td>
</tr>
<tr>
<td>farm 8</td>
<td><select name="you give8">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><select name="you get8">
<option value="blank">-----</option>
<option value="wood">wood</option>
<option value="stone">stone</option>
<option value="silver">silver</option>
</select></td>
<td><input type="text" name="ratio8" size="15" maxlength="4" value="1.25"></td>
</tr>
</table>
</body>
</html>
Don't worry, that did not take me too long to write, it is actually pretty simple code.
 
Last edited:

ld57

Phrourach
Thanks for the suggestion !
Maybe that will be too much numbers to enter... In the current version 'wood' is the main resource to exchange, and I may allow to set 'silver' or 'stones' as the main resource. That will make the calculator more flexible without too much numbers.