Ikariam kChen Overview

By kchen Last update Feb 18, 2009 — Installed 346,353 times.

vineyard effect aren't calculated

in
Subscribe to vineyard effect aren't calculated 3 posts, 2 voices



mudi User

As i saw the newest kChen doesn't calculate the Vineyard effect on its table.

I have tevern on 22lvl and Vineyard on 15lvl so the Wine usage in town is -184/hour but in table there is -216/hour (that should be without Wineyard)

Cheers.

 
kchen Script's Author

I have no vineyard, so I did not repair.
I will try to build a vineyard and repair this problem

 
mudi User

thx for reply.
Yesterday before i update to your new version my old ver. worked very good with this modification:

if (/view=tavern/.test(document.URL)) {
function storeWineUsage() {
try {
var n = document.getElementById("wineAmount");
var city_id = getNode_value("//form[@id='wineAssignForm']/input[@type='hidden' and @name='id']");
var city = getCity(city_id);
city.wineUsage = tavernWineUsage[n.selectedIndex];
setVar("config", serialize(config));
} catch (e) {
log("Hiba: "+e);
}
}
var n = getNode("//form[@id='wineAssignForm']//*[@type='submit']");
n.addEventListener("click", storeWineUsage, false);
var n = document.getElementById("wineAmount");

wineUsage = tavernWineUsage[n.selectedIndex];
var cellarLevel = getArrValue(res.buildings["vineyard"], "level", "-");
if (cellarLevel >=0) {
wineSave = wineUsage * cellarLevel;
wineSave = wineSave / 100;
wineUsage = wineUsage - wineSave;
res.wineUsage = wineUsage ;
} else {

res.wineUsage = wineUsage ;
}

and i don't know but maybe it should to be done not only in Vineyard but also with other new buildings with lowers usage of resources.

Cheers :)

Ps. I've corrected all spell-kind mistakes in Polish translation and translated new strings so if u mind to add this to your ~d96030/kchenoverview/lang.js i'll be glad.

Link: http://userscripts.org/topics/21186?page=1#post...

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel