Scripts

TR_m7_Ns_MovingHouse_SkullSC

TR_Mainland.esm
Variables 5
Local Variables
Control
onPCDrop
onPCAdd
ControlQ
doonce
Source
1begin TR_m7_Ns_MovingHouse_SkullSC 2 3short Control 4short onPCDrop 5short onPCAdd 6short ControlQ 7short doonce 8 9if ( onActivate ) ; Makes it so the player cannot pick up the skull again after putting it in the appropriate location, which would break immersion 10 if ( Control == 3 ) 11 return 12 elseif ( getjournalindex "TR_m7_Ns_MovingHouse" < 20 ) ; Makes it so you can't pick up the skull before talking with Uhammaku which would break the quest 13 set "TR_m7_CR_Uhammaku".control to 1 14 "TR_m7_CR_Uhammaku"->Forcegreeting 15 return 16 else 17 Activate 18 endif 19endif 20 21if ( Control == 3 ) ; Once quest is complete shorts the script 22 return 23endif 24 25if ( getjournalindex "TR_m7_Ns_MovingHouse" >= 32 ) ; if pacified makes it so the skull script shorts 26 set Control to 3 27endif 28 29if ( menumode == 1 ) ; Make sure this doesn't run with menu's up, needed to prevent onPCDrop weirdness 30 return 31endif 32 33if ( onPCDrop ) ; When putting the skull down - script to determine if it's in the correct location, if not feedback to player 34 if ( getpccell "Narsis, Catacombs: Lost Burial" == 1 ) 35 if ( getpos x > -153 ) 36 if ( getpos x < -64 ) 37 if ( getpos y > -1668 ) 38 if ( getpos y < -1400 ) 39 "TR_m7_Ns_MovingHouseSuFX"->placeatme "T_Glb_Var_SummonFX" 1 0 0 ; Summoning VFX for effect 40 "TR_m7_Cr_Uhammaku"->enable ; Enable Uhammaku after positioncell 41 set onPCDrop to 0 42 set Control to 3 43 else 44 messagebox "Nothing happens." 45 set onPCDrop to 0 46 endif 47 else 48 messagebox "Nothing happens." 49 set onPCDrop to 0 50 endif 51 else 52 messagebox "Nothing happens." 53 set onPCDrop to 0 54 endif 55 else 56 messagebox "Nothing happens." 57 set onPCDrop to 0 58 endif 59 else 60 set onPCDrop to 0 61 endif 62endif 63 64if ( ControlQ ) ; Disable Uhammaku when picking up the skull 65 if ( doonce == 0 ) 66 "TR_m7_Cr_Uhammaku"->placeatme "T_Glb_Var_SummonFX" 1 0 0 67 "TR_m7_Cr_Uhammaku"->disable 68 "TR_m7_Cr_Uhammaku"->positioncell 62 -1730 -125 19200 "Narsis, Catacombs: Lost Burial" ; corresponding MARK is TR_m7_MARK_Uhammaku 69 set doonce to 1 70 else 71 return 72 endif 73endif 74 75if ( onPCAdd ) 76 set onPCadd to 0 77 set ControlQ to 1 78endif 79 80end