Scripts

TR_m7_NPC_DiceGambler

TR_Mainland.esm
Variables 18
Local Variables
TR_Map
control
controlQ
TR_dicegambler
TR_36bet
TR_36losstrack
TR_36playscore
TR_36opposcore
TR_36playroll1
TR_36playroll2
TR_36opporoll1
TR_36opporoll2
TR_36playstand
TR_36oppostand
TR_36playluck
TR_36goldreserve
T_Local_NPC
NoLore
Source
1Begin TR_m7_NPC_DiceGambler 2; This short script is there to allow dialogue to be filtered on the TR_Map local variable, 3; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be 4; appropriate to the location the NPC is. 5 6short TR_Map 7short control 8short controlQ 9 10;variables for the "game of thirty-six" 11 12short TR_dicegambler ;this variable gives the NPC access to the game 13short TR_36bet ;this marks the bet size - 1 for 10 gold, 2 for 50 gold, 3 for 100 gold 14short TR_36losstrack ;this tracks how many times the opponent has lost 15short TR_36playscore ;this tracks the player's total score 16short TR_36opposcore ;this tracks the opponent's total score 17short TR_36playroll1 ;this tracks the player's first die's roll 18short TR_36playroll2 ;this tracks the player's second die's roll 19short TR_36opporoll1 ;this tracks the opponent's first die's roll 20short TR_36opporoll2 ;this tracks the opponent's second die's roll 21short TR_36playstand ;the player has stood 22short TR_36oppostand ;the opponent has stood 23short TR_36playluck ;the player's luck 24short TR_36goldreserve ;the gold the NPC has left 25short T_Local_NPC 26short NoLore 27 28;end of gambling shorts 29 30if ( TR_36goldreserve != ( GetItemCount gold_001 ) ) 31 set TR_36goldreserve to ( GetItemCount gold_001 ) 32endif 33 34if ( TR_Map == 7 ) 35 return 36endif 37 38set TR_Map to 7 39set TR_36goldreserve to ( GetItemCount gold_001 ) 40 41End