scn zIceColdScript
;Modified version of the Fallout 3 Nuka-cola Machine Script
;Allows the Player to add and chill Nuka-Colas and Sunset Sarsasparillas
;Jesus Christ why did I decide not to take that compsci course in High school
short Button
short NukasOnMe
short SSOnMe
short GoNuka
begin OnActivate
if ( IsActionRef Player == 1 )
if ( Player.GetItemCount NukaCola >= 1 ) && ( Player.GetItemCount SSBottleFull <1 )
ShowMessage zNukaMachineNoSunsYesNuka
set GoNuka to 2
elseif ( Player.GetItemCount NukaCola < 1 ) && ( Player.GetItemCount SSBottleFull <1 )
ShowMessage zNukaMachineNothing
set GoNuka to 1
elseif ( Player.GetItemCount NukaCola <1 ) && ( Player.GetItemCount SSBottleFull >= 1 )
ShowMessage zNukaMachineYesSunsNoNuka
set GoNuka to 3
elseif ( Player.GetItemCount NukaCola >= 1 )&& ( Player.GetItemCount SSBottleFull >= 1 )
ShowMessage zNukaMachineBoth
set GoNuka to 4
endif
endif
end
begin gamemode
set Button to GetButtonPressed
if ( Button == 0 ) && ( GoNuka >= 1 )
Activate
set GoNuka to 0
elseif ( Button == 1 ) && ( GoNuka == 2 ) ;Add all nukas
set NukasOnMe to ( Player.GetItemCount NukaCola )
Player.RemoveItem NukaCola NukasOnMe
zNukaHouseMachine.AddItem MS05IceNukaCola NukasOnMe
set NukasOnMe to 0
set GoNuka to 0
elseif ( Button == 1 ) && ( GoNuka == 1 )
;Do Nothing
set GoNuka to 0
elseif ( Button == 2 ) && ( GoNuka == 2 )
;Do Nothing
set GoNuka to 0
elseif ( Button == 2 ) && ( GoNuka == 3 )
;Do Nothing
set GoNuka to 0
elseif ( Button == 4 ) && ( GoNuka == 4 )
;Do Nothing
set GoNuka to 0
elseif ( Button == 1 ) && ( GoNuka == 3 ) ;Add all Sunset Sarsasparilla
set SSOnMe to ( Player.GetItemCount SSBottleFull )
Player.RemoveItem SSBottleFull SSOnMe
zNukaHouseMachine.additem zIceColdSS SSOnMe
set SSOnMe to 0
set GoNuka to 0
elseif ( Button == 1 ) && ( GoNuka == 4 )
set NukasOnMe to ( Player.GetItemCount NukaCola )
Player.RemoveItem NukaCola NukasOnMe
zNukaHouseMachine.AddItem MS05IceNukaCola NukasOnMe
set NukasOnMe to 0
set GoNuka to 0
elseif ( Button == 2 ) && ( GoNuka == 4 )
set SSOnMe to ( Player.GetItemCount SSBottleFull )
Player.RemoveItem SSBottleFull SSOnMe
zNukaHouseMachine.additem zIceColdSS SSOnMe
set SSOnMe to 0
set GoNuka to 0
elseif ( Button == 3 ) && ( GoNuka == 4 )
;Add Nuka-Cola
set NukasOnMe to ( Player.GetItemCount NukaCola )
Player.RemoveItem NukaCola NukasOnMe
zNukaHouseMachine.AddItem MS05IceNukaCola NukasOnMe
set NukasOnMe to 0
set GoNuka to 0
;!---------ADD SS--------!
set SSOnMe to ( Player.GetItemCount SSBottleFull )
Player.RemoveItem SSBottleFull SSOnMe
zNukaHouseMachine.additem zIceColdSS SSOnMe
set SSOnMe to 0
set GoNuka to 0
endif
end