Advertisement
abitoftaste

Untitled

Nov 19th, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.84 KB | None | 0 0
  1. # VV23_AristTeleportVault =====================================================
  2. Begin VV23_AristTeleportVault
  3.  
  4. short done
  5.  
  6. if ( MenuMode )
  7. return
  8. endif
  9.  
  10. if ( done )
  11. return
  12. endif
  13.  
  14. if ( GetJournalIndex "vv23_vault" < 5 )
  15. return
  16. endif
  17.  
  18. if ( GetPCCell "Monastery of Order, Vault Entrance" )
  19. set done to 1
  20. vv23_artist->PositionCell 6726 4000 16258 5400 "Monastery of Order, Vault Entrance"
  21. StopScript VV23_AristTeleportVault
  22. endif
  23.  
  24. End
  25.  
  26. # VV23_ArmourGuardDead ========================================================
  27. Begin VV23_ArmourGuardDead
  28.  
  29. short doonce
  30. short foundonce
  31.  
  32. if ( doOnce == 0 )
  33. disable
  34. endif
  35.  
  36. if ( doOnce == 0 )
  37. if ( GetJournalIndex "VV23_ArmourRecovery" >= 10 )
  38. set doOnce to 1
  39. enable
  40. endif
  41. endif
  42.  
  43. if ( foundonce == 0 )
  44. if ( GetJournalIndex "VV23_ArmourRecovery" == 10 )
  45. if ( GetDistance player <= 250 )
  46. journal VV23_ArmourRecovery 15
  47. set foundonce to 1
  48. endif
  49. endif
  50. endif
  51.  
  52. end
  53.  
  54. # VV23_artifactspin ===========================================================
  55. begin VV23_artifactspin
  56.  
  57. if ( MenuMode )
  58. return
  59. endif
  60.  
  61. ; spin around
  62. Rotate z 5
  63.  
  64. End
  65.  
  66. # VV23_ArtistTeleport =========================================================
  67. Begin VV23_ArtistTeleport
  68.  
  69. ; adapted from a script by The Other Felix
  70.  
  71. float Timer
  72. short port
  73. float oldgamehour
  74.  
  75. If ( MenuMode )
  76. return
  77. elseif ( GameHour == oldgamehour )
  78. return
  79. endif
  80.  
  81. set oldgamehour to GameHour
  82.  
  83. if ( port == 0 )
  84. if ( Timer == 0 )
  85. vv23_artist->Cast "recall" vv23_artist
  86. Set Timer to 1
  87. elseif ( Timer < 3.5 )
  88. Set Timer to ( Timer + GetSecondsPassed )
  89. else
  90. if ( GetJournalIndex "vv23_vault" == 150 )
  91. vv23_artist->disable
  92. else
  93. vv23_artist->PositionCell -4042 -6370 16099 0 "Bthumzchekar"
  94. endif
  95. Set Timer to 0
  96. set port to 1
  97. endif
  98. endif
  99.  
  100. if ( port == 1 )
  101. set Timer to Timer + GetSecondsPassed
  102. if ( Timer > 1 )
  103. Set Timer to 0
  104. set port to 0
  105. StopScript vv23_ArtistTeleport
  106. endif
  107. endif
  108.  
  109. End
  110.  
  111. # VV23_BoardNotice_ILLU =======================================================
  112. begin VV23_BoardNotice_ILLU
  113.  
  114. short doOnce
  115. short done
  116.  
  117. if ( doOnce == 0 )
  118. set doOnce to 1
  119. disable
  120. endif
  121.  
  122. if ( doOnce == 1 )
  123. if ( GetPCRank "Thieves Guild" > 3 )
  124. if ( GetJournalIndex "vv23_tg_intro" >= 20 )
  125. enable
  126. set doOnce to 2
  127. endif
  128. endif
  129. endif
  130.  
  131. if ( done == 1 )
  132. return
  133. endif
  134.  
  135. if ( OnActivate )
  136. Journal "VV23_TGTombIllusion" 5
  137. AddTopic "Gem of Greedbane"
  138. set done to 1
  139. activate
  140. endif
  141.  
  142. end
  143.  
  144. # VV23_BoardNotice_Inan =======================================================
  145. begin VV23_BoardNotice_Inan
  146.  
  147. short doOnce
  148. short done
  149.  
  150. if ( doOnce == 0 )
  151. set doOnce to 1
  152. disable
  153. endif
  154.  
  155. if ( doOnce == 1 )
  156. if ( GetPCRank "Thieves Guild" > 1 )
  157. enable
  158. set doOnce to 2
  159. endif
  160.  
  161. if ( done == 1 )
  162. return
  163. endif
  164.  
  165. if ( OnActivate )
  166. Journal "VV23_TGInanius" 5
  167. AddTopic "Inanius Item Recovery"
  168. set done to 1
  169. activate
  170. endif
  171. endif
  172.  
  173. end
  174.  
  175. # VV23_BoardNotice_TURQ =======================================================
  176. begin VV23_BoardNotice_TURQ
  177.  
  178. short doOnce
  179. short done
  180.  
  181. if ( doOnce == 0 )
  182. set doOnce to 1
  183. disable
  184. endif
  185.  
  186. if ( doOnce == 1 )
  187. if ( GetPCRank "Thieves Guild" > 4 )
  188. if ( GetJournalIndex "vv23_tg_intro" >= 20 )
  189. enable
  190. set doOnce to 2
  191. endif
  192. endif
  193. endif
  194.  
  195. if ( done == 1 )
  196. return
  197. endif
  198.  
  199. if ( OnActivate )
  200. Journal "VV23_TGDwemTurq" 5
  201. AddTopic "Turquoise of Lies"
  202. set done to 1
  203. activate
  204. endif
  205.  
  206. end
  207.  
  208. # vv23_CaretakerControl_s =====================================================
  209. begin vv23_CaretakerControl_s
  210.  
  211. if ( CellChanged )
  212. if ( GetSoundPlaying "T_SndObj_HauntedChoir" )
  213. StopSound "T_SndObj_HauntedChoir"
  214. endif
  215. if ( GetSoundPlaying "VV23_ghostsoundLOUDER" )
  216. StopSound "VV23_ghostsoundLOUDER"
  217. endif
  218. endif
  219.  
  220. if ( GetTarget Player )
  221. Return
  222. endif
  223.  
  224. if ( GetDistance player >= 512 )
  225. if ( GetSoundPlaying "T_SndObj_HauntedChoir" == 0 )
  226. PlayLoopSound3DVP "T_SndObj_HauntedChoir" 1.0 1.0
  227. endif
  228. if ( GetSoundPlaying "VV23_ghostsoundLOUDER" )
  229. StopSound "VV23_ghostsoundLOUDER"
  230. endif
  231. return
  232. endif
  233.  
  234. if ( player->GetInvisible )
  235. if ( GetSoundPlaying "T_SndObj_HauntedChoir" == 0 )
  236. PlayLoopSound3DVP "T_SndObj_HauntedChoir" 1.0 1.0
  237. endif
  238. if ( GetSoundPlaying "VV23_ghostsoundLOUDER" )
  239. StopSound "VV23_ghostsoundLOUDER"
  240. endif
  241. return
  242. endif
  243.  
  244. if ( GetDistance player >= 192 )
  245. if ( GetSoundPlaying "VV23_ghostsoundLOUDER" == 0 )
  246. PlayLoopSound3DVP "VV23_ghostsoundLOUDER" 1.0 1.0
  247. endif
  248. if ( GetSoundPlaying "T_SndObj_HauntedChoir" )
  249. StopSound "T_SndObj_HauntedChoir"
  250. endif
  251. return
  252. endif
  253.  
  254. Set vv23_catacombstealthfail to 1
  255. PlaySound3D "bonelord scream"
  256. SetFight 100
  257. StartCombat Player
  258. if ( GetSoundPlaying "T_SndObj_HauntedChoir" )
  259. StopSound "T_SndObj_HauntedChoir"
  260. endif
  261. if ( GetSoundPlaying "VV23_ghostsoundLOUDER" )
  262. StopSound "VV23_ghostsoundLOUDER"
  263. endif
  264.  
  265. end
  266.  
  267. # VV23_CatacombGhostAttack ====================================================
  268. Begin VV23_CatacombGhostAttack
  269.  
  270. short doOnce
  271.  
  272. if ( doOnce == 0 )
  273. Disable
  274. set doOnce to 1
  275. endif
  276.  
  277. if ( doOnce == 1 )
  278. if ( vv23_catacombstealthfail > 0 )
  279. Enable
  280. playsound3d "conjuration hit"
  281. set doOnce to 2
  282. endif
  283. endif
  284.  
  285. End
  286.  
  287. # vv23_CatacombTrickwall1_s ===================================================
  288. begin vv23_CatacombTrickwall1_s
  289.  
  290. float timer
  291. short state
  292.  
  293. if ( MenuMode )
  294. return
  295. endif
  296.  
  297. if ( state == 2 )
  298. return
  299. endif
  300.  
  301. if ( OnActivate )
  302. if ( state == 0 )
  303. if ( Player->GetItemCount "VV23_CatacombKey" )
  304. set state to 1
  305. set timer to 15 ; edit this to make the wall move longer
  306. playSound3D "Stone Door Open 1"
  307. else
  308. playSound3D "LockedDoor"
  309. endif
  310. endif
  311. endif
  312.  
  313. if ( state == 1 )
  314. set timer to ( timer - GetSecondsPassed )
  315. if ( timer > 0 )
  316. Move Z -32 ; edit this to make the wall move faster
  317. else
  318. set state to 2
  319. endif
  320. endif
  321.  
  322. end
  323.  
  324. # VV23_ChaosGreeting ==========================================================
  325. begin VV23_ChaosGreeting
  326.  
  327. short once
  328. short nolore
  329.  
  330. if ( MenuMode )
  331. return
  332. endif
  333.  
  334. if ( once )
  335. return
  336. endif
  337.  
  338. if ( GetJournalIndex "vv23_codex_chaos" >= 5 )
  339. return
  340. endif
  341.  
  342. if ( GetJournalIndex "vv23_guilty" < 100 )
  343. return
  344. endif
  345.  
  346. if ( GetJournalIndex "vv23_opposites" < 100 )
  347. return
  348. endif
  349.  
  350. if ( GetDistance Player <= 700 )
  351. set once to 1
  352. forcegreeting
  353. endif
  354.  
  355. end
  356.  
  357. # vv23_Codex_s ================================================================
  358. Begin vv23_Codex_s
  359.  
  360. short enhanced
  361. short doonce
  362. short state
  363. short messageOn
  364. short button
  365.  
  366. float timer
  367.  
  368. if ( MenuMode )
  369. Return
  370. endif
  371.  
  372. if ( OnActivate )
  373. if ( state == 0 )
  374. LoopGroup Idle2 0 ; open book
  375. set timer to 1.3333
  376. set state to 1
  377. elseif ( state == 1 )
  378. if ( enhanced == 0 )
  379. if ( GetJournalIndex "vv23_vault" == 20 ) ; player will be asked to destroy The Codex
  380. MessageBox "Destroy the Codex?" "Yes." "No."
  381. set messageOn to 3
  382. else
  383. if ( GetJournalIndex "vv23_vault" == 25 ) ; player will be asked to enhance The Codex
  384. if ( Player->GetItemCount "vv23_w_CrystalSword" > 0 )
  385. MessageBox "Enhance the Sword of Order?" "Yes." "No."
  386. set messageOn to 2
  387. endif
  388. else
  389. MessageBox "The Codex does nothing."
  390. endif
  391. endif
  392. elseif ( enhanced == 1 )
  393. LoopGroup Idle3 0 ; close book
  394. set timer to 1.3333
  395. set state to 0
  396. endif
  397. endif
  398. endif
  399.  
  400. if ( timer > 0 ) ; can't activate book while animation is playing
  401. set timer to ( timer - GetSecondsPassed )
  402. Return
  403. endif
  404.  
  405. if ( doonce == 0 )
  406. if ( state == -1 )
  407. disable
  408. setdelete 1
  409. set doonce to 1
  410. endif
  411. endif
  412.  
  413. if ( messageOn == 1 )
  414.  
  415. set button to GetButtonPressed
  416.  
  417. if ( button >= 0 )
  418. set messageOn to 0
  419. endif
  420.  
  421. if ( button == 0 )
  422. ; Player->AddItem "vv23_bk_codex" 1
  423. PlaySound "Item Book Up"
  424. Disable
  425.  
  426. elseif ( button == 1 )
  427. LoopGroup Idle3 0 ; close book
  428. set timer to 1.3333
  429. set state to 0
  430. set button to 0
  431. endif
  432.  
  433. endif
  434.  
  435. if ( messageOn == 2 )
  436.  
  437. set button to GetButtonPressed
  438.  
  439. if ( button >= 0 )
  440. set messageOn to 0
  441. endif
  442.  
  443. if ( button == 0 )
  444. LoopGroup Idle5 0
  445. PlaySound "vv23_codexExplosion"
  446. Player->RemoveItem "vv23_w_CrystalSword" 1
  447. Player->AddItem "vv23_w_CrystalSwordEnhanced" 1
  448. Journal vv23_vault 150 ; change to whatever entry covers the enhancement of The Codex
  449. set enhanced to 1
  450.  
  451. elseif ( button == 1 )
  452. LoopGroup Idle3 0 ; close book
  453. set timer to 1.3333
  454. set state to 0
  455. set button to 0
  456. endif
  457.  
  458. endif
  459.  
  460. if ( messageOn == 3 )
  461.  
  462. set button to GetButtonPressed
  463.  
  464. if ( button >= 0 )
  465. set messageOn to 0
  466. endif
  467.  
  468. if ( button == 0 )
  469. LoopGroup Idle4 0
  470. PlaySound "vv23_codexExplosion"
  471. Journal vv23_vault 100 ; change to whatever entry covers the destruction of The Codex
  472. vv23_keeper->disable
  473. set state to -1
  474. set timer to 1.6667
  475.  
  476. elseif ( button == 1 )
  477. LoopGroup Idle3 0 ; close book
  478. set timer to 1.3333
  479. set state to 0
  480. set button to 0
  481. endif
  482.  
  483. endif
  484.  
  485. End
  486.  
  487. # VV23_CodexPlaceholder =======================================================
  488. begin VV23_CodexPlaceholder
  489.  
  490. short done
  491.  
  492. if ( done == 1 )
  493. return
  494. endif
  495.  
  496. if ( OnActivate )
  497. Journal vv23_vault 100
  498. Activate
  499. ; set once to 1
  500. set done to 1
  501. endif
  502.  
  503. end
  504.  
  505. # vv23_coinDwrv005_s ==========================================================
  506. Begin vv23_coinDwrv005_s
  507.  
  508. Short State
  509.  
  510. if ( MenuMode )
  511. Return
  512. endif
  513.  
  514. if ( State == 1 )
  515. if ( GetDisabled )
  516. SetDelete 1
  517. set State to 2
  518. endif
  519. endif
  520.  
  521. if ( OnActivate )
  522. Player->AddItem "misc_dwrv_coin00" 5
  523. PlaySound "Item Gold Up"
  524. Disable
  525. set State to 1
  526. endif
  527.  
  528. End
  529.  
  530. # vv23_coinDwrv010_s ==========================================================
  531. Begin vv23_coinDwrv010_s
  532.  
  533. Short State
  534.  
  535. if ( MenuMode )
  536. Return
  537. endif
  538.  
  539. if ( State == 1 )
  540. if ( GetDisabled )
  541. SetDelete 1
  542. set State to 2
  543. endif
  544. endif
  545.  
  546. if ( OnActivate )
  547. Player->AddItem "misc_dwrv_coin00" 10
  548. PlaySound "Item Gold Up"
  549. Disable
  550. set State to 1
  551. endif
  552.  
  553. End
  554.  
  555. # vv23_coinDwrv025_s ==========================================================
  556. Begin vv23_coinDwrv025_s
  557.  
  558. Short State
  559.  
  560. if ( MenuMode )
  561. Return
  562. endif
  563.  
  564. if ( State == 1 )
  565. if ( GetDisabled )
  566. SetDelete 1
  567. set State to 2
  568. endif
  569. endif
  570.  
  571. if ( OnActivate )
  572. Player->AddItem "misc_dwrv_coin00" 25
  573. PlaySound "Item Gold Up"
  574. Disable
  575. set State to 1
  576. endif
  577.  
  578. End
  579.  
  580. # vv23_coinDwrv100_s ==========================================================
  581. Begin vv23_coinDwrv100_s
  582.  
  583. Short State
  584.  
  585. if ( MenuMode )
  586. Return
  587. endif
  588.  
  589. if ( State == 1 )
  590. if ( GetDisabled )
  591. SetDelete 1
  592. set State to 2
  593. endif
  594. endif
  595.  
  596. if ( OnActivate )
  597. Player->AddItem "misc_dwrv_coin00" 100
  598. PlaySound "Item Gold Up"
  599. Disable
  600. set State to 1
  601. endif
  602.  
  603. End
  604.  
  605. # VV23_floorwarpdown ==========================================================
  606. begin VV23_floorwarpdown
  607.  
  608. if ( MenuMode )
  609. return
  610. endif
  611.  
  612. if ( GetDistance player <= 500 )
  613. Player->setpos z 14832
  614. endif
  615.  
  616. end
  617.  
  618. # VV23_floorwarpdowntombstair =================================================
  619. begin VV23_floorwarpdowntombstair
  620.  
  621. if ( MenuMode )
  622. return
  623. endif
  624.  
  625. if ( GetJournalIndex "VV23_TGTombIllusion" >= 10 )
  626. if ( GetDistance player <= 255 )
  627. Player->setpos z 16256
  628. endif
  629. endif
  630.  
  631. end
  632.  
  633. # VV23_floorwarpexitdown ======================================================
  634. begin VV23_floorwarpexitdown
  635.  
  636. if ( MenuMode )
  637. return
  638. endif
  639.  
  640. if ( GetDistance player <= 500 )
  641. Player->setpos z -14272
  642. endif
  643.  
  644. end
  645.  
  646. # vv23_floorwarpup ============================================================
  647. Begin vv23_floorwarpup
  648.  
  649. if ( MenuMode )
  650. return
  651. endif
  652.  
  653. if ( GetDistance player <= 500 )
  654. Player->setpos z 20976
  655. endif
  656.  
  657. end
  658.  
  659. # vv23_GillesCombat ===========================================================
  660. Begin vv23_GillesCombat
  661.  
  662. if ( vv23_gilles->GetDistance "Player" > 1000 )
  663. return
  664. endif
  665.  
  666. if ( vv23_gilles->GetHealth > 0 )
  667. vv23_Fau_SpiderGilles->StartCombat vv23_gilles
  668. vv23_Fau_Spiderl1Gilles->StartCombat vv23_gilles
  669. vv23_Fau_Spiderl2Gilles->StartCombat vv23_gilles
  670. else
  671. return
  672. endif
  673.  
  674. float timer
  675.  
  676. If ( GetHealth > 0 )
  677. If ( vv23_gilles->GetWeaponDrawn == 0 )
  678. If ( vv23_gilles->GetSpellReadied == 0 )
  679. set timer to ( timer + GetSecondsPassed )
  680. If ( timer < 1 )
  681. return
  682. endif
  683. vv23_gilles->StartCombat vv23_Fau_SpiderGilles
  684. vv23_gilles->StartCombat vv23_Fau_Spiderl1Gilles
  685. vv23_gilles->StartCombat vv23_Fau_Spiderl2Gilles
  686. StopScript vv23_GillesCombat
  687. endif
  688. endif
  689. endif
  690.  
  691. End
  692.  
  693. # vv23_GillesScript ===========================================================
  694. Begin vv23_GillesScript
  695.  
  696. short nolore
  697. short once
  698. short OnPCHitMe
  699.  
  700. if ( MenuMode )
  701. return
  702. endif
  703.  
  704. ; if ( once == 1 )
  705. ; return
  706. ; endif
  707.  
  708. if ( GetJournalIndex "vv23_guilty" < 15 )
  709. disable
  710. endif
  711.  
  712. if ( once == 0 )
  713. if ( GetJournalIndex "vv23_guilty" >= 15 )
  714. enable
  715. set once to 1
  716. endif
  717. endif
  718.  
  719. ; Gilles dies in one hit after player agrees to kill him
  720. if ( OnPCHitMe == 1 )
  721. if ( GetJournalIndex "vv23_guilty_brother" == 25 )
  722. setHealth 0
  723. Set OnPCHitMe to 0
  724. Journal vv23_guilty_brother 35
  725. endif
  726. endif
  727.  
  728. ; If player helps Lucien escape before speaking to Gilles
  729. if ( GetJournalIndex "vv23_guilty_brother" == 125 )
  730. if ( GetHealth > 0 )
  731. setHealth 0
  732. endif
  733. endif
  734.  
  735. End
  736.  
  737. # VV23_GolemEnabler ===========================================================
  738. Begin VV23_GolemEnabler
  739.  
  740. short doonce
  741.  
  742. if ( doOnce == 0 )
  743. disable
  744. endif
  745.  
  746. if ( GetJournalIndex "VV23_slaythegolem" >= 10 )
  747. if ( doOnce == 0 )
  748. set doOnce to 1
  749. enable
  750. endif
  751. endif
  752.  
  753. end
  754.  
  755. # VV23_GolemNotice ============================================================
  756. begin VV23_GolemNotice
  757.  
  758. short done
  759.  
  760. if ( done == 1 )
  761. return
  762. endif
  763.  
  764. if ( OnActivate )
  765.  
  766. Journal "VV23_slaythegolem" 5
  767. AddTopic "Crystal Golem"
  768. set done to 1
  769. activate
  770.  
  771. endif
  772.  
  773. end
  774.  
  775. # VV23_GreedBaneGem ===========================================================
  776. Begin VV23_GreedBaneGem
  777.  
  778. short doOnce
  779. short done
  780.  
  781. if ( doOnce == 0 )
  782. disable
  783. endif
  784.  
  785. if ( GetJournalIndex "VV23_TGTombIllusion" > 1 )
  786. if ( doOnce == 0 )
  787. set doOnce to 1
  788. enable
  789. endif
  790. endif
  791.  
  792. if ( OnActivate )
  793. if ( done == 0 )
  794.  
  795. Journal "VV23_TGTombIllusion" 15
  796. set done to 1
  797. player->additem VV23_TrueGreedbaneItem 1
  798. player->removeitem VV23_FakeWarning 1
  799. journal VV23_TGTombIllusion 10
  800. disable
  801. endif
  802. endif
  803.  
  804. End
  805.  
  806. # VV23_greedbanetreasurecursed ================================================
  807. Begin VV23_greedbanetreasurecursed
  808.  
  809. short doonce
  810.  
  811. if ( doOnce == 0 )
  812. if ( GetJournalIndex "VV23_TGTombIllusion" > 1 )
  813. set doOnce to 1
  814. enable
  815. else
  816. disable
  817. endif
  818. endif
  819.  
  820.  
  821. if ( OnActivate )
  822. Cast "AB_trap_Runestone_01" Player
  823. endif
  824.  
  825. if ( GetJournalIndex "VV23_TGTombIllusion" >= 10 )
  826. disable
  827. endif
  828.  
  829. end
  830.  
  831. # VV23_GuardNotice ============================================================
  832. begin VV23_GuardNotice
  833.  
  834. short done
  835.  
  836. if ( done == 1 )
  837. return
  838. endif
  839.  
  840. if ( OnActivate )
  841.  
  842. Journal "VV23_ArmourRecovery" 5
  843. AddTopic "Missing Guardian"
  844. set done to 1
  845. activate
  846.  
  847. endif
  848.  
  849. end
  850.  
  851. # vv23_hauntedbooksounds ======================================================
  852. begin vv23_hauntedbooksounds
  853.  
  854. float timer
  855. short doOnce
  856.  
  857. if ( doOnce == 2 )
  858. return
  859. endif
  860.  
  861. if ( timer == 0 )
  862. set timer to Random 100
  863. endif
  864.  
  865. if ( GetJournalIndex "VV23_TGInanius" == 10 )
  866. if ( CellChanged == 0 )
  867. set timer to timer - GetSecondsPassed
  868. if ( timer < 1 )
  869. if ( GetSoundPlaying "T_SndEnv_DirenniHaunted" == 0 )
  870. PlayLoopSound3DVP "T_SndEnv_DirenniHaunted" 0.5 1.0
  871. endif
  872. endif
  873. endif
  874. endif
  875.  
  876. if ( doOnce == 0 )
  877. set doOnce to 1
  878. endif
  879.  
  880. if ( doOnce == 1 )
  881. if ( GetJournalIndex "VV23_TGInanius" == 15 )
  882. stopsound "T_SndEnv_DirenniHaunted"
  883. disable
  884. set doOnce to 2
  885. endif
  886. endif
  887.  
  888. end
  889.  
  890. # VV23_IlluOff ================================================================
  891. begin VV23_IlluOff
  892.  
  893. Short DoOnce
  894.  
  895. if ( GetJournalIndex "VV23_TGTombIllusion" < 4 )
  896. disable
  897. Endif
  898.  
  899. if ( GetJournalIndex "VV23_TGTombIllusion" >= 4 )
  900. if ( GetJournalIndex "VV23_TGTombIllusion" < 10 )
  901. enable
  902. endif
  903. endif
  904.  
  905. If ( Doonce == 0 )
  906. if ( GetJournalIndex "VV23_TGTombIllusion" >= 10 )
  907. if ( GetDistance player > 500 )
  908. Set Doonce to 1
  909. disable
  910. endif
  911. endif
  912. endif
  913.  
  914. If ( Doonce == 1 )
  915. if ( GetJournalIndex "VV23_TGTombIllusion" >= 10 )
  916. if ( GetDistance player <= 500 )
  917. Set Doonce to 0
  918. enable
  919. endif
  920. endif
  921. endif
  922.  
  923. end
  924.  
  925. # VV23_IlluOn =================================================================
  926. begin VV23_IlluOn
  927.  
  928. Short DoOnce
  929.  
  930. if ( GetJournalIndex "VV23_TGTombIllusion" >= 4 )
  931. if ( GetJournalIndex "VV23_TGTombIllusion" < 10 )
  932. disable
  933. endif
  934. endif
  935.  
  936. If ( Doonce == 0 )
  937. if ( GetJournalIndex "VV23_TGTombIllusion" >= 10 )
  938. if ( GetDistance player > 500 )
  939. Set Doonce to 1
  940. enable
  941. endif
  942. endif
  943. endif
  944.  
  945. If ( Doonce == 1 )
  946. if ( GetJournalIndex "VV23_TGTombIllusion" >= 10 )
  947. if ( GetDistance player <= 500 )
  948. Set Doonce to 0
  949. disable
  950. endif
  951. endif
  952. endif
  953.  
  954. end
  955.  
  956. # vv23_jygDoorSmall_s =========================================================
  957. Begin vv23_jygDoorSmall_s
  958.  
  959. float timer
  960. ; a variable to prevent the door from frequently getting opened and closed by npcs
  961. short state
  962. ; 0 = initial state
  963. ; 1 = opening
  964. ; 2 = open
  965. ; 3 = closing
  966. ; 4 = closed
  967.  
  968. if ( MenuMode )
  969. return
  970. endif
  971.  
  972. if ( OnActivate )
  973. if ( getLocked > 0 )
  974. if ( timer >= 1 )
  975. set timer to 0
  976. playSound3D "LockedDoor"
  977. endif
  978. elseif ( state > 2 )
  979. if ( timer >= 1 )
  980. set state to 1
  981. set timer to 0
  982. playSound3D "Door Metal Open"
  983. endif
  984. elseif ( state < 3 )
  985. if ( getCollidingActor == 0 ) ; to prevent the closing while an npc collides with the door
  986. if ( timer >= 1 )
  987. set state to 3
  988. set timer to 0
  989. playSound3D "Door Metal Close"
  990. endif
  991. endif
  992. endif
  993. endif
  994.  
  995. if ( timer < 1 )
  996. set timer to ( timer + getSecondsPassed )
  997. endif
  998.  
  999. if ( state == 0 ) ; set the door to closed
  1000. set state to 4
  1001. set timer to 1
  1002. endif
  1003.  
  1004. if ( state == 1 ) ; the door is opening
  1005. playGroup, idle2, 0
  1006. set state to 2
  1007. return
  1008. endif
  1009.  
  1010. if ( state == 2 ) ; the door has finished opening
  1011. playGroup, idle4, 0
  1012. return
  1013. endif
  1014.  
  1015. if ( state == 3 ) ; the door is closing
  1016. playGroup, idle3, 0
  1017. set state to 4
  1018. return
  1019. endif
  1020.  
  1021. if ( state == 4 ) ; the door has finished closing
  1022. playGroup, idle, 0
  1023. endif
  1024.  
  1025. end
  1026.  
  1027. # vv23_KeeperMark_s ===========================================================
  1028. Begin vv23_KeeperMark_s
  1029.  
  1030. short button
  1031. short messageOn
  1032. short reset
  1033. short OnPCEquip
  1034.  
  1035. ;if ( MenuMode )
  1036. ; Return
  1037. ;endif
  1038.  
  1039. if ( OnPCEquip == 0 )
  1040. set reset to 0
  1041. endif
  1042.  
  1043. if ( reset == 1 )
  1044. return
  1045. endif
  1046.  
  1047. if ( OnPCEquip == 1 )
  1048. if ( reset == 0 )
  1049. Set OnPCEquip to 0
  1050. MessageBox "Would you like to return to the Monastery of Order?" "Yes" "No"
  1051. set messageOn to 1
  1052. endif
  1053. endif
  1054.  
  1055. if ( messageOn == 1 )
  1056.  
  1057. set button to GetButtonPressed
  1058.  
  1059. if ( button >= 0 )
  1060. set messageOn to 0
  1061. endif
  1062.  
  1063. if ( button == 0 )
  1064. Player->PositionCell 3840 12800 15856 0 "Monastery of Order"
  1065. set reset to 1
  1066.  
  1067. elseif ( button == 1 )
  1068. set reset to 1
  1069. return
  1070. endif
  1071. endif
  1072.  
  1073.  
  1074. End
  1075.  
  1076. # VV23_KeeperScript ===========================================================
  1077. Begin VV23_KeeperScript
  1078.  
  1079. short done
  1080. short nolore
  1081.  
  1082. if ( MenuMode )
  1083. return
  1084. endif
  1085.  
  1086. if ( done == 1 )
  1087. return
  1088. endif
  1089.  
  1090. if ( done == 0 )
  1091. if ( GetJournalIndex vv23_introductions < 5 )
  1092. if ( GetDistance "Player" < 500 )
  1093. set done to 1
  1094. vv23_keeper->ForceGreeting
  1095. endif
  1096. else
  1097. return
  1098. endif
  1099. endif
  1100.  
  1101. End
  1102.  
  1103. # VV23_KeeperTeleport =========================================================
  1104. Begin VV23_KeeperTeleport
  1105.  
  1106. ; adapted from a script by The Other Felix
  1107.  
  1108. float Timer
  1109. short port
  1110. float oldgamehour
  1111.  
  1112. If ( MenuMode )
  1113. return
  1114. elseif ( GameHour == oldgamehour )
  1115. return
  1116. endif
  1117.  
  1118. set oldgamehour to GameHour
  1119.  
  1120. if ( port == 0 )
  1121. if ( Timer == 0 )
  1122. vv23_keeper->Cast "recall" vv23_keeper
  1123. Set Timer to 1
  1124. elseif ( Timer < 4.5 )
  1125. Set Timer to ( Timer + GetSecondsPassed )
  1126. else
  1127. vv23_keeper->PositionCell 4094.88, 4089.65, 11650, 10800, "Monastery of Order, Keeper's Study"
  1128. player->PositionCell 4092, 3801.41, 11650, 0, "Monastery of Order, Keeper's Study"
  1129. Set Timer to 0
  1130. set port to 1
  1131. endif
  1132. endif
  1133.  
  1134. if ( port == 1 )
  1135. set Timer to Timer + GetSecondsPassed
  1136. if ( Timer > 1 )
  1137. Set Timer to 0
  1138. set port to 0
  1139. StopScript VV23_KeeperTeleport
  1140. endif
  1141. endif
  1142.  
  1143. End
  1144.  
  1145. # VV23_KeeperTeleport_2 =======================================================
  1146. Begin VV23_KeeperTeleport_2
  1147.  
  1148. short done
  1149. short nolore
  1150.  
  1151. if ( MenuMode )
  1152. return
  1153. endif
  1154.  
  1155. if ( done == 1 )
  1156. return
  1157. endif
  1158.  
  1159. if ( done == 0 )
  1160. if ( GetJournalIndex vv23_vault >= 5 )
  1161. set done to 1
  1162. vv23_keeper->PositionCell, 7054.45, 4088.19, 16258, 16200, "Monastery of Order, Vault Entrance"
  1163. vv23_artist->PositionCell, 5072.87, 12657.33, 15346, 5400, "Monastery of Order"
  1164. StopScript VV23_KeeperTeleport_2
  1165. else
  1166. return
  1167. endif
  1168. endif
  1169.  
  1170. End
  1171.  
  1172. # VV23_lightsoff ==============================================================
  1173. Begin VV23_lightsoff
  1174.  
  1175. short doOnce
  1176.  
  1177. if ( doOnce == 0 )
  1178. set doOnce to 1
  1179. endif
  1180.  
  1181. if ( doOnce == 1 )
  1182. if ( VV23_stabbajackspookyoff == 1 )
  1183. disable
  1184.  
  1185. set doOnce to 2
  1186. endif
  1187. endif
  1188.  
  1189. End
  1190.  
  1191. # VV23_MoveLucien =============================================================
  1192. begin VV23_MoveLucien
  1193.  
  1194. if ( GetJournalIndex, "vv23_guilty" == 100 )
  1195. if ( cellChanged == 1 )
  1196. "vv23_lucien"->PositionCell -2701.38, 7561.95, -525.77, 0 "Suran Depths, Crystal Grotto"
  1197. StopScript VV23_MoveLucien
  1198. endif
  1199. endif
  1200.  
  1201. if ( GetJournalIndex, "vv23_guilty" == 115 )
  1202. if ( cellChanged == 1 )
  1203. "vv23_lucien"->PositionCell -2701.38, 7561.95, -525.77, 0 "Suran Depths, Crystal Grotto"
  1204. StopScript VV23_MoveLucien
  1205. endif
  1206. endif
  1207.  
  1208. end
  1209.  
  1210. # VV23_NotArcheologist01 ======================================================
  1211. Begin VV23_NotArcheologist01
  1212.  
  1213. short doOnce
  1214. short greetonce
  1215.  
  1216.  
  1217. if ( doOnce == 0 )
  1218. disable
  1219. endif
  1220.  
  1221. if ( GetJournalIndex "VV23_TGTombIllusion" == 5 )
  1222. if ( doOnce == 0 )
  1223. set doOnce to 1
  1224. enable
  1225. endif
  1226. endif
  1227.  
  1228. if ( GetJournalIndex "VV23_TGTombIllusion" == 5 )
  1229. if ( greetonce == 0 )
  1230. if ( GetDistance player <= 300 )
  1231. ForceGreeting
  1232. set greetonce to -1
  1233. endif
  1234. endif
  1235. endif
  1236.  
  1237. if ( GetJournalIndex "VV23_TGTombIllusion" >= 10 )
  1238. disable
  1239. endif
  1240.  
  1241. End
  1242.  
  1243. # VV23_NotArcheologistOther ===================================================
  1244. Begin VV23_NotArcheologistOther
  1245.  
  1246. short doOnce
  1247.  
  1248.  
  1249. if ( doOnce == 0 )
  1250. disable
  1251. endif
  1252.  
  1253. if ( GetJournalIndex "VV23_TGTombIllusion" == 5 )
  1254. if ( doOnce == 0 )
  1255. set doOnce to 1
  1256. enable
  1257. endif
  1258. endif
  1259.  
  1260. if ( GetJournalIndex "VV23_TGTombIllusion" >= 10 )
  1261. disable
  1262. endif
  1263. End
  1264.  
  1265. # VV23_OrderGreeting ==========================================================
  1266. begin VV23_OrderGreeting
  1267.  
  1268. short once
  1269. short nolore
  1270.  
  1271. if ( MenuMode )
  1272. return
  1273. endif
  1274.  
  1275. if ( once == 1 )
  1276. return
  1277. endif
  1278.  
  1279. if ( GetJournalIndex "vv23_codex_chaos" >= 15 )
  1280. if ( GetJournalIndex "vv23_codex_chaos" <= 25 )
  1281. if ( GetJournalIndex "vv23_codex_order" < 5 )
  1282. if ( once == 0 )
  1283. if ( GetDistance, Player <= 750 )
  1284. forcegreeting
  1285. set once to 1
  1286. endif
  1287. endif
  1288. endif
  1289. endif
  1290. endif
  1291.  
  1292. end
  1293.  
  1294. # VV23_pitfighter01_s =========================================================
  1295. Begin VV23_pitfighter01_s
  1296.  
  1297. ; By Nigedo, with adjustments by JOG to prevent incorrect npc-behaviour by enabling/disabling. This script is for each kid that practices dueling with another kid
  1298. ; It must be altered in each case to include the unique ID of the dueling partner - see below
  1299. ; scripts disable/enable while unseen and timing reworked by abot
  1300.  
  1301. Short nolore
  1302. Short knowyou
  1303. Short OnPCHitMe
  1304. Short removeDay
  1305. Short count
  1306. Short extraBounty
  1307. Short combatState
  1308. short weapvar
  1309. short state
  1310.  
  1311. if ( MenuMode )
  1312. return
  1313. endif
  1314.  
  1315. ;--------------------- Dueling scripting
  1316.  
  1317. If ( chargenstate != -1 )
  1318. return
  1319. endif
  1320.  
  1321. if ( Player->GetWeaponDrawn )
  1322. set weapvar to 1
  1323. elseif ( Player->GetSpellReadied )
  1324. set Weapvar to 1
  1325. else
  1326. set Weapvar to 0
  1327. endif
  1328.  
  1329. If ( GetDistance Player < 256 )
  1330. If ( combatState != 1 )
  1331. If ( weapvar == 1 )
  1332. StopCombat
  1333. Set combatState to 1
  1334. endif
  1335. endif
  1336. Elseif ( GetDistance Player > 1024 )
  1337. If ( combatState != 2 )
  1338. StopCombat
  1339. Set combatState to 2
  1340. Endif
  1341. Else
  1342. If ( combatState != 3 )
  1343. if ( GetTarget Player == 0 )
  1344. StartCombat "VV23_PitFighter2"; **This must be unique ID of dueling partner NPC
  1345. Set combatState to 3
  1346. endif
  1347. Endif
  1348. Endif
  1349.  
  1350. if ( GetTarget Player == 0 )
  1351. SetHealth 87; Prevent dueling from killing NPC
  1352. elseif ( GetTarget Player == 1 )
  1353. return
  1354. endif
  1355.  
  1356. End
  1357.  
  1358. # VV23_pitfighter02_s =========================================================
  1359. Begin VV23_pitfighter02_s
  1360.  
  1361. ; By Nigedo, with adjustments by JOG to prevent incorrect npc-behaviour by enabling/disabling. This script is for each kid that practices dueling with another kid
  1362. ; It must be altered in each case to include the unique ID of the dueling partner - see below
  1363. ; scripts disable/enable while unseen and timing reworked by abot
  1364.  
  1365. Short nolore
  1366. Short knowyou
  1367. Short OnPCHitMe
  1368. Short removeDay
  1369. Short count
  1370. Short extraBounty
  1371. Short combatState
  1372. short weapvar
  1373. short state
  1374.  
  1375. if ( MenuMode )
  1376. return
  1377. endif
  1378.  
  1379. ; Dueling scripting
  1380.  
  1381. If ( chargenstate != -1 )
  1382. return
  1383. endif
  1384.  
  1385. if ( Player->GetWeaponDrawn )
  1386. set weapvar to 1
  1387. elseif ( Player->GetSpellReadied )
  1388. set Weapvar to 1
  1389. else
  1390. set Weapvar to 0
  1391. endif
  1392.  
  1393. If ( GetDistance Player < 256 )
  1394. If ( combatState != 1 )
  1395. If ( weapvar == 1 )
  1396. StopCombat
  1397. Set combatState to 1
  1398. endif
  1399. endif
  1400. Elseif ( GetDistance Player > 1024 )
  1401. If ( combatState != 2 )
  1402. StopCombat
  1403. Set combatState to 2
  1404. Endif
  1405. Else
  1406. If ( combatState != 3 )
  1407. if ( GetTarget Player == 0 )
  1408. StartCombat "VV23_PitFighter1"; **This must be unique ID of dueling partner NPC
  1409. Set combatState to 3
  1410. endif
  1411. Endif
  1412. Endif
  1413.  
  1414. if ( GetTarget Player == 0 )
  1415. Sethealth 87; Prevent dueling from killing NPC
  1416. elseif ( GetTarget Player == 1 )
  1417. return
  1418. endif
  1419.  
  1420. End
  1421.  
  1422. # VV23_quieterhauntedsound ====================================================
  1423. Begin VV23_quieterhauntedsound
  1424.  
  1425. if ( CellChanged == 0 )
  1426. if ( GetSoundPlaying "T_SndEnv_DirenniHaunted" == 0 )
  1427. PlayLoopSound3DVP "T_SndEnv_DirenniHaunted", 0.5, 1.0
  1428. endif
  1429. endif
  1430.  
  1431. end
  1432.  
  1433. # VV23_RiddleDoorScr ==========================================================
  1434. Begin VV23_RiddleDoorScr
  1435.  
  1436. ; note changed the script ID to be unique /abot
  1437.  
  1438. if ( OnActivate )
  1439. if ( GetJournalIndex "vv23_tg_intro" < 17 )
  1440. vv23_riddle_door->ForceGreeting
  1441. elseif ( GetJournalIndex "vv23_tg_intro" >= 17 )
  1442. Activate
  1443. endif
  1444. endif
  1445.  
  1446. End
  1447.  
  1448. # VV23_RiftNotice =============================================================
  1449. begin VV23_RiftNotice
  1450.  
  1451. short done
  1452.  
  1453. if ( done == 1 )
  1454. return
  1455. endif
  1456.  
  1457. if ( OnActivate )
  1458.  
  1459. Journal "VV23_SheoRift" 5
  1460. AddTopic "Open Rift"
  1461. set done to 1
  1462. activate
  1463.  
  1464. endif
  1465.  
  1466. end
  1467.  
  1468. # vv23_RiftSheoOpen_s =========================================================
  1469. Begin vv23_RiftSheoOpen_s
  1470.  
  1471. short doonce
  1472.  
  1473. if ( doOnce == 0 )
  1474. disable
  1475. endif
  1476.  
  1477. if ( GetJournalIndex "vv23_sheorift" == 10 )
  1478. if ( doOnce == 0 )
  1479. set doOnce to 1
  1480. enable
  1481. endif
  1482. endif
  1483.  
  1484. if ( GetJournalIndex "vv23_sheorift" == 15 )
  1485. disable
  1486. endif
  1487.  
  1488. end
  1489.  
  1490.  
  1491.  
  1492. # VV23_RopeClimb ==============================================================
  1493. Begin VV23_RopeClimb
  1494.  
  1495. short doonce
  1496.  
  1497. if ( doOnce == 0 )
  1498. disable
  1499. endif
  1500.  
  1501. if ( GetJournalIndex "vv23_codex_chaos" >= 10 )
  1502. if ( doOnce == 0 )
  1503. set doOnce to 1
  1504. enable
  1505. endif
  1506. endif
  1507.  
  1508. end
  1509.  
  1510.  
  1511.  
  1512. # vv23_sheoriftsounds =========================================================
  1513. begin vv23_sheoriftsounds
  1514.  
  1515. float timer
  1516. short doOnce
  1517.  
  1518. if ( doOnce == 2 )
  1519. return
  1520. endif
  1521.  
  1522. if ( GetJournalIndex "VV23_SheoRift" == 10 )
  1523. if ( CellChanged == 0 )
  1524. if ( GetSoundPlaying "T_SndObj_DirenniCrystal" == 0 )
  1525. PlayLoopSound3DVP "T_SndObj_DirenniCrystal", 0.5, 1.0
  1526. endif
  1527. endif
  1528. endif
  1529.  
  1530. if ( doOnce == 0 )
  1531. set doOnce to 1
  1532. endif
  1533.  
  1534. if ( doOnce == 1 )
  1535. if ( GetJournalIndex "VV23_SheoRift" == 15 )
  1536. stopsound "T_SndObj_DirenniCrystal"
  1537. disable
  1538. set doOnce to 2
  1539. endif
  1540. endif
  1541.  
  1542. end
  1543.  
  1544. # vv23_SoundAxiomGears_s ======================================================
  1545. begin vv23_SoundAxiomGears_s
  1546.  
  1547. if ( CellChanged == 0 )
  1548. if ( GetSoundPlaying "vv23_AxiomGears" == 0 )
  1549. PlayLoopSound3DVP "vv23_AxiomGears", 1.0, 1.0
  1550. endif
  1551. endif
  1552.  
  1553. end
  1554.  
  1555.  
  1556.  
  1557. # vv23_SpiderScript ===========================================================
  1558. Begin vv23_SpiderScript
  1559.  
  1560. float timer
  1561. short once
  1562.  
  1563. if ( MenuMode )
  1564. return
  1565. endif
  1566.  
  1567. if ( once == 1 )
  1568. return
  1569. endif
  1570.  
  1571. if ( GetJournalIndex "vv23_guilty" < 15 )
  1572. disable
  1573. endif
  1574.  
  1575. if ( once == 0 )
  1576. if ( GetJournalIndex "vv23_guilty" >= 15 )
  1577. enable
  1578. set once to 1
  1579. endif
  1580. endif
  1581.  
  1582. End
  1583.  
  1584. # VV23_stabbajackfloat_s ======================================================
  1585. Begin VV23_stabbajackfloat_s
  1586.  
  1587. DontSaveObject
  1588.  
  1589. if ( MenuMode )
  1590. return
  1591. endif
  1592.  
  1593. if ( GetDistance, Player > 2000 )
  1594. return
  1595. endif
  1596.  
  1597. Rotate z, 5
  1598.  
  1599. if ( MenuMode )
  1600. return
  1601. endif
  1602.  
  1603. if ( OnActivate )
  1604. Journal "vv23_codex_chaos" 100
  1605. Journal "vv23_vault" 5
  1606. StartScript VV23_KeeperTeleport_2
  1607. StartScript VV23_AristTeleportVault
  1608. player->additem "vv23_w_TheStabbajack" 1
  1609. PlaySound3D, "Item Weapon Shortblade Up"
  1610. set VV23_StabbajackSpookyOff to 1
  1611. disable
  1612. endif
  1613.  
  1614. end
  1615.  
  1616. end VV23_stabbajackfloat_s
  1617.  
  1618. # VV23_stabbajacksound ========================================================
  1619.  
  1620. begin VV23_stabbajacksound
  1621.  
  1622. float timer
  1623. short doOnce
  1624.  
  1625. if ( doOnce == 2 )
  1626. return
  1627. endif
  1628.  
  1629. if ( timer == 0 )
  1630. set timer to Random 100
  1631. endif
  1632.  
  1633. if ( CellChanged == 0 )
  1634. set timer to timer - GetSecondsPassed
  1635. if ( timer < 1 )
  1636. if ( GetSoundPlaying "T_SndEnv_DirenniHaunted" == 0 )
  1637. PlayLoopSound3DVP "T_SndEnv_DirenniHaunted", 0.5, 1.0
  1638. endif
  1639. endif
  1640. endif
  1641.  
  1642. if ( doOnce == 0 )
  1643. set doOnce to 1
  1644. endif
  1645.  
  1646. if ( doOnce == 1 )
  1647. if ( VV23_StabbajackSpookyOff == 1 )
  1648. stopsound "T_SndEnv_DirenniHaunted"
  1649.  
  1650. set doOnce to 2
  1651. endif
  1652. endif
  1653.  
  1654. end
  1655.  
  1656. # VV23_StoreroomScript ========================================================
  1657. Begin VV23_StoreroomScript
  1658.  
  1659. float timer
  1660.  
  1661. if ( MenuMode )
  1662. return
  1663. endif
  1664.  
  1665. If ( timer < 10 )
  1666. set timer to ( timer + GetSecondsPassed )
  1667. return
  1668. endif
  1669.  
  1670. if ( GetPCCell, "Monastery of Order" == 1 )
  1671. if ( GetDistance "Player" < 750 )
  1672. if ( GetJournalIndex "vv23_guilty" < 5 )
  1673. MessageBox "Is someone out there? Help! I'm trapped in this storeroom!"
  1674. set timer to 0
  1675. else
  1676. return
  1677. endif
  1678. endif
  1679. endif
  1680.  
  1681. End
  1682.  
  1683. # VV23_TGBook =================================================================
  1684. Begin VV23_TGBook
  1685.  
  1686. short doOnce
  1687. short done
  1688.  
  1689. if ( doOnce == 0 )
  1690. disable
  1691. endif
  1692.  
  1693. if ( GetJournalIndex "VV23_TGInanius" > 1 )
  1694. if ( doOnce == 0 )
  1695. set doOnce to 1
  1696. enable
  1697. endif
  1698. endif
  1699.  
  1700. if ( OnActivate )
  1701. if ( done == 0 )
  1702. Journal "VV23_TGInanius" 15
  1703. set done to 1
  1704. player->additem VV23_Misc_BookofMagic 1
  1705. journal VV23_TGInanius 15
  1706. StopSound "T_SndEnv_DirenniHaunted"
  1707. disable
  1708. endif
  1709. endif
  1710.  
  1711. End
  1712.  
  1713. # VV23_towerupperlock =========================================================
  1714. Begin VV23_towerupperlock
  1715.  
  1716. if ( OnActivate )
  1717. if ( GetJournalIndex "vv23_tg_intro" < 17 )
  1718. playsound "lockeddoor"
  1719. return
  1720. elseif ( GetJournalIndex "vv23_tg_intro" >= 17 )
  1721. Activate
  1722. endif
  1723. endif
  1724.  
  1725. End
  1726.  
  1727. # vv23_Trickwall1_s ===========================================================
  1728. begin vv23_Trickwall1_s
  1729.  
  1730. float timer
  1731. short state
  1732.  
  1733. if ( MenuMode )
  1734. return
  1735. endif
  1736.  
  1737. if ( OnActivate )
  1738. if ( state == 0 )
  1739. if ( Player->GetItemCount "VV23_vivecpoetry" == 0 )
  1740. playSound3D "vv23_DoorVivec"
  1741. elseif ( Player->GetItemCount "VV23_vivecpoetry" > 0 )
  1742. MessageBox "The Wall of Mastery recognizes your grasp of poetry."
  1743. set state to 1
  1744. set timer to 10 ;edit this to make the wall move longer
  1745. playSound3D "Stone Door Open 1"
  1746. endif
  1747. endif
  1748. endif
  1749.  
  1750. if ( state == 1 )
  1751. set timer to timer - GetSecondsPassed
  1752. if ( timer > 0 )
  1753. Move Z -64 ;edit this to make the wall move faster
  1754. else
  1755. set state to 2
  1756. endif
  1757. endif
  1758.  
  1759. end
  1760.  
  1761. # vv23_Trickwall2_s ===========================================================
  1762. begin vv23_Trickwall2_s
  1763.  
  1764. float timer
  1765. short state
  1766.  
  1767. if ( MenuMode )
  1768. return
  1769. endif
  1770.  
  1771. if ( OnActivate )
  1772. if ( state == 0 )
  1773. if ( Player->GetItemCount "AB_IngFlor_Pomegranate01" == 0 )
  1774. playSound3D "vv23_DoorAlma"
  1775. elseif ( Player->GetItemCount "AB_IngFlor_Pomegranate01" > 0 )
  1776. MessageBox "The Wall of Mercy recognizes the pomegranate you carry."
  1777. set state to 1
  1778. set timer to 10 ;edit this to make the wall move longer
  1779. playSound3D "Stone Door Open 1"
  1780. endif
  1781. endif
  1782. endif
  1783.  
  1784. if ( state == 1 )
  1785. set timer to timer - GetSecondsPassed
  1786. if ( timer > 0 )
  1787. Move Z -64 ;edit this to make the wall move faster
  1788. else
  1789. set state to 2
  1790. endif
  1791. endif
  1792.  
  1793. end
  1794.  
  1795. # vv23_Trickwall3_s ===========================================================
  1796. begin vv23_Trickwall3_s
  1797.  
  1798. float timer
  1799. short state
  1800.  
  1801. if ( MenuMode )
  1802. return
  1803. endif
  1804.  
  1805. if ( OnActivate )
  1806. if ( state == 0 )
  1807. if ( Player->GetItemCount "VV23_Misc_ChiselGlass" == 0 )
  1808. playSound3D "vv23_DoorSotha"
  1809. elseif ( Player->GetItemCount "VV23_Misc_ChiselGlass" > 0 )
  1810. MessageBox "The Wall of Mystery recognizes the chisel you carry."
  1811. set state to 1
  1812. set timer to 10 ;edit this to make the wall move longer
  1813. playSound3D "Stone Door Open 1"
  1814. endif
  1815. endif
  1816. endif
  1817.  
  1818. if ( state == 1 )
  1819. set timer to timer - GetSecondsPassed
  1820. if ( timer > 0 )
  1821. Move Z -64 ;edit this to make the wall move faster
  1822. else
  1823. set state to 2
  1824. endif
  1825. endif
  1826.  
  1827. end
  1828.  
  1829. # VV23_VaultCombat ============================================================
  1830. Begin VV23_VaultCombat
  1831.  
  1832. short state
  1833.  
  1834. if ( MenuMode )
  1835. return
  1836. endif
  1837.  
  1838. if ( GetJournalIndex "vv23_vault" == 10 )
  1839. if ( state == 0 )
  1840. vv23_keeper->StartCombat Player
  1841. vv23_Cre_Golem_Vault_01->StartCombat Player
  1842. vv23_Cre_Golem_Vault_02->StartCombat vv23_artist
  1843. set state to 1
  1844. elseif ( state == 1 )
  1845. if ( vv23_artist->GetHealth < 100 )
  1846. vv23_artist->SetHealth 100
  1847. endif
  1848. if ( vv23_keeper->GetHealth < 100 )
  1849. vv23_keeper->SetFatigue -5000
  1850. vv23_keeper->SetHealth 30
  1851. if ( GetJournalIndex "vv23_vault" < 20 )
  1852. Journal "vv23_vault" 20
  1853. endif
  1854. endif
  1855. endif
  1856. endif
  1857.  
  1858. if ( GetJournalIndex "vv23_vault" == 15 )
  1859. if ( state == 0 )
  1860. vv23_Cre_Golem_Vault_01->StartCombat vv23_artist
  1861. vv23_Cre_Golem_Vault_02->StartCombat vv23_artist
  1862. set state to 1
  1863. elseif ( state == 1 )
  1864. vv23_artist->SetHealth 100
  1865. MessageBox "The Artist: No, you shall not take me! Farewell, my love, until we meet again."
  1866. StartScript VV23_ArtistTeleport
  1867. if ( GetJournalIndex "vv23_vault" < 25 )
  1868. Journal "vv23_vault" 25
  1869. endif
  1870. endif
  1871. endif
  1872.  
  1873. End
  1874.  
  1875. # vv23_VaultDoor_s ============================================================
  1876. begin vv23_VaultDoor_s
  1877.  
  1878. if ( MenuMode )
  1879. return
  1880. endif
  1881.  
  1882. if ( OnActivate )
  1883. if ( Player->GetItemCount "vv23_w_TheStabbajack" < 1 )
  1884. MessageBox "The shield is impenetrable."
  1885. Return
  1886. else
  1887. MessageBox "The shield dissipates when pierced by the chaotic energy of the Fragment of The Wabbajack"
  1888. PlaySound3DVP "alteration area" 1.0 1.0
  1889. Disable
  1890. endif
  1891. endif
  1892.  
  1893. end
  1894.  
  1895. # vv23_VaultDoor_s_02 =========================================================
  1896. begin vv23_VaultDoor_s_02
  1897.  
  1898. if ( MenuMode )
  1899. return
  1900. endif
  1901.  
  1902. if ( OnActivate )
  1903. if ( GetJournalIndex "vv23_vault" < 20 )
  1904. MessageBox "The shield is impenetrable."
  1905. Return
  1906. else
  1907. if ( Player->GetItemCount "vv23_w_TheStabbajack" < 1 )
  1908. MessageBox "The shield is impenetrable."
  1909. Return
  1910. else
  1911. MessageBox "The shield dissipates when pierced by the chaotic energy of the Fragment of The Wabbajack"
  1912. PlaySound3DVP "alteration area" 1.0 1.0
  1913. Disable
  1914. endif
  1915. endif
  1916. endif
  1917.  
  1918. end
  1919.  
  1920. # vv23_VaultDoorExit_s ========================================================
  1921. Begin vv23_VaultDoorExit_s
  1922.  
  1923. Short DoOnce
  1924.  
  1925. if ( OnActivate )
  1926. if ( DoOnce == 0 )
  1927. if ( GetJournalIndex "vv23_vault" == 100 )
  1928. vv23_artist->PositionCell 4094.88, 4089.65, 11650, 90, "Monastery of Order, Keeper's Study"
  1929. Activate
  1930. set DoOnce to 1
  1931. elseif ( GetJournalIndex "vv23_vault" == 150 )
  1932. vv23_keeper->PositionCell 4094.88, 4089.65, 11650, 90, "Monastery of Order, Keeper's Study"
  1933. Activate
  1934. set DoOnce to 1
  1935. endif
  1936. else
  1937. Activate
  1938. endif
  1939. endif
  1940.  
  1941.  
  1942. End
  1943.  
  1944. # VV23_warpexit ===============================================================
  1945. begin VV23_warpexit
  1946.  
  1947. if ( MenuMode )
  1948. return
  1949. endif
  1950.  
  1951. if ( GetDistance player <= 500 )
  1952. PlaySound3DVP "vv23_AxiomTeleport" 1.0 1.0
  1953. Player->setpos z -9312
  1954. endif
  1955.  
  1956. end
  1957.  
  1958. # VV_dwrvcoin05_s =============================================================
  1959. Begin VV_dwrvcoin05_s
  1960.  
  1961. Short State
  1962.  
  1963. if ( MenuMode )
  1964. Return
  1965. endif
  1966.  
  1967. if ( State == 1 )
  1968. if ( GetDisabled )
  1969. SetDelete 1
  1970. set State to 2
  1971. endif
  1972. endif
  1973.  
  1974. if ( OnActivate )
  1975. Player->AddItem "misc_dwrv_coin00" 5
  1976. PlaySound "Item Gold Up"
  1977. Disable
  1978. set State to 1
  1979. endif
  1980.  
  1981. End
  1982.  
  1983. # VV_dwrvcoin10_s =============================================================
  1984. Begin VV_dwrvcoin10_s
  1985.  
  1986. Short State
  1987.  
  1988. if ( MenuMode )
  1989. Return
  1990. endif
  1991.  
  1992. if ( State == 1 )
  1993. if ( GetDisabled )
  1994. SetDelete 1
  1995. set State to 2
  1996. endif
  1997. endif
  1998.  
  1999. if ( OnActivate )
  2000. Player->AddItem "misc_dwrv_coin00" 10
  2001. PlaySound "Item Gold Up"
  2002. Disable
  2003. set State to 1
  2004. endif
  2005.  
  2006. End
  2007.  
  2008.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement