Index: scripts/zones/Batallia_Downs/Zone.lua =================================================================== --- scripts/zones/Batallia_Downs/Zone.lua (revision 1620) +++ scripts/zones/Batallia_Downs/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-693.609,-14.583,173.59,30); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); y = (tonumber(colors) % 8 >= 4); i = (tonumber(colors) % 64 >= 32); - cs = 0x0385; - if (y == false) then + cs = 0x0385; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (y == false and (wc == 8 or wc == 9)) then player:setVar("ICanHearARainbow_Weather",8); player:setVar("ICanHearARainbow",colors+4); - elseif (i == false) then + elseif (i == false and (wc == 12 or wc == 13)) then player:setVar("ICanHearARainbow_Weather",12); player:setVar("ICanHearARainbow",colors+32); else Index: scripts/zones/Beaucedine_Glacier/Zone.lua =================================================================== --- scripts/zones/Beaucedine_Glacier/Zone.lua (revision 1620) +++ scripts/zones/Beaucedine_Glacier/Zone.lua (working copy) @@ -21,15 +21,20 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-247.911,-82.165,260.207,248); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); i = (tonumber(colors) % 64 >= 32); + o = (tonumber(colors) % 4 >= 2); cs = 0x0072; - if (i == false) then + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (i == false and (wc == 12 or wc == 13)) then player:setVar("ICanHearARainbow_Weather",12); player:setVar("ICanHearARainbow",colors+32); else Index: scripts/zones/Buburimu_Peninsula/Zone.lua =================================================================== --- scripts/zones/Buburimu_Peninsula/Zone.lua (revision 1620) +++ scripts/zones/Buburimu_Peninsula/Zone.lua (working copy) @@ -21,7 +21,8 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-276.529,16.403,-324.519,14); end @@ -31,13 +32,13 @@ g = (tonumber(colors) % 16 >= 8); b = (tonumber(colors) % 32 >= 16); cs = 0x0003; - if (o == false) then + if (o == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); - elseif (g == false) then + elseif (g == false and (wc == 10 or wc == 11)) then player:setVar("ICanHearARainbow_Weather",10); player:setVar("ICanHearARainbow",colors+8); - elseif (b == false) then + elseif (b == false and (wc == 6 or wc == 7)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+16); else Index: scripts/zones/Cape_Teriggan/Zone.lua =================================================================== --- scripts/zones/Cape_Teriggan/Zone.lua (revision 1620) +++ scripts/zones/Cape_Teriggan/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(315.644,-1.517,-60.633,108); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); r = (tonumber(colors) % 2 >= 1); g = (tonumber(colors) % 16 >= 8); - cs = 0x0002; - if (r == false) then + cs = 0x0002; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (r == false and (wc == 4 or wc == 5)) then player:setVar("ICanHearARainbow_Weather",4); player:setVar("ICanHearARainbow",colors+1); - elseif (g == false) then + elseif (g == false and (wc == 10 or wc == 11)) then player:setVar("ICanHearARainbow_Weather",10); player:setVar("ICanHearARainbow",colors+8); else Index: scripts/zones/East_Ronfaure/Zone.lua =================================================================== --- scripts/zones/East_Ronfaure/Zone.lua (revision 1620) +++ scripts/zones/East_Ronfaure/Zone.lua (working copy) @@ -13,26 +13,27 @@ -- onInitialize ----------------------------------- -function onInitialize(zone) +function onInitialize(zone) end; ------------------------------------ --- onZoneIn ------------------------------------ +----------------------------------- +-- onZoneIn +----------------------------------- -function onZoneIn(player,prevZone) - cs = -1; +function onZoneIn(player,prevZone) + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(200.015,-3.187,-536.074,187); - end + end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); o = (tonumber(colors) % 4 >= 2); cs = 0x0015; - if (o == false) then + if (o == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); - else + else cs = -1; end end Index: scripts/zones/East_Sarutabaruta/Zone.lua =================================================================== --- scripts/zones/East_Sarutabaruta/Zone.lua (revision 1620) +++ scripts/zones/East_Sarutabaruta/Zone.lua (working copy) @@ -24,7 +24,8 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(305.377,-36.092,660.435,71); end @@ -36,7 +37,7 @@ colors = player:getVar("ICanHearARainbow"); o = (tonumber(colors) % 4 >= 2); cs = 0x0032; - if (o == false) then + if (o == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); else Index: scripts/zones/Eastern_Altepa_Desert/Zone.lua =================================================================== --- scripts/zones/Eastern_Altepa_Desert/Zone.lua (revision 1620) +++ scripts/zones/Eastern_Altepa_Desert/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(260.09,6.013,320.454,76); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); r = (tonumber(colors) % 2 >= 1); y = (tonumber(colors) % 8 >= 4); - cs = 0x0002; - if (r == false) then + cs = 0x0002; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (r == false and (wc == 4 or wc == 5)) then player:setVar("ICanHearARainbow_Weather",4); player:setVar("ICanHearARainbow",colors+1); - elseif (y == false) then + elseif (y == false and (wc == 8 or wc == 9)) then player:setVar("ICanHearARainbow_Weather",8); player:setVar("ICanHearARainbow",colors+4); else Index: scripts/zones/Jugner_Forest/Zone.lua =================================================================== --- scripts/zones/Jugner_Forest/Zone.lua (revision 1620) +++ scripts/zones/Jugner_Forest/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(342,-5,15.117,169); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); b = (tonumber(colors) % 32 >= 16); v = (tonumber(colors) % 128 >= 64); - cs = 0x000f; - if (b == false) then + cs = 0x000f; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (b == false and (wc == 6 or wc == 7)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+16); - elseif (v == false) then + elseif (v == false and (wc == 14 or wc == 15)) then player:setVar("ICanHearARainbow_Weather",14); player:setVar("ICanHearARainbow",colors+64); else Index: scripts/zones/Konschtat_Highlands/Zone.lua =================================================================== --- scripts/zones/Konschtat_Highlands/Zone.lua (revision 1620) +++ scripts/zones/Konschtat_Highlands/Zone.lua (working copy) @@ -20,20 +20,25 @@ -- onZoneIn ----------------------------------- -function onZoneIn(player,prevZone) - cs = -1; +function onZoneIn(player,prevZone) + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(521.922,28.361,747.85,45); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); y = (tonumber(colors) % 8 >= 4); v = (tonumber(colors) % 128 >= 64); - cs = 0x0068; - if (y == false) then + cs = 0x0068; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (y == false and (wc == 8 or wc == 9)) then player:setVar("ICanHearARainbow_Weather",8); player:setVar("ICanHearARainbow",colors+4); - elseif (v == false) then + elseif (v == false and (wc == 14 or wc == 15)) then player:setVar("ICanHearARainbow_Weather",14); player:setVar("ICanHearARainbow",colors+64); else Index: scripts/zones/La_Theine_Plateau/Zone.lua =================================================================== --- scripts/zones/La_Theine_Plateau/Zone.lua (revision 1620) +++ scripts/zones/La_Theine_Plateau/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-272.118,21.715,98.859,243); end if(player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); g = (tonumber(colors) % 16 >= 8); b = (tonumber(colors) % 32 >= 16); cs = 0x007b; - if(g == false) then + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (g == false and (wc == 10 or wc == 11)) then player:setVar("ICanHearARainbow_Weather",10); player:setVar("ICanHearARainbow",colors+8); - elseif(b == false) then + elseif (b == false and (wc == 6 or wc == 7)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+16); else Index: scripts/zones/Meriphataud_Mountains/Zone.lua =================================================================== --- scripts/zones/Meriphataud_Mountains/Zone.lua (revision 1620) +++ scripts/zones/Meriphataud_Mountains/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(752.632,-33.761,-40.035,129); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); r = (tonumber(colors) % 2 >= 1); y = (tonumber(colors) % 8 >= 4); - cs = 0x001f; - if (r == false) then + cs = 0x001f; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (r == false and (wc == 4 or wc == 5)) then player:setVar("ICanHearARainbow_Weather",4); player:setVar("ICanHearARainbow",colors+1); - elseif (y == false) then + elseif (y == false and (wc == 8 or wc == 9)) then player:setVar("ICanHearARainbow_Weather",8); player:setVar("ICanHearARainbow",colors+4); else Index: scripts/zones/North_Gustaberg/Zone.lua =================================================================== --- scripts/zones/North_Gustaberg/Zone.lua (revision 1620) +++ scripts/zones/North_Gustaberg/Zone.lua (working copy) @@ -21,7 +21,8 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-518.867,35.538,588.64,50); end @@ -29,7 +30,7 @@ colors = player:getVar("ICanHearARainbow"); o = (tonumber(colors) % 4 >= 2); cs = 0x00f4; - if (o == false) then + if (o == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); else Index: scripts/zones/Pashhow_Marshlands/Zone.lua =================================================================== --- scripts/zones/Pashhow_Marshlands/Zone.lua (revision 1620) +++ scripts/zones/Pashhow_Marshlands/Zone.lua (working copy) @@ -24,7 +24,8 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; +cs = -1; +wc = player:getWeather(); if((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(547.841,23.192,696.323,136); @@ -37,14 +38,18 @@ cs = 0x000b; end elseif(player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then - colors = player:getVar("ICanHearARainbow"); + colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); b = (tonumber(colors) % 32 >= 16); v = (tonumber(colors) % 128 >= 64); - cs = 0x000d; - if(b == false) then + cs = 0x000d; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (b == false and (wc == 6 or wc == 7)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+16); - elseif(v == false) then + elseif (v == false and (wc == 14 or wc == 15)) then player:setVar("ICanHearARainbow_Weather",14); player:setVar("ICanHearARainbow",colors+64); else Index: scripts/zones/Rolanberry_Fields/Zone.lua =================================================================== --- scripts/zones/Rolanberry_Fields/Zone.lua (revision 1620) +++ scripts/zones/Rolanberry_Fields/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-381.747,-31.068,-788.092,211); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); r = (tonumber(colors) % 2 >= 1); b = (tonumber(colors) % 32 >= 16); - cs = 0x0002; - if (r == false) then + cs = 0x0002; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (r == false and (wc == 4 or wc == 5)) then player:setVar("ICanHearARainbow_Weather",4); player:setVar("ICanHearARainbow",colors+1); - elseif (b == false) then + elseif (b == false and (wc == 6 or wc == 7)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+16); else Index: scripts/zones/Sauromugue_Champaign/Zone.lua =================================================================== --- scripts/zones/Sauromugue_Champaign/Zone.lua (revision 1620) +++ scripts/zones/Sauromugue_Champaign/Zone.lua (working copy) @@ -21,19 +21,25 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-103.991,-25.956,-425.221,190); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); y = (tonumber(colors) % 8 >= 4); v = (tonumber(colors) % 128 >= 64); - cs = 0x0003; - if (y == false) then + wc = player:getWeather(); + cs = 0x0003; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (y == false and (wc == 8 or wc == 9)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+4); - elseif (v == false) then + elseif (v == false and (wc == 14 or wc == 15)) then player:setVar("ICanHearARainbow_Weather",14); player:setVar("ICanHearARainbow",colors+64); else Index: scripts/zones/South_Gustaberg/Zone.lua =================================================================== --- scripts/zones/South_Gustaberg/Zone.lua (revision 1620) +++ scripts/zones/South_Gustaberg/Zone.lua (working copy) @@ -16,12 +16,13 @@ function onInitialize(zone) end; ------------------------------------ +----------------------------------- -- onZoneIn ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-601.433,35.204,-520.031,1); end @@ -29,7 +30,7 @@ colors = player:getVar("ICanHearARainbow"); o = (tonumber(colors) % 4 >= 2); cs = 0x0385; - if (o == false) then + if (o == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); else Index: scripts/zones/Tahrongi_Canyon/Zone.lua =================================================================== --- scripts/zones/Tahrongi_Canyon/Zone.lua (revision 1620) +++ scripts/zones/Tahrongi_Canyon/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(442.781,-1.641,-40.144,160); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); y = (tonumber(colors) % 8 >= 4); g = (tonumber(colors) % 16 >= 8); - cs = 0x0023; - if (y == false) then + cs = 0x0023; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (y == false and (wc == 8 or wc == 9)) then player:setVar("ICanHearARainbow_Weather",8); player:setVar("ICanHearARainbow",colors+4); - elseif (g == false) then + elseif (g == false and (wc == 10 or wc == 11)) then player:setVar("ICanHearARainbow_Weather",10); player:setVar("ICanHearARainbow",colors+8); else Index: scripts/zones/The_Sanctuary_of_ZiTah/Zone.lua =================================================================== --- scripts/zones/The_Sanctuary_of_ZiTah/Zone.lua (revision 1620) +++ scripts/zones/The_Sanctuary_of_ZiTah/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(539.901,3.379,-580.218,126); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); b = (tonumber(colors) % 32 >= 16); v = (tonumber(colors) % 128 >= 64); - cs = 0x0002; - if (b == false) then + cs = 0x0002; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (b == false and (wc == 6 or wc == 7)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+16); - elseif (v == false) then + elseif (v == false and (wc == 14 or wc == 15)) then player:setVar("ICanHearARainbow_Weather",14); player:setVar("ICanHearARainbow",colors+64); else Index: scripts/zones/Valkurm_Dunes/Zone.lua =================================================================== --- scripts/zones/Valkurm_Dunes/Zone.lua (revision 1620) +++ scripts/zones/Valkurm_Dunes/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(60.989,-4.898,-151.001,198); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); r = (tonumber(colors) % 2 >= 1); y = (tonumber(colors) % 8 >= 4); - cs = 0x0003; - if (r == false) then + cs = 0x0003; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (r == false and (wc == 4 or wc == 5)) then player:setVar("ICanHearARainbow_Weather",4); player:setVar("ICanHearARainbow",colors+1); - elseif (y == false) then + elseif (y == false and (wc == 8 or wc == 9)) then player:setVar("ICanHearARainbow_Weather",8); player:setVar("ICanHearARainbow",colors+4); else Index: scripts/zones/West_Ronfaure/Zone.lua =================================================================== --- scripts/zones/West_Ronfaure/Zone.lua (revision 1620) +++ scripts/zones/West_Ronfaure/Zone.lua (working copy) @@ -21,7 +21,8 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-24.427,-53.107,140,127); end @@ -29,7 +30,7 @@ colors = player:getVar("ICanHearARainbow"); o = (tonumber(colors) % 4 >= 2); cs = 0x0033; - if (o == false) then + if (o == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); else Index: scripts/zones/West_Sarutabaruta/Zone.lua =================================================================== --- scripts/zones/West_Sarutabaruta/Zone.lua (revision 1620) +++ scripts/zones/West_Sarutabaruta/Zone.lua (working copy) @@ -5,9 +5,9 @@ ----------------------------------- package.loaded["scripts/zones/West_Sarutabaruta/TextIDs"] = nil; +require("scripts/zones/West_Sarutabaruta/TextIDs"); require("scripts/globals/quests"); require("scripts/globals/settings"); -require("scripts/zones/West_Sarutabaruta/TextIDs"); ----------------------------------- -- onInitialize @@ -21,7 +21,8 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-374.008,-23.712,63.289,213); end @@ -29,14 +30,14 @@ colors = player:getVar("ICanHearARainbow"); o = (tonumber(colors) % 4 >= 2); cs = 0x0030; - if (o == false) then + if (o == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); - else + else cs = -1; end - end - return cs; + end + return cs; end; ----------------------------------- Index: scripts/zones/Western_Altepa_Desert/Zone.lua =================================================================== --- scripts/zones/Western_Altepa_Desert/Zone.lua (revision 1620) +++ scripts/zones/Western_Altepa_Desert/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-19.901,13.607,440.058,78); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); r = (tonumber(colors) % 2 >= 1); y = (tonumber(colors) % 8 >= 4); - cs = 0x0002; - if (r == false) then + cs = 0x0002; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (r == false and (wc == 4 or wc == 5)) then player:setVar("ICanHearARainbow_Weather",4); player:setVar("ICanHearARainbow",colors+1); - elseif (y == false) then + elseif (y == false and (wc == 8 or wc == 9)) then player:setVar("ICanHearARainbow_Weather",8); player:setVar("ICanHearARainbow",colors+4); else Index: scripts/zones/Xarcabard/Zone.lua =================================================================== --- scripts/zones/Xarcabard/Zone.lua (revision 1620) +++ scripts/zones/Xarcabard/Zone.lua (working copy) @@ -17,24 +17,29 @@ end; ----------------------------------- --- onZoneIn ------------------------------------ +-- onZoneIn +----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-136.287,-23.268,137.302,91); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); i = (tonumber(colors) % 64 >= 32); + o = (tonumber(colors) % 4 >= 2); cs = 0x0009; - if (i == false) then + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (i == false and (wc == 12 or wc == 13)) then player:setVar("ICanHearARainbow_Weather",12); player:setVar("ICanHearARainbow",colors+32); else cs = -1; - end + end end return cs; end; Index: scripts/zones/Yhoator_Jungle/Zone.lua =================================================================== --- scripts/zones/Yhoator_Jungle/Zone.lua (revision 1620) +++ scripts/zones/Yhoator_Jungle/Zone.lua (working copy) @@ -20,8 +20,9 @@ -- onZoneIn ----------------------------------- -function onZoneIn(player,prevZone) - cs = -1; +function onZoneIn(player,prevZone) + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(299.997,-5.838,-622.998,190); end @@ -31,13 +32,13 @@ o = (tonumber(colors) % 8 >= 4); b = (tonumber(colors) % 32 >= 16); cs = 0x0002; - if (r == false) then + if (r == false and (wc == 4 or wc == 5)) then player:setVar("ICanHearARainbow_Weather",4); player:setVar("ICanHearARainbow",colors+1); - elseif (o == false) then + elseif (o == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); - elseif (b == false) then + elseif (b == false and (wc == 6 or wc == 7)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+16); else Index: scripts/zones/Yuhtunga_Jungle/Zone.lua =================================================================== --- scripts/zones/Yuhtunga_Jungle/Zone.lua (revision 1620) +++ scripts/zones/Yuhtunga_Jungle/Zone.lua (working copy) @@ -21,19 +21,24 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(116.825,6.613,100,140); end if (player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == QUEST_ACCEPTED and player:hasItem(1125,0)) then colors = player:getVar("ICanHearARainbow"); + o = (tonumber(colors) % 4 >= 2); r = (tonumber(colors) % 2 >= 1); b = (tonumber(colors) % 32 >= 16); - cs = 0x000b; - if (r == false) then + cs = 0x000b; + if (o == false and wc < 4) then + player:setVar("ICanHearARainbow_Weather",1); + player:setVar("ICanHearARainbow",colors+2); + elseif (r == false and (wc == 4 or wc == 5)) then player:setVar("ICanHearARainbow_Weather",4); player:setVar("ICanHearARainbow",colors+1); - elseif (b == false) then + elseif (b == false and (wc == 6 or wc == 7)) then player:setVar("ICanHearARainbow_Weather",6); player:setVar("ICanHearARainbow",colors+16); else