• Страница 1 из 1
  • 1
Форум » Записи участника [Reider76]

Результаты поиска
Reider76  Offline  Сообщение №1 | Тема: Скрипты написано: 11 марта 2014, 04:21



1
Как разблокировать армейский магазин из DLC Lonesome Road, через скрипты?

Код
SCN NVDLC04EDECommissarySCRIPT

; ED-E's special access panel to allow him to unlock barter points for the player.
; TLS 03/21/2011
; TLS 04/07/2011 - Complete optional commissary objective.
; TLS 05/19/2011 - Added timer to set animation states.
; CES 6/23/11 - Updated the add script package to work for each individual commissary so EdE will travel to the terminal, not the player.
; TLS 07/18/2011 - Removed obsolete code for weapon use.
; ABR 07/22/2011 - Added scripting to reset Vendor Container's Caps if they get to high to prevent Barter issues.
; TLS 08/02/2011 - Added commissary 6
; ABR 08/09/2011 - Fixed scripting to check the Number of Caps in the Repair Merchant as well as the Vendor Container.

Short bUnlocked;                ;  Flag for whether ED-E has unlocked the terminal yet.
Short nDisplay;                ; Flag for whether the Commissary message box is popped up - 1 = locked message, 2 = unlocked message.
Short nButton;                    ; Controller for button functionality.
Ref rLinkedRef;                ; Reference used for Merchant/Repair NPC
Ref rSelf;                        ; Reference for telling ED-E what to shoot.
Short bRunTimer;
Float fTimer;
Int nNumCapsVendor;        ; Number of Caps in the Commissary Vendor Container.
Int nNumCapsRepair;            ; Number of Caps the Commissary Repair Merchant has.

BEGIN OnActivate

     If (IsActionREF Player == 1) && (bUnlocked == 0)
         Set nDisplay to 1;
         Set rSelf to GetSelf;
         ShowMessage NVDLC04EDECommissaryLockedMSG;
     ElseIf (IsActionREF Player == 1) && (bUnlocked == 1)
         Set nDisplay to 2;
         Set rLinkedRef to GetLinkedRef;
         ShowMessage NVDLC04EDECommissaryUnlockedMSG;
     EndIf

     ; Reset Caps if the get to High.
     set nNumCapsVendor to NVDLC04VendorContainerCommissaryREF.getitemcount caps001
     set nNumCapsRepair to rLinkedRef.getitemcount caps001
      
     If ((nNumCapsVendor + nNumCapsRepair) > 6000) || ((nNumCapsVendor + nNumCapsRepair) < 200)
         NVDLC04VendorContainerCommissaryREF.removeitem caps001 nNumCapsVendor
         NVDLC04VendorContainerCommissaryREF.additem caps001 6000
         rLinkedRef.removeitem caps001 nNumCapsRepair
     EndIf

END

BEGIN OnHit NVDLC04EDEREF

     If (bUnlocked == 0)
         ShowMessage NVDLC04EDECommissaryMSG;
         PlaySound OBJComputerTerminalArc;
         PlayGroup Left 1;
         PlaySound OBJComputerTerminalForward;
         Set bUnlocked to 1;
         Set bRunTimer to 1;
         If (GetObjectiveCompleted NVDLC04MQ01a 25 == 0)
             SetObjectiveCompleted NVDLC04MQ01a 25 1;
         EndIf
         NVDLC04EDEREF.ResetAI;
     EndIf

END

BEGIN GameMode

     If (nDisplay == 1)
         Set nButton to GetButtonPressed
         ; Cancel Option
         If (nButton == 0)
             Set nDisplay to 0;
         ; Commissary Option
         ElseIf (nButton == 1)
             PlayGroup Forward 1;
             If (NVDLC04EDEREF.GetInCell NVDLC04Silo01 == 1)
                 ;Commissary 1 - Silo01
                 NVDLC04EDEREF.AddScriptPackage NVDLC04EDEMoveToPlayerCommissary01;
             ElseIf (NVDLC04EDEREF.GetInCell NVDLC04SLHopeVilleMensBarracks == 1)
                 ;Commissary 2 - Hopeville Men's Barracks
                 NVDLC04EDEREF.AddScriptPackage NVDLC04EDEMoveToPlayerCommissary02;
             ElseIf (NVDLC04EDEREF.GetInCell NVDLC04RoadHQ == 1)
                 ;Commissary 3 - Hopeville HQ
                 NVDLC04EDEREF.AddScriptPackage NVDLC04EDEMoveToPlayerCommissary03;
             ElseIf (NVDLC04EDEREF.GetInCell NVDLC04Silo02 == 1)
                 ;Commissary 4 - Silo02
                 NVDLC04EDEREF.AddScriptPackage NVDLC04EDEMoveToPlayerCommissary04;
             ElseIf (NVDLC04EDEREF.GetInCell NVDLC04DivideTempleMaint == 1)
                 ;Commissary 5 - Ulysses' Temple
                 NVDLC04EDEREF.AddScriptPackage NVDLC04EDEMoveToPlayerCommissary05;
             ElseIf (Player.GetInWorldspace NVDLC04Road02World == 1)
                 ;Commissary 6 - High Road
                 NVDLC04EDEREF.AddScriptPackage NVDLC04EDEMoveToPlayerCommissary06;
             Else
                 ;Fall back to just moving to the player if the above doesn't work.
                 NVDLC04EDEREF.AddScriptPackage NVDLC04EDEMoveToPlayerCommissary;
             EndIf
         EndIf
     ElseIf (nDisplay == 2)
         Set nButton to GetButtonPressed
         ; Cancel Option
         If (nButton == 0)
             Set nDisplay to 0;
         ; Commissary Option
         ElseIf (nButton == 1)
             rLinkedRef.Activate Player 1;
             Set nDisplay to 0;
         ; Repair Option
         ElseIf (nButton == 2)
             rLinkedRef.ShowRepairMenu;
             Set nDisplay to 0;
         EndIf
     EndIf

     If (bRunTimer == 1)
         If (fTimer >= 1)
             PlayGroup SpecialIdle 0;
             Set bRunTimer to 0;
         Else
             Set fTimer to (fTimer + GetSecondsPassed);
         EndIf
     EndIf

END

Форум » Записи участника [Reider76]
  • Страница 1 из 1
  • 1
Поиск:





Ответ на жалобу смотрите в разделе жалоб