diff --git a/Input fallback.esp b/Input fallback.esp new file mode 100644 index 00000000..253988e2 Binary files /dev/null and b/Input fallback.esp differ diff --git a/scripts/_00e_fs_nq02_functions.pex b/scripts/_00e_fs_nq02_functions.pex index 12d4cfb2..84d729bd 100644 Binary files a/scripts/_00e_fs_nq02_functions.pex and b/scripts/_00e_fs_nq02_functions.pex differ diff --git a/scripts/_sag_activ_diceblackjackmainsscript.pex b/scripts/_sag_activ_diceblackjackmainsscript.pex index 072f8648..eadef218 100644 Binary files a/scripts/_sag_activ_diceblackjackmainsscript.pex and b/scripts/_sag_activ_diceblackjackmainsscript.pex differ diff --git a/scripts/_sag_dicesgame_mainscript.pex b/scripts/_sag_dicesgame_mainscript.pex index 503f3692..d30262c3 100644 Binary files a/scripts/_sag_dicesgame_mainscript.pex and b/scripts/_sag_dicesgame_mainscript.pex differ diff --git a/scripts/_sag_playcards_mainscript.pex b/scripts/_sag_playcards_mainscript.pex index 4729fd2a..39c5de6b 100644 Binary files a/scripts/_sag_playcards_mainscript.pex and b/scripts/_sag_playcards_mainscript.pex differ diff --git a/source/scripts/_00e_fs_nq02_functions.psc b/source/scripts/_00e_fs_nq02_functions.psc index 0e093fcd..98727425 100644 --- a/source/scripts/_00e_fs_nq02_functions.psc +++ b/source/scripts/_00e_fs_nq02_functions.psc @@ -942,7 +942,7 @@ int Function Step01() ; place your bet endif endif - If PlayerBet > MaxBet || PlayerBet == 0 + If PlayerBet > MaxBet || PlayerBet <= 0 Step01() RETURN 0 EndIf diff --git a/source/scripts/_sag_activ_diceblackjackmainsscript.psc b/source/scripts/_sag_activ_diceblackjackmainsscript.psc index 380084dc..ff1e078d 100644 --- a/source/scripts/_sag_activ_diceblackjackmainsscript.psc +++ b/source/scripts/_sag_activ_diceblackjackmainsscript.psc @@ -52,14 +52,39 @@ Function Step01() OpponentScore = 0 if PlayerRef.GetItemcount(gold001) < Opponent.GetReference().GetItemCount(gold001) - MaxBet = PlayerRef.GetItemcount(gold001) /2 + MaxBet = PlayerRef.GetItemcount(gold001) / 2 elseif PlayerRef.GetItemcount(gold001) >= Opponent.GetReference().GetItemCount(gold001) - MaxBet = Opponent.GetReference().GetItemcount(gold001) /2 + MaxBet = Opponent.GetReference().GetItemcount(gold001) / 2 endif - PlayerBet = (((self as QUEST) as FORM) as UILIB_1).ShowTextInput(PlaceYourBet .GetName()+MaxBet, MaxBet) as int + if false && EnderalFunctions.TextInputEnabled() + PlayerBet = (((self as QUEST) as FORM) as UILIB_1).ShowTextInput(PlaceYourBet .GetName()+MaxBet, MaxBet) as int + else + float fPrevValue = PlayerRef.GetActorValue("Variable08") + PlayerRef.SetActorValue("Variable08", MaxBet) + int iBet = _SAG_SelectBetMessage.Show() + PlayerRef.SetActorValue("Variable08", fPrevValue) + + if iBet == 0 + PlayerBet = 50 + elseif iBet == 1 + PlayerBet = 100 + elseif iBet == 2 + PlayerBet = 200 + elseif iBet == 3 + PlayerBet = 350 + elseif iBet == 4 + PlayerBet = 500 + elseif iBet == 5 + PlayerBet = 750 + elseif iBet == 6 + PlayerBet = 1000 + else + PlayerBet = 0 + endif + endif - if PlayerBet == 0 + if PlayerBet <= 0 QuitGame() elseif PlayerBet > MaxBet Step01() @@ -329,6 +354,7 @@ GlobalVariable Property _SAG_Activ_BJ_GoldWon Auto GlobalVariable Property _SAG_Activ_BJ_Victories Auto Message Property PlaceYourBet Auto +Message Property _SAG_SelectBetMessage Auto String s_chargeninitialtext Int OpponentTHrowing = 0 Int PlayerTHrowing = 0 @@ -362,26 +388,3 @@ int MaxDice02 int MaxDice01 Bool OpponentPlayed = FALSE Bool PlayerPlayed = FALSE - - - - - - - - - - - - - - - - - - - - - - - diff --git a/source/scripts/_sag_dicesgame_mainscript.psc b/source/scripts/_sag_dicesgame_mainscript.psc index 2c4403c2..9320bef4 100644 --- a/source/scripts/_sag_dicesgame_mainscript.psc +++ b/source/scripts/_sag_dicesgame_mainscript.psc @@ -54,16 +54,45 @@ Function Step01() ORandomDice2.Disable() PRandomDice1.Disable() PRandomDice2.Disable() -if PlayerRef.GetItemCount(Gold001) <= Opponent.GetReference().GetItemCount(Gold001) - MaxBet = (PlayerRef.GetItemCount(Gold001)/2) as INT -elseif PlayerRef.GetItemCount(Gold001) > Opponent.GetReference().GetItemCount(Gold001) - MaxBet = (Opponent.GetReference().GetItemCount(Gold001)/2) as INT -endif - PlayerBet = (((self as Quest) as form) as uilib_1).ShowTextInput(PlaceYourBet.GetName() + MaxBet as String, MaxBet as String) as Int -if PlayerBet > MaxBet || PlayerBet == 0 - Step01() - Return -endif + + if PlayerRef.GetItemCount(Gold001) <= Opponent.GetReference().GetItemCount(Gold001) + MaxBet = (PlayerRef.GetItemCount(Gold001)/2) as INT + elseif PlayerRef.GetItemCount(Gold001) > Opponent.GetReference().GetItemCount(Gold001) + MaxBet = (Opponent.GetReference().GetItemCount(Gold001)/2) as INT + endif + + if false && EnderalFunctions.TextInputEnabled() + PlayerBet = (((self as Quest) as form) as uilib_1).ShowTextInput(PlaceYourBet.GetName() + MaxBet as String, MaxBet as String) as Int + else + float fPrevValue = PlayerRef.GetActorValue("Variable08") + PlayerRef.SetActorValue("Variable08", MaxBet) + int iBet = _SAG_SelectBetMessage.Show() + PlayerRef.SetActorValue("Variable08", fPrevValue) + + if iBet == 0 + PlayerBet = 50 + elseif iBet == 1 + PlayerBet = 100 + elseif iBet == 2 + PlayerBet = 200 + elseif iBet == 3 + PlayerBet = 350 + elseif iBet == 4 + PlayerBet = 500 + elseif iBet == 5 + PlayerBet = 750 + elseif iBet == 6 + PlayerBet = 1000 + else + QuitGame() + endif + endif + + if PlayerBet > MaxBet || PlayerBet <= 0 + Step01() + Return + endif + OpponentBet = PlayerBet Step02() EndFunction @@ -172,11 +201,13 @@ Function QuitGame() if Opponent.GetReference().IsDisabled() Opponent.GetReference().Enable() endif -if initialFurn - PlayerRef.MoveTo(initialFurn) -else - PlayerRef.MoveTo(PlayerPosition) -endif + + if initialFurn + PlayerRef.MoveTo(initialFurn) + else + PlayerRef.MoveTo(PlayerPosition) + endif + Game.EnablePlayerControls() game.SetInChargen(false, false, false) Opponent.Clear() @@ -184,4 +215,5 @@ EndFunction Message Property PlayAgain Auto Message Property PlayerLost Auto -Message Property PlayerWon Auto \ No newline at end of file +Message Property PlayerWon Auto +Message Property _SAG_SelectBetMessage Auto diff --git a/source/scripts/_sag_playcards_mainscript.psc b/source/scripts/_sag_playcards_mainscript.psc index 8ae847ba..9e86f260 100644 --- a/source/scripts/_sag_playcards_mainscript.psc +++ b/source/scripts/_sag_playcards_mainscript.psc @@ -44,8 +44,35 @@ int Function Step01() ; place your bet else MaxBet = (PlayerRef.GetItemCount(Gold001))/2 endif - PlayerBet = (((self as QUEST) as FORM) as UILIB_1).ShowTextInput(PlaceYourBet .GetName()+MaxBet, MaxBet) as int - if PlayerBet == 0 + + if false && EnderalFunctions.TextInputEnabled() + PlayerBet = (((self as QUEST) as FORM) as UILIB_1).ShowTextInput(PlaceYourBet .GetName()+MaxBet, MaxBet) as int + else + float fPrevValue = PlayerRef.GetActorValue("Variable08") + PlayerRef.SetActorValue("Variable08", MaxBet) + int iBet = _SAG_SelectBetMessage.Show() + PlayerRef.SetActorValue("Variable08", fPrevValue) + + if iBet == 0 + PlayerBet = 50 + elseif iBet == 1 + PlayerBet = 100 + elseif iBet == 2 + PlayerBet = 200 + elseif iBet == 3 + PlayerBet = 350 + elseif iBet == 4 + PlayerBet = 500 + elseif iBet == 5 + PlayerBet = 750 + elseif iBet == 6 + PlayerBet = 1000 + else + PlayerBet = 0 + endif + endif + + if PlayerBet <= 0 FinishGameAndClearUp() elseif PlayerBet > MaxBet Step01() @@ -470,6 +497,7 @@ Actor Property Commentator Auto Actor Property PlayerRef Auto Message Property PlaceYourBet Auto +Message Property _SAG_SelectBetMessage Auto GlobalVariable Property ExAequo Auto GlobalVariable Property WonGames Auto @@ -531,4 +559,4 @@ Sound Property _00E_TavernGames_DiceRollM Auto MiscObject Property Gold001 Auto -ObjectReference Property BeeHive Auto \ No newline at end of file +ObjectReference Property BeeHive Auto