Script Summary: Script that Distributes Resources in Ikariam Default include 'Wine dealer'
Version: 4.0
License: GPL v3 - http://www.gnu.org/copyleft/gpl.html
The script takes a fair distribution of warehouse of the destination cities.
Example:(5 cities: 2 source, 3 target)
Config Dealer:
Min. Deal ==> 30000
Max. Deal ==> 80000
Min. Stock ==> 10000
Before:
Source 1 ==> 60000
Source 2 ==> 35000
Target 1 ==> 20000
Target 2 ==> 15000
Target 3 ==> 10000
Is execute? [((Source1 - Min. Stock) + (Source2 - Min. Stock)) > Min. Deal]
((60000 - 10000) + (35000 - 10000)) > 30000
(50000 + 25000) > 30000
75000 > 30000
Yes ==> script makes the distribution. Dealing 75000.
If total deal (75000, in this example) > Max. Deal (80000, in this example )
==> script only distributed Max. Deal (not in this example)
After:
Source 1 ==> 10000 [-50000]
Source 2 ==> 10000 [-25000]
Target 1 ==> 40000 [+20000]
Target 2 ==> 40000 [+25000]
Target 3 ==> 40000 [+30000]



