Scripts

TR_m3_Ulka_script

TR_Mainland.esm
Variables 13
Local Variables
TR_Map
control
controlQ
wager
ulkaRoll
winState
gauntlets
gloves
addRemaining
day
canBet
T_Local_NPC
NoLore
Source
1Begin TR_m3_Ulka_script 2 3; Script on NPC "TR_m3_Ulka gra-Bol", involved in quest 4; TR_m3_OE_BreadcrumbTrailGloves. 5 6short TR_Map 7short control 8short controlQ 9short wager 10short ulkaRoll 11short winState ; 0 - tie, <0 - player, >0 Ulka 12short gauntlets 13short gloves 14short addRemaining 15short day 16short canBet 17short T_Local_NPC 18short NoLore 19 20if ( MenuMode ) 21 if ( GetItemCount gold_001 >= 25 ) 22 set canBet to 1 23 else 24 set canBet to 0 25 endif 26endif 27 28if ( CellChanged ) 29 if ( day != 0 ) 30 if ( GetItemCount gold_001 < 25 ) 31 while ( day < DaysPassed ) 32 AddItem gold_001 5 33 set day to ( day + 1 ) 34 endwhile 35 endif 36 endif 37 set day to DaysPassed 38endif 39 40if ( addRemaining == -1 ) 41 return 42endif 43 44if ( GetJournalIndex TR_m3_OE_BreadcrumbTrailGloves >= 20 ) 45 set addRemaining to 1 46elseif ( OnDeath ) 47 set addRemaining to 1 48endif 49 50if ( addRemaining ) 51 while ( gauntlets > 0 ) 52 AddItem "imperial left gauntlet" 1 53 AddItem "imperial right gauntlet" 1 54 set gauntlets to ( gauntlets - 1 ) 55 endwhile 56 while ( gloves > 0 ) 57 AddItem extravagant_glove_left_01 1 58 AddItem extravagant_glove_right_01 1 59 set gloves to ( gloves - 1 ) 60 endwhile 61 set addRemaining to -1 62endif 63 64if ( TR_Map == 3 ) 65 return 66endif 67 68set TR_Map to 3 69 70End