//////////////////////////// /// Goggles of Revealing /// ///////////////////////////////////////////////////////////////////////////////////////////////// /// Based directly on MoscowModder's 'One Ring' script, this allows you to set the amulet item // /// that reveals invisible enemies to be true or false only when the Goggles of Revealing are // /// active, like those spectral Goggles that Ray wears in Ghostbusters. Enjoy! // ///////////////////////////////////////////////////////////////////////////////////////////////// global script active{ void run(){ while(true){ if ( gogglesOn && Link->MP ){ //Decrement magic gogglesTimer = (gogglesTimer+1) % TIME_PER_MP; if ( !gogglesTimer ) Link->MP--; Screen->Rectangle(6, 0, 0, 256, 172, 4, 1, 0, 0, 0, true, 64); if ( Link->MP <= 0 //If magic ran out ){ //Take off goggles. gogglesOn = false; Link->Item[I_AMULET1] = false; } } else if ( !gogglesOn ){ //Disable Goggles Link->Item[I_AMULET1] = false; Waitframes(1); } Waitframe(); } } }