lordbevan1 Posted September 18, 2019 Share Posted September 18, 2019 I'm looking to make a mod which adds a ring that creates the sanctuary effect for 1 to 120 seconds. Is that possible? I'd imagine it requires a script. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted September 18, 2019 Share Posted September 18, 2019 If you want the ring to give the sanctuary effect on use, you don't need any script. Link to comment Share on other sites More sharing options...
lordbevan1 Posted September 18, 2019 Author Share Posted September 18, 2019 (edited) I want the duration to be within the range of 1 second to 120 seconds, like how magnitude can fall between a range of values, but you can't do that using the normal tab. Edited September 18, 2019 by lordbevan1 Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted September 19, 2019 Share Posted September 19, 2019 My bad http://image.jeuxvideo.com/smileys_img/55.gif you're right about the floating duration. I don't know if it's possible through a script though. :-( Link to comment Share on other sites More sharing options...
RacerPlume Posted October 30, 2019 Share Posted October 30, 2019 (edited) This is possible through scripting. It could look something like this. Your ring would have a script If ( OnPCEquip == 1 ) ;This means the Player equipped it StartScript MyRandomSanctuarySpellScript Endif And then the other script Begin MyRandomSanctuarySpellScript Short RandomValue Short DoOnce Float TimePassed If ( DoOnce == 0 ) Set RandomValue to Random, 121 ;This sets a value between 1 and 120 Set DoOnce to 1 Endif Set TimePassed to ( TimePassed + GetSecondsPassed ) ;This constantly keeps time If ( Player->GetSpell "my_sanctuary_spell" == 0 ) Player->AddSpell "my_sanctuary_spell" Endif If ( TimePassed > RandomValue ) ;The random time limit has been reached If ( Player->GetSpell "my_sanctuary_spell" == 1 ) Player->RemoveSpell "my_sanctuary_spell" Set DoOnce to 0 StopScript MyRandomSanctuarySpellScript Endif Endif If ( Player->HasItemEquipped "my_sanctuary_ring" == 0 ) ;Player took the ring off Player->RemoveSpell "my_sanctuary_spell" Set DoOnce to 0 StopScript MyRandomSanctuarySpellScript Endif End Edited October 30, 2019 by RacerPlume Link to comment Share on other sites More sharing options...
lordbevan1 Posted December 5, 2019 Author Share Posted December 5, 2019 (edited) I would like for the ring to actually have a charge that's used tho, but this is a great 1st step! Edited December 5, 2019 by lordbevan1 Link to comment Share on other sites More sharing options...
abot Posted December 5, 2019 Share Posted December 5, 2019 (edited) begin sanctuary1_120Script short state float timer if ( MenuMode ) return endif if ( state ) if ( timer > 0 ) set timer to ( timer - GetSecondsPassed ) return endif set state to 0 player->RemoveSpell "lb1Sanctuary120" player->RemoveSpellEffects "lb1Sanctuary120" endif if ( player->GetSpellEffects "lb1Sanctuary120" ) set state to 1 set timer to Random 1000 ; 0 <= timer <= 999 set timer to ( timer * 0.120 ) ; 0 <= timer <= 119 set timer to ( timer + 1 ) ; 1 <= timer <= 120 endif end Edited December 5, 2019 by abot Link to comment Share on other sites More sharing options...
Recommended Posts