Jump to content

Re-Scripting FO3 "My First Lab" can't get it working!


TimeShadow

Recommended Posts

I been working on re-doing the Megaton house lab script and can't get it to do anything at all. I'm at a loss, any help would be much appreciated.

 

Script is attached:

scn aaBMHLabSCRIPT

Int Menu		; Menu Displayed
Int Button		; Button Pressed
Int ProcessButton
Int ChemLab

Int ItemStimpak
Int ItemRadaway
Int ItemMentatsB
Int ItemMentatsG
Int ItemMentatsO

Int ItemBuffout
Int ItemJet
Int ItemMedX
Int ItemMentats
Int ItemQuantum
Int ItemPsycho
Int ItemRadX
Int ItemUltrajet

Float LabBrewingTime		x.x= Float for how much time has passed

BEGIN OnActivate Player

	If ( ChemLab == 0)				; Available
		Set Menu to 1
		Set ProcessButton to 1
		ShowMessage aaBMHLabMainMenuMSG
		
	elseif ( ChemLab == 1)				; Brewing
		ShowMessage aaBMHLabBrewingMSG
		
	elseif ( ChemLab == 2)				; Complete
		Set ChemLab to 0
		ShowMessage aaBMHLabBrewingDoneMSG

;-------------- Non-Addictive -----------

		if ( ItemStimpak == 1)
			Player.addItem Stimpak 1
		endif

		if ( ItemRadaway == 1)
			Player.addItem Radaway 1
		endif

		if ( ItemMentatsB == 1)
			Player.addItem MS15Mentat02 1
		endif
		
		if ( ItemMentatsG == 1)
			Player.addItem MS15Mentat01 1
		endif

		if ( ItemMentatsO == 1)
			Player.addItem MS15Mentat03 1
		endif

;-------------- Addictive ---------------

		if ( ItemBuffout == 1)
			Player.addItem Buffout 1
		endif
		
		if ( ItemJet == 1)
			Player.addItem Jet 1
		endif

		if ( ItemMedX == 1)
			Player.addItem Morphine 1
		endif

		if ( ItemMentats == 1)
			Player.addItem Mentats 1
		endif

		if ( ItemQuantum == 1)
			Player.addItem MS05NukaColaQtm 1
		endif

		if ( ItemPsycho == 1)
			Player.addItem Psycho 1
		endif

		if ( ItemRadX == 1)
			Player.addItem RadX 1
		endif

		if ( ItemUltrajet == 1)
			Player.addItem MS09Ultrajet 1
		endif
	Endif
END	

BEGIN GameMode
	Set Button to GetButtonPressed
	If ( Button > -1)
	If ProcessButton == 1

		If Menu == 1
;---------------------------------------- MAIN MENU -------------------------------------
			If ( Button == 1 )			; INSTRUCTIONS
				ShowMessage aaBMHLabInstructionMSG
				Set Menu to 1
			elseif ( Button == 2 )			; NON-ADDICTIVE CHEMS MENU
				ShowMessage aaBMHLabMakeChem1MSG
				Set Menu to 2
			elseif ( Button == 3 ) 			; ADDICTIVE CHEMS MENU
				ShowMessage aaBMHLabMakeChem2MSG
				Set Menu to 3
			Endif
;---------------------------------- Non-Addictive Chem's Menu ---------------------------
		Elseif Menu == 2

			If Button == 0		; Make Stimpak	( Stimpak )
				
				Set ChemLab to 1
				Set ItemStimpak to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 1	; Make Radaway	( Radaway )
				
				Set ChemLab to 1
				Set ItemRadaway to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 2	; Make Berry Mentats	(MS15Mentat02)
				
				Set ChemLab to 1
				Set ItemMentatsB to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 3	; Make Grape Mentats(MS15Mentat01)
				
				Set ChemLab to 1
				Set ItemMentatsG to 1
				Set LabBrewingTime to GameDaysPassed
					
			Elseif Button == 4	; Make Orange Mentats	(MS15Mentat03)				
				Set ChemLab to 1
				Set ItemMentatsO to 1
				Set LabBrewingTime to GameDaysPassed
				
			Endif
	
;----------------------------------- Addictive Chem's Menu ------------------------------
		Elseif Menu == 3
	
			If Button == 0			; Make Buffout	(Buffout)
				
				Set ChemLab to 1
				Set ItemBuffout to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 1		; Make Jet	(Jet)
			
				Set ChemLab to 1
				Set ItemJet to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 2		; Make Med-X	(Morphine)
				
				Set ChemLab to 1
				Set ItemMedX to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 3		; Make Mentats	(Mentats)
			
				Set ChemLab to 1
				Set ItemMentats to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 4	; Make Nuka-Cola Quantum (MS05NukaColaQtm) 
						; (player needs 8 Nuka-cola's for this)
				
				If ( player.getItemCount NukaCola >= 8 )
					
					Set ChemLab to 1
					Set ItemQuantum to 1
					Set LabBrewingTime to GetSecondsPassed
			
					player.removeItem NukaCola 8
					
				else
					ShowMessage aaBMHLabBrewingFailMSG
					Set ChemLab to 0
				Endif	
		
			Elseif Button == 5		; Make Psycho	(Psycho)
				
				Set ChemLab to 1
				Set ItemPsycho to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 6		; Make Rad-X	(RadX)
			
				Set ChemLab to 1
				Set ItemRadX to 1
				Set LabBrewingTime to GameDaysPassed
				
			Elseif Button == 7	; Make Ultrajet	( MS09 Ultrajet ) 
					        ; (player needs one Jet, one Abraxo Cleaner and one Sugar Bombs)

				If (player.getItemCount Jet >= 1)&&(player.getItemCount SugarBombs01 >= 1)&&(player.getItemCount AbraxoCleaner >= 1)
				
					Set ChemLab to 1
					Set ItemUltrajet to 1
					Set LabBrewingTime to GameDaysPassed
					
					player.removeItem SugarBombs01 1
					player.removeItem AbraxoCleaner 1
					player.removeItem Jet 1
				
				else
					ShowMessage aaBMHLabBrewingFailMSG
					Set ChemLab to 0
				Endif
				
			Endif
		Endif
	Endif
		Set ProcessButton to 0			; Clear Button Variable
	Endif
	If ( ChemLab == 1 )
		if ( GameDaysPassed - LabBrewingTime >= 1 )
			Set ChemLab to 2
		endif
	Endif
END

Thank you,

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...