SHOW:
|
|
- or go back to the newest paste.
1 | var ores = ["wood", "sand", "stone", "copper", "tin", "iron", "silver", "gold", "quartz", "flint", "marble", "titanium", "glass", "bronzeBar", "ironBar", "silverBar", "goldBar"]; | |
2 | var oldOreValues = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; | |
3 | ||
4 | for(i = 0; i < ores.length; i++) | |
5 | { | |
6 | if( $('#item-'+ores[i]+'-box > #'+ores[i]+'-gains').length ) | |
7 | { | |
8 | ||
9 | } | |
10 | else | |
11 | { | |
12 | text = '<span id="'+ores[i]+'-gains"></span>'; | |
13 | if(ores[i] != "sand" && ores[i] != "stone" && ores[i] != "wood") | |
14 | { | |
15 | text = '<br />'+text; | |
16 | } | |
17 | $('#item-'+ores[i]+'-box').append(text); | |
18 | oldOreValues[i] = window[ores[i]]; | |
19 | } | |
20 | } | |
21 | ||
22 | $('.inventory-item-box').each(function(i, val) { | |
23 | $(val).height(150); | |
24 | }); | |
25 | ||
26 | updateOreGains = function() | |
27 | { | |
28 | for(i = 0; i < ores.length; i++) | |
29 | { | |
30 | $('#'+ores[i]+'-gains').text((window[ores[i]]-oldOreValues[i])*12+"/h"); | |
31 | oldOreValues[i] = window[ores[i]]; | |
32 | } | |
33 | } | |
34 | ||
35 | setInterval(updateOreGains,300000); |