Post by Usiel on Aug 9, 2017 23:31:03 GMT -8
I'm using a modified code I got a long time ago that allows seasons to appear in a given time period. The way Seasons worked on my site was every 45 real life days a season changed. This allowed my site to have 4 seasons happen and it went on well. Problem was that 45 days was a long time so I wanted to expand it. I added different levels of a season. Each Season had 5 levels which meant we had 20 images all together. This meant I had to change from 45 days per season to 9 days per level. The Code I'm using is what is in code below. Now the issue is that Winter season restarted to 1. What I'm thinking is that it's still only calculating the first 4 images. I tried changing the %4 to %20 to see if that would do, however if I switch the images around it still wont work. Any help would be appreciated.
<center><br><script type="text/javascript">
<!--
seasonArray= [
"http://imageshack.com/a/img923/5254/kGcOoI.png",
"http://imageshack.com/a/img923/5971/smXuJT.png",
"http://imageshack.com/a/img922/1332/Z6jGDh.png",
"http://imageshack.com/a/img923/9985/WBTfRO.png",
"http://imageshack.com/a/img923/1006/yZwnTm.png",
"http://imageshack.com/a/img923/7893/To8tQ4.png",
"http://imageshack.com/a/img924/469/Iw9nWq.png",
"http://imageshack.com/a/img923/9073/BKgVzc.png",
"http://imageshack.com/a/img924/4563/BQnlGg.png",
"http://imageshack.com/a/img924/1504/3pFa3t.png",
"http://imageshack.com/a/img923/4283/ufv356.png",
"http://imageshack.com/a/img923/8461/eZWKkN.png",
"http://imageshack.com/a/img922/7647/NameEx.png",
"http://imageshack.com/a/img922/1859/rnQ7T4.png",
"http://imageshack.com/a/img924/2541/s9gl4D.png",
"http://imageshack.com/a/img924/7434/nkBjHj.png",
"http://imageshack.com/a/img923/5884/BaKYC6.png",
"http://imageshack.com/a/img924/5590/v02JFT.png",
"http://imageshack.com/a/img923/3167/wFm3YP.png",
"http://imageshack.com/a/img922/75/o9hfBW.png",
];
var nwtime=new Date();
dayseed=nwtime.getTime();
dayseed=(parseInt((parseInt(dayseed/(1000*60*60*24)))/9)) % 4;
document.write("<img border='0' src='"+seasonArray[dayseed]+"'/>");
// -->
</script></center><br>