this is what I have so far:
Basically, there are a few things I know I need to clean up, but im just trying to see results..
Right now, I get colour notes telling me my hand correctly, and it even tells me the card the dealer has, but it isn't actually 'updating' the variable.
Also, when I tried a different approach it would give me errors relating to doing math on a string or something.
Id like to get them both to numbers that I can do things with to determine how I should proceed at the table.
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
expand_variables="y"
match="\'Will you hit\, stay\, or double down\?\'"
regexp="y"
send_to="12"
sequence="100"
>
<send>local DealHand
local MyHand
DealHand = GetVariable("deal_hand")
MyHand = GetVariable("my_hand")
if DealHand == Ace then
SetVariable("deal_hand", "1")
else
if DealHand == Two then
SetVariable("deal_hand", "2")
else
if DealHand == Three then
SetVariable("deal_hand", "3")
else
if DealHand == Four then
SetVariable("deal_hand", "4")
else
if DealHand == Five then
SetVariable("deal_hand", "5")
else
if DealHand == Six then
SetVariable("deal_hand", "6")
else
if DealHand == Seven then
SetVariable("deal_hand", "7")
else
if DealHand == Eight then
SetVariable("deal_hand", "8")
else
if DealHand == Nine then
SetVariable("deal_hand", "9")
else
if DealHand == Ten then
SetVariable("deal_hand", "10")
else
if DealHand == Jack then
SetVariable("deal_hand", "10")
else
if DealHand == Queen then
SetVariable("deal_hand", "10")
else
if DealHand == King then
SetVariable("deal_hand", "10")
end
end
end
end
end
end
end
end
end
end
end
end
end
DealHand = GetVariable("deal_hand")
MyHand = GetVariable("my_hand")
ColourNote ("Black", "Blue", "DealHand is (" .. DealHand .. ")")
ColourNote ("Black", "Blue", "MyHand is (" .. MyHand .. ")")
</send>
</trigger>
<trigger
enabled="y"
match="Your current total is\: *(\d+)*$"
regexp="y"
send_to="9"
sequence="100"
variable="my_hand"
>
<send>%1</send>
</trigger>
<trigger
enabled="y"
match="A blackjack dealer deals (a|an) (.*?) of (.*?) face up to himself\.$"
regexp="y"
send_to="9"
sequence="100"
variable="deal_hand"
>
<send>%2</send>
</trigger>
</triggers>
Basically, there are a few things I know I need to clean up, but im just trying to see results..
Right now, I get colour notes telling me my hand correctly, and it even tells me the card the dealer has, but it isn't actually 'updating' the variable.
Also, when I tried a different approach it would give me errors relating to doing math on a string or something.
Id like to get them both to numbers that I can do things with to determine how I should proceed at the table.