TFQp_bet_ballsAndCups
This commit is contained in:
parent
d2039a2aad
commit
c6b15ba434
151
public_scripts/TFQp_bet_ballsAndCups.tf
Normal file
151
public_scripts/TFQp_bet_ballsAndCups.tf
Normal file
@ -0,0 +1,151 @@
|
||||
# TFQuests
|
||||
|
||||
script {
|
||||
name "TFQp_bet_ballsAndCups-v0.1"
|
||||
description "Find the ball to win a prize"
|
||||
icon "@GameData/TB/cc/badges/dice-fire.svg"
|
||||
owner 18
|
||||
public
|
||||
deployable
|
||||
|
||||
overrides {
|
||||
1 "<center><h2>I challenge thee to a duel of balls and cups!<br>guess where the ball hides and claim your prize.</h2></center>"
|
||||
2 "<h3>By Thor's hammer, I accept!</h3>"
|
||||
3 "<center><h2>The cups are shuffled and moved, hiding the ball's true location.<br>Watch closely, for only the keenest eye will find it!</h2></center>"
|
||||
4 "Alas, I must decline the challenge this time."
|
||||
5 "<center><h2>Understood! Another time, then.<br>Until then, may your path be clear and your days full of fortune!</h2></center>"
|
||||
6 "<center><h2>Now comes the moment of truth.<br>Choose your cup wisely and reveal where the ball lies hidden!</h2></center>"
|
||||
7 "<center><h2>The cup is beeing lifted...<br>Did your choice uncover the hidden ball?</h2></center>"
|
||||
8 "<h3>Perhaps we should rest ourselves</h3>"
|
||||
|
||||
local "pledge" 100000000
|
||||
local "award" 25000000
|
||||
}
|
||||
|
||||
precondition "Gold Reserve" gold >= local "pledge"
|
||||
|
||||
reserves { owner gold local "award" }
|
||||
|
||||
state "init" {
|
||||
text "
|
||||
${1}<br>
|
||||
<center>
|
||||
...............................<br>
|
||||
Gold pledge: <strong>${gold:pledge}</strong><br>
|
||||
Chance of Win: <strong>1 in 3</strong><br>
|
||||
Prize: <strong>${gold:award}</strong><br>
|
||||
...............................<br>
|
||||
Gold Won: <strong>${gold:wg}</strong><br>
|
||||
Gold Lost: <strong>${gold:lg}</strong><br>
|
||||
</center>
|
||||
<br><br>
|
||||
"
|
||||
|
||||
choice {
|
||||
enabled gold >= local "pledge"
|
||||
text "${2}"
|
||||
|
||||
reserves {
|
||||
player gold local "pledge"
|
||||
owner gold local "award"
|
||||
}
|
||||
|
||||
selected text "${3}"
|
||||
next state "play"
|
||||
}
|
||||
|
||||
choice {
|
||||
enabled gold >= local "pledge"
|
||||
text "${4}"
|
||||
|
||||
selected text "
|
||||
${5}<br>
|
||||
<center>
|
||||
...............................<br>
|
||||
Gold Won: <strong>${gold:wg}</strong><br>
|
||||
Gold Lost: <strong>${gold:lg}</strong><br>
|
||||
</center>
|
||||
<br><br>
|
||||
"
|
||||
|
||||
next state ""
|
||||
}
|
||||
|
||||
choice {
|
||||
enabled gold < local "pledge"
|
||||
text "${9}"
|
||||
|
||||
selected text "
|
||||
${5}<br>
|
||||
<center>
|
||||
...............................<br>
|
||||
Gold Won: <strong>${gold:wg}</strong><br>
|
||||
Gold Lost: <strong>${gold:lg}</strong><br>
|
||||
</center>
|
||||
<br><br>
|
||||
"
|
||||
|
||||
next state ""
|
||||
}
|
||||
}
|
||||
|
||||
state "play" {
|
||||
text "${6}<br><br>"
|
||||
|
||||
init { set local "wCup" random 2 }
|
||||
|
||||
choice {
|
||||
text "1"
|
||||
|
||||
actions {
|
||||
if (local "wCup" == 0) {
|
||||
award gold local "award"
|
||||
set local "wg" local "wg" + local "award"
|
||||
}
|
||||
else {
|
||||
pay gold local "pledge"
|
||||
set local "lg" local "lg" + local "pledge"
|
||||
}
|
||||
}
|
||||
|
||||
selected text "${7}"
|
||||
next state "init"
|
||||
}
|
||||
|
||||
choice {
|
||||
text "2"
|
||||
|
||||
actions {
|
||||
if (local "wCup" == 1) {
|
||||
award gold local "award"
|
||||
set local "wg" local "wg" + local "award"
|
||||
}
|
||||
else {
|
||||
pay gold local "pledge"
|
||||
set local "lg" local "lg" + local "pledge"
|
||||
}
|
||||
}
|
||||
|
||||
selected text "${7}"
|
||||
next state "init"
|
||||
}
|
||||
|
||||
choice {
|
||||
text "3"
|
||||
|
||||
actions {
|
||||
if (local "wCup" == 2) {
|
||||
award gold local "award"
|
||||
set local "wg" local "wg" + local "award"
|
||||
}
|
||||
else {
|
||||
pay gold local "pledge"
|
||||
set local "lg" local "lg" + local "pledge"
|
||||
}
|
||||
}
|
||||
|
||||
selected text "${8}"
|
||||
next state "init"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user