Scripts

TR_m7_Narsis_ExchangeLedgerSc

TR_Mainland.esm
Variables 1
Local Variables
state
Source
1begin TR_m7_Narsis_ExchangeLedgerSc 2 3short state 4 5; Opens the book in a state preventing pickup 6 7if ( OnActivate ) 8 if ( T_Glob_StockStarted > 1 ) ; Companies are still being reset, wait until they're done 9 return 10 endif 11 player->additem "TR_m7_Narsis_ExchangeLedger" 1 12 player->equip "TR_m7_Narsis_ExchangeLedger" 13 player->removeitem "TR_m7_Narsis_ExchangeLedger" 1 14 set state to 1 15 return ; On vanilla, MenuMode is 0 for the first frame of reading a book 16endif 17 18if ( state == 0 ) 19 return 20endif 21 22; On vanilla, closing the book after reading it this way puts you into a bugged state 23; No menu is open, but it treats you as if you're in MenuMode 24if ( MenuMode ) 25 ; This command fixes the bugged state, but doesn't close the book 26 ; Call it every frame until player is no longer in MenuMode 27 MenuTest 0 28 return 29endif 30 31set state to 0 32 33end