Jump to content

Getting a script for an elevator in Cerulean Robotics to work


prodlimen

Recommended Posts

Hi there!. I'm working on a mod that gives Cerulean Robotics its own building model.

 

 

The place has now 4 floors and an elevator to go to each of them. I edited the Gomorrah elevator script to get the elevator work and I did it :laugh:. However, I want to put a prerrequisite to use it, same as in Vault 22. I mean, the elevator is out of order and you need a repair skill of at least 50 to fix it and make it functional again. I tried to emulate the script from Vault 22 but it doesn't works, saying that there's a "Mismatched structure" and that line 35 is wrong. I'm not sure how to fix it, could you guys check it out and tell what's wrong?.

 

I have the following items created:

 

CeruleanRoboticsElevatorBrokenMsg (Message)
CeruleanRoboticsElevatorBrokenNoSkillMsg (Message)
CeruleanRoboticsElevatorDoor (Door)
CeruleanRoboticsElevatorWorkingMsg (Msg)
CeruleanRoboticsFreeform (Quest)
CeruleanRoboticsVFreeformScript (Script)

 

Due to the errors I can't save CeruleanRoboticsElevatorDoorScript (Script), Here's the syntaxis:

 

 

scn CeruleanRoboticsElevatorDoorScript
int Button
int ScreenNumber ; 0 = No skill page
; 1 = Fixing possible page
; 2 = Floor selection page
int ShouldSave ; 0 = Shouldn't save
; 1 = Should autosave
ref DoorOpener
begin onActivate
set DoorOpener to GetActionREF
if DoorOpener.GetIsReference player
if VFreeformCeruleanRobotics.ElevatorRepaired == 0
if player.getav Repair >= 50
ShowMessage CeruleanRoboticsElevatorBrokenMsg
set ScreenNumber to 1
elseif player.getav Repair < 50
ShowMessage CeruleanRoboticsElevatorBrokenNoSkillMsg
set ScreenNumber to 0
endif
elseif VFreeformCeruleanRobotics.ElevatorRepaired == 1
ShowMessage CeruleanRoboticsElevatorWorkingMsg
set ScreenNumber to 2
endif
;--------------------------------------------------------------------------------------------------------------------------
begin GameMode
set Button to GetButtonPressed
if Button == 0 ; Do nothing
elseif Button == 1
if ScreenNumber == 1
set VFreeformVault22.ElevatorRepaired to 1
ShowMessage V22ElevatorWorkingMsg
set ScreenNumber to 2
player.rewardxp 100
elseif ScreenNumber == 2
player.MoveTo CeruleanFirstMarker
if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0
CraigBooneRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker
elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0
ArcadeRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker
elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0
RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker
elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0
RaulRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker
elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0
LilyRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker
elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0
VeronicaRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker
endif
if VNPCFollowers.RexHired && RexREF.Waiting == 0
RexRef.MoveTo CeruleanRoboticsElevator1FRobotMarker
elseif VNPCFollowers.bEDEHired
if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0
EDE1Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;
elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0
EDE2Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;
elseif EDE3Ref.GetDisabled == 0 && EDE3REF.waiting == 0
EDE3Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;
endif
endif
endif
set ShouldSave to 1
elseif Button == 2
player.MoveTo CeruleanSecondMarker
if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0
CraigBooneRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker
elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0
ArcadeRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker
elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0
RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker
elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0
RaulRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker
elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0
LilyRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker
elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0
VeronicaRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker
endif
if VNPCFollowers.RexHired && RexREF.Waiting == 0
RexRef.MoveTo CeruleanRoboticsElevator2FRobotMarker
elseif VNPCFollowers.bEDEHired
if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0
EDE1Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;
elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0
EDE2Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;
elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0
EDE3Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;
endif
endif
set ShouldSave to 1
elseif Button == 3
player.MoveTo CeruleanThirdMarker
if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0
CraigBooneRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker
elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0
ArcadeRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker
elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0
RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker
elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0
RaulRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker
elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0
LilyRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker
elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0
VeronicaRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker
endif
if VNPCFollowers.RexHired && RexREF.Waiting == 0
RexRef.MoveTo CeruleanRoboticsElevator3FRobotMarker
elseif VNPCFollowers.bEDEHired
if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0
EDE1Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;
elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0
EDE2Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;
elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0
EDE3Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;
endif
endif
set ShouldSave to 1
elseif Button == 4
player.MoveTo CeruleanFourthMarker
if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0
CraigBooneRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker
elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0
ArcadeRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker
elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0
RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker
elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0
RaulRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker
elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0
LilyRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker
elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0
VeronicaRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker
endif
if VNPCFollowers.RexHired && RexREF.Waiting == 0
RexRef.MoveTo CeruleanRoboticsElevator4FRobotMarker
elseif VNPCFollowers.bEDEHired
if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0
EDE1Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;
elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0
EDE2Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;
elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0
EDE3Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;
endif
endif
set ShouldSave to 1
endif
if ShouldSave == 1
AutoSave
set ShouldSave to 0
endif
end
Many thanks for your time and help :laugh:
Greetings,
Prodlimen
Link to comment
Share on other sites

Sure thing pal, here it is:

 

 

[code] scn CeruleanRoboticsElevatorDoorScript

 

int Button

int ScreenNumber ; 0 = No skill page

; 1 = Fixing possible page

; 2 = Floor selection page

 

int ShouldSave ; 0 = Shouldn't save

; 1 = Should autosave

 

ref DoorOpener

 

begin onActivate

 

set DoorOpener to GetActionREF

 

if DoorOpener.GetIsReference player

 

if VFreeformCeruleanRobotics.ElevatorRepaired == 0

if player.getav Repair >= 50

ShowMessage CeruleanRoboticsElevatorBrokenMsg

set ScreenNumber to 1

elseif player.getav Repair < 50

ShowMessage CeruleanRoboticsElevatorBrokenNoSkillMsg

set ScreenNumber to 0

endif

elseif VFreeformCeruleanRobotics.ElevatorRepaired == 1

ShowMessage CeruleanRoboticsElevatorWorkingMsg

set ScreenNumber to 2

endif

 

 

;--------------------------------------------------------------------------------------------------------------------------

 

begin GameMode

 

set Button to GetButtonPressed

 

if Button == 0 ; Do nothing

 

elseif Button == 1

if ScreenNumber == 1

set VFreeformVault22.ElevatorRepaired to 1

ShowMessage V22ElevatorWorkingMsg

set ScreenNumber to 2

player.rewardxp 100

elseif ScreenNumber == 2

player.MoveTo CeruleanFirstMarker

 

if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0

CraigBooneRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker

elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0

ArcadeRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker

elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0

RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker

elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0

RaulRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker

elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0

LilyRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker

elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0

VeronicaRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker

endif

 

if VNPCFollowers.RexHired && RexREF.Waiting == 0

RexRef.MoveTo CeruleanRoboticsElevator1FRobotMarker

elseif VNPCFollowers.bEDEHired

if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0

EDE1Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;

elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0

EDE2Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;

elseif EDE3Ref.GetDisabled == 0 && EDE3REF.waiting == 0

EDE3Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;

endif

endif

endif

 

set ShouldSave to 1

 

elseif Button == 2

player.MoveTo CeruleanSecondMarker

 

if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0

CraigBooneRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker

elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0

ArcadeRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker

elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0

RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker

elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0

RaulRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker

elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0

LilyRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker

elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0

VeronicaRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker

endif

 

if VNPCFollowers.RexHired && RexREF.Waiting == 0

RexRef.MoveTo CeruleanRoboticsElevator2FRobotMarker

elseif VNPCFollowers.bEDEHired

if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0

EDE1Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;

elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0

EDE2Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;

elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0

EDE3Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;

endif

endif

 

 

set ShouldSave to 1

 

elseif Button == 3

player.MoveTo CeruleanThirdMarker

 

if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0

CraigBooneRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker

elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0

ArcadeRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker

elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0

RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker

elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0

RaulRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker

elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0

LilyRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker

elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0

VeronicaRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker

endif

 

if VNPCFollowers.RexHired && RexREF.Waiting == 0

RexRef.MoveTo CeruleanRoboticsElevator3FRobotMarker

elseif VNPCFollowers.bEDEHired

if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0

EDE1Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;

elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0

EDE2Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;

elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0

EDE3Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;

endif

endif

 

set ShouldSave to 1

 

elseif Button == 4

player.MoveTo CeruleanFourthMarker

 

if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0

CraigBooneRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker

elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0

ArcadeRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker

elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0

RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker

elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0

RaulRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker

elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0

LilyRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker

elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0

VeronicaRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker

endif

 

if VNPCFollowers.RexHired && RexREF.Waiting == 0

RexRef.MoveTo CeruleanRoboticsElevator4FRobotMarker

elseif VNPCFollowers.bEDEHired

if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0

EDE1Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;

elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0

EDE2Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;

elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0

EDE3Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;

endif

endif

 

set ShouldSave to 1

 

endif

 

if ShouldSave == 1

AutoSave

set ShouldSave to 0

endif

 

end

 

 

 

[/code]

Link to comment
Share on other sites

You are missing an end at the end of the OnActivate block.

 

All the conditions and MoveTo calls on followers are redundant and you can remove them. Calling MoveTo on the player automatically applies on all party members currently following the player.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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