Daily Chest Respawn

Post » Sun Aug 08, 2010 4:58 pm

Is there a certain script I can chuck on a container in order for a certain item to repsawn with a RANDOM amount say between 0 and 50?
If so could someone write one up for me?

Cheers,

Shadowform.
User avatar
Budgie
 
Posts: 3518
Joined: Sat Oct 14, 2006 2:26 pm

Post » Sun Aug 08, 2010 7:22 am

*wups*

MarkForDelete
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Sun Aug 08, 2010 2:38 pm

scn QuestSCPTInt iDiceInt iCountInt iDayBegin GameMode	If (GetDayOfWeek == iDay) ; If the plugin is first loaded on a Sunday, it won't be filled until Monday		Return	Else		Set iDay to GetDayOfWeek		Set iCount to ContainerREF.GetItemCount Widget ; No more than 50 widgets		ContainerREF.RemoveItem ItemID iCount ; Remove Widgets		Set iDice to (GetRandomPercent / 2)		ContainerREF.AddItem Widget iDice ; Add Widgets	EndIfEnd


Should do it...?
User avatar
Jaylene Brower
 
Posts: 3347
Joined: Tue Aug 15, 2006 12:24 pm

Post » Sun Aug 08, 2010 5:28 pm

So the "2" in "Set iDice to (GetRandomPercent / 2)" represents the limit? Eg, if it was 50 rather than 2, the number could end up anywhere between 0 and 50?
User avatar
BEl J
 
Posts: 3397
Joined: Tue Feb 13, 2007 8:12 am

Post » Sun Aug 08, 2010 7:28 pm

So the "2" in "Set iDice to (GetRandomPercent / 2)" represents the limit? Eg, if it was 50 rather than 2, the number could end up anywhere between 0 and 50?
http://geck.gamesas.com/index.php/GetRandomPercent will invariably return a positive integer less than 100, so no matter how the dice rolls, that number cut in half will be less than 50. If the '2' were replaced with '50', you would have about a 50/50 chance of one single widget being added to ContainerREF.
User avatar
Melung Chan
 
Posts: 3340
Joined: Sun Jun 24, 2007 4:15 am


Return to Fallout 3