Scripts

TR_m4_TT_DonationBoxScript

TR_Mainland.esm
Variables 2
Local Variables
doOnce
checkGold
Source
1Begin TR_m4_TT_DonationBoxScript 2 3; Script on container TR_m4_And_Temple_Coffer for the Bal Foyen Temple 4; questline. This script is in charge of moving some Temple NPCs as well. 5 6short doOnce 7short checkGold 8;global long TR_m4_TT_And_GoldCounter 9 10if ( OnActivate ) 11 if ( checkGold == 0 ) 12 set checkGold to 1 13 endif 14 Activate 15 Return 16endif 17 18if ( checkGold == 1 ) 19 if ( MenuMode == 0 ) 20 set checkGold to 0 21 set TR_m4_TT_And_GoldCounter to ( getitemcount gold_001 ) 22; MessageBox "Gold amount %G" TR_m4_TT_And_GoldCounter 23 endif 24endif 25 26if ( doOnce == 0 ) 27 if ( GetJournalIndex TR_m4_TT_WellnessCheck >= 30 ) 28 TR_m4_TT_Ravur_Othravel->PositionCell 5700 -130000 200 2500 "Bal Foyen" 29 TR_m4_TT_Ravur_Othravel->AIWander 0 0 0 0 30 set doOnce to 1 31 endif 32elseif ( doOnce == 1 ) 33 if ( GetJournalIndex TR_m4_TT_KitchenSupplies >= 90 ) 34 TR_m4_TT_Ravur_Othravel->PositionCell 3940 4349 14753 15000 "Bal Foyen, Temple" 35 TR_m4_TT_Ravur_Othravel->AIWander 0, 0, 5, 0, 40, 0, 10, 0, 5, 5, 25, 5 36 Set TR_m4_TT_Ravur_Othravel.controlQ to 5 37 set doOnce to 2 38 endif 39elseif ( doOnce == 2 ) 40 if ( GetJournalIndex TR_m4_TT_TroublesomeOrc > 20 ) 41 if ( CellChanged ) 42 ; move the pilgrim on the Bodrum bridge out of harm's way 43 TR_m4_TT_Tevuren_Galdar->PositionCell -380 522 -255 1920 "Sinramen Monastery" 44 TR_m4_TT_Tevuren_Galdar->AIWander 0 0 0 25 10 0 10 20 5 10 20 0 45 set doOnce to 3 46 endif 47 endif 48elseif ( doOnce == 3 ) 49 if ( GetJournalIndex TR_m4_TT_Forgiveness >= 100 ) 50 if ( CellChanged ) 51 set doOnce to 4 52 SetPos X 3772.126 53 SetPos Y 4014.329 54 SetPos Z 14600.051 55 SetAngle Z 0 56 endif 57 endif 58elseif ( doOnce == 4 ) 59 if ( TR_m4_TT_AndothrenFinale ) 60 ; the coins grow legs... 61 set doOnce to 5 62 PositionCell 4852.568 3661.374 15499.300 5502 "Omaynis, Ulmon Vathri's House" 63 endif 64endif 65 66End