Added stake select to tavern games
This commit is contained in:
parent
5cba6f3c76
commit
fdd9fa86ec
BIN
Input fallback.esp
Normal file
BIN
Input fallback.esp
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
Message Property PlayerWon Auto
|
||||
Message Property _SAG_SelectBetMessage Auto
|
||||
|
@ -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
|
||||
ObjectReference Property BeeHive Auto
|
||||
|
Loading…
Reference in New Issue
Block a user