5 values, defining array data and in VBscipt form

User Generated

fgehttryvatfghqragf

Programming

Description

I need to collect story information from the user by using an array that can hold 5 values. I need to collect the information using the defined array and not the single data. I am having a lot of trouble with this. This is being done using VBscript

I also need to know what the collected information from the user with a defined array would be

I also need to add a few lines to the end of the story for the sequel where your arch nemesis comes for revenge!

Note: The string can only output a certain number of characters. You will need to shorten the story in some way in order to add the sequel hook.

The script is as follows

'*************************************************************************

'Script Name: Captain Adventure.vbs

'Author: Jerry Ford

'Created: 02/28/02

'Description: This script prompts the user to answer a number of questions

'and then uses the answers to create a comical action adventure story.

'*************************************************************************

'Perform script initialization activities

Option Explicit

'Specify the message to appear in each pop-up dialog title bar

Const cGameTitle = "Captain Adventure"

'Specify variables used by the script

Dim strWelcomeMsg, strName, strVacation, strObject, strFriend

Dim strFood, strStory

'Specify the message to be displayed in the initial splash screen

strWelcomeMsg = "Welcome to the story of .

...............

" & vbCrLf & _

vbCrLf & "CCC" & space(14) & "A" & vbCrLf & _

"C" & space(17) & "AAA" & vbCrLf & _

"CCCaptain

A

Adventure gets his super powers" & _

vbCrLf

' Welcome the user to the story

MsgBox strWelcomeMsg, vbOkOnly + vbExclamation, cGameTitle

'Collect story information from the user

strName = InputBox("What is your name?", cGameTitle,"Joe Blow")

strVacation = InputBox("Name a place you would like to visit.", _

cGameTitle,"Nevada")

strObject = InputBox("Name a strange object.", cGameTitle,"Soda Can")

strFriend = InputBox("Type the name of a close friend.", _

cGameTitle,"Barney")

strFood = InputBox("Type the name of your favorite dessert.", _

cGameTitle,"Pickle")

' Assemble the Captain Adventure story

strStory = "Once upon a time .

..........

" & vbCrLf & vbCrLf & _

strName & " went on vacation in the far away land of " & strVacation & _

". A local tour guide suggested cave exploration. While in the cave " & _

strName & " accidentally became separated from the rest of the tour " & _

"group and stumbled into a part of the cave never visited before. " & _

"It was completely dark. Suddenly a powerful light began to glow. " & _

strName & " saw that it came from a mysterious " & strObject & " " & _

"located in the far corner of the cave room. " & strName & " picked " & _

"it up and a flash of light occurred and " &strName & " was " & _

"instantly transported to a far away world. There in front of him " & _

"was " & strFriend & ", the ancient God of the legendary cave " & _

"people. " & strFriend & " explained to " & strName & " that " & _

"destiny had selected him to become Captain Adventure! He was " & _

"then returned to Earth and told to purchase a Winnebago and travel " & _

"the countryside looking for people in need of help. To activate " & _

"the superpowers bestowed by " & strFriend & " all that " & strName & _

"had to do was pick up the " & strObject & " and say " & strFood & _

"three times in a row." & vbCrLf & vbCrLf & _

"The End"

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello all what is required is in the vbs script .i have done as required and added some comment thank you for your time.unzip to get the script.The doc contain the script

'*************************************************************************
'Script Name: Captain Adventure.vbs
'Author: Jerry Ford
'Created: 02/28/02
'Description: This script prompts the user to answer a number of questions
'and then uses the answers to create a comical action adventure story.
'*************************************************************************

'Perform script initialization activities

Option Explicit

'Specify the message to appear in each pop-up dialog title bar

Const cGameT...


Anonymous
Great! 10/10 would recommend using Studypool to help you study.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
Similar Content
Related Tags